diff --git a/UIX/Microsoft/Iris/Accessibility/Accessible.cs b/UIX/Microsoft/Iris/Accessibility/Accessible.cs index 99025de..481fbd4 100644 --- a/UIX/Microsoft/Iris/Accessibility/Accessible.cs +++ b/UIX/Microsoft/Iris/Accessibility/Accessible.cs @@ -41,7 +41,7 @@ namespace Microsoft.Iris.Accessibility private static readonly DataCookie s_popupStateSlot = DataCookie.ReserveSlot(); private static readonly DataCookie s_multiSelectableStateSlot = DataCookie.ReserveSlot(); - public Accessible() => this.SetData(Accessible.s_roleSlot, AccRole.Client); + public Accessible() => this.SetData(s_roleSlot, AccRole.Client); public void Attach(AccessibleProxy proxy) { @@ -51,7 +51,7 @@ namespace Microsoft.Iris.Accessibility public void Detach() { - this.SetData(Accessible.s_defaultActionCommandSlot, null); + this.SetData(s_defaultActionCommandSlot, null); this._proxy = null; } @@ -59,52 +59,52 @@ namespace Microsoft.Iris.Accessibility public string Description { - get => (string)this.GetData(Accessible.s_descriptionSlot); + get => (string)this.GetData(s_descriptionSlot); set { string description = this.Description; if (!(value != description)) return; - this.SetData(Accessible.s_descriptionSlot, value); + this.SetData(s_descriptionSlot, value); this.FireAccessiblePropertyChanged(NotificationID.Description, AccessibleProperty.Description); } } public string DefaultAction { - get => (string)this.GetData(Accessible.s_defaultActionSlot); + get => (string)this.GetData(s_defaultActionSlot); set { string defaultAction = this.DefaultAction; if (!(value != defaultAction)) return; - this.SetData(Accessible.s_defaultActionSlot, value); + this.SetData(s_defaultActionSlot, value); this.FireAccessiblePropertyChanged(NotificationID.DefaultAction, AccessibleProperty.DefaultAction); } } public IUICommand DefaultActionCommand { - get => (IUICommand)this.GetData(Accessible.s_defaultActionCommandSlot); + get => (IUICommand)this.GetData(s_defaultActionCommandSlot); set { IUICommand defaultActionCommand = this.DefaultActionCommand; if (value == defaultActionCommand) return; - this.SetData(Accessible.s_defaultActionCommandSlot, value); + this.SetData(s_defaultActionCommandSlot, value); this.FireAccessiblePropertyChanged(NotificationID.DefaultActionCommand, AccessibleProperty.DefaultActionCommand); } } public string Help { - get => (string)this.GetData(Accessible.s_helpSlot); + get => (string)this.GetData(s_helpSlot); set { string help = this.Help; if (!(value != help)) return; - this.SetData(Accessible.s_helpSlot, value); + this.SetData(s_helpSlot, value); this.FireAccessiblePropertyChanged(NotificationID.Help, AccessibleProperty.Help); } } @@ -113,7 +113,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_helpTopicSlot); + object data = this.GetData(s_helpTopicSlot); return data != null ? (int)data : -1; } set @@ -121,33 +121,33 @@ namespace Microsoft.Iris.Accessibility int helpTopic = this.HelpTopic; if (value == helpTopic) return; - this.SetData(Accessible.s_helpTopicSlot, value); + this.SetData(s_helpTopicSlot, value); this.FireAccessiblePropertyChanged(NotificationID.HelpTopic, AccessibleProperty.HelpTopic); } } public string KeyboardShortcut { - get => (string)this.GetData(Accessible.s_keyboardShortcutSlot); + get => (string)this.GetData(s_keyboardShortcutSlot); set { string keyboardShortcut = this.KeyboardShortcut; if (!(value != keyboardShortcut)) return; - this.SetData(Accessible.s_keyboardShortcutSlot, value); + this.SetData(s_keyboardShortcutSlot, value); this.FireAccessiblePropertyChanged(NotificationID.KeyboardShortcut, AccessibleProperty.KeyboardShortcut); } } public string Name { - get => (string)this.GetData(Accessible.s_nameSlot); + get => (string)this.GetData(s_nameSlot); set { string name = this.Name; if (!(value != name)) return; - this.SetData(Accessible.s_nameSlot, value); + this.SetData(s_nameSlot, value); this.FireAccessiblePropertyChanged(NotificationID.Name, AccessibleProperty.Name); } } @@ -156,7 +156,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_roleSlot); + object data = this.GetData(s_roleSlot); return data != null ? (AccRole)data : AccRole.None; } set @@ -164,20 +164,20 @@ namespace Microsoft.Iris.Accessibility AccRole role = this.Role; if (value == role) return; - this.SetData(Accessible.s_roleSlot, value); + this.SetData(s_roleSlot, value); this.FireAccessiblePropertyChanged(NotificationID.Role, AccessibleProperty.Role); } } public string Value { - get => (string)this.GetData(Accessible.s_valueSlot); + get => (string)this.GetData(s_valueSlot); set { string str = this.Value; if (!(value != str)) return; - this.SetData(Accessible.s_valueSlot, value); + this.SetData(s_valueSlot, value); this.FireAccessiblePropertyChanged(NotificationID.Value, AccessibleProperty.Value); } } @@ -186,7 +186,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_animatedStateSlot); + object data = this.GetData(s_animatedStateSlot); return data != null && (bool)data; } set @@ -194,7 +194,7 @@ namespace Microsoft.Iris.Accessibility bool isAnimated = this.IsAnimated; if (value == isAnimated) return; - this.SetData(Accessible.s_animatedStateSlot, value); + this.SetData(s_animatedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsAnimated, AccessibleProperty.IsAnimated); } } @@ -203,7 +203,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_unavailableStateSlot); + object data = this.GetData(s_unavailableStateSlot); return data != null && (bool)data; } set @@ -211,7 +211,7 @@ namespace Microsoft.Iris.Accessibility bool isUnavailable = this.IsUnavailable; if (value == isUnavailable) return; - this.SetData(Accessible.s_unavailableStateSlot, value); + this.SetData(s_unavailableStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsUnavailable, AccessibleProperty.IsUnavailable); } } @@ -220,7 +220,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_selectedStateSlot); + object data = this.GetData(s_selectedStateSlot); return data != null && (bool)data; } set @@ -228,7 +228,7 @@ namespace Microsoft.Iris.Accessibility bool isSelected = this.IsSelected; if (value == isSelected) return; - this.SetData(Accessible.s_selectedStateSlot, value); + this.SetData(s_selectedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsSelected, AccessibleProperty.IsSelected); } } @@ -237,7 +237,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_busyStateSlot); + object data = this.GetData(s_busyStateSlot); return data != null && (bool)data; } set @@ -245,7 +245,7 @@ namespace Microsoft.Iris.Accessibility bool isBusy = this.IsBusy; if (value == isBusy) return; - this.SetData(Accessible.s_busyStateSlot, value); + this.SetData(s_busyStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsBusy, AccessibleProperty.IsBusy); } } @@ -254,7 +254,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_pressedStateSlot); + object data = this.GetData(s_pressedStateSlot); return data != null && (bool)data; } set @@ -262,7 +262,7 @@ namespace Microsoft.Iris.Accessibility bool isPressed = this.IsPressed; if (value == isPressed) return; - this.SetData(Accessible.s_pressedStateSlot, value); + this.SetData(s_pressedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsPressed, AccessibleProperty.IsPressed); } } @@ -271,7 +271,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_checkedStateSlot); + object data = this.GetData(s_checkedStateSlot); return data != null && (bool)data; } set @@ -279,7 +279,7 @@ namespace Microsoft.Iris.Accessibility bool isChecked = this.IsChecked; if (value == isChecked) return; - this.SetData(Accessible.s_checkedStateSlot, value); + this.SetData(s_checkedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsChecked, AccessibleProperty.IsChecked); } } @@ -288,7 +288,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_collapsedStateSlot); + object data = this.GetData(s_collapsedStateSlot); return data != null && (bool)data; } set @@ -296,7 +296,7 @@ namespace Microsoft.Iris.Accessibility bool isCollapsed = this.IsCollapsed; if (value == isCollapsed) return; - this.SetData(Accessible.s_collapsedStateSlot, value); + this.SetData(s_collapsedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsCollapsed, AccessibleProperty.IsCollapsed); } } @@ -305,7 +305,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_defaultStateSlot); + object data = this.GetData(s_defaultStateSlot); return data != null && (bool)data; } set @@ -313,7 +313,7 @@ namespace Microsoft.Iris.Accessibility bool isDefault = this.IsDefault; if (value == isDefault) return; - this.SetData(Accessible.s_defaultStateSlot, value); + this.SetData(s_defaultStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsDefault, AccessibleProperty.IsDefault); } } @@ -322,7 +322,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_marqueeStateSlot); + object data = this.GetData(s_marqueeStateSlot); return data != null && (bool)data; } set @@ -330,7 +330,7 @@ namespace Microsoft.Iris.Accessibility bool isMarquee = this.IsMarquee; if (value == isMarquee) return; - this.SetData(Accessible.s_marqueeStateSlot, value); + this.SetData(s_marqueeStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsMarquee, AccessibleProperty.IsMarquee); } } @@ -339,7 +339,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_mixedStateSlot); + object data = this.GetData(s_mixedStateSlot); return data != null && (bool)data; } set @@ -347,7 +347,7 @@ namespace Microsoft.Iris.Accessibility bool isMixed = this.IsMixed; if (value == isMixed) return; - this.SetData(Accessible.s_mixedStateSlot, value); + this.SetData(s_mixedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsMixed, AccessibleProperty.IsMixed); } } @@ -356,7 +356,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_expandedStateSlot); + object data = this.GetData(s_expandedStateSlot); return data != null && (bool)data; } set @@ -364,7 +364,7 @@ namespace Microsoft.Iris.Accessibility bool isExpanded = this.IsExpanded; if (value == isExpanded) return; - this.SetData(Accessible.s_expandedStateSlot, value); + this.SetData(s_expandedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsExpanded, AccessibleProperty.IsExpanded); } } @@ -373,7 +373,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_traversedStateSlot); + object data = this.GetData(s_traversedStateSlot); return data != null && (bool)data; } set @@ -381,7 +381,7 @@ namespace Microsoft.Iris.Accessibility bool isTraversed = this.IsTraversed; if (value == isTraversed) return; - this.SetData(Accessible.s_traversedStateSlot, value); + this.SetData(s_traversedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsTraversed, AccessibleProperty.IsTraversed); } } @@ -390,7 +390,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_selectableStateSlot); + object data = this.GetData(s_selectableStateSlot); return data != null && (bool)data; } set @@ -398,7 +398,7 @@ namespace Microsoft.Iris.Accessibility bool isSelectable = this.IsSelectable; if (value == isSelectable) return; - this.SetData(Accessible.s_selectableStateSlot, value); + this.SetData(s_selectableStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsSelectable, AccessibleProperty.IsSelectable); } } @@ -407,7 +407,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_multiSelectableStateSlot); + object data = this.GetData(s_multiSelectableStateSlot); return data != null && (bool)data; } set @@ -415,7 +415,7 @@ namespace Microsoft.Iris.Accessibility bool isMultiSelectable = this.IsMultiSelectable; if (value == isMultiSelectable) return; - this.SetData(Accessible.s_multiSelectableStateSlot, value); + this.SetData(s_multiSelectableStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsMultiSelectable, AccessibleProperty.IsMultiSelectable); } } @@ -424,7 +424,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_protectedStateSlot); + object data = this.GetData(s_protectedStateSlot); return data != null && (bool)data; } set @@ -432,7 +432,7 @@ namespace Microsoft.Iris.Accessibility bool isProtected = this.IsProtected; if (value == isProtected) return; - this.SetData(Accessible.s_protectedStateSlot, value); + this.SetData(s_protectedStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.IsProtected, AccessibleProperty.IsProtected); } } @@ -441,7 +441,7 @@ namespace Microsoft.Iris.Accessibility { get { - object data = this.GetData(Accessible.s_popupStateSlot); + object data = this.GetData(s_popupStateSlot); return data != null && (bool)data; } set @@ -449,7 +449,7 @@ namespace Microsoft.Iris.Accessibility bool hasPopup = this.HasPopup; if (value == hasPopup) return; - this.SetData(Accessible.s_popupStateSlot, value); + this.SetData(s_popupStateSlot, value); this.FireAccessiblePropertyChanged(NotificationID.HasPopup, AccessibleProperty.HasPopup); } } diff --git a/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs b/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs index 0bc8f2e..a5d0acf 100644 --- a/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs +++ b/UIX/Microsoft/Iris/Accessibility/AccessibleProxy.cs @@ -28,7 +28,7 @@ namespace Microsoft.Iris.Accessibility private int _proxyID = -1; private static int s_proxyIDAllocator = 0; private static Map s_proxyFromID = new Map(); - private static DeferredHandler s_notifyEventHandler = new DeferredHandler(AccessibleProxy.NotifyEvent); + private static DeferredHandler s_notifyEventHandler = new DeferredHandler(NotifyEvent); private static bool s_accessibilityActive; internal AccessibleProxy(UIClass ui, Accessible data) @@ -47,13 +47,13 @@ namespace Microsoft.Iris.Accessibility this._ui = null; if (this._proxyID == -1) return; - AccessibleProxy.s_proxyFromID.Remove(this._proxyID); + s_proxyFromID.Remove(this._proxyID); } internal static bool AccessibilityActive { - get => AccessibleProxy.s_accessibilityActive; - set => AccessibleProxy.s_accessibilityActive = true; + get => s_accessibilityActive; + set => s_accessibilityActive = true; } internal virtual IAccessible Parent => this._ui.Parent != null ? _ui.Parent.AccessibleProxy : null; @@ -197,35 +197,35 @@ namespace Microsoft.Iris.Accessibility internal static void NotifyCreated(UIClass ui) { - if (!AccessibleProxy.AccessibilityActive) + if (!AccessibilityActive) return; ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectCreate); } internal static void NotifyDestroyed(UIClass ui) { - if (!AccessibleProxy.AccessibilityActive) + if (!AccessibilityActive) return; ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectDestroy); } internal static void NotifyTreeChanged(UIClass ui) { - if (!AccessibleProxy.AccessibilityActive || !ui.Initialized) + if (!AccessibilityActive || !ui.Initialized) return; ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectReorder); } internal static void NotifyVisibilityChange(UIClass ui, bool visible) { - if (!AccessibleProxy.AccessibilityActive || !ui.Initialized) + if (!AccessibilityActive || !ui.Initialized) return; ui.AccessibleProxy.QueueNotifyEvent(visible ? AccEvents.ObjectShow : AccEvents.ObjectHide); } internal static void NotifyFocus(UIClass ui) { - if (!AccessibleProxy.AccessibilityActive || !ui.Initialized) + if (!AccessibilityActive || !ui.Initialized) return; ui.AccessibleProxy.QueueNotifyEvent(AccEvents.ObjectFocus); } @@ -295,7 +295,7 @@ namespace Microsoft.Iris.Accessibility this, (int) eventType }; - DeferredCall.Post(DispatchPriority.AppEvent, AccessibleProxy.s_notifyEventHandler, obj); + DeferredCall.Post(DispatchPriority.AppEvent, s_notifyEventHandler, obj); } private static void NotifyEvent(object payload) @@ -519,8 +519,8 @@ namespace Microsoft.Iris.Accessibility { if (this._proxyID == -1) { - this._proxyID = ++AccessibleProxy.s_proxyIDAllocator; - AccessibleProxy.s_proxyFromID[this._proxyID] = this; + this._proxyID = ++s_proxyIDAllocator; + s_proxyFromID[this._proxyID] = this; } return this._proxyID; } @@ -529,7 +529,7 @@ namespace Microsoft.Iris.Accessibility internal static AccessibleProxy AccessibleProxyFromID(int proxyID) { AccessibleProxy accessibleProxy; - AccessibleProxy.s_proxyFromID.TryGetValue(proxyID, out accessibleProxy); + s_proxyFromID.TryGetValue(proxyID, out accessibleProxy); return accessibleProxy; } diff --git a/UIX/Microsoft/Iris/Animations/ActiveSequence.cs b/UIX/Microsoft/Iris/Animations/ActiveSequence.cs index af995f1..01eb6d4 100644 --- a/UIX/Microsoft/Iris/Animations/ActiveSequence.cs +++ b/UIX/Microsoft/Iris/Animations/ActiveSequence.cs @@ -176,7 +176,7 @@ namespace Microsoft.Iris.Animations ActiveTransitions activeTransitions = ActiveTransitions.None; foreach (AnimationProxy animationProxy in animationCollection) { - ActiveTransitions activeTransition = ActiveSequence.ConvertToActiveTransition(animationProxy.Type); + ActiveTransitions activeTransition = ConvertToActiveTransition(animationProxy.Type); activeTransitions |= activeTransition; } return activeTransitions; diff --git a/UIX/Microsoft/Iris/Animations/Animation.cs b/UIX/Microsoft/Iris/Animations/Animation.cs index 2422e68..22ab76c 100644 --- a/UIX/Microsoft/Iris/Animations/Animation.cs +++ b/UIX/Microsoft/Iris/Animations/Animation.cs @@ -41,18 +41,18 @@ namespace Microsoft.Iris.Animations base.CloneWorker(rawAnimation); Animation animation = (Animation)rawAnimation; animation.Type = this.Type; - if (this.GetBit(Animation.Bits.CenterPointScale)) + if (this.GetBit(Bits.CenterPointScale)) animation.CenterPointPercent = this.CenterPointPercent; - if (this.GetBit(Animation.Bits.RotationAxis)) + if (this.GetBit(Bits.RotationAxis)) animation.RotationAxis = this.RotationAxis; animation.DisableMouseInput = this.DisableMouseInput; } private void PrepareToPlay(ref AnimationArgs args) { - if (this.GetBit(Animation.Bits.CenterPointScale)) + if (this.GetBit(Bits.CenterPointScale)) args.ViewItem.VisualCenterPoint = this.CenterPointPercent; - if (!this.GetBit(Animation.Bits.RotationAxis)) + if (!this.GetBit(Bits.RotationAxis)) return; Rotation visualRotation = args.ViewItem.VisualRotation; args.ViewItem.VisualRotation = new Rotation(visualRotation.AngleRadians, this.RotationAxis); @@ -66,32 +66,32 @@ namespace Microsoft.Iris.Animations public Vector3 CenterPointPercent { - get => !this.GetBit(Animation.Bits.CenterPointScale) ? Vector3.Zero : (Vector3)this.GetData(Animation.s_centerPointScaleProperty); + get => !this.GetBit(Bits.CenterPointScale) ? Vector3.Zero : (Vector3)this.GetData(s_centerPointScaleProperty); set { if (!(this.CenterPointPercent != value)) return; - this.SetData(Animation.s_centerPointScaleProperty, value); - this.SetBit(Animation.Bits.CenterPointScale, true); + this.SetData(s_centerPointScaleProperty, value); + this.SetBit(Bits.CenterPointScale, true); } } public Vector3 RotationAxis { - get => !this.GetBit(Animation.Bits.RotationAxis) ? Rotation.Default.Axis : (Vector3)this.GetData(Animation.s_rotationAxisProperty); + get => !this.GetBit(Bits.RotationAxis) ? Rotation.Default.Axis : (Vector3)this.GetData(s_rotationAxisProperty); set { if (!(this.RotationAxis != value)) return; - this.SetData(Animation.s_rotationAxisProperty, value); - this.SetBit(Animation.Bits.RotationAxis, true); + this.SetData(s_rotationAxisProperty, value); + this.SetBit(Bits.RotationAxis, true); } } public bool DisableMouseInput { - get => this.GetBit(Animation.Bits.DisableMouseInput); - set => this.SetBit(Animation.Bits.DisableMouseInput, value); + get => this.GetBit(Bits.DisableMouseInput); + set => this.SetBit(Bits.DisableMouseInput, value); } AnimationTemplate IAnimationProvider.Build( diff --git a/UIX/Microsoft/Iris/Animations/AnimationProxy.cs b/UIX/Microsoft/Iris/Animations/AnimationProxy.cs index 2849878..f763706 100644 --- a/UIX/Microsoft/Iris/Animations/AnimationProxy.cs +++ b/UIX/Microsoft/Iris/Animations/AnimationProxy.cs @@ -22,7 +22,7 @@ namespace Microsoft.Iris.Animations private bool _doNotAutoReleaseFlag; private IAnimatable _animatableTarget; private RendererProperty _rendererProperty; - private static DeferredHandler s_deferredCleanupWorker = new DeferredHandler(AnimationProxy.DeferredCleanupWorker); + private static DeferredHandler s_deferredCleanupWorker = new DeferredHandler(DeferredCleanupWorker); internal AnimationProxy( ActiveSequence activeSequence, @@ -91,7 +91,7 @@ namespace Microsoft.Iris.Animations } else animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, AnimationProxy.GenerateInterpolation(keyframe.Interpolation))); + this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); } public void AddVector2Keyframe(BaseKeyframe keyframe, Vector2 value) @@ -115,7 +115,7 @@ namespace Microsoft.Iris.Animations } else animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, AnimationProxy.GenerateInterpolation(keyframe.Interpolation))); + this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); } public void AddVector3Keyframe(BaseKeyframe keyframe, Vector3 value) @@ -139,7 +139,7 @@ namespace Microsoft.Iris.Animations } else animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, AnimationProxy.GenerateInterpolation(keyframe.Interpolation))); + this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); } public void AddVector4Keyframe(BaseKeyframe keyframe, Vector4 value) @@ -163,7 +163,7 @@ namespace Microsoft.Iris.Animations } else animationInput1 = new ConstantAnimationInput(value); - this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, AnimationProxy.GenerateInterpolation(keyframe.Interpolation))); + this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, GenerateInterpolation(keyframe.Interpolation))); } public void AddRotationKeyframe(BaseKeyframe keyframe, Rotation value) @@ -188,7 +188,7 @@ namespace Microsoft.Iris.Animations } else animationInput1 = new ConstantAnimationInput(new Quaternion(value.Axis, value.AngleRadians)); - AnimationInterpolation interpolation = AnimationProxy.GenerateInterpolation(keyframe.Interpolation); + AnimationInterpolation interpolation = GenerateInterpolation(keyframe.Interpolation); interpolation.UseSphericalCombination = true; this._animation.AddKeyframe(new AnimationKeyframe(keyframe.Time, animationInput1, interpolation)); } @@ -266,7 +266,7 @@ namespace Microsoft.Iris.Animations { if (!this.Session.IsValid) return; - DeferredCall.Post(DispatchPriority.Housekeeping, AnimationProxy.s_deferredCleanupWorker, this); + DeferredCall.Post(DispatchPriority.Housekeeping, s_deferredCleanupWorker, this); } } diff --git a/UIX/Microsoft/Iris/Animations/AnimationSystem.cs b/UIX/Microsoft/Iris/Animations/AnimationSystem.cs index 5ee7e1c..7561ebb 100644 --- a/UIX/Microsoft/Iris/Animations/AnimationSystem.cs +++ b/UIX/Microsoft/Iris/Animations/AnimationSystem.cs @@ -20,62 +20,62 @@ namespace Microsoft.Iris.Animations { } - public static bool SequenceExists(string id) => AnimationSystem._sequences.ContainsKey(id); + public static bool SequenceExists(string id) => _sequences.ContainsKey(id); public static AnimationTemplate GetSequenceByID(string id) { - if (!AnimationSystem.Enabled) + if (!Enabled) return null; - return AnimationSystem.SequenceExists(id) ? (AnimationTemplate)AnimationSystem._sequences[id].Clone() : null; + return SequenceExists(id) ? (AnimationTemplate)_sequences[id].Clone() : null; } - public static AnimationTemplate GetSequenceByIDAlways(string id) => AnimationSystem.SequenceExists(id) ? (AnimationTemplate)AnimationSystem._sequences[id].Clone() : null; + public static AnimationTemplate GetSequenceByIDAlways(string id) => SequenceExists(id) ? (AnimationTemplate)_sequences[id].Clone() : null; public static void AddSequenceByID(string id, AnimationTemplate seq) { - if (AnimationSystem.SequenceExists(id)) + if (SequenceExists(id)) return; - AnimationSystem._sequences.Add(id, seq); + _sequences.Add(id, seq); } - public static void ClearSequences() => AnimationSystem._sequences = new Dictionary(); + public static void ClearSequences() => _sequences = new Dictionary(); public static ICollection GetAllSequences() => _sequences.Values; - public static bool Enabled => AnimationSystem._enabledFlag; + public static bool Enabled => _enabledFlag; - public static void SetEnableState(bool value) => AnimationSystem._enabledFlag = value; + public static void SetEnableState(bool value) => _enabledFlag = value; public static void OverrideAnimationState(bool overrideToFalseFlag) { - if (AnimationSystem._overrideToFalseFlag == overrideToFalseFlag) + if (_overrideToFalseFlag == overrideToFalseFlag) return; - AnimationSystem._overrideToFalseFlag = overrideToFalseFlag; - AnimationSystem.UpdateAnimationState(); + _overrideToFalseFlag = overrideToFalseFlag; + UpdateAnimationState(); } public static void UpdateAnimationState() { bool flag = true; - if (AnimationSystem._disableAnimationCount > 0 || AnimationSystem._overrideToFalseFlag) + if (_disableAnimationCount > 0 || _overrideToFalseFlag) flag = false; - AnimationSystem.SetEnableState(flag); + SetEnableState(flag); } public static void PushDisableAnimations() { - ++AnimationSystem._disableAnimationCount; - if (AnimationSystem._disableAnimationCount != 1) + ++_disableAnimationCount; + if (_disableAnimationCount != 1) return; - AnimationSystem.UpdateAnimationState(); + UpdateAnimationState(); } public static void PopDisableAnimations() { - --AnimationSystem._disableAnimationCount; - if (AnimationSystem._disableAnimationCount != 0) + --_disableAnimationCount; + if (_disableAnimationCount != 0) return; - AnimationSystem.UpdateAnimationState(); + UpdateAnimationState(); } } } diff --git a/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs b/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs index 57ae029..1b38dd6 100644 --- a/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs +++ b/UIX/Microsoft/Iris/Animations/AnimationTemplate.cs @@ -121,7 +121,7 @@ namespace Microsoft.Iris.Animations for (int index = 0; index < count; ++index) { BaseKeyframe keyframes = this._keyframesList[index]; - if (AnimationTemplate.IsSameTime(time, keyframes.Time)) + if (IsSameTime(time, keyframes.Time)) return keyframes; } return null; diff --git a/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs b/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs index 3db384d..2b10075 100644 --- a/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs +++ b/UIX/Microsoft/Iris/Animations/BaseKeyframe.cs @@ -19,22 +19,22 @@ namespace Microsoft.Iris.Animations static BaseKeyframe() { - BaseKeyframe.s_propertyMap[0] = new RendererProperty("Position"); - BaseKeyframe.s_propertyMap[1] = new RendererProperty("Size"); - BaseKeyframe.s_propertyMap[2] = new RendererProperty("Alpha"); - BaseKeyframe.s_propertyMap[3] = new RendererProperty("Scale"); - BaseKeyframe.s_propertyMap[4] = new RendererProperty("Rotation"); - BaseKeyframe.s_propertyMap[5] = new RendererProperty("Orientation"); - BaseKeyframe.s_propertyMap[6] = new RendererProperty("Position", "X", "X00"); - BaseKeyframe.s_propertyMap[7] = new RendererProperty("Position", "Y", "0X0"); - BaseKeyframe.s_propertyMap[8] = new RendererProperty("Size", "X", "X0"); - BaseKeyframe.s_propertyMap[9] = new RendererProperty("Size", "Y", "0X"); - BaseKeyframe.s_propertyMap[10] = new RendererProperty("Scale", "X", "X00"); - BaseKeyframe.s_propertyMap[11] = new RendererProperty("Scale", "Y", "0X0"); - BaseKeyframe.s_propertyMap[16] = new RendererProperty("CameraEye"); - BaseKeyframe.s_propertyMap[17] = new RendererProperty("CameraAt"); - BaseKeyframe.s_propertyMap[18] = new RendererProperty("CameraUp"); - BaseKeyframe.s_propertyMap[19] = new RendererProperty("CameraZn"); + s_propertyMap[0] = new RendererProperty("Position"); + s_propertyMap[1] = new RendererProperty("Size"); + s_propertyMap[2] = new RendererProperty("Alpha"); + s_propertyMap[3] = new RendererProperty("Scale"); + s_propertyMap[4] = new RendererProperty("Rotation"); + s_propertyMap[5] = new RendererProperty("Orientation"); + s_propertyMap[6] = new RendererProperty("Position", "X", "X00"); + s_propertyMap[7] = new RendererProperty("Position", "Y", "0X0"); + s_propertyMap[8] = new RendererProperty("Size", "X", "X0"); + s_propertyMap[9] = new RendererProperty("Size", "Y", "0X"); + s_propertyMap[10] = new RendererProperty("Scale", "X", "X00"); + s_propertyMap[11] = new RendererProperty("Scale", "Y", "0X0"); + s_propertyMap[16] = new RendererProperty("CameraEye"); + s_propertyMap[17] = new RendererProperty("CameraAt"); + s_propertyMap[18] = new RendererProperty("CameraUp"); + s_propertyMap[19] = new RendererProperty("CameraZn"); } public BaseKeyframe() @@ -66,7 +66,7 @@ namespace Microsoft.Iris.Animations string property) { StopCommand stopCommand = anim.GetStopCommand(this.Type); - RendererProperty rendererProperty = property != null ? new RendererProperty(property) : BaseKeyframe.s_propertyMap[(int)this.Type]; + RendererProperty rendererProperty = property != null ? new RendererProperty(property) : s_propertyMap[(int)this.Type]; return new AnimationProxy(aseq, aseq.Target, this.Type, rendererProperty, anim.Loop, stopCommand); } diff --git a/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs b/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs index a03ad4a..1ed565a 100644 --- a/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs +++ b/UIX/Microsoft/Iris/Animations/PositionKeyframe.cs @@ -20,7 +20,7 @@ namespace Microsoft.Iris.Animations Vector3 baseValueVector, ref AnimationArgs args) { - return PositionKeyframe.GetEffectivePositionValue(this.RelativeTo, targetObject, baseValueVector, ref args); + return GetEffectivePositionValue(this.RelativeTo, targetObject, baseValueVector, ref args); } public static Vector3 GetEffectivePositionValue( diff --git a/UIX/Microsoft/Iris/Animations/RelativeTo.cs b/UIX/Microsoft/Iris/Animations/RelativeTo.cs index a68ceb3..1605934 100644 --- a/UIX/Microsoft/Iris/Animations/RelativeTo.cs +++ b/UIX/Microsoft/Iris/Animations/RelativeTo.cs @@ -26,7 +26,7 @@ namespace Microsoft.Iris.Animations public RelativeTo(SnapshotPolicy snapshot) => this._snapshot = snapshot; - public bool IsRelativeToObject => this._sourceObject != null || this._sourceId != 0 || this == RelativeTo.s_current || this == RelativeTo.s_currentSnapshotOnLoop; + public bool IsRelativeToObject => this._sourceObject != null || this._sourceId != 0 || this == s_current || this == s_currentSnapshotOnLoop; public IAnimatable Source { @@ -70,13 +70,13 @@ namespace Microsoft.Iris.Animations set => this._add = value; } - public static RelativeTo Absolute => RelativeTo.s_absolute; + public static RelativeTo Absolute => s_absolute; - public static RelativeTo Current => RelativeTo.s_current; + public static RelativeTo Current => s_current; - public static RelativeTo CurrentSnapshotOnLoop => RelativeTo.s_currentSnapshotOnLoop; + public static RelativeTo CurrentSnapshotOnLoop => s_currentSnapshotOnLoop; - public static RelativeTo Final => RelativeTo.s_final; + public static RelativeTo Final => s_final; public AnimationInput CreateAnimationInput( IAnimatable defaultSource, @@ -126,13 +126,13 @@ namespace Microsoft.Iris.Animations public override string ToString() { - if (this == RelativeTo.s_absolute) + if (this == s_absolute) return "Absolute"; - if (this == RelativeTo.s_current) + if (this == s_current) return "Current"; - if (this == RelativeTo.s_currentSnapshotOnLoop) + if (this == s_currentSnapshotOnLoop) return "CurrentSnapshotOnLoop"; - return this == RelativeTo.s_final ? "Final" : string.Format("[Object = {0}, Property = {1}]", this._sourceObject != null ? _sourceObject : (object)this._sourceId, _sourceProperty); + return this == s_final ? "Final" : string.Format("[Object = {0}, Property = {1}]", this._sourceObject != null ? _sourceObject : (object)this._sourceId, _sourceProperty); } } } diff --git a/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs b/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs index 74171eb..d698fbb 100644 --- a/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs +++ b/UIX/Microsoft/Iris/Animations/ScaleKeyframe.cs @@ -23,7 +23,7 @@ namespace Microsoft.Iris.Animations Vector3 baseValueVector, ref AnimationArgs args) { - return ScaleKeyframe.GetEffectiveScaleValue(this.RelativeTo, targetObject, baseValueVector, ref args); + return GetEffectiveScaleValue(this.RelativeTo, targetObject, baseValueVector, ref args); } public static Vector3 GetEffectiveScaleValue( diff --git a/UIX/Microsoft/Iris/Animations/TransformAnimation.cs b/UIX/Microsoft/Iris/Animations/TransformAnimation.cs index 61ba366..e28bcac 100644 --- a/UIX/Microsoft/Iris/Animations/TransformAnimation.cs +++ b/UIX/Microsoft/Iris/Animations/TransformAnimation.cs @@ -83,7 +83,7 @@ namespace Microsoft.Iris.Animations bool flag3 = magnitude != 1.0; int filter = (int)this._filter; AnimationTemplate anim1 = base.BuildWorker(ref args); - TransformAnimation.DumpAnimation(anim1, "Source"); + DumpAnimation(anim1, "Source"); if (!flag1 && !flag2 && !flag3) return anim1; AnimationTemplate anim2 = (AnimationTemplate)anim1.Clone(); @@ -118,7 +118,7 @@ namespace Microsoft.Iris.Animations if (this.ShouldApplyTransform(keyframe)) keyframe.Time *= timeScaleValue; } - TransformAnimation.DumpAnimation(anim, "Result"); + DumpAnimation(anim, "Result"); } private void ApplyTimeOffset(AnimationTemplate anim, float timeOffsetValue) @@ -135,7 +135,7 @@ namespace Microsoft.Iris.Animations } foreach (BaseKeyframe key in arrayList) anim.AddKeyframe(key); - TransformAnimation.DumpAnimation(anim, "Result"); + DumpAnimation(anim, "Result"); } private void ApplyMagnitude(AnimationTemplate anim, float magnitudeValue) @@ -145,7 +145,7 @@ namespace Microsoft.Iris.Animations if (this.ShouldApplyTransform(keyframe)) keyframe.MagnifyValue(magnitudeValue); } - TransformAnimation.DumpAnimation(anim, "Result"); + DumpAnimation(anim, "Result"); } private KeyframeFilter GetKeyframeFilter(BaseKeyframe key) diff --git a/UIX/Microsoft/Iris/Application.cs b/UIX/Microsoft/Iris/Application.cs index 8183bff..d20db36 100644 --- a/UIX/Microsoft/Iris/Application.cs +++ b/UIX/Microsoft/Iris/Application.cs @@ -25,7 +25,7 @@ namespace Microsoft.Iris { public static class Application { - private static Application.InitializationState s_initializationState = Application.InitializationState.NotInitialized; + private static Application.InitializationState s_initializationState = InitializationState.NotInitialized; private static UISession s_session; private static Window s_mainWindow; private static bool s_isShuttingDown; @@ -47,11 +47,11 @@ namespace Microsoft.Iris { get { - if (Application.s_initializationState != Application.InitializationState.FullyInitialized) + if (s_initializationState != InitializationState.FullyInitialized) throw new InvalidOperationException("Application.Initialize must be called prior Window query"); - if (Application.s_mainWindow == null) - Application.s_mainWindow = new Window((UIForm)Application.s_session.Form); - return Application.s_mainWindow; + if (s_mainWindow == null) + s_mainWindow = new Window((UIForm)s_session.Form); + return s_mainWindow; } } @@ -59,74 +59,74 @@ namespace Microsoft.Iris { set { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - Application.s_renderType = value; + s_renderType = value; } - get => Application.s_renderType; + get => s_renderType; } public static SoundType SoundType { set { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - Application.s_soundType = value; + s_soundType = value; } - get => Application.s_soundType; + get => s_soundType; } public static RenderingQuality RenderingQuality { set { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - Application.s_renderingQuality = value; + s_renderingQuality = value; } - get => Application.s_renderingQuality; + get => s_renderingQuality; } public static bool AnimationsEnabled { set { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - Application.s_EnableAnimations = value; + s_EnableAnimations = value; } - get => Application.s_EnableAnimations; + get => s_EnableAnimations; } public static bool IsRTL { set { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Property cannot be modified after application has been initialized"); - Application.s_IsRTL = value; + s_IsRTL = value; } - get => Application.s_IsRTL; + get => s_IsRTL; } public static bool IsDx9AccelerationAvailable { get { - if (Application.s_initializationState != Application.InitializationState.FullyInitialized) + if (s_initializationState != InitializationState.FullyInitialized) throw new InvalidOperationException("Application.Initialize must be called prior to DX9 check"); - return Application.s_session.IsGraphicsDeviceAvailable(GraphicsDeviceType.Direct3D9); + return s_session.IsGraphicsDeviceAvailable(GraphicsDeviceType.Direct3D9); } } - private static bool IsInitialized => Application.s_initializationState != Application.InitializationState.NotInitialized; + private static bool IsInitialized => s_initializationState != InitializationState.NotInitialized; public static bool StaticDllResourcesOnly { set { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Property cannot be modified after application has been initialized"); DllResources.StaticDllResourcesOnly = value; } @@ -135,63 +135,63 @@ namespace Microsoft.Iris public static void Initialize() { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Application already initialized"); - Application.VerifyTrustedEnvironment(); - Application.s_session = new UISession(); - Application.s_session.IsRtl = Application.s_IsRTL; - Application.s_session.InputManager.KeyCoalescePolicy = new KeyCoalesceFilter(Application.QueryKeyCoalesce); - GraphicsDeviceType graphicsType = Application.ChooseRenderingGraphicsDevice(Application.s_renderType); + VerifyTrustedEnvironment(); + s_session = new UISession(); + s_session.IsRtl = s_IsRTL; + s_session.InputManager.KeyCoalescePolicy = new KeyCoalesceFilter(QueryKeyCoalesce); + GraphicsDeviceType graphicsType = ChooseRenderingGraphicsDevice(s_renderType); switch (graphicsType) { case GraphicsDeviceType.Gdi: - Application.s_renderType = RenderingType.GDI; + s_renderType = RenderingType.GDI; break; case GraphicsDeviceType.Direct3D9: - Application.s_renderType = RenderingType.DX9; + s_renderType = RenderingType.DX9; break; default: throw new ArgumentException(InvariantString.Format("Unknown graphics type {0}", graphicsType)); } if (graphicsType == GraphicsDeviceType.Gdi) - Application.s_EnableAnimations = false; - SoundDeviceType soundType = Application.ChooseRendererSoundDevice(Application.s_soundType); + s_EnableAnimations = false; + SoundDeviceType soundType = ChooseRendererSoundDevice(s_soundType); switch (soundType) { case SoundDeviceType.None: - Application.s_soundType = SoundType.None; + s_soundType = SoundType.None; break; case SoundDeviceType.DirectSound8: - Application.s_soundType = SoundType.DirectSound; + s_soundType = SoundType.DirectSound; break; default: throw new ArgumentException(InvariantString.Format("Unknown sound type {0}", soundType)); } - Application.s_session.InitializeRenderingDevices(graphicsType, (GraphicsRenderingQuality)Application.s_renderingQuality, soundType); - Application.s_renderingQuality = (RenderingQuality)Application.s_session.RenderSession.GraphicsDevice.RenderingQuality; - Application.InitializeCommon(true); - if (!Application.s_EnableAnimations) + s_session.InitializeRenderingDevices(graphicsType, (GraphicsRenderingQuality)s_renderingQuality, soundType); + s_renderingQuality = (RenderingQuality)s_session.RenderSession.GraphicsDevice.RenderingQuality; + InitializeCommon(true); + if (!s_EnableAnimations) AnimationSystem.OverrideAnimationState(true); - UIForm uiForm = new UIForm(Application.s_session); - Application.s_initializationState = Application.InitializationState.FullyInitialized; + UIForm uiForm = new UIForm(s_session); + s_initializationState = InitializationState.FullyInitialized; } private static void InitializeCommon(bool fullInitialization) { - ErrorManager.OnErrors += new NotifyErrorBatch(Application.NotifyErrorBatchHandler); - Microsoft.Iris.Debug.Trace.Initialize(); + ErrorManager.OnErrors += new NotifyErrorBatch(NotifyErrorBatchHandler); + Debug.Trace.Initialize(); MarkupSystem.Startup(!fullInitialization); StaticServices.Initialize(); } public static void InitializeForToolOnly() { - if (Application.IsInitialized) + if (IsInitialized) throw new InvalidOperationException("Application has already been initialized"); RenderApi.InitializeForToolOnly(); UIDispatcher uiDispatcher = new UIDispatcher(true); - Application.InitializeCommon(false); - Application.s_initializationState = Application.InitializationState.InitializedWithoutUI; + InitializeCommon(false); + s_initializationState = InitializationState.InitializedWithoutUI; } public static bool IsApplicationThread => UIDispatcher.IsUIThread; @@ -262,42 +262,42 @@ namespace Microsoft.Iris public static void Run(DeferredInvokeHandler initialLoadComplete) { UIDispatcher.VerifyOnApplicationThread(); - if (Application.s_initializationState != Application.InitializationState.FullyInitialized) + if (s_initializationState != InitializationState.FullyInitialized) throw new InvalidOperationException("Application not initialized for displaying UI"); if (initialLoadComplete != null) - ((UIForm)Application.s_session.Form).SetInitialLoadCompleteCallback(DeferredInvokeProxy.Thunk(initialLoadComplete)); + ((UIForm)s_session.Form).SetInitialLoadCompleteCallback(DeferredInvokeProxy.Thunk(initialLoadComplete)); UIApplication.Run(); } - public static void Run() => Application.Run(null); + public static void Run() => Run(null); public static event EventHandler ShuttingDown; - public static bool IsShuttingDown => Application.s_isShuttingDown; + public static bool IsShuttingDown => s_isShuttingDown; public static void Shutdown() { UIDispatcher.VerifyOnApplicationThread(); - Application.s_isShuttingDown = true; - if (Application.ShuttingDown != null) - Application.ShuttingDown(null, EventArgs.Empty); + s_isShuttingDown = true; + if (ShuttingDown != null) + ShuttingDown(null, EventArgs.Empty); MarkupSystem.Shutdown(); - if (Application.s_initializationState == Application.InitializationState.FullyInitialized) + if (s_initializationState == InitializationState.FullyInitialized) { - Application.s_session.Dispose(); - Application.s_session = null; + s_session.Dispose(); + s_session = null; } - if (Application.s_initializationState == Application.InitializationState.InitializedWithoutUI) + if (s_initializationState == InitializationState.InitializedWithoutUI) RenderApi.ShutdownForToolOnly(); StaticServices.Uninitialize(); - Microsoft.Iris.Debug.Trace.Shutdown(); - ErrorManager.OnErrors -= new NotifyErrorBatch(Application.NotifyErrorBatchHandler); - Application.s_initializationState = Application.InitializationState.NotInitialized; + Debug.Trace.Shutdown(); + ErrorManager.OnErrors -= new NotifyErrorBatch(NotifyErrorBatchHandler); + s_initializationState = InitializationState.NotInitialized; } - public static void DeferredInvoke(DeferredInvokeHandler method, DeferredInvokePriority priority) => Application.DeferredInvoke(method, null, priority); + public static void DeferredInvoke(DeferredInvokeHandler method, DeferredInvokePriority priority) => DeferredInvoke(method, null, priority); - public static void DeferredInvoke(DeferredInvokeHandler method, object args) => Application.DeferredInvoke(method, args, DeferredInvokePriority.Normal); + public static void DeferredInvoke(DeferredInvokeHandler method, object args) => DeferredInvoke(method, args, DeferredInvokePriority.Normal); public static void DeferredInvoke( DeferredInvokeHandler method, @@ -321,7 +321,7 @@ namespace Microsoft.Iris DeferredCall.Post(priority1, DeferredInvokeProxy.Thunk(method), args); } - public static void DeferredInvoke(DeferredInvokeHandler method, TimeSpan delay) => Application.DeferredInvoke(method, null, delay); + public static void DeferredInvoke(DeferredInvokeHandler method, TimeSpan delay) => DeferredInvoke(method, null, delay); public static void DeferredInvoke(DeferredInvokeHandler method, object args, TimeSpan delay) { @@ -330,7 +330,7 @@ namespace Microsoft.Iris DeferredCall.Post(delay, DeferredInvokeProxy.Thunk(method), args); } - public static void DeferredInvoke(Thread thread, DeferredInvokeHandler method) => Application.DeferredInvoke(thread, method, null); + public static void DeferredInvoke(Thread thread, DeferredInvokeHandler method) => DeferredInvoke(thread, method, null); public static void DeferredInvoke(Thread thread, DeferredInvokeHandler method, object args) { @@ -379,11 +379,11 @@ namespace Microsoft.Iris public static int CreateExternalAnimationInput(IDictionary propertyNameToId) { UIDispatcher.VerifyOnApplicationThread(); - if (Application.s_idToExternalAnimationInput == null) - Application.s_idToExternalAnimationInput = new Dictionary(); + if (s_idToExternalAnimationInput == null) + s_idToExternalAnimationInput = new Dictionary(); SimpleAnimationPropertyMap animationPropertyMap = new SimpleAnimationPropertyMap(propertyNameToId); - IExternalAnimationInput externalAnimationInput = Application.s_session.RenderSession.AnimationSystem.CreateExternalAnimationInput(s_idToExternalAnimationInput, animationPropertyMap); - Application.s_idToExternalAnimationInput.Add((int)externalAnimationInput.UniqueId, externalAnimationInput); + IExternalAnimationInput externalAnimationInput = s_session.RenderSession.AnimationSystem.CreateExternalAnimationInput(s_idToExternalAnimationInput, animationPropertyMap); + s_idToExternalAnimationInput.Add((int)externalAnimationInput.UniqueId, externalAnimationInput); return (int)externalAnimationInput.UniqueId; } @@ -391,14 +391,14 @@ namespace Microsoft.Iris { UIDispatcher.VerifyOnApplicationThread(); IExternalAnimationInput externalAnimationInput; - if (Application.s_idToExternalAnimationInput == null || !Application.s_idToExternalAnimationInput.TryGetValue(animationId, out externalAnimationInput)) + if (s_idToExternalAnimationInput == null || !s_idToExternalAnimationInput.TryGetValue(animationId, out externalAnimationInput)) return; - Application.s_idToExternalAnimationInput.Remove(animationId); + s_idToExternalAnimationInput.Remove(animationId); externalAnimationInput.UnregisterUsage(s_idToExternalAnimationInput); IAnimationInputProvider animationInputProvider; - if (Application.s_animationProviders == null || !Application.s_animationProviders.TryGetValue(animationId, out animationInputProvider)) + if (s_animationProviders == null || !s_animationProviders.TryGetValue(animationId, out animationInputProvider)) return; - Application.s_animationProviders.Remove(animationId); + s_animationProviders.Remove(animationId); animationInputProvider.UnregisterUsage(s_idToExternalAnimationInput); } @@ -407,8 +407,8 @@ namespace Microsoft.Iris { UIDispatcher.VerifyOnApplicationThread(); IExternalAnimationInput externalAnimationInput = null; - if (Application.s_idToExternalAnimationInput != null) - Application.s_idToExternalAnimationInput.TryGetValue(animationId, out externalAnimationInput); + if (s_idToExternalAnimationInput != null) + s_idToExternalAnimationInput.TryGetValue(animationId, out externalAnimationInput); return externalAnimationInput; } @@ -419,12 +419,12 @@ namespace Microsoft.Iris { UIDispatcher.VerifyOnApplicationThread(); IAnimationInputProvider provider; - if (Application.s_animationProviders == null || !Application.s_animationProviders.TryGetValue(animationId, out provider)) + if (s_animationProviders == null || !s_animationProviders.TryGetValue(animationId, out provider)) { - provider = Application.MapExternalAnimationInput(animationId).CreateProvider(s_idToExternalAnimationInput); - if (Application.s_animationProviders == null) - Application.s_animationProviders = new Dictionary(); - Application.s_animationProviders.Add(animationId, provider); + provider = MapExternalAnimationInput(animationId).CreateProvider(s_idToExternalAnimationInput); + if (s_animationProviders == null) + s_animationProviders = new Dictionary(); + s_animationProviders.Add(animationId, provider); } provider.PublishFloat(property, value); } @@ -433,7 +433,7 @@ namespace Microsoft.Iris private static void NotifyErrorBatchHandler(IList records) { - if (Application.ErrorReport == null) + if (ErrorReport == null) return; Error[] errors = new Error[records.Count]; for (int index = 0; index < records.Count; ++index) @@ -448,7 +448,7 @@ namespace Microsoft.Iris Column = record.Column }; } - Application.ErrorReport(errors); + ErrorReport(errors); } private static GraphicsDeviceType ChooseRenderingGraphicsDevice( @@ -467,7 +467,7 @@ namespace Microsoft.Iris default: throw new ArgumentException(InvariantString.Format("Unknown rendering type {0}", type)); } - if (type == RenderingType.Default && !Application.s_session.IsGraphicsDeviceRecommended(graphicsType) || !Application.s_session.IsGraphicsDeviceAvailable(graphicsType)) + if (type == RenderingType.Default && !s_session.IsGraphicsDeviceRecommended(graphicsType) || !s_session.IsGraphicsDeviceAvailable(graphicsType)) graphicsType = GraphicsDeviceType.Gdi; return graphicsType; } @@ -478,7 +478,7 @@ namespace Microsoft.Iris return SoundDeviceType.None; if (typeRequested != SoundType.DirectSound) throw new ArgumentException(InvariantString.Format("Unknown sound type {0}", typeRequested)); - return Application.s_session.IsSoundDeviceAvailable(SoundDeviceType.DirectSound8) ? SoundDeviceType.DirectSound8 : SoundDeviceType.None; + return s_session.IsSoundDeviceAvailable(SoundDeviceType.DirectSound8) ? SoundDeviceType.DirectSound8 : SoundDeviceType.None; } private static bool QueryKeyCoalesce(Keys key) => true; diff --git a/UIX/Microsoft/Iris/Choice.cs b/UIX/Microsoft/Iris/Choice.cs index 662569c..0b0488a 100644 --- a/UIX/Microsoft/Iris/Choice.cs +++ b/UIX/Microsoft/Iris/Choice.cs @@ -249,12 +249,12 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(Choice.s_chosenChangedEvent, value); + this.AddEventHandler(s_chosenChangedEvent, value); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(Choice.s_chosenChangedEvent, value); + this.RemoveEventHandler(s_chosenChangedEvent, value); } } @@ -315,7 +315,7 @@ namespace Microsoft.Iris private void FireChangedChosenEvent() { - if (this.GetEventHandler(Choice.s_chosenChangedEvent) is EventHandler eventHandler) + if (this.GetEventHandler(s_chosenChangedEvent) is EventHandler eventHandler) eventHandler(this, EventArgs.Empty); this.OnChosenChanged(); } diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs index fbeb9dd..1593a72 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllInterfaceProxy.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.CodeModel.Cpp { protected IntPtr _interface; - ~DllInterfaceProxy() => DllProxyObject.RegisterAppThreadRelease(new DllProxyObject.AppThreadReleaseEntry(this._interface)); + ~DllInterfaceProxy() => RegisterAppThreadRelease(new DllProxyObject.AppThreadReleaseEntry(this._interface)); protected override void OnDispose() => new DllProxyObject.AppThreadReleaseEntry(this._interface).Release(); diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs index 009036b..7e86936 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllIntrinsicTypeSchema.cs @@ -18,7 +18,7 @@ namespace Microsoft.Iris.CodeModel.Cpp this._baseType = ObjectSchema.Type; this._name = InvariantString.Format(" {0}", equivalentType.Name); this._marshalAs = ID; - TypeSchema.RegisterOneWayEquivalence(this, equivalentType); + RegisterOneWayEquivalence(this, equivalentType); } } } diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs index 2d705e8..7908bd0 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResult.cs @@ -30,23 +30,23 @@ namespace Microsoft.Iris.CodeModel.Cpp { DllLoadResultFactory.Startup(); DllProxyServices.Startup(); - DllLoadResult.LoadIntrinsicTypeData(); + LoadIntrinsicTypeData(); } private static void LoadIntrinsicTypeData() { - DllLoadResult.s_intrinsicData = new Map(); - DllLoadResult.s_intrinsicData[4294967294U] = new DllLoadResult.IntrinsicTypeData(BooleanSchema.Type); - DllLoadResult.s_intrinsicData[4294967293U] = new DllLoadResult.IntrinsicTypeData(ByteSchema.Type); - DllLoadResult.s_intrinsicData[4294967292U] = new DllLoadResult.IntrinsicTypeData(DoubleSchema.Type); - DllLoadResult.s_intrinsicData[4294967285U] = new DllLoadResult.IntrinsicTypeData(ListSchema.Type, typeof(DllProxyList)); - DllLoadResult.s_intrinsicData[4294967284U] = new DllLoadResult.IntrinsicTypeData(ImageSchema.Type); - DllLoadResult.s_intrinsicData[4294967283U] = new DllLoadResult.IntrinsicTypeData(Int32Schema.Type); - DllLoadResult.s_intrinsicData[4294967282U] = new DllLoadResult.IntrinsicTypeData(Int64Schema.Type); - DllLoadResult.s_intrinsicData[4294967280U] = new DllLoadResult.IntrinsicTypeData(ObjectSchema.Type); - DllLoadResult.s_intrinsicData[4294967279U] = new DllLoadResult.IntrinsicTypeData(SingleSchema.Type); - DllLoadResult.s_intrinsicData[4294967278U] = new DllLoadResult.IntrinsicTypeData(StringSchema.Type); - DllLoadResult.s_intrinsicData[4294967277U] = new DllLoadResult.IntrinsicTypeData(VoidSchema.Type); + s_intrinsicData = new Map(); + s_intrinsicData[4294967294U] = new DllLoadResult.IntrinsicTypeData(BooleanSchema.Type); + s_intrinsicData[4294967293U] = new DllLoadResult.IntrinsicTypeData(ByteSchema.Type); + s_intrinsicData[4294967292U] = new DllLoadResult.IntrinsicTypeData(DoubleSchema.Type); + s_intrinsicData[4294967285U] = new DllLoadResult.IntrinsicTypeData(ListSchema.Type, typeof(DllProxyList)); + s_intrinsicData[4294967284U] = new DllLoadResult.IntrinsicTypeData(ImageSchema.Type); + s_intrinsicData[4294967283U] = new DllLoadResult.IntrinsicTypeData(Int32Schema.Type); + s_intrinsicData[4294967282U] = new DllLoadResult.IntrinsicTypeData(Int64Schema.Type); + s_intrinsicData[4294967280U] = new DllLoadResult.IntrinsicTypeData(ObjectSchema.Type); + s_intrinsicData[4294967279U] = new DllLoadResult.IntrinsicTypeData(SingleSchema.Type); + s_intrinsicData[4294967278U] = new DllLoadResult.IntrinsicTypeData(StringSchema.Type); + s_intrinsicData[4294967277U] = new DllLoadResult.IntrinsicTypeData(VoidSchema.Type); } public static void Shutdown() => DllProxyServices.Shutdown(); @@ -59,13 +59,13 @@ namespace Microsoft.Iris.CodeModel.Cpp return false; } - private bool CheckNativeReturn(uint hr) => DllLoadResult.CheckNativeReturn(hr, "IUIXTypeSchema"); + private bool CheckNativeReturn(uint hr) => CheckNativeReturn(hr, "IUIXTypeSchema"); - public static void PushContext(LoadResult newContext) => DllLoadResult.s_objectContext = newContext; + public static void PushContext(LoadResult newContext) => s_objectContext = newContext; - public static LoadResult CurrentContext => DllLoadResult.s_objectContext; + public static LoadResult CurrentContext => s_objectContext; - public static void PopContext() => DllLoadResult.s_objectContext = null; + public static void PopContext() => s_objectContext = null; public static TypeSchema MapType(uint typeID) { @@ -78,7 +78,7 @@ namespace Microsoft.Iris.CodeModel.Cpp if (dllLoadResult != null) typeSchema = dllLoadResult.MapLocalType(typeID); } - else if (DllLoadResult.CurrentContext is DllLoadResult currentContext) + else if (CurrentContext is DllLoadResult currentContext) typeSchema = currentContext.MapIntrinsicType(typeID); if (typeSchema == null) ErrorManager.ReportError("Unable to find type with ID '0x{0:X8}' in '{1}'", typeID, dllLoadResult != null ? dllLoadResult.Uri : string.Empty); @@ -91,7 +91,7 @@ namespace Microsoft.Iris.CodeModel.Cpp this._intrinsicTypes = new Map(); TypeSchema typeSchema; DllLoadResult.IntrinsicTypeData intrinsicTypeData; - if (!this._intrinsicTypes.TryGetValue(typeID, out typeSchema) && DllLoadResult.s_intrinsicData.TryGetValue(typeID, out intrinsicTypeData)) + if (!this._intrinsicTypes.TryGetValue(typeID, out typeSchema) && s_intrinsicData.TryGetValue(typeID, out intrinsicTypeData)) { typeSchema = !intrinsicTypeData.DemandCreateTypeSchema ? intrinsicTypeData.FrameworkEquivalent : new DllIntrinsicTypeSchema(this, typeID, intrinsicTypeData.FrameworkEquivalent); this._intrinsicTypes[typeID] = typeSchema; @@ -113,7 +113,7 @@ namespace Microsoft.Iris.CodeModel.Cpp this._status = LoadResultStatus.Loading; this._schema = nativeSchema; this._loadPass = LoadPass.Invalid; - this._component = DllLoadResult.s_nextID++; + this._component = s_nextID++; } public override void Load(LoadPass pass) @@ -291,7 +291,7 @@ namespace Microsoft.Iris.CodeModel.Cpp public override LoadResultStatus Status => this._status; - public override LoadResult[] Dependencies => LoadResult.EmptyList; + public override LoadResult[] Dependencies => EmptyList; public override bool Cachable => true; @@ -305,7 +305,7 @@ namespace Microsoft.Iris.CodeModel.Cpp else { DllLoadResult.IntrinsicTypeData intrinsicTypeData; - if (DllLoadResult.s_intrinsicData.TryGetValue(marshalAs, out intrinsicTypeData)) + if (s_intrinsicData.TryGetValue(marshalAs, out intrinsicTypeData)) type = intrinsicTypeData.MarshalAsRuntimeType; } return type; diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs index 840b0f1..fed5c2f 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllLoadResultFactory.cs @@ -22,19 +22,19 @@ namespace Microsoft.Iris.CodeModel.Cpp private static Map s_loadResultIDCache = new Map(); private static Map s_dllFactoriesCache = new Map(); - public static void Startup() => MarkupSystem.RegisterFactoryByProtocol("dll://", new CreateLoadResultHandler(DllLoadResultFactory.GetLoadResult)); + public static void Startup() => MarkupSystem.RegisterFactoryByProtocol("dll://", new CreateLoadResultHandler(GetLoadResult)); public static DllLoadResult GetLoadResultByID(uint id) { DllLoadResult dllLoadResult; - DllLoadResultFactory.s_loadResultIDCache.TryGetValue(id, out dllLoadResult); + s_loadResultIDCache.TryGetValue(id, out dllLoadResult); return dllLoadResult; } private static LoadResult GetLoadResult(string uri) { DllLoadResult dllLoadResult; - if (DllLoadResultFactory.s_loadResultCache.TryGetValue(uri, out dllLoadResult)) + if (s_loadResultCache.TryGetValue(uri, out dllLoadResult)) return dllLoadResult; int length = uri.IndexOf('!'); string str; @@ -50,16 +50,16 @@ namespace Microsoft.Iris.CodeModel.Cpp qualifier = null; } DllLoadResultFactory loadResultFactory; - if (!DllLoadResultFactory.s_dllFactoriesCache.TryGetValue(str, out loadResultFactory)) + if (!s_dllFactoriesCache.TryGetValue(str, out loadResultFactory)) { loadResultFactory = new DllLoadResultFactory(str); - DllLoadResultFactory.s_dllFactoriesCache[str] = loadResultFactory; + s_dllFactoriesCache[str] = loadResultFactory; } DllLoadResult loadResult = loadResultFactory.GetLoadResult(uri, qualifier); if (loadResult != null) { - DllLoadResultFactory.s_loadResultCache[uri] = loadResult; - DllLoadResultFactory.s_loadResultIDCache[loadResult.SchemaComponent] = loadResult; + s_loadResultCache[uri] = loadResult; + s_loadResultIDCache[loadResult.SchemaComponent] = loadResult; } return loadResult; } @@ -76,7 +76,7 @@ namespace Microsoft.Iris.CodeModel.Cpp protected override void OnDispose() { base.OnDispose(); - DllLoadResultFactory.s_dllFactoriesCache.Remove(this._dllName); + s_dllFactoriesCache.Remove(this._dllName); if (this._schemaFactory != IntPtr.Zero) { NativeApi.SpReleaseExternalObject(this._schemaFactory); @@ -110,8 +110,8 @@ namespace Microsoft.Iris.CodeModel.Cpp public void NotifyLoadResultDisposed(DllLoadResult loadResult) { - DllLoadResultFactory.s_loadResultCache.Remove(loadResult.Uri); - DllLoadResultFactory.s_loadResultIDCache.Remove(loadResult.SchemaComponent); + s_loadResultCache.Remove(loadResult.Uri); + s_loadResultIDCache.Remove(loadResult.SchemaComponent); this.UnregisterUsage(loadResult); } } diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs index 44c018f..4f5c58f 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllPropertySchema.cs @@ -54,11 +54,11 @@ namespace Microsoft.Iris.CodeModel.Cpp public override TypeSchema AlternateType => (TypeSchema)null; - public override bool CanRead => this.GetBit(DllPropertySchema.Bits.CanRead); + public override bool CanRead => this.GetBit(Bits.CanRead); - public override bool CanWrite => this.GetBit(DllPropertySchema.Bits.CanWrite); + public override bool CanWrite => this.GetBit(Bits.CanWrite); - public override bool IsStatic => this.GetBit(DllPropertySchema.Bits.IsStatic); + public override bool IsStatic => this.GetBit(Bits.IsStatic); public override ExpressionRestriction ExpressionRestriction => ExpressionRestriction.None; @@ -66,7 +66,7 @@ namespace Microsoft.Iris.CodeModel.Cpp public override RangeValidator RangeValidator => (RangeValidator)null; - public override bool NotifiesOnChange => this.GetBit(DllPropertySchema.Bits.NotifiesOnChange); + public override bool NotifiesOnChange => this.GetBit(Bits.NotifiesOnChange); private DllTypeSchema OwnerTypeSchema => (DllTypeSchema)this.Owner; @@ -106,7 +106,7 @@ namespace Microsoft.Iris.CodeModel.Cpp bool canRead; if (this.CheckNativeReturn(NativeApi.SpQueryPropertyCanRead(property, out canRead))) { - this.SetBit(DllPropertySchema.Bits.CanRead, canRead); + this.SetBit(Bits.CanRead, canRead); flag = true; } return flag; @@ -118,7 +118,7 @@ namespace Microsoft.Iris.CodeModel.Cpp bool canWrite; if (this.CheckNativeReturn(NativeApi.SpQueryPropertyCanWrite(property, out canWrite))) { - this.SetBit(DllPropertySchema.Bits.CanWrite, canWrite); + this.SetBit(Bits.CanWrite, canWrite); flag = true; } return flag; @@ -130,7 +130,7 @@ namespace Microsoft.Iris.CodeModel.Cpp bool isStatic; if (this.CheckNativeReturn(NativeApi.SpQueryPropertyIsStatic(property, out isStatic))) { - this.SetBit(DllPropertySchema.Bits.IsStatic, isStatic); + this.SetBit(Bits.IsStatic, isStatic); flag = true; } return flag; @@ -144,7 +144,7 @@ namespace Microsoft.Iris.CodeModel.Cpp bool notifiesOnChange; if (this.CheckNativeReturn(NativeApi.SpQueryPropertyNotifiesOnChange(property, out notifiesOnChange))) { - this.SetBit(DllPropertySchema.Bits.NotifiesOnChange, notifiesOnChange); + this.SetBit(Bits.NotifiesOnChange, notifiesOnChange); flag = true; } return flag; diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs index 528d961..8f112ea 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyObject.cs @@ -21,19 +21,19 @@ namespace Microsoft.Iris.CodeModel.Cpp private static object s_finalizeLock = new object(); private static bool s_pendingAppThreadRelease = false; private static Vector s_pendingReleases; - private static SimpleCallback s_releaseOnAppThread = new SimpleCallback(DllProxyObject.ReleaseFinalizedObjects); + private static SimpleCallback s_releaseOnAppThread = new SimpleCallback(ReleaseFinalizedObjects); private static DllProxyObjectHandleTable s_handleTable; - public static void CreateHandleTable() => DllProxyObject.s_handleTable = new DllProxyObjectHandleTable(); + public static void CreateHandleTable() => s_handleTable = new DllProxyObjectHandleTable(); public static void ReleaseOutstandingProxies() { - DllProxyObject.s_pendingAppThreadRelease = true; + s_pendingAppThreadRelease = true; GC.Collect(); GC.WaitForPendingFinalizers(); foreach (IDisposableObject disposableObject in s_handleTable) disposableObject.Dispose(disposableObject); - DllProxyObject.ReleaseFinalizedObjects(); + ReleaseFinalizedObjects(); } public static DllProxyObject Wrap(IntPtr nativeObject) @@ -45,7 +45,7 @@ namespace Microsoft.Iris.CodeModel.Cpp TypeSchema type = DllLoadResult.MapType(typeID); if (type != null) { - dllProxyObject = DllProxyObject.GetExistingProxy(nativeObject) ?? DllProxyObject.WrapNewObject(nativeObject, type); + dllProxyObject = GetExistingProxy(nativeObject) ?? WrapNewObject(nativeObject, type); NativeApi.SpReleaseExternalObject(nativeObject); } return dllProxyObject; @@ -56,7 +56,7 @@ namespace Microsoft.Iris.CodeModel.Cpp DllProxyObject dllProxyObject = null; ulong state; NativeApi.SpGetStateCache(nativeObject, out state); - if (state != 0UL && !DllProxyObject.s_handleTable.LookupByHandle(state, out dllProxyObject)) + if (state != 0UL && !s_handleTable.LookupByHandle(state, out dllProxyObject)) ErrorManager.ReportError("IUIXObject::GetStateCache retrieved unexpected value"); return dllProxyObject; } @@ -66,7 +66,7 @@ namespace Microsoft.Iris.CodeModel.Cpp DllProxyObject dllProxyObject = null; uint marshalAs; IntPtr nativeImpl; - if (DllProxyObject.DetermineProxyInterfaceForObject(nativeObject, type, out marshalAs, out nativeImpl)) + if (DetermineProxyInterfaceForObject(nativeObject, type, out marshalAs, out nativeImpl)) { switch (marshalAs) { @@ -108,7 +108,7 @@ namespace Microsoft.Iris.CodeModel.Cpp flag = true; nativeImpl = IntPtr.Zero; } - else if (DllProxyObject.CheckNativeReturn(NativeApi.SpQueryForMarshalAsInterface(nativeObject, marshalAs, out nativeImpl)) && nativeImpl != IntPtr.Zero) + else if (CheckNativeReturn(NativeApi.SpQueryForMarshalAsInterface(nativeObject, marshalAs, out nativeImpl)) && nativeImpl != IntPtr.Zero) flag = true; else ErrorManager.ReportError("Object didn't implement expected interface '{0}'", marshalAs); @@ -117,19 +117,19 @@ namespace Microsoft.Iris.CodeModel.Cpp protected DllProxyObject() => this._handle = 0UL; - ~DllProxyObject() => DllProxyObject.RegisterAppThreadRelease(new DllProxyObject.AppThreadReleaseEntry(this._nativeObject, this._handle, this.OwningLoadResult)); + ~DllProxyObject() => RegisterAppThreadRelease(new DllProxyObject.AppThreadReleaseEntry(this._nativeObject, this._handle, this.OwningLoadResult)); protected static void RegisterAppThreadRelease(DllProxyObject.AppThreadReleaseEntry entry) { - lock (DllProxyObject.s_finalizeLock) + lock (s_finalizeLock) { - if (DllProxyObject.s_pendingReleases == null) - DllProxyObject.s_pendingReleases = new Vector(); - DllProxyObject.s_pendingReleases.Add(entry); - if (DllProxyObject.s_pendingAppThreadRelease) + if (s_pendingReleases == null) + s_pendingReleases = new Vector(); + s_pendingReleases.Add(entry); + if (s_pendingAppThreadRelease) return; - DllProxyObject.s_pendingAppThreadRelease = true; - DeferredCall.Post(DispatchPriority.Idle, DllProxyObject.s_releaseOnAppThread); + s_pendingAppThreadRelease = true; + DeferredCall.Post(DispatchPriority.Idle, s_releaseOnAppThread); } } @@ -138,7 +138,7 @@ namespace Microsoft.Iris.CodeModel.Cpp this._type = type; this._nativeObject = nativeObject; this.OwningLoadResult.RegisterProxyUsage(); - this._handle = DllProxyObject.s_handleTable.RegisterProxy(this); + this._handle = s_handleTable.RegisterProxy(this); NativeApi.SpSetStateCache(this._nativeObject, this._handle); NativeApi.SpAddRefExternalObject(this._nativeObject); this.LoadWorker(nativeObject, marshalAs); @@ -151,7 +151,7 @@ namespace Microsoft.Iris.CodeModel.Cpp public static HRESULT OnChangeNotification(IntPtr nativeObject, uint id) { HRESULT hresult = new HRESULT(0); - DllProxyObject existingProxy = DllProxyObject.GetExistingProxy(nativeObject); + DllProxyObject existingProxy = GetExistingProxy(nativeObject); if (existingProxy != null) { string id1 = null; @@ -204,22 +204,22 @@ namespace Microsoft.Iris.CodeModel.Cpp private static void ReleaseFinalizedObjects() { Vector pendingReleases; - lock (DllProxyObject.s_finalizeLock) + lock (s_finalizeLock) { - pendingReleases = DllProxyObject.s_pendingReleases; - DllProxyObject.s_pendingReleases = null; - DllProxyObject.s_pendingAppThreadRelease = false; + pendingReleases = s_pendingReleases; + s_pendingReleases = null; + s_pendingAppThreadRelease = false; } if (pendingReleases == null || pendingReleases.Count == 0) return; foreach (DllProxyObject.AppThreadReleaseEntry threadReleaseEntry in pendingReleases) threadReleaseEntry.Release(); - lock (DllProxyObject.s_finalizeLock) + lock (s_finalizeLock) { - if (DllProxyObject.s_pendingAppThreadRelease) + if (s_pendingAppThreadRelease) return; pendingReleases.Clear(); - DllProxyObject.s_pendingReleases = pendingReleases; + s_pendingReleases = pendingReleases; } } @@ -256,7 +256,7 @@ namespace Microsoft.Iris.CodeModel.Cpp { if (this._releaseHandle) { - DllProxyObject.s_handleTable.ReleaseProxy(this._handle); + s_handleTable.ReleaseProxy(this._handle); ulong state; NativeApi.SpGetStateCache(this._nativeObject, out state); if ((long)this._handle == (long)state) diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs index a69cc0a..43d0afe 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllProxyServices.cs @@ -22,7 +22,7 @@ namespace Microsoft.Iris.CodeModel.Cpp public static void Startup() { DllProxyObject.CreateHandleTable(); - DllProxyServices.s_stringTable = new StringProxyHandleTable(); + s_stringTable = new StringProxyHandleTable(); int num = (int)NativeApi.SpRegisterNativeServicesCallbacks(new DllProxyServices()); } @@ -31,7 +31,7 @@ namespace Microsoft.Iris.CodeModel.Cpp DllProxyObject.ReleaseOutstandingProxies(); NativeMarkupDataType.ReleaseOutstandingProxies(); NativeApi.SpUnregisterNativeServicesCallbacks(); - DllProxyServices.s_stringTable = null; + s_stringTable = null; } HRESULT IRawUIXServices.NotifyChangeForObject( @@ -43,7 +43,7 @@ namespace Microsoft.Iris.CodeModel.Cpp private static void Crash(string message) => throw new Exception(message); - void IRawUIXServices.Crash(string message) => DllProxyServices.Crash(message); + void IRawUIXServices.Crash(string message) => Crash(message); public static string GetString(IntPtr nativeStringObject) { @@ -54,7 +54,7 @@ namespace Microsoft.Iris.CodeModel.Cpp NativeApi.SpGetStringHandle(nativeStringObject, out handle); if (handle == 0UL) NativeApi.SpConvertStringToManaged(nativeStringObject, out handle); - DllProxyServices.s_stringTable.LookupByHandle(handle, out str); + s_stringTable.LookupByHandle(handle, out str); NativeApi.SpReleaseExternalObject(nativeStringObject); } return str; @@ -63,22 +63,22 @@ namespace Microsoft.Iris.CodeModel.Cpp public static void CreateNativeString(string value, out IntPtr nativeObject) { nativeObject = IntPtr.Zero; - if (value == null || NativeApi.SpCreateNativeString(DllProxyServices.AllocateStringHandle(value), value.Length, out nativeObject)) + if (value == null || NativeApi.SpCreateNativeString(AllocateStringHandle(value), value.Length, out nativeObject)) return; - DllProxyServices.Crash("Unable to allocate string"); + Crash("Unable to allocate string"); } unsafe ulong IRawUIXServices.AllocateString(char* value, out int length) { string str = new string(value); length = str.Length; - return DllProxyServices.AllocateStringHandle(str); + return AllocateStringHandle(str); } private static ulong AllocateStringHandle(string value) { ulong handle; - DllProxyServices.s_stringTable.GetStringHandle(value, out handle); + s_stringTable.GetStringHandle(value, out handle); return handle; } @@ -88,20 +88,20 @@ namespace Microsoft.Iris.CodeModel.Cpp uint targetSize) { string source; - DllProxyServices.s_stringTable.LookupByHandle(handle, out source); + s_stringTable.LookupByHandle(handle, out source); NativeApi.SpCopyString(source, target, targetSize); } unsafe char* IRawUIXServices.PinString(ulong handle) { char* chPtr; - DllProxyServices.s_stringTable.PinString(handle, out chPtr); + s_stringTable.PinString(handle, out chPtr); return chPtr; } - void IRawUIXServices.UnpinString(ulong handle) => DllProxyServices.s_stringTable.UnpinString(handle); + void IRawUIXServices.UnpinString(ulong handle) => s_stringTable.UnpinString(handle); - void IRawUIXServices.ReleaseString(ulong handle) => DllProxyServices.s_stringTable.ReleaseStringHandle(handle, out string _); + void IRawUIXServices.ReleaseString(ulong handle) => s_stringTable.ReleaseStringHandle(handle, out string _); public static UIImage GetImage(IntPtr nativeImageObject) { @@ -154,9 +154,9 @@ namespace Microsoft.Iris.CodeModel.Cpp public static void CreateNativeImage(UIImage image, out IntPtr nativeObject) { nativeObject = IntPtr.Zero; - if (image == null || !NativeApi.SpCreateNativeImage(DllProxyServices.GetImageHandle(image, image.Source), image.Source, out nativeObject).IsError()) + if (image == null || !NativeApi.SpCreateNativeImage(GetImageHandle(image, image.Source), image.Source, out nativeObject).IsError()) return; - DllProxyServices.Crash("Unable to allocate native image object"); + Crash("Unable to allocate native image object"); } private static ulong GetImageHandle(UIImage image, string source) => (ulong)GCHandle.ToIntPtr(GCHandle.Alloc(image)).ToInt64(); @@ -168,8 +168,8 @@ namespace Microsoft.Iris.CodeModel.Cpp Size maximumSize; bool flippable; bool antialiasEdges; - DllProxyServices.CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); - return DllProxyServices.GetImageHandle(new UriImage(uri, Inset.Zero, maximumSize, flippable, antialiasEdges), uri); + CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); + return GetImageHandle(new UriImage(uri, Inset.Zero, maximumSize, flippable, antialiasEdges), uri); } unsafe ulong IRawUIXServices.AllocateImageFromBits( @@ -182,9 +182,9 @@ namespace Microsoft.Iris.CodeModel.Cpp Size maximumSize; bool flippable; bool antialiasEdges; - DllProxyServices.CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); + CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); Size imageSize = new Size(imageInfo->width, imageInfo->height); - return DllProxyServices.GetImageHandle(new RawImage(ID, imageSize, imageInfo->stride, surfaceFormat, imageInfo->bits, true, Inset.Zero, maximumSize, flippable, antialiasEdges), ID); + return GetImageHandle(new RawImage(ID, imageSize, imageInfo->stride, surfaceFormat, imageInfo->bits, true, Inset.Zero, maximumSize, flippable, antialiasEdges), ID); } unsafe void IRawUIXServices.RemoveCachedImage( @@ -194,7 +194,7 @@ namespace Microsoft.Iris.CodeModel.Cpp Size maximumSize; bool flippable; bool antialiasEdges; - DllProxyServices.CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); + CrackDecodeParams(decodeParams, out maximumSize, out flippable, out antialiasEdges); UriImage.RemoveCache(ID, maximumSize, flippable, antialiasEdges); } diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs index 03399c0..9e89f7f 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchema.cs @@ -96,7 +96,7 @@ namespace Microsoft.Iris.CodeModel.Cpp bool isRuntimeImmutable; if (this.CheckNativeReturn(NativeApi.SpIsRuntimeImmutable(this._type, out isRuntimeImmutable))) { - this.SetBit(DllTypeSchemaBase.Bits.IsRuntimeImmutable, isRuntimeImmutable); + this.SetBit(Bits.IsRuntimeImmutable, isRuntimeImmutable); flag = true; } return flag; @@ -148,7 +148,7 @@ namespace Microsoft.Iris.CodeModel.Cpp this._constructors[new MethodSignatureKey(constructorSchema.ParameterTypes)] = constructorSchema; if (constructorSchema.ParameterTypes.Length == 0) { - this.SetBit(DllTypeSchemaBase.Bits.HasDefaultConstructor, true); + this.SetBit(Bits.HasDefaultConstructor, true); this._defaultConstructorID = ID; } flag = idVerifier.RegisterID(ID); @@ -293,7 +293,7 @@ namespace Microsoft.Iris.CodeModel.Cpp case uint.MaxValue: return flag; case 4294967285: - TypeSchema.RegisterOneWayEquivalence(this, ListSchema.Type); + RegisterOneWayEquivalence(this, ListSchema.Type); goto case 4294967281; default: ErrorManager.ReportError("Invalid MarshalAs '{0}' returned from IUIXType::MarshalAs", _marshalAs); @@ -416,7 +416,7 @@ namespace Microsoft.Iris.CodeModel.Cpp if (NativeApi.SUCCEEDED(hr)) dllProxyObject = DllProxyObject.Wrap(nativeObject); else - this.ReportError(hr, DllTypeSchema.ErrorContext.Construct, this, watermark); + this.ReportError(hr, ErrorContext.Construct, this, watermark); if ((IntPtr)uixVariantPtr != IntPtr.Zero) UIXVariant.CleanupMarshalledObjects(uixVariantPtr, count); return dllProxyObject; @@ -434,7 +434,7 @@ namespace Microsoft.Iris.CodeModel.Cpp if (NativeApi.SUCCEEDED(propertyValue2)) obj = UIXVariant.GetValue(propertyValue1, this.Owner); else - this.ReportError(propertyValue2, DllTypeSchema.ErrorContext.PropertyGet, property, watermark); + this.ReportError(propertyValue2, ErrorContext.PropertyGet, property, watermark); return obj; } @@ -449,7 +449,7 @@ namespace Microsoft.Iris.CodeModel.Cpp ErrorWatermark watermark = ErrorManager.Watermark; uint hr = NativeApi.SpSetPropertyValue(this._type, nativeObject, property.ID, uixVariantPtr); if (NativeApi.FAILED(hr)) - this.ReportError(hr, DllTypeSchema.ErrorContext.PropertySet, property, watermark); + this.ReportError(hr, ErrorContext.PropertySet, property, watermark); UIXVariant.CleanupMarshalledObject(uixVariantPtr); } @@ -475,7 +475,7 @@ namespace Microsoft.Iris.CodeModel.Cpp if (NativeApi.SUCCEEDED(hr)) obj = UIXVariant.GetValue(returnValue, this.Owner); else - this.ReportError(hr, DllTypeSchema.ErrorContext.MethodInvoke, method, watermark); + this.ReportError(hr, ErrorContext.MethodInvoke, method, watermark); if ((IntPtr)uixVariantPtr != IntPtr.Zero) UIXVariant.CleanupMarshalledObjects(uixVariantPtr, count); return obj; @@ -490,7 +490,7 @@ namespace Microsoft.Iris.CodeModel.Cpp if (NativeApi.SUCCEEDED(hr)) str = DllProxyServices.GetString(nativeStringObject); else - this.ReportError(hr, DllTypeSchema.ErrorContext.ToString, this, watermark); + this.ReportError(hr, ErrorContext.ToString, this, watermark); return str; } @@ -507,23 +507,23 @@ namespace Microsoft.Iris.CodeModel.Cpp string message; switch (contextType) { - case DllTypeSchema.ErrorContext.MethodInvoke: + case ErrorContext.MethodInvoke: DllMethodSchema dllMethodSchema = (DllMethodSchema)context; message = string.Format("Error 0x{0:X8} occurred invoking method {1}.{2} from {3}.", hr, dllMethodSchema.Owner.Name, dllMethodSchema.Name, dllMethodSchema.Owner.Owner.Uri); break; - case DllTypeSchema.ErrorContext.ToString: + case ErrorContext.ToString: DllTypeSchema dllTypeSchema1 = (DllTypeSchema)context; message = string.Format("Error 0x{0:X8} occurred invoking ToString on type {1} from {2}.", hr, dllTypeSchema1.Name, dllTypeSchema1.Owner.Uri); break; - case DllTypeSchema.ErrorContext.PropertyGet: + case ErrorContext.PropertyGet: DllPropertySchema dllPropertySchema1 = (DllPropertySchema)context; message = string.Format("Error 0x{0:X8} occurred reading property {1}.{2} from {3}.", hr, dllPropertySchema1.Owner.Name, dllPropertySchema1.Name, dllPropertySchema1.Owner.Owner.Uri); break; - case DllTypeSchema.ErrorContext.PropertySet: + case ErrorContext.PropertySet: DllPropertySchema dllPropertySchema2 = (DllPropertySchema)context; message = string.Format("Error 0x{0:X8} occurred writing property {1}.{2} from {3}.", hr, dllPropertySchema2.Owner.Name, dllPropertySchema2.Name, dllPropertySchema2.Owner.Owner.Uri); break; - case DllTypeSchema.ErrorContext.Construct: + case ErrorContext.Construct: DllTypeSchema dllTypeSchema2 = (DllTypeSchema)context; message = string.Format("Error 0x{0:X8} occurred constructing object of type {1} from {2}.", hr, dllTypeSchema2.Name, dllTypeSchema2.Owner.Uri); break; diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs index 5de08ff..49b5cb1 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/DllTypeSchemaBase.cs @@ -64,9 +64,9 @@ namespace Microsoft.Iris.CodeModel.Cpp public override int FindTypeHint => (int)this._typeID; - public override bool HasDefaultConstructor => this.GetBit(DllTypeSchemaBase.Bits.HasDefaultConstructor); + public override bool HasDefaultConstructor => this.GetBit(Bits.HasDefaultConstructor); - public override bool IsRuntimeImmutable => this.GetBit(DllTypeSchemaBase.Bits.IsRuntimeImmutable); + public override bool IsRuntimeImmutable => this.GetBit(Bits.IsRuntimeImmutable); public override ConstructorSchema FindConstructor(TypeSchema[] parameters) { diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs index c0562ac..9a7bb1e 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/ProxyHandleTable.cs @@ -14,7 +14,7 @@ namespace Microsoft.Iris.CodeModel.Cpp private uint _tableIndex; private static uint s_tableCount; - protected ProxyHandleTable() => this._tableIndex = ProxyHandleTable.s_tableCount++; + protected ProxyHandleTable() => this._tableIndex = s_tableCount++; protected uint TableIndex => this._tableIndex; diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs index d94c44a..09e3680 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/StringProxyHandleTable.cs @@ -15,9 +15,9 @@ namespace Microsoft.Iris.CodeModel.Cpp public bool GetStringHandle(string value, out ulong handle) { - if (StringProxyHandleTable.s_stringToHandleLookup == null) - StringProxyHandleTable.s_stringToHandleLookup = new Map(); - bool flag = StringProxyHandleTable.s_stringToHandleLookup.TryGetValue(value, out handle); + if (s_stringToHandleLookup == null) + s_stringToHandleLookup = new Map(); + bool flag = s_stringToHandleLookup.TryGetValue(value, out handle); if (flag) { this.AddRefHandle(handle); @@ -25,7 +25,7 @@ namespace Microsoft.Iris.CodeModel.Cpp else { handle = this.AllocateHandle(value); - StringProxyHandleTable.s_stringToHandleLookup[value] = handle; + s_stringToHandleLookup[value] = handle; } return !flag; } @@ -34,7 +34,7 @@ namespace Microsoft.Iris.CodeModel.Cpp { bool flag = this.ReleaseHandle(handle, out value); if (flag) - StringProxyHandleTable.s_stringToHandleLookup.Remove(value); + s_stringToHandleLookup.Remove(value); return flag; } @@ -42,10 +42,10 @@ namespace Microsoft.Iris.CodeModel.Cpp public unsafe int PinString(ulong handle, out char* value) { - if (StringProxyHandleTable.s_pinnedStrings == null) - StringProxyHandleTable.s_pinnedStrings = new Map(); + if (s_pinnedStrings == null) + s_pinnedStrings = new Map(); StringPinState stringPinState; - if (StringProxyHandleTable.s_pinnedStrings.TryGetValue(handle, out stringPinState)) + if (s_pinnedStrings.TryGetValue(handle, out stringPinState)) { ++stringPinState._pinCount; } @@ -56,19 +56,19 @@ namespace Microsoft.Iris.CodeModel.Cpp stringPinState._gcHandle = GCHandle.Alloc(str, GCHandleType.Pinned); stringPinState._pinCount = 1; } - StringProxyHandleTable.s_pinnedStrings[handle] = stringPinState; + s_pinnedStrings[handle] = stringPinState; value = (char*)stringPinState._gcHandle.AddrOfPinnedObject().ToPointer(); return stringPinState._pinCount; } public int UnpinString(ulong handle) { - StringPinState pinnedString = StringProxyHandleTable.s_pinnedStrings[handle]; + StringPinState pinnedString = s_pinnedStrings[handle]; --pinnedString._pinCount; if (pinnedString._pinCount == 0) { pinnedString._gcHandle.Free(); - StringProxyHandleTable.s_pinnedStrings.Remove(handle); + s_pinnedStrings.Remove(handle); } return pinnedString._pinCount; } diff --git a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs b/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs index c42450c..d2a5e51 100644 --- a/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs +++ b/UIX/Microsoft/Iris/CodeModel/Cpp/UIXVariant.cs @@ -20,31 +20,31 @@ namespace Microsoft.Iris.CodeModel.Cpp { switch (inboundObject._type) { - case UIXVariant.VariantType.Empty: + case VariantType.Empty: return null; - case UIXVariant.VariantType.Bool: + case VariantType.Bool: return inboundObject._integer != 0L; - case UIXVariant.VariantType.Byte: + case VariantType.Byte: return (byte)inboundObject._integer; - case UIXVariant.VariantType.Int32: + case VariantType.Int32: return (int)inboundObject._integer; - case UIXVariant.VariantType.Int64: + case VariantType.Int64: return inboundObject._integer; - case UIXVariant.VariantType.Single: + case VariantType.Single: return inboundObject._float; - case UIXVariant.VariantType.Double: + case VariantType.Double: return inboundObject._double; - case UIXVariant.VariantType.Enum: - return UIXVariant.GetEnumValue(inboundObject._enum._value, inboundObject._enum._type); - case UIXVariant.VariantType.UIXObject: - return UIXVariant.GetObjectValue(inboundObject._pointer, context); - case UIXVariant.VariantType.UIXString: + case VariantType.Enum: + return GetEnumValue(inboundObject._enum._value, inboundObject._enum._type); + case VariantType.UIXObject: + return GetObjectValue(inboundObject._pointer, context); + case VariantType.UIXString: return DllProxyServices.GetString(inboundObject._pointer); - case UIXVariant.VariantType.UIXImage: + case VariantType.UIXImage: return DllProxyServices.GetImage(inboundObject._pointer); - case UIXVariant.VariantType.UIXDataQuery: + case VariantType.UIXDataQuery: return DllProxyServices.GetDataQuery(inboundObject._pointer); - case UIXVariant.VariantType.UIXDataType: + case VariantType.UIXDataType: return DllProxyServices.GetDataType(inboundObject._pointer); default: return null; @@ -66,7 +66,7 @@ namespace Microsoft.Iris.CodeModel.Cpp public static unsafe void MarshalObjectArray(object[] objects, UIXVariant* destination) { for (int index = 0; index < objects.Length; ++index) - UIXVariant.MarshalObject(objects[index], destination + index); + MarshalObject(objects[index], destination + index); } public static unsafe void MarshalObject(object o, UIXVariant* destination) @@ -77,30 +77,30 @@ namespace Microsoft.Iris.CodeModel.Cpp destination->SetToNull(); break; case bool flag: - destination->SetIntegerValue(flag ? 1L : 0L, UIXVariant.VariantType.Bool); + destination->SetIntegerValue(flag ? 1L : 0L, VariantType.Bool); break; case byte num: - destination->SetIntegerValue(num, UIXVariant.VariantType.Byte); + destination->SetIntegerValue(num, VariantType.Byte); break; case int num: - destination->SetIntegerValue(num, UIXVariant.VariantType.Int32); + destination->SetIntegerValue(num, VariantType.Int32); break; case long num: - destination->SetIntegerValue(num, UIXVariant.VariantType.Int64); + destination->SetIntegerValue(num, VariantType.Int64); break; case float num: - destination->SetFloatValue(num, UIXVariant.VariantType.Single); + destination->SetFloatValue(num, VariantType.Single); break; case double num: - destination->SetDoubleValue(num, UIXVariant.VariantType.Double); + destination->SetDoubleValue(num, VariantType.Double); break; case string _: IntPtr nativeObject1; DllProxyServices.CreateNativeString((string)o, out nativeObject1); - destination->SetPointerValue(nativeObject1, UIXVariant.VariantType.UIXString); + destination->SetPointerValue(nativeObject1, VariantType.UIXString); break; case DllProxyObject _: - destination->SetPointerValue(((DllProxyObject)o).NativeObject, UIXVariant.VariantType.UIXObject); + destination->SetPointerValue(((DllProxyObject)o).NativeObject, VariantType.UIXObject); NativeApi.SpAddRefExternalObject(destination->_pointer); break; case DllEnumProxy _: @@ -113,15 +113,15 @@ namespace Microsoft.Iris.CodeModel.Cpp case UIImage _: IntPtr nativeObject2; DllProxyServices.CreateNativeImage((UIImage)o, out nativeObject2); - destination->SetPointerValue(nativeObject2, UIXVariant.VariantType.UIXImage); + destination->SetPointerValue(nativeObject2, VariantType.UIXImage); break; case MarkupDataQuery _: MarkupDataQuery markupDataQuery = (MarkupDataQuery)o; - destination->SetPointerValue(markupDataQuery.ExternalNativeObject, UIXVariant.VariantType.UIXDataQuery); + destination->SetPointerValue(markupDataQuery.ExternalNativeObject, VariantType.UIXDataQuery); break; case MarkupDataType _: MarkupDataType markupDataType = (MarkupDataType)o; - destination->SetPointerValue(markupDataType.ExternalNativeObject, UIXVariant.VariantType.UIXDataType); + destination->SetPointerValue(markupDataType.ExternalNativeObject, VariantType.UIXDataType); break; } } @@ -129,12 +129,12 @@ namespace Microsoft.Iris.CodeModel.Cpp public static unsafe void CleanupMarshalledObjects(UIXVariant* source, int count) { for (int index = 0; index < count; ++index) - UIXVariant.CleanupMarshalledObject(source + index); + CleanupMarshalledObject(source + index); } public static unsafe void CleanupMarshalledObject(UIXVariant* source) { - if (source->_type != UIXVariant.VariantType.UIXObject || !(source->_pointer != IntPtr.Zero)) + if (source->_type != VariantType.UIXObject || !(source->_pointer != IntPtr.Zero)) return; NativeApi.SpReleaseExternalObject(source->_pointer); } @@ -142,7 +142,7 @@ namespace Microsoft.Iris.CodeModel.Cpp private void SetToNull() { this._pointer = IntPtr.Zero; - this._type = UIXVariant.VariantType.UIXObject; + this._type = VariantType.UIXObject; } private void SetPointerValue(IntPtr value, UIXVariant.VariantType type) @@ -172,7 +172,7 @@ namespace Microsoft.Iris.CodeModel.Cpp private void SetEnumValue(UIXVariant.EnumValue value) { this._enum = value; - this._type = UIXVariant.VariantType.Enum; + this._type = VariantType.Enum; } private unsafe IntPtr _pointer diff --git a/UIX/Microsoft/Iris/Command.cs b/UIX/Microsoft/Iris/Command.cs index 85c6c83..014c46a 100644 --- a/UIX/Microsoft/Iris/Command.cs +++ b/UIX/Microsoft/Iris/Command.cs @@ -101,7 +101,7 @@ namespace Microsoft.Iris if (this.IsDisposed) return; this.FirePropertyChanged("Invoked"); - if (this.GetEventHandler(Command.s_invokedEvent) is EventHandler eventHandler) + if (this.GetEventHandler(s_invokedEvent) is EventHandler eventHandler) eventHandler(this, EventArgs.Empty); this.OnInvoked(); } @@ -111,12 +111,12 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(Command.s_invokedEvent, value); + this.AddEventHandler(s_invokedEvent, value); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(Command.s_invokedEvent, value); + this.RemoveEventHandler(s_invokedEvent, value); } } diff --git a/UIX/Microsoft/Iris/Data/IntListUtility.cs b/UIX/Microsoft/Iris/Data/IntListUtility.cs index bcd4083..6b7c865 100644 --- a/UIX/Microsoft/Iris/Data/IntListUtility.cs +++ b/UIX/Microsoft/Iris/Data/IntListUtility.cs @@ -30,8 +30,8 @@ namespace Microsoft.Iris.Data return -1; } - public static bool Contains(List list, int item) => IntListUtility.IndexOf(list, item) != -1; + public static bool Contains(List list, int item) => IndexOf(list, item) != -1; - public static bool Contains(Vector list, int item) => IntListUtility.IndexOf(list, item) != -1; + public static bool Contains(Vector list, int item) => IndexOf(list, item) != -1; } } diff --git a/UIX/Microsoft/Iris/Data/ListUtility.cs b/UIX/Microsoft/Iris/Data/ListUtility.cs index f19340c..5628ae3 100644 --- a/UIX/Microsoft/Iris/Data/ListUtility.cs +++ b/UIX/Microsoft/Iris/Data/ListUtility.cs @@ -14,9 +14,9 @@ namespace Microsoft.Iris.Data public static bool IsNullOrEmpty(IVector list) => list == null || list.Count <= 0; - public static bool IsValidIndex(IList list, int idx) => ListUtility.IsValidIndex(idx, list.Count); + public static bool IsValidIndex(IList list, int idx) => IsValidIndex(idx, list.Count); - public static bool IsValidIndex(IVector list, int idx) => ListUtility.IsValidIndex(idx, list.Count); + public static bool IsValidIndex(IVector list, int idx) => IsValidIndex(idx, list.Count); public static bool IsValidIndex(int idx, int itemsCount) { @@ -36,7 +36,7 @@ namespace Microsoft.Iris.Data return false; for (int index = 0; index < num1; ++index) { - if (!ListUtility.IsEqual(a[index], b[index])) + if (!IsEqual(a[index], b[index])) return false; } return true; diff --git a/UIX/Microsoft/Iris/Data/Resource.cs b/UIX/Microsoft/Iris/Data/Resource.cs index 91c9191..06bc6c7 100644 --- a/UIX/Microsoft/Iris/Data/Resource.cs +++ b/UIX/Microsoft/Iris/Data/Resource.cs @@ -69,7 +69,7 @@ namespace Microsoft.Iris.Data else if (this._buffer != IntPtr.Zero) { if (this._requiresMemoryFree) - Resource.FreeNativeBuffer(this._buffer); + FreeNativeBuffer(this._buffer); this._buffer = IntPtr.Zero; } this._status = ResourceStatus.NeedsAcquire; diff --git a/UIX/Microsoft/Iris/Data/ResourceManager.cs b/UIX/Microsoft/Iris/Data/ResourceManager.cs index 54dcd12..24be71f 100644 --- a/UIX/Microsoft/Iris/Data/ResourceManager.cs +++ b/UIX/Microsoft/Iris/Data/ResourceManager.cs @@ -18,7 +18,7 @@ namespace Microsoft.Iris.Data private ResourceManager() => this._sourcesTable = new Map(); - public static ResourceManager Instance => ResourceManager.s_instance; + public static ResourceManager Instance => s_instance; public void RegisterSource(string scheme, IResourceProvider source) => this._sourcesTable[scheme] = source; @@ -66,7 +66,7 @@ namespace Microsoft.Iris.Data Resource resource = null; string scheme; string hierarchicalPart; - ResourceManager.ParseUri(uri, out scheme, out hierarchicalPart); + ParseUri(uri, out scheme, out hierarchicalPart); if (string.IsNullOrEmpty(scheme) || string.IsNullOrEmpty(hierarchicalPart)) { ErrorManager.ReportWarning("Invalid resource uri: '{0}'", uri); @@ -108,7 +108,7 @@ namespace Microsoft.Iris.Data public static Resource AcquireResource(string uri) { ErrorWatermark watermark = ErrorManager.Watermark; - Resource resource = ResourceManager.Instance.GetResource(uri, true); + Resource resource = Instance.GetResource(uri, true); if (resource == null) return null; resource.Acquire(); diff --git a/UIX/Microsoft/Iris/Data/StringUtility.cs b/UIX/Microsoft/Iris/Data/StringUtility.cs index c9c88b1..a647f23 100644 --- a/UIX/Microsoft/Iris/Data/StringUtility.cs +++ b/UIX/Microsoft/Iris/Data/StringUtility.cs @@ -62,7 +62,7 @@ namespace Microsoft.Iris.Data case 'u': case 'x': uint result; - flag = StringUtility.ReadHexSequence(mode, source, ref index, length, out result); + flag = ReadHexSequence(mode, source, ref index, length, out result); if (flag) { if (result <= ushort.MaxValue) diff --git a/UIX/Microsoft/Iris/DataProviderMapping.cs b/UIX/Microsoft/Iris/DataProviderMapping.cs index 0662e5d..353e7b5 100644 --- a/UIX/Microsoft/Iris/DataProviderMapping.cs +++ b/UIX/Microsoft/Iris/DataProviderMapping.cs @@ -25,11 +25,11 @@ namespace Microsoft.Iris public string PropertyName => this._propertySchema.Name; - public string PropertyTypeName => DataProviderMapping.GetCanonicalTypeName(this._propertySchema.PropertyType); + public string PropertyTypeName => GetCanonicalTypeName(this._propertySchema.PropertyType); public Type PropertyType => this._assemblyPropertyType; - public string UnderlyingCollectionTypeName => DataProviderMapping.GetCanonicalTypeName(this._propertySchema.AlternateType); + public string UnderlyingCollectionTypeName => GetCanonicalTypeName(this._propertySchema.AlternateType); public Type UnderlyingCollectionType => this._assemblyAlternateType; diff --git a/UIX/Microsoft/Iris/DataProviderObject.cs b/UIX/Microsoft/Iris/DataProviderObject.cs index 45e2cf2..1d538f3 100644 --- a/UIX/Microsoft/Iris/DataProviderObject.cs +++ b/UIX/Microsoft/Iris/DataProviderObject.cs @@ -50,7 +50,7 @@ namespace Microsoft.Iris { if (this._mappings == null) { - lock (DataProviderObject.SynchronizedFindDataMappings) + lock (SynchronizedFindDataMappings) { MarkupDataMapping dataMapping = MarkupDataProvider.FindDataMapping(this._owner != null ? this._owner.ProviderName : string.Empty, this._typeSchema); if (dataMapping.AssemblyDataProviderCookie == null) diff --git a/UIX/Microsoft/Iris/DataProviderQuery.cs b/UIX/Microsoft/Iris/DataProviderQuery.cs index 1e5f54d..b86492e 100644 --- a/UIX/Microsoft/Iris/DataProviderQuery.cs +++ b/UIX/Microsoft/Iris/DataProviderQuery.cs @@ -38,7 +38,7 @@ namespace Microsoft.Iris get => this._result; set { - if (object.Equals(this._result, value)) + if (Equals(this._result, value)) return; this._result = value; this.FirePropertyChanged(nameof(Result)); @@ -103,7 +103,7 @@ namespace Microsoft.Iris } if (!flag2 && this._propertyValues.ContainsKey(propertyName)) { - if (object.Equals(this._propertyValues[propertyName], value)) + if (Equals(this._propertyValues[propertyName], value)) goto label_8; } this._propertyValues[propertyName] = value; diff --git a/UIX/Microsoft/Iris/Drawing/Color.cs b/UIX/Microsoft/Iris/Drawing/Color.cs index 9d9545a..9c4aa32 100644 --- a/UIX/Microsoft/Iris/Drawing/Color.cs +++ b/UIX/Microsoft/Iris/Drawing/Color.cs @@ -18,38 +18,38 @@ namespace Microsoft.Iris.Drawing private const int ARGBBlueShift = 0; private readonly uint value; - public Color(int red, int green, int blue) => this = Color.FromArgb(byte.MaxValue, red, green, blue); + public Color(int red, int green, int blue) => this = FromArgb(byte.MaxValue, red, green, blue); - public Color(float red, float green, float blue) => this = Color.FromArgb(1f, red, green, blue); + public Color(float red, float green, float blue) => this = FromArgb(1f, red, green, blue); - public Color(int alpha, int red, int green, int blue) => this = Color.FromArgb(alpha, red, green, blue); + public Color(int alpha, int red, int green, int blue) => this = FromArgb(alpha, red, green, blue); - public Color(float alpha, float red, float green, float blue) => this = Color.FromArgb(alpha, red, green, blue); + public Color(float alpha, float red, float green, float blue) => this = FromArgb(alpha, red, green, blue); internal Color(uint value) => this.value = value; public byte R { get => (byte)(this.Value >> 16 & byte.MaxValue); - set => this = Color.FromArgb(A, value, G, B); + set => this = FromArgb(A, value, G, B); } public byte G { get => (byte)(this.Value >> 8 & byte.MaxValue); - set => this = Color.FromArgb(A, R, value, B); + set => this = FromArgb(A, R, value, B); } public byte B { get => (byte)(this.Value & byte.MaxValue); - set => this = Color.FromArgb(A, R, G, value); + set => this = FromArgb(A, R, G, value); } public byte A { get => (byte)(this.Value >> 24 & byte.MaxValue); - set => this = Color.FromArgb(value, R, G, B); + set => this = FromArgb(value, R, G, B); } internal void GetArgb(out float a, out float r, out float g, out float b) @@ -74,22 +74,22 @@ namespace Microsoft.Iris.Drawing internal static Color FromArgb(int alpha, int red, int green, int blue) { - Color.CheckByte(alpha, nameof(alpha)); - Color.CheckByte(red, nameof(red)); - Color.CheckByte(green, nameof(green)); - Color.CheckByte(blue, nameof(blue)); - return new Color(Color.MakeArgb((byte)alpha, (byte)red, (byte)green, (byte)blue)); + CheckByte(alpha, nameof(alpha)); + CheckByte(red, nameof(red)); + CheckByte(green, nameof(green)); + CheckByte(blue, nameof(blue)); + return new Color(MakeArgb((byte)alpha, (byte)red, (byte)green, (byte)blue)); } - internal static Color FromArgb(float alpha, float red, float green, float blue) => Color.FromArgb(Color.ChannelFromFloat(alpha), Color.ChannelFromFloat(red), Color.ChannelFromFloat(green), Color.ChannelFromFloat(blue)); + internal static Color FromArgb(float alpha, float red, float green, float blue) => FromArgb(ChannelFromFloat(alpha), ChannelFromFloat(red), ChannelFromFloat(green), ChannelFromFloat(blue)); internal static Color FromArgb(int alpha, Color baseColor) { - Color.CheckByte(alpha, nameof(alpha)); - return new Color(Color.MakeArgb((byte)alpha, baseColor.R, baseColor.G, baseColor.B)); + CheckByte(alpha, nameof(alpha)); + return new Color(MakeArgb((byte)alpha, baseColor.R, baseColor.G, baseColor.B)); } - internal static Color FromArgb(int red, int green, int blue) => Color.FromArgb(byte.MaxValue, red, green, blue); + internal static Color FromArgb(int red, int green, int blue) => FromArgb(byte.MaxValue, red, green, blue); internal float GetValue() { diff --git a/UIX/Microsoft/Iris/Drawing/RawImage.cs b/UIX/Microsoft/Iris/Drawing/RawImage.cs index b2ef60c..41208ce 100644 --- a/UIX/Microsoft/Iris/Drawing/RawImage.cs +++ b/UIX/Microsoft/Iris/Drawing/RawImage.cs @@ -55,7 +55,7 @@ namespace Microsoft.Iris.Drawing ~RawImage() { - RawImage.FreeBuffer(this._data); + FreeBuffer(this._data); this._data = IntPtr.Zero; } @@ -77,7 +77,7 @@ namespace Microsoft.Iris.Drawing imageCacheItem = instance.Lookup(_cacheItemKey); if (imageCacheItem == null) { - Size maxSize = UIImage.ClampSize(this._maximumSize); + Size maxSize = ClampSize(this._maximumSize); imageCacheItem = new RawImageItem(UISession.Default.RenderSession, this, str, this._data, this._length, this._imageSize, this._stride, this._format, maxSize, this.IsFlipped, this._antialiasEdges); instance.Add(_cacheItemKey, imageCacheItem); } diff --git a/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs b/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs index e06398b..e3b1c59 100644 --- a/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs +++ b/UIX/Microsoft/Iris/Drawing/RawImageItemKey.cs @@ -15,11 +15,11 @@ namespace Microsoft.Iris.Drawing public RawImageItemKey(string id) : base(id) - => this._uniqueId = ++RawImageItemKey.s_uniqueId; + => this._uniqueId = ++s_uniqueId; public override bool Equals(object obj) { - if (object.ReferenceEquals(this, obj)) + if (ReferenceEquals(this, obj)) return true; return obj is RawImageItemKey rawImageItemKey && this._uniqueId == rawImageItemKey._uniqueId; } diff --git a/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs b/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs index a158b03..47f27f7 100644 --- a/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs +++ b/UIX/Microsoft/Iris/Drawing/ResourceImageItem.cs @@ -105,7 +105,7 @@ namespace Microsoft.Iris.Drawing { if (resource != this._resource) return; - if (!ResourceImageItem.IsSuccessfulResourceLoad(this._resource) || Application.IsShuttingDown) + if (!IsSuccessfulResourceLoad(this._resource) || Application.IsShuttingDown) { this.OnImageLoadComplete(); this.FreeResource(); diff --git a/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs b/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs index cc11dea..16bfdc4 100644 --- a/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs +++ b/UIX/Microsoft/Iris/Drawing/RichTextInfoKey.cs @@ -69,7 +69,7 @@ namespace Microsoft.Iris.Drawing public override bool Equals(object obj) { - if (object.ReferenceEquals(this, obj)) + if (ReferenceEquals(this, obj)) return true; return obj is RichTextInfoKey richTextInfoKey && this._hashCode == richTextInfoKey._hashCode && (this._fontFaceUniqueId == richTextInfoKey._fontFaceUniqueId && this._fontSize == richTextInfoKey._fontSize) && (this._fontWeight == richTextInfoKey._fontWeight && this._flags == richTextInfoKey._flags && (_rasterizerConfig == richTextInfoKey._rasterizerConfig && this._samplingMode.Equals(richTextInfoKey._samplingMode))) && (this._srcSizeF.Equals(richTextInfoKey._srcSizeF) && this._naturalSize.Equals(richTextInfoKey._naturalSize) && (this._rasterizedOffset.Equals(richTextInfoKey._rasterizedOffset) && this._textColor.Equals(richTextInfoKey._textColor))) && this._content.Equals(richTextInfoKey._content); } diff --git a/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs b/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs index d37aeae..d4e52e1 100644 --- a/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs +++ b/UIX/Microsoft/Iris/Drawing/ScavengeImageCache.cs @@ -14,25 +14,25 @@ namespace Microsoft.Iris.Drawing internal sealed class ScavengeImageCache : ImageCache { private static ScavengeImageCache s_theOnlyCache; - private static readonly DeferredHandler s_dhReschedule = new DeferredHandler(ScavengeImageCache.Reschedule); + private static readonly DeferredHandler s_dhReschedule = new DeferredHandler(Reschedule); private UISession _session; private ScavengeImageCache.ScavengeCallback _callback; public static void Initialize(UISession session) { - ScavengeImageCache.s_theOnlyCache = new ScavengeImageCache(session); - ScavengeImageCache.s_theOnlyCache.NumItemsToKeep = 200; - ScavengeImageCache.s_theOnlyCache.ItemRetainTime = new TimeSpan(0, 2, 0); + s_theOnlyCache = new ScavengeImageCache(session); + s_theOnlyCache.NumItemsToKeep = 200; + s_theOnlyCache.ItemRetainTime = new TimeSpan(0, 2, 0); } public static void Uninitialize(UISession session) { - if (ScavengeImageCache.s_theOnlyCache == null) + if (s_theOnlyCache == null) return; - ScavengeImageCache.s_theOnlyCache.Dispose(); + s_theOnlyCache.Dispose(); } - public static ScavengeImageCache Instance => ScavengeImageCache.s_theOnlyCache; + public static ScavengeImageCache Instance => s_theOnlyCache; private ScavengeImageCache(UISession session) : base(session.RenderSession, "GraphicImageCache") @@ -51,7 +51,7 @@ namespace Microsoft.Iris.Drawing protected override void ScheduleScavenge() { if (!this.CleanupPending) - DeferredCall.Post(DispatchPriority.Idle, ScavengeImageCache.s_dhReschedule, this); + DeferredCall.Post(DispatchPriority.Idle, s_dhReschedule, this); base.ScheduleScavenge(); } diff --git a/UIX/Microsoft/Iris/Drawing/TextImageCache.cs b/UIX/Microsoft/Iris/Drawing/TextImageCache.cs index d031667..0b51b8d 100644 --- a/UIX/Microsoft/Iris/Drawing/TextImageCache.cs +++ b/UIX/Microsoft/Iris/Drawing/TextImageCache.cs @@ -14,25 +14,25 @@ namespace Microsoft.Iris.Drawing internal sealed class TextImageCache : ImageCache { private static TextImageCache s_theOnlyCache; - private static readonly DeferredHandler s_dhReschedule = new DeferredHandler(TextImageCache.Reschedule); + private static readonly DeferredHandler s_dhReschedule = new DeferredHandler(Reschedule); private UISession _session; private TextImageCache.ScavengeCallback _callback; public static void Initialize(UISession session) { - TextImageCache.s_theOnlyCache = new TextImageCache(session); - TextImageCache.s_theOnlyCache.NumItemsToKeep = 500; - TextImageCache.s_theOnlyCache.ItemRetainTime = TimeSpan.Zero; + s_theOnlyCache = new TextImageCache(session); + s_theOnlyCache.NumItemsToKeep = 500; + s_theOnlyCache.ItemRetainTime = TimeSpan.Zero; } public static void Uninitialize(UISession session) { - if (TextImageCache.s_theOnlyCache == null) + if (s_theOnlyCache == null) return; - TextImageCache.s_theOnlyCache.Dispose(); + s_theOnlyCache.Dispose(); } - public static TextImageCache Instance => TextImageCache.s_theOnlyCache; + public static TextImageCache Instance => s_theOnlyCache; private TextImageCache(UISession session) : base(session.RenderSession, nameof(TextImageCache)) @@ -51,7 +51,7 @@ namespace Microsoft.Iris.Drawing protected override void ScheduleScavenge() { if (!this.CleanupPending) - DeferredCall.Post(DispatchPriority.Idle, TextImageCache.s_dhReschedule, this); + DeferredCall.Post(DispatchPriority.Idle, s_dhReschedule, this); base.ScheduleScavenge(); } diff --git a/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs b/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs index 1b55d61..dc71b22 100644 --- a/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs +++ b/UIX/Microsoft/Iris/Drawing/TextMeasureParams.cs @@ -24,7 +24,7 @@ namespace Microsoft.Iris.Drawing { if (!UISession.Default.IsRtl) return; - this._data._flags |= TextMeasureParams.MeasureFlags.IsRtl; + this._data._flags |= MeasureFlags.IsRtl; } public void Dispose() @@ -41,7 +41,7 @@ namespace Microsoft.Iris.Drawing public unsafe void SetContent(char* content) { - this._data._flags |= TextMeasureParams.MeasureFlags.Content; + this._data._flags |= MeasureFlags.Content; this._data._content = content; } @@ -62,30 +62,30 @@ namespace Microsoft.Iris.Drawing this._textStyle = style; } - public void TrimLeftSideBearing() => this._data._flags |= TextMeasureParams.MeasureFlags.TrimLeftSideBearing; + public void TrimLeftSideBearing() => this._data._flags |= MeasureFlags.TrimLeftSideBearing; public void SetEditMode(bool inEditMode) { if (inEditMode) - this._data._flags |= TextMeasureParams.MeasureFlags.FormatOnly; + this._data._flags |= MeasureFlags.FormatOnly; else - this._data._flags &= ~TextMeasureParams.MeasureFlags.FormatOnly; + this._data._flags &= ~MeasureFlags.FormatOnly; } public void SetScale(float scale) => this._data._scale = scale; public void SetWordWrap(bool wordWrap) { - this._data._flags |= TextMeasureParams.MeasureFlags.WordWrap; + this._data._flags |= MeasureFlags.WordWrap; if (wordWrap) - this._data._flags |= TextMeasureParams.MeasureFlags.WordWrapValue; + this._data._flags |= MeasureFlags.WordWrapValue; else - this._data._flags &= ~TextMeasureParams.MeasureFlags.WordWrapValue; + this._data._flags &= ~MeasureFlags.WordWrapValue; } public void SetPasswordChar(char passwordChar) { - this._data._flags |= TextMeasureParams.MeasureFlags.PasswordMasked; + this._data._flags |= MeasureFlags.PasswordMasked; this._data._passwordChar = passwordChar; } diff --git a/UIX/Microsoft/Iris/Drawing/TextRun.cs b/UIX/Microsoft/Iris/Drawing/TextRun.cs index e45b452..358a0e9 100644 --- a/UIX/Microsoft/Iris/Drawing/TextRun.cs +++ b/UIX/Microsoft/Iris/Drawing/TextRun.cs @@ -61,9 +61,9 @@ namespace Microsoft.Iris.Drawing this._fontFaceUniqueId = runPacketPtr->fontFaceUniqueId; this._lfHeight = runPacketPtr->lf.lfHeight; this._lfWeight = runPacketPtr->lf.lfWeight; - this.SetBit(TextRun.Bits.Italic, runPacketPtr->lf.lfItalic != 0); - this.SetBit(TextRun.Bits.Underline, runPacketPtr->lf.lfUnderline != 0); - this.SetBit(TextRun.Bits.Link, (runPacketPtr->dwEffects & 32) != 0); + this.SetBit(Bits.Italic, runPacketPtr->lf.lfItalic != 0); + this.SetBit(Bits.Underline, runPacketPtr->lf.lfUnderline != 0); + this.SetBit(Bits.Link, (runPacketPtr->dwEffects & 32) != 0); this._underlineBounds = runPacketPtr->rcUnderlineBounds; this._lineNumber = runPacketPtr->nLineNumber; this._naturalRunExtent = runPacketPtr->sizeNatural; @@ -106,9 +106,9 @@ namespace Microsoft.Iris.Drawing public int FontWeight => this._lfWeight; - public bool Italic => this.GetBit(TextRun.Bits.Italic); + public bool Italic => this.GetBit(Bits.Italic); - public bool Underline => this.GetBit(TextRun.Bits.Underline); + public bool Underline => this.GetBit(Bits.Underline); public Point RasterizedOffset => new Point(this._rasterizeX - this._naturalX, this._rasterizeY - this._naturalY); @@ -120,14 +120,14 @@ namespace Microsoft.Iris.Drawing public bool Visible { - get => this.GetBit(TextRun.Bits.Visible); - set => this.SetBit(TextRun.Bits.Visible, value); + get => this.GetBit(Bits.Visible); + set => this.SetBit(Bits.Visible, value); } public bool IsFragment { - get => this.GetBit(TextRun.Bits.Fragment); - set => this.SetBit(TextRun.Bits.Fragment, value); + get => this.GetBit(Bits.Fragment); + set => this.SetBit(Bits.Fragment, value); } public Point Position => new Point(this._layoutBounds.X, this._layoutBounds.Y); @@ -136,7 +136,7 @@ namespace Microsoft.Iris.Drawing public byte RasterizerConfig => this._rasterizerConfig; - public bool Link => this.GetBit(TextRun.Bits.Link); + public bool Link => this.GetBit(Bits.Link); public unsafe NativeApi.UnderlineStyle UnderlineStyle { diff --git a/UIX/Microsoft/Iris/Drawing/UIImage.cs b/UIX/Microsoft/Iris/Drawing/UIImage.cs index b8bf82a..1e21b00 100644 --- a/UIX/Microsoft/Iris/Drawing/UIImage.cs +++ b/UIX/Microsoft/Iris/Drawing/UIImage.cs @@ -170,14 +170,14 @@ namespace Microsoft.Iris.Drawing internal static Size MaximumSurfaceSize(UISession session) { - if (UIImage.s_sizeMaximumSurface.Width == -1) - UIImage.s_sizeMaximumSurface = session.RenderSession.GraphicsDevice.MaximumImageSize; - return UIImage.s_sizeMaximumSurface; + if (s_sizeMaximumSurface.Width == -1) + s_sizeMaximumSurface = session.RenderSession.GraphicsDevice.MaximumImageSize; + return s_sizeMaximumSurface; } internal static Size ClampSize(Size maxSizeImage) { - Size size = UIImage.MaximumSurfaceSize(UISession.Default); + Size size = MaximumSurfaceSize(UISession.Default); if (maxSizeImage.Width == 0 || maxSizeImage.Width > size.Width) maxSizeImage.Width = size.Width; if (maxSizeImage.Height == 0 || maxSizeImage.Height > size.Height) diff --git a/UIX/Microsoft/Iris/Drawing/UriImage.cs b/UIX/Microsoft/Iris/Drawing/UriImage.cs index 2a3fcaf..d386f4c 100644 --- a/UIX/Microsoft/Iris/Drawing/UriImage.cs +++ b/UIX/Microsoft/Iris/Drawing/UriImage.cs @@ -41,7 +41,7 @@ namespace Microsoft.Iris.Drawing ResourceImageItem resourceImageItem = this.GetResourceFromCache(); if (resourceImageItem == null) { - resourceImageItem = new ResourceImageItem(UISession.Default.RenderSession, this.Source, UIImage.ClampSize(this._maximumSize), this.IsFlipped, this._antialiasEdges); + resourceImageItem = new ResourceImageItem(UISession.Default.RenderSession, this.Source, ClampSize(this._maximumSize), this.IsFlipped, this._antialiasEdges); resourceImageItem.LoadCompleteHandler += new ContentLoadCompleteHandler(this.OnLoadComplete); ScavengeImageCache.Instance.Add(this._cacheKey, resourceImageItem); this.SetStatus(resourceImageItem.Status); @@ -54,7 +54,7 @@ namespace Microsoft.Iris.Drawing private ResourceImageItem GetResourceFromCache() { - Size maxSize = UIImage.ClampSize(this._maximumSize); + Size maxSize = ClampSize(this._maximumSize); if (this._cacheKey == null) this._cacheKey = new ImageCacheKey(this.Source, maxSize, this.IsFlipped, this._antialiasEdges); return (ResourceImageItem)ScavengeImageCache.Instance.Lookup(this._cacheKey); diff --git a/UIX/Microsoft/Iris/Image.cs b/UIX/Microsoft/Iris/Image.cs index 96883c4..c8b3ee0 100644 --- a/UIX/Microsoft/Iris/Image.cs +++ b/UIX/Microsoft/Iris/Image.cs @@ -154,9 +154,9 @@ namespace Microsoft.Iris } } - public static void RemoveCache(string source) => Image.RemoveCache(source, 0, 0, false, false); + public static void RemoveCache(string source) => RemoveCache(source, 0, 0, false, false); - public static void RemoveCache(string source, int maximumWidth, int maximumHeight) => Image.RemoveCache(source, maximumWidth, maximumHeight, false, false); + public static void RemoveCache(string source, int maximumWidth, int maximumHeight) => RemoveCache(source, maximumWidth, maximumHeight, false, false); public static void RemoveCache( string source, @@ -164,7 +164,7 @@ namespace Microsoft.Iris int maximumHeight, bool flippable) { - Image.RemoveCache(source, maximumWidth, maximumHeight, flippable, false); + RemoveCache(source, maximumWidth, maximumHeight, flippable, false); } public static void RemoveCache( diff --git a/UIX/Microsoft/Iris/Input/DragDropInfo.cs b/UIX/Microsoft/Iris/Input/DragDropInfo.cs index 151b9de..926e200 100644 --- a/UIX/Microsoft/Iris/Input/DragDropInfo.cs +++ b/UIX/Microsoft/Iris/Input/DragDropInfo.cs @@ -8,11 +8,11 @@ namespace Microsoft.Iris.Input { internal class DragDropInfo : MouseInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.DragDrop; + private static InputInfo.InfoType s_poolType = InfoType.DragDrop; private InputModifiers _modifiers; private DragOperation _operation; - static DragDropInfo() => InputInfo.SetPoolLimitMode(DragDropInfo.s_poolType, false); + static DragDropInfo() => SetPoolLimitMode(s_poolType, false); private DragDropInfo() { @@ -25,7 +25,7 @@ namespace Microsoft.Iris.Input InputModifiers modifiers, DragOperation operation) { - DragDropInfo dragDropInfo = (DragDropInfo)InputInfo.GetFromPool(DragDropInfo.s_poolType) ?? new DragDropInfo(); + DragDropInfo dragDropInfo = (DragDropInfo)GetFromPool(s_poolType) ?? new DragDropInfo(); dragDropInfo.Initialize(rawSource, x, y, modifiers, operation); return dragDropInfo; } @@ -39,10 +39,10 @@ namespace Microsoft.Iris.Input { this._modifiers = modifiers; this._operation = operation; - this.Initialize(rawSource, x, y, DragDropInfo.EventTypeForDragOperation(operation)); + this.Initialize(rawSource, x, y, EventTypeForDragOperation(operation)); } - protected override InputInfo.InfoType PoolType => DragDropInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; public InputModifiers Modifiers => this._modifiers; diff --git a/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs b/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs index fa239c1..e3d5cf4 100644 --- a/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs +++ b/UIX/Microsoft/Iris/Input/HIDCommandMapping.cs @@ -65,7 +65,7 @@ namespace Microsoft.Iris.Input public static CommandCode Find(uint usage, uint usagePage) { - foreach (HIDCommandMapping mapping in HIDCommandMapping.s_mappings) + foreach (HIDCommandMapping mapping in s_mappings) { if ((int)mapping._usage == (int)usage && (int)mapping._usagePage == (int)usagePage) return mapping._command; diff --git a/UIX/Microsoft/Iris/Input/InputInfo.cs b/UIX/Microsoft/Iris/Input/InputInfo.cs index ed9751c..a06a795 100644 --- a/UIX/Microsoft/Iris/Input/InputInfo.cs +++ b/UIX/Microsoft/Iris/Input/InputInfo.cs @@ -37,9 +37,9 @@ namespace Microsoft.Iris.Input protected static void SetPoolLimitMode(InputInfo.InfoType type, bool keepSingle) { - if (InputInfo.s_pools == null) - InputInfo.s_pools = new InputInfo.InfoPool[9]; - InputInfo.s_pools[(int)type].SetLimitMode(keepSingle); + if (s_pools == null) + s_pools = new InputInfo.InfoPool[9]; + s_pools[(int)type].SetLimitMode(keepSingle); } protected abstract InputInfo.InfoType PoolType { get; } @@ -50,13 +50,13 @@ namespace Microsoft.Iris.Input this._eventType = InputEventType.Invalid; } - protected static InputInfo GetFromPool(InputInfo.InfoType poolType) => InputInfo.s_pools[(int)poolType].GetPooledInfo(); + protected static InputInfo GetFromPool(InputInfo.InfoType poolType) => s_pools[(int)poolType].GetPooledInfo(); public void ReturnToPool() { if (!this.Poolable) return; - InputInfo.s_pools[(int)this.PoolType].RecycleInfo(this); + s_pools[(int)this.PoolType].RecycleInfo(this); } private bool Poolable => this._lockCount == 0; diff --git a/UIX/Microsoft/Iris/Input/InputItem.cs b/UIX/Microsoft/Iris/Input/InputItem.cs index 08fadd4..048fdf7 100644 --- a/UIX/Microsoft/Iris/Input/InputItem.cs +++ b/UIX/Microsoft/Iris/Input/InputItem.cs @@ -27,7 +27,7 @@ namespace Microsoft.Iris.Input ICookedInputSite target, InputInfo info) { - InputItem inputItem = InputItem.AllocateFromPool(); + InputItem inputItem = AllocateFromPool(); inputItem._manager = manager; inputItem._target = target; inputItem._info = info; @@ -37,12 +37,12 @@ namespace Microsoft.Iris.Input private static InputItem AllocateFromPool() { InputItem inputItem = null; - if (InputItem.s_cache != null) + if (s_cache != null) { - inputItem = InputItem.s_cache; - InputItem.s_cache = (InputItem)inputItem._next; + inputItem = s_cache; + s_cache = (InputItem)inputItem._next; inputItem._next = null; - --InputItem.s_cachedCount; + --s_cachedCount; } if (inputItem == null) inputItem = new InputItem(); @@ -61,11 +61,11 @@ namespace Microsoft.Iris.Input this._prev = null; this._next = null; this._owner = null; - if (InputItem.s_cachedCount >= 5) + if (s_cachedCount >= 5) return; this._next = s_cache; - InputItem.s_cache = this; - ++InputItem.s_cachedCount; + s_cache = this; + ++s_cachedCount; } public InputManager Manager => this._manager; diff --git a/UIX/Microsoft/Iris/Input/InputManager.cs b/UIX/Microsoft/Iris/Input/InputManager.cs index ac7155a..ceb1404 100644 --- a/UIX/Microsoft/Iris/Input/InputManager.cs +++ b/UIX/Microsoft/Iris/Input/InputManager.cs @@ -38,7 +38,7 @@ namespace Microsoft.Iris.Input private readonly SimpleCallback _refreshHitTargetHandler; private UIZone _mouseFocusZone; private UIZone _keyFocusZone; - private static readonly DeferredHandler s_deliverCoalescedKey = new DeferredHandler(InputManager.DeliverCoalescedKey); + private static readonly DeferredHandler s_deliverCoalescedKey = new DeferredHandler(DeliverCoalescedKey); internal InputManager(UISession session) { @@ -326,7 +326,7 @@ namespace Microsoft.Iris.Input if (!this._currentCoalesceUndelivered) { this._currentCoalesceUndelivered = true; - this._inputQueue.RawInputIdleItem(DeferredCall.Create(InputManager.s_deliverCoalescedKey, this)); + this._inputQueue.RawInputIdleItem(DeferredCall.Create(s_deliverCoalescedKey, this)); } return true; } @@ -582,7 +582,7 @@ namespace Microsoft.Iris.Input InputManager.ZoneDeliveryInfo newFocusInfo = new InputManager.ZoneDeliveryInfo(); if (mouseFocusInfo.State) newFocusInfo = deliveryInfo; - InputManager.ProcessFocusUpdates(InputDeviceType.Mouse, ref this._mouseFocusZone, newFocusInfo, target as ITreeNode); + ProcessFocusUpdates(InputDeviceType.Mouse, ref this._mouseFocusZone, newFocusInfo, target as ITreeNode); this._session.RootZone.UpdateCursor(null); } if (mouseFocusInfo.State && target == mouseFocusInfo.Other) @@ -594,7 +594,7 @@ namespace Microsoft.Iris.Input InputManager.ZoneDeliveryInfo newFocusInfo = new InputManager.ZoneDeliveryInfo(); if (keyFocusInfo.State) newFocusInfo = deliveryInfo; - InputManager.ProcessFocusUpdates(InputDeviceType.Keyboard, ref this._keyFocusZone, newFocusInfo, target as ITreeNode); + ProcessFocusUpdates(InputDeviceType.Keyboard, ref this._keyFocusZone, newFocusInfo, target as ITreeNode); } if (keyFocusInfo.State && target == keyFocusInfo.Other) flag = false; @@ -615,10 +615,10 @@ namespace Microsoft.Iris.Input return; refCurrentFocusZone = newFocusInfo.zone; if (refCurrentFocusZone == null) - InputManager.UpdateZoneFocusStates(focusType, zone, null, false, null); + UpdateZoneFocusStates(focusType, zone, null, false, null); if (newFocusInfo.zone == null) return; - InputManager.UpdateZoneFocusStates(focusType, newFocusInfo.zone, newFocusInfo.param, true, actualFocus); + UpdateZoneFocusStates(focusType, newFocusInfo.zone, newFocusInfo.param, true, actualFocus); } private static void UpdateZoneFocusStates( diff --git a/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs b/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs index a98f1a1..1696e4d 100644 --- a/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs +++ b/UIX/Microsoft/Iris/Input/KeyCharacterInfo.cs @@ -10,10 +10,10 @@ namespace Microsoft.Iris.Input { internal class KeyCharacterInfo : KeyActionInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.KeyCharacter; + private static InputInfo.InfoType s_poolType = InfoType.KeyCharacter; private char _character; - static KeyCharacterInfo() => InputInfo.SetPoolLimitMode(KeyCharacterInfo.s_poolType, false); + static KeyCharacterInfo() => SetPoolLimitMode(s_poolType, false); private KeyCharacterInfo() { @@ -30,7 +30,7 @@ namespace Microsoft.Iris.Input int scanCode, ushort eventFlags) { - KeyCharacterInfo keyCharacterInfo = (KeyCharacterInfo)InputInfo.GetFromPool(KeyCharacterInfo.s_poolType) ?? new KeyCharacterInfo(); + KeyCharacterInfo keyCharacterInfo = (KeyCharacterInfo)GetFromPool(s_poolType) ?? new KeyCharacterInfo(); keyCharacterInfo.Initialize(action, deviceType, modifiers, repeatCount, character, systemKey, nativeMessageID, scanCode, eventFlags); return keyCharacterInfo; } @@ -52,7 +52,7 @@ namespace Microsoft.Iris.Input public char Character => this._character; - protected override InputInfo.InfoType PoolType => KeyCharacterInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; public override string ToString() => InvariantString.Format("{0}({1}, Key={2})", this.GetType().Name, Action, _character); } diff --git a/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs b/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs index ce070e9..f2d2ef8 100644 --- a/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs +++ b/UIX/Microsoft/Iris/Input/KeyCommandInfo.cs @@ -10,10 +10,10 @@ namespace Microsoft.Iris.Input { internal class KeyCommandInfo : KeyActionInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.KeyCommand; + private static InputInfo.InfoType s_poolType = InfoType.KeyCommand; public CommandCode _command; - static KeyCommandInfo() => InputInfo.SetPoolLimitMode(KeyCommandInfo.s_poolType, false); + static KeyCommandInfo() => SetPoolLimitMode(s_poolType, false); private KeyCommandInfo() { @@ -24,7 +24,7 @@ namespace Microsoft.Iris.Input InputDeviceType deviceType, CommandCode command) { - KeyCommandInfo keyCommandInfo = (KeyCommandInfo)InputInfo.GetFromPool(KeyCommandInfo.s_poolType) ?? new KeyCommandInfo(); + KeyCommandInfo keyCommandInfo = (KeyCommandInfo)GetFromPool(s_poolType) ?? new KeyCommandInfo(); keyCommandInfo.Initialize(action, deviceType, command); return keyCommandInfo; } @@ -37,7 +37,7 @@ namespace Microsoft.Iris.Input public CommandCode Command => this._command; - protected override InputInfo.InfoType PoolType => KeyCommandInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; public override string ToString() => InvariantString.Format("{0}({1}, Command={2})", this.GetType().Name, Action, _command); } diff --git a/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs b/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs index d78745d..3b42e99 100644 --- a/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs +++ b/UIX/Microsoft/Iris/Input/KeyFocusInfo.cs @@ -8,12 +8,12 @@ namespace Microsoft.Iris.Input { internal class KeyFocusInfo : KeyInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.KeyFocus; + private static InputInfo.InfoType s_poolType = InfoType.KeyFocus; private bool _state; private ICookedInputSite _other; private KeyFocusReason _focusReason; - static KeyFocusInfo() => InputInfo.SetPoolLimitMode(KeyFocusInfo.s_poolType, true); + static KeyFocusInfo() => SetPoolLimitMode(s_poolType, true); private KeyFocusInfo() { @@ -24,7 +24,7 @@ namespace Microsoft.Iris.Input ICookedInputSite other, KeyFocusReason focusReason) { - KeyFocusInfo keyFocusInfo = (KeyFocusInfo)InputInfo.GetFromPool(KeyFocusInfo.s_poolType) ?? new KeyFocusInfo(); + KeyFocusInfo keyFocusInfo = (KeyFocusInfo)GetFromPool(s_poolType) ?? new KeyFocusInfo(); keyFocusInfo.Initialize(state, other, focusReason); return keyFocusInfo; } @@ -49,6 +49,6 @@ namespace Microsoft.Iris.Input public KeyFocusReason FocusReason => this._focusReason; - protected override InputInfo.InfoType PoolType => KeyFocusInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; } } diff --git a/UIX/Microsoft/Iris/Input/KeyStateInfo.cs b/UIX/Microsoft/Iris/Input/KeyStateInfo.cs index 8d1926f..e86e297 100644 --- a/UIX/Microsoft/Iris/Input/KeyStateInfo.cs +++ b/UIX/Microsoft/Iris/Input/KeyStateInfo.cs @@ -10,10 +10,10 @@ namespace Microsoft.Iris.Input { internal class KeyStateInfo : KeyActionInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.KeyState; + private static InputInfo.InfoType s_poolType = InfoType.KeyState; private Keys _key; - static KeyStateInfo() => InputInfo.SetPoolLimitMode(KeyStateInfo.s_poolType, false); + static KeyStateInfo() => SetPoolLimitMode(s_poolType, false); private KeyStateInfo() { @@ -30,7 +30,7 @@ namespace Microsoft.Iris.Input int scanCode, ushort eventFlags) { - KeyStateInfo keyStateInfo = (KeyStateInfo)InputInfo.GetFromPool(KeyStateInfo.s_poolType) ?? new KeyStateInfo(); + KeyStateInfo keyStateInfo = (KeyStateInfo)GetFromPool(s_poolType) ?? new KeyStateInfo(); keyStateInfo.Initialize(action, deviceType, modifiers, repeatCount, key, systemKey, nativeMessageID, scanCode, eventFlags); return keyStateInfo; } @@ -52,11 +52,11 @@ namespace Microsoft.Iris.Input public bool IsRepeatOf(KeyStateInfo other) => other != null && this._key == other._key && this.IsRepeatOf((KeyActionInfo)other); - public KeyStateInfo MakeRepeatableCopy() => KeyStateInfo.Create(this.Action, this.DeviceType, this.Modifiers, this.RepeatCount, this._key, this.SystemKey, this.NativeMessageID, this.ScanCode, this.KeyboardFlags); + public KeyStateInfo MakeRepeatableCopy() => Create(this.Action, this.DeviceType, this.Modifiers, this.RepeatCount, this._key, this.SystemKey, this.NativeMessageID, this.ScanCode, this.KeyboardFlags); public Keys Key => this._key; - protected override InputInfo.InfoType PoolType => KeyStateInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; public override string ToString() => InvariantString.Format("{0}({1}, Key={2})", this.GetType().Name, Action, _key); } diff --git a/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs b/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs index 86c7a3e..1f894ba 100644 --- a/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs +++ b/UIX/Microsoft/Iris/Input/MouseButtonInfo.cs @@ -10,11 +10,11 @@ namespace Microsoft.Iris.Input { internal class MouseButtonInfo : MouseActionInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.MouseButton; + private static InputInfo.InfoType s_poolType = InfoType.MouseButton; private bool _doubleClick; private bool _state; - static MouseButtonInfo() => InputInfo.SetPoolLimitMode(MouseButtonInfo.s_poolType, false); + static MouseButtonInfo() => SetPoolLimitMode(s_poolType, false); private MouseButtonInfo() { @@ -32,7 +32,7 @@ namespace Microsoft.Iris.Input bool state, uint messageID) { - MouseButtonInfo mouseButtonInfo = (MouseButtonInfo)InputInfo.GetFromPool(MouseButtonInfo.s_poolType) ?? new MouseButtonInfo(); + MouseButtonInfo mouseButtonInfo = (MouseButtonInfo)GetFromPool(s_poolType) ?? new MouseButtonInfo(); mouseButtonInfo.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, button, state, messageID); return mouseButtonInfo; } @@ -51,7 +51,7 @@ namespace Microsoft.Iris.Input { this._state = state; this._doubleClick = false; - this.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, MouseButtonInfo.EventTypeForMouseButton(state, button, modifiers), messageID, button, 0); + this.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, EventTypeForMouseButton(state, button, modifiers), messageID, button, 0); } public override InputEventType EventType => this._doubleClick ? InputEventType.MouseDoubleClick : this._eventType; @@ -73,7 +73,7 @@ namespace Microsoft.Iris.Input public bool IsDown => this._state; - protected override InputInfo.InfoType PoolType => MouseButtonInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; public override string ToString() => InvariantString.Format("{0}({1}, Button={2})", this.GetType().Name, this._state ? "Down" : "Up", Button); } diff --git a/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs b/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs index 55fa733..f62fe83 100644 --- a/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs +++ b/UIX/Microsoft/Iris/Input/MouseFocusInfo.cs @@ -8,11 +8,11 @@ namespace Microsoft.Iris.Input { internal class MouseFocusInfo : MouseInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.MouseFocus; + private static InputInfo.InfoType s_poolType = InfoType.MouseFocus; private bool _state; private ICookedInputSite _other; - static MouseFocusInfo() => InputInfo.SetPoolLimitMode(MouseFocusInfo.s_poolType, true); + static MouseFocusInfo() => SetPoolLimitMode(s_poolType, true); private MouseFocusInfo() { @@ -25,7 +25,7 @@ namespace Microsoft.Iris.Input bool state, ICookedInputSite other) { - MouseFocusInfo mouseFocusInfo = (MouseFocusInfo)InputInfo.GetFromPool(MouseFocusInfo.s_poolType) ?? new MouseFocusInfo(); + MouseFocusInfo mouseFocusInfo = (MouseFocusInfo)GetFromPool(s_poolType) ?? new MouseFocusInfo(); mouseFocusInfo.Initialize(rawSource, x, y, state, other); return mouseFocusInfo; } @@ -52,6 +52,6 @@ namespace Microsoft.Iris.Input public bool State => this._state; - protected override InputInfo.InfoType PoolType => MouseFocusInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; } } diff --git a/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs b/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs index 2302553..d75d833 100644 --- a/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs +++ b/UIX/Microsoft/Iris/Input/MouseMoveInfo.cs @@ -8,9 +8,9 @@ namespace Microsoft.Iris.Input { internal class MouseMoveInfo : MouseActionInfo { - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.MouseMove; + private static InputInfo.InfoType s_poolType = InfoType.MouseMove; - static MouseMoveInfo() => InputInfo.SetPoolLimitMode(MouseMoveInfo.s_poolType, true); + static MouseMoveInfo() => SetPoolLimitMode(s_poolType, true); private MouseMoveInfo() { @@ -25,11 +25,11 @@ namespace Microsoft.Iris.Input int screenY, InputModifiers modifiers) { - MouseMoveInfo mouseMoveInfo = (MouseMoveInfo)InputInfo.GetFromPool(MouseMoveInfo.s_poolType) ?? new MouseMoveInfo(); + MouseMoveInfo mouseMoveInfo = (MouseMoveInfo)GetFromPool(s_poolType) ?? new MouseMoveInfo(); mouseMoveInfo.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, InputEventType.MouseMove, 512U, MouseButtons.None, 0); return mouseMoveInfo; } - protected override InputInfo.InfoType PoolType => MouseMoveInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; } } diff --git a/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs b/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs index c4fcc59..dee9f6a 100644 --- a/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs +++ b/UIX/Microsoft/Iris/Input/MouseWheelInfo.cs @@ -11,9 +11,9 @@ namespace Microsoft.Iris.Input internal class MouseWheelInfo : MouseActionInfo { public const int k_defaultDelta = 120; - private static InputInfo.InfoType s_poolType = InputInfo.InfoType.MouseWheel; + private static InputInfo.InfoType s_poolType = InfoType.MouseWheel; - static MouseWheelInfo() => InputInfo.SetPoolLimitMode(MouseWheelInfo.s_poolType, true); + static MouseWheelInfo() => SetPoolLimitMode(s_poolType, true); private MouseWheelInfo() { @@ -29,13 +29,13 @@ namespace Microsoft.Iris.Input InputModifiers modifiers, int delta) { - MouseWheelInfo mouseWheelInfo = (MouseWheelInfo)InputInfo.GetFromPool(MouseWheelInfo.s_poolType) ?? new MouseWheelInfo(); + MouseWheelInfo mouseWheelInfo = (MouseWheelInfo)GetFromPool(s_poolType) ?? new MouseWheelInfo(); mouseWheelInfo.Initialize(rawSource, rawNatural, x, y, screenX, screenY, modifiers, InputEventType.MouseWheel, 522U, MouseButtons.None, delta); return mouseWheelInfo; } public override string ToString() => InvariantString.Format("{0}(Delta={1})", this.GetType().Name, WheelDelta); - protected override InputInfo.InfoType PoolType => MouseWheelInfo.s_poolType; + protected override InputInfo.InfoType PoolType => s_poolType; } } diff --git a/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs index c814c3e..c6f80d5 100644 --- a/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/ClickHandler.cs @@ -36,8 +36,8 @@ namespace Microsoft.Iris.InputHandlers this._clickType = ClickType.Key | ClickType.GamePad | ClickType.LeftMouse; this._clickCount = ClickCount.Single; this._repeat = true; - this._repeatDelay = ClickHandler.DefaultRepeatDelay; - this._repeatRate = ClickHandler.DefaultRepeatRate; + this._repeatDelay = DefaultRepeatDelay; + this._repeatRate = DefaultRepeatRate; this._handle = true; } @@ -191,7 +191,7 @@ namespace Microsoft.Iris.InputHandlers private void CancelClick(ClickType clickType) { - if (this._clickTypeInProgress != ClickType.None && Microsoft.Iris.Library.Bits.TestAllFlags((uint)clickType, (uint)this._clickTypeInProgress)) + if (this._clickTypeInProgress != ClickType.None && Library.Bits.TestAllFlags((uint)clickType, (uint)this._clickTypeInProgress)) { bool clicking = this.Clicking; this._clickTypeInProgress = ClickType.None; @@ -211,7 +211,7 @@ namespace Microsoft.Iris.InputHandlers return this.ShouldHandleEvent(type) && this._clickCount == count && this.ShouldHandleEvent(modifiers); } - private bool ShouldHandleEvent(ClickType type) => Microsoft.Iris.Library.Bits.TestAnyFlags((uint)this._clickType, (uint)type); + private bool ShouldHandleEvent(ClickType type) => Library.Bits.TestAnyFlags((uint)this._clickType, (uint)type); private bool OnClickEvent( ICookedInputSite clickTarget, @@ -307,34 +307,34 @@ namespace Microsoft.Iris.InputHandlers } } - private static int DefaultRepeatDelay => ClickHandler.s_defaultRepeatDelay; + private static int DefaultRepeatDelay => s_defaultRepeatDelay; - private static int DefaultRepeatRate => ClickHandler.s_defaultRepeatRate; + private static int DefaultRepeatRate => s_defaultRepeatRate; protected override void OnMousePrimaryDown(UIClass ui, MouseButtonInfo info) { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) return; info.MarkHandled(); } protected override void OnMouseSecondaryDown(UIClass ui, MouseButtonInfo info) { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) return; info.MarkHandled(); } protected override void OnMousePrimaryUp(UIClass ui, MouseButtonInfo info) { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) return; info.MarkHandled(); } protected override void OnMouseSecondaryUp(UIClass ui, MouseButtonInfo info) { - if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, this.GetClickType(info.Button), InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) return; info.MarkHandled(); } @@ -342,9 +342,9 @@ namespace Microsoft.Iris.InputHandlers protected override void OnMouseDoubleClick(UIClass ui, MouseButtonInfo info) { ClickType clickType = this.GetClickType(info.Button); - if (!this.OnClickEvent(info.Target, clickType, InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers), ClickCount.Double)) + if (!this.OnClickEvent(info.Target, clickType, InputHandlerTransition.Down, GetModifiers(info.Modifiers), ClickCount.Double)) return; - this.OnClickEvent(info.Target, clickType, InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers), ClickCount.Double); + this.OnClickEvent(info.Target, clickType, InputHandlerTransition.Up, GetModifiers(info.Modifiers), ClickCount.Double); if (!this._handle) return; info.MarkHandled(); @@ -371,7 +371,7 @@ namespace Microsoft.Iris.InputHandlers switch (info.Key) { case Keys.Enter: - if (!this.OnClickEvent(info.Target, ClickType.EnterKey, InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.EnterKey, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; @@ -384,17 +384,17 @@ namespace Microsoft.Iris.InputHandlers this._handleEscape = true; break; case Keys.Space: - if (!this.OnClickEvent(info.Target, ClickType.SpaceKey, InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.SpaceKey, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; case Keys.GamePadA: - if (!this.OnClickEvent(info.Target, ClickType.GamePadA, InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.GamePadA, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; case Keys.GamePadStart: - if (!this.OnClickEvent(info.Target, ClickType.GamePadStart, InputHandlerTransition.Down, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.GamePadStart, InputHandlerTransition.Down, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; @@ -406,7 +406,7 @@ namespace Microsoft.Iris.InputHandlers switch (info.Key) { case Keys.Enter: - if (!this.OnClickEvent(info.Target, ClickType.EnterKey, InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.EnterKey, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; @@ -418,17 +418,17 @@ namespace Microsoft.Iris.InputHandlers this._handleEscape = false; break; case Keys.Space: - if (!this.OnClickEvent(info.Target, ClickType.SpaceKey, InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.SpaceKey, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; case Keys.GamePadA: - if (!this.OnClickEvent(info.Target, ClickType.GamePadA, InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.GamePadA, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; case Keys.GamePadStart: - if (!this.OnClickEvent(info.Target, ClickType.GamePadStart, InputHandlerTransition.Up, InputHandler.GetModifiers(info.Modifiers)) || !this._handle) + if (!this.OnClickEvent(info.Target, ClickType.GamePadStart, InputHandlerTransition.Up, GetModifiers(info.Modifiers)) || !this._handle) break; info.MarkHandled(); break; @@ -440,7 +440,7 @@ namespace Microsoft.Iris.InputHandlers switch (info.Character) { case '\r': - if (!this.ShouldHandleEvent(ClickType.EnterKey, InputHandler.GetModifiers(info.Modifiers), ClickCount.Single) || !this._handle) + if (!this.ShouldHandleEvent(ClickType.EnterKey, GetModifiers(info.Modifiers), ClickCount.Single) || !this._handle) break; info.MarkHandled(); break; @@ -450,7 +450,7 @@ namespace Microsoft.Iris.InputHandlers info.MarkHandled(); break; case ' ': - if (!this.ShouldHandleEvent(ClickType.SpaceKey, InputHandler.GetModifiers(info.Modifiers), ClickCount.Single) || !this._handle) + if (!this.ShouldHandleEvent(ClickType.SpaceKey, GetModifiers(info.Modifiers), ClickCount.Single) || !this._handle) break; info.MarkHandled(); break; diff --git a/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs b/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs index cd8ab1d..146d554 100644 --- a/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs +++ b/UIX/Microsoft/Iris/InputHandlers/DragDropHelper.cs @@ -16,36 +16,36 @@ namespace Microsoft.Iris.InputHandlers private static DropTargetHandler _targetHandler; private static DropAction _dropAction; - public static bool DraggingInternally => DragDropHelper._draggingInternally; + public static bool DraggingInternally => _draggingInternally; - public static DragSourceHandler SourceHandler => DragDropHelper._sourceHandler; + public static DragSourceHandler SourceHandler => _sourceHandler; public static DropTargetHandler TargetHandler { - get => DragDropHelper._targetHandler; + get => _targetHandler; set { - if (DragDropHelper._targetHandler == value) + if (_targetHandler == value) return; - DropTargetHandler targetHandler = DragDropHelper._targetHandler; - DragDropHelper._targetHandler = value; - DragDropHelper.OnAllowedDropActionsChanged(); + DropTargetHandler targetHandler = _targetHandler; + _targetHandler = value; + OnAllowedDropActionsChanged(); } } - public static DropAction AllowedDropActions => DragDropHelper._targetHandler == null ? DropAction.None : DragDropHelper._targetHandler.AllowedDropActions; + public static DropAction AllowedDropActions => _targetHandler == null ? DropAction.None : _targetHandler.AllowedDropActions; public static InputModifiers Modifiers => UISession.Default.InputManager.DragModifiers; public static void OnAllowedDropActionsChanged() { - if (DragDropHelper.DraggingInternally) + if (DraggingInternally) { - DragDropHelper._sourceHandler.UpdateCurrentAction(); + _sourceHandler.UpdateCurrentAction(); } else { - uint allowedDropActions = (uint)DragDropHelper.AllowedDropActions; + uint allowedDropActions = (uint)AllowedDropActions; UISession.Default.Form.SetDragDropResult(allowedDropActions, allowedDropActions); } } @@ -58,16 +58,16 @@ namespace Microsoft.Iris.InputHandlers int formY, InputModifiers modifiers) { - DragDropHelper._sourceHandler = sourceHandler; - DragDropHelper._draggingInternally = true; + _sourceHandler = sourceHandler; + _draggingInternally = true; UISession.Default.Form.IsDragInProgress = true; - UISession.Default.InputManager.SimulateDragEnter(source, target, DragDropHelper._sourceHandler.Value, formX, formY, modifiers); + UISession.Default.InputManager.SimulateDragEnter(source, target, _sourceHandler.Value, formX, formY, modifiers); } public static void Requery(InputModifiers modifiers) { UISession.Default.InputManager.SimulateDragOver(modifiers); - DragDropHelper._sourceHandler.UpdateCurrentAction(); + _sourceHandler.UpdateCurrentAction(); } public static void Requery( @@ -82,8 +82,8 @@ namespace Microsoft.Iris.InputHandlers public static void EndDrag(IRawInputSite target, InputModifiers modifiers, DropAction action) { DragOperation formOperation = DragOperation.Drop; - DragDropHelper._dropAction = action; - DragDropHelper._draggingInternally = false; + _dropAction = action; + _draggingInternally = false; if (action == DropAction.None) { target = null; @@ -95,9 +95,9 @@ namespace Microsoft.Iris.InputHandlers public static void OnDragComplete() { - DragDropHelper._sourceHandler.OnEndDrag(DragDropHelper._dropAction); - DragDropHelper._sourceHandler = null; - DragDropHelper._dropAction = DropAction.None; + _sourceHandler.OnEndDrag(_dropAction); + _sourceHandler = null; + _dropAction = DropAction.None; } public static object GetValue() => UISession.Default.InputManager.GetDragDropValue(); diff --git a/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs b/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs index 6a24f95..f1a55c0 100644 --- a/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/DragHandler.cs @@ -268,7 +268,7 @@ namespace Microsoft.Iris.InputHandlers Point point = new Point(info.ScreenX, info.ScreenY); if (this.BeginDragPolicy == BeginDragPolicy.Down) { - this.BeginDrag(relative, relative, point, point, InputHandler.GetModifiers(info.Modifiers)); + this.BeginDrag(relative, relative, point, point, GetModifiers(info.Modifiers)); info.MarkHandled(); } else @@ -303,12 +303,12 @@ namespace Microsoft.Iris.InputHandlers Point point = new Point(info.ScreenX, info.ScreenY); if (this.Dragging) { - this.InDrag(ui1, point, InputHandler.GetModifiers(info.Modifiers)); + this.InDrag(ui1, point, GetModifiers(info.Modifiers)); info.MarkHandled(); } else if (Math.Abs(point.X - this._initialScreenPosition.X) >= Win32Api.GetSystemMetrics(68) || Math.Abs(point.Y - this._initialScreenPosition.Y) >= Win32Api.GetSystemMetrics(69)) { - this.BeginDrag(this._initialPosition, this.TransformToRelative(ui1), this._initialScreenPosition, point, InputHandler.GetModifiers(info.Modifiers)); + this.BeginDrag(this._initialPosition, this.TransformToRelative(ui1), this._initialScreenPosition, point, GetModifiers(info.Modifiers)); info.MarkHandled(); } } @@ -409,7 +409,7 @@ namespace Microsoft.Iris.InputHandlers IList added = new List(); RectangleF uiBounds; this.GetDragBounds(out RectangleF _, out uiBounds); - DragHandler.GetEventContexts(this.UI, added, null, RectangleF.Zero, uiBounds); + GetEventContexts(this.UI, added, null, RectangleF.Zero, uiBounds); return added; } @@ -434,7 +434,7 @@ namespace Microsoft.Iris.InputHandlers return; this._addedContexts = new List(); this._removedContexts = new List(); - DragHandler.GetEventContexts(this.UI, _addedContexts, _removedContexts, this.TransformFromRelative(this._contextBounds), uiBounds); + GetEventContexts(this.UI, _addedContexts, _removedContexts, this.TransformFromRelative(this._contextBounds), uiBounds); this._contextBounds = relativeBounds; } @@ -465,7 +465,7 @@ namespace Microsoft.Iris.InputHandlers { RectangleF oldBounds1 = node1.RootItem.Parent.TransformFromAncestor(rootItem.Parent, oldBounds); RectangleF newBounds1 = node1.RootItem.Parent.TransformFromAncestor(rootItem.Parent, newBounds); - DragHandler.GetEventContexts(node1, added, removed, oldBounds1, newBounds1); + GetEventContexts(node1, added, removed, oldBounds1, newBounds1); } } } diff --git a/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs b/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs index b5c2dc1..119b585 100644 --- a/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/FocusHandler.cs @@ -60,7 +60,7 @@ namespace Microsoft.Iris.InputHandlers this.FireNotification(NotificationID.LostFocus); } - private bool ShouldHandleEvent(KeyFocusInfo info) => Microsoft.Iris.Library.Bits.TestAnyFlags((uint)this.Reason, (uint)FocusHandler.GetFocusChangeReason(info)) && this.ShouldHandleEvent(InputHandler.GetModifiers(UISession.Default.InputManager.Modifiers)); + private bool ShouldHandleEvent(KeyFocusInfo info) => Library.Bits.TestAnyFlags((uint)this.Reason, (uint)GetFocusChangeReason(info)) && this.ShouldHandleEvent(GetModifiers(UISession.Default.InputManager.Modifiers)); private static FocusChangeReason GetFocusChangeReason(KeyFocusInfo info) { diff --git a/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs b/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs index 7aabd1a..b095d13 100644 --- a/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/KeyHandler.cs @@ -132,9 +132,9 @@ namespace Microsoft.Iris.InputHandlers protected override void OnKeyDown(UIClass ui, KeyStateInfo info) { Keys key = info.Key; - InputHandlerModifiers modifiers = InputHandler.GetModifiers(info.Modifiers); + InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); if (key != (Keys)this._key) - KeyHandler.TranslateKey(ref key, ref modifiers); + TranslateKey(ref key, ref modifiers); if (!this.KeyMatches(key) || !this.ShouldHandleEvent(modifiers)) return; bool flag; @@ -161,9 +161,9 @@ namespace Microsoft.Iris.InputHandlers protected override void OnKeyUp(UIClass ui, KeyStateInfo info) { Keys key = info.Key; - InputHandlerModifiers modifiers = InputHandler.GetModifiers(info.Modifiers); + InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); if (key != (Keys)this._key) - KeyHandler.TranslateKey(ref key, ref modifiers); + TranslateKey(ref key, ref modifiers); if (!this.KeyMatches(key) || !this.ShouldHandleEvent(modifiers)) return; this._pressing = false; @@ -192,7 +192,7 @@ namespace Microsoft.Iris.InputHandlers return this._key == KeyHandlerKey.Any && candidate != Keys.None; } - public static void TranslateKey(ref Keys key, ref InputHandlerModifiers modifiers) => KeyHandler.TranslateKey(ref key, ref modifiers, Orientation.Horizontal); + public static void TranslateKey(ref Keys key, ref InputHandlerModifiers modifiers) => TranslateKey(ref key, ref modifiers, Orientation.Horizontal); public static void TranslateKey( ref Keys key, diff --git a/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs index 79f9adb..7cf2d84 100644 --- a/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/ModifierInputHandler.cs @@ -58,6 +58,6 @@ namespace Microsoft.Iris.InputHandlers } } - protected bool ShouldHandleEvent(InputHandlerModifiers modifiers) => (this._disallowedModifiers == InputHandlerModifiers.None || !Microsoft.Iris.Library.Bits.TestAnyFlags((uint)modifiers, (uint)this._disallowedModifiers)) && (this._requiredModifiers == InputHandlerModifiers.None || Microsoft.Iris.Library.Bits.TestAllFlags((uint)modifiers, (uint)this._requiredModifiers)); + protected bool ShouldHandleEvent(InputHandlerModifiers modifiers) => (this._disallowedModifiers == InputHandlerModifiers.None || !Library.Bits.TestAnyFlags((uint)modifiers, (uint)this._disallowedModifiers)) && (this._requiredModifiers == InputHandlerModifiers.None || Library.Bits.TestAllFlags((uint)modifiers, (uint)this._requiredModifiers)); } } diff --git a/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs b/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs index bfadadc..6d4e617 100644 --- a/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/ScrollingHandler.cs @@ -149,28 +149,28 @@ namespace Microsoft.Iris.InputHandlers if (info.Key != this._currentCampingKey) this.EndCamp(); Keys key = info.Key; - InputHandlerModifiers modifiers = InputHandler.GetModifiers(info.Modifiers); + InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); KeyHandler.TranslateKey(ref key, ref modifiers, this.Orientation); switch (this.ShouldHandleKey(key)) { - case ScrollingHandler.HandleKeyPolicy.None: + case HandleKeyPolicy.None: return; - case ScrollingHandler.HandleKeyPolicy.Up: + case HandleKeyPolicy.Up: this._model.ScrollUp(this._useFocusBehavior); break; - case ScrollingHandler.HandleKeyPolicy.Down: + case HandleKeyPolicy.Down: this._model.ScrollDown(this._useFocusBehavior); break; - case ScrollingHandler.HandleKeyPolicy.PageUp: + case HandleKeyPolicy.PageUp: this._model.PageUp(this._useFocusBehavior); break; - case ScrollingHandler.HandleKeyPolicy.PageDown: + case HandleKeyPolicy.PageDown: this._model.PageDown(this._useFocusBehavior); break; - case ScrollingHandler.HandleKeyPolicy.Home: + case HandleKeyPolicy.Home: this._model.Home(this._useFocusBehavior); break; - case ScrollingHandler.HandleKeyPolicy.End: + case HandleKeyPolicy.End: this._model.End(this._useFocusBehavior); break; } @@ -202,9 +202,9 @@ namespace Microsoft.Iris.InputHandlers if (info.Key == this._currentCampingKey) this.EndCamp(); Keys key = info.Key; - InputHandlerModifiers modifiers = InputHandler.GetModifiers(info.Modifiers); + InputHandlerModifiers modifiers = GetModifiers(info.Modifiers); KeyHandler.TranslateKey(ref key, ref modifiers, this.Orientation); - if (this.ShouldHandleKey(key) == ScrollingHandler.HandleKeyPolicy.None) + if (this.ShouldHandleKey(key) == HandleKeyPolicy.None) return; info.MarkHandled(); } @@ -263,62 +263,62 @@ namespace Microsoft.Iris.InputHandlers private ScrollingHandler.HandleKeyPolicy ShouldHandleKey(Keys key) { - ScrollingHandler.HandleKeyPolicy handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.None; + ScrollingHandler.HandleKeyPolicy handleKeyPolicy = HandleKeyPolicy.None; switch (key) { case Keys.PageUp: if (this._handlePageKeysFlag) { - handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.PageUp; + handleKeyPolicy = HandleKeyPolicy.PageUp; break; } break; case Keys.Next: if (this._handlePageKeysFlag) { - handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.PageDown; + handleKeyPolicy = HandleKeyPolicy.PageDown; break; } break; case Keys.End: if (this._handleHomeEndKeysFlag) { - handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.End; + handleKeyPolicy = HandleKeyPolicy.End; break; } break; case Keys.Home: if (this._handleHomeEndKeysFlag) { - handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.Home; + handleKeyPolicy = HandleKeyPolicy.Home; break; } break; case Keys.Left: if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Horizontal) { - handleKeyPolicy = this.UI.Zone.Session.IsRtl ? ScrollingHandler.HandleKeyPolicy.Down : ScrollingHandler.HandleKeyPolicy.Up; + handleKeyPolicy = this.UI.Zone.Session.IsRtl ? HandleKeyPolicy.Down : HandleKeyPolicy.Up; break; } break; case Keys.Up: if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Vertical) { - handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.Up; + handleKeyPolicy = HandleKeyPolicy.Up; break; } break; case Keys.Right: if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Horizontal) { - handleKeyPolicy = this.UI.Zone.Session.IsRtl ? ScrollingHandler.HandleKeyPolicy.Up : ScrollingHandler.HandleKeyPolicy.Down; + handleKeyPolicy = this.UI.Zone.Session.IsRtl ? HandleKeyPolicy.Up : HandleKeyPolicy.Down; break; } break; case Keys.Down: if (this._handleDirectionalKeysFlag && this.Orientation == Orientation.Vertical) { - handleKeyPolicy = ScrollingHandler.HandleKeyPolicy.Down; + handleKeyPolicy = HandleKeyPolicy.Down; break; } break; diff --git a/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs b/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs index dc21eff..0de2f63 100644 --- a/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs +++ b/UIX/Microsoft/Iris/InputHandlers/TextEditingHandler.cs @@ -66,7 +66,7 @@ namespace Microsoft.Iris.InputHandlers this._readOnlyChangedHandler = new EventHandler(this.OnEditableTextReadOnlyChanged); this._valueChangedHandler = new EventHandler(this.OnEditableTextValueChanged); this._activationStateHandler = new EventHandler(this.OnActivationChanged); - this.SetBit(TextEditingHandler.Bits.AcceptsEnter); + this.SetBit(Bits.AcceptsEnter); } protected override void OnDispose() @@ -204,10 +204,10 @@ namespace Microsoft.Iris.InputHandlers public bool DetectUrls { - get => this.GetBit(TextEditingHandler.Bits.DetectUrls); + get => this.GetBit(Bits.DetectUrls); set { - if (!this.ChangeBit(TextEditingHandler.Bits.DetectUrls, value)) + if (!this.ChangeBit(Bits.DetectUrls, value)) return; this._editControl.DetectUrls = value; this.FireThreadSafeNotification(NotificationID.DetectUrls); @@ -504,10 +504,10 @@ namespace Microsoft.Iris.InputHandlers public bool Overtype { - get => this.GetBit(TextEditingHandler.Bits.Overtype); + get => this.GetBit(Bits.Overtype); set { - if (!this.ChangeBit(TextEditingHandler.Bits.Overtype, value)) + if (!this.ChangeBit(Bits.Overtype, value)) return; this.FireThreadSafeNotification(NotificationID.Overtype); } @@ -515,10 +515,10 @@ namespace Microsoft.Iris.InputHandlers public bool AcceptsTab { - get => this.GetBit(TextEditingHandler.Bits.AcceptsTab); + get => this.GetBit(Bits.AcceptsTab); set { - if (!this.ChangeBit(TextEditingHandler.Bits.AcceptsTab, value)) + if (!this.ChangeBit(Bits.AcceptsTab, value)) return; this.FireThreadSafeNotification(NotificationID.AcceptsTab); } @@ -526,10 +526,10 @@ namespace Microsoft.Iris.InputHandlers public bool AcceptsEnter { - get => this.GetBit(TextEditingHandler.Bits.AcceptsEnter); + get => this.GetBit(Bits.AcceptsEnter); set { - if (!this.ChangeBit(TextEditingHandler.Bits.AcceptsEnter, value)) + if (!this.ChangeBit(Bits.AcceptsEnter, value)) return; this.FireThreadSafeNotification(NotificationID.AcceptsEnter); } @@ -539,7 +539,7 @@ namespace Microsoft.Iris.InputHandlers { set { - if (!this.ChangeBit(TextEditingHandler.Bits.WordWrap, value)) + if (!this.ChangeBit(Bits.WordWrap, value)) return; this._editControl.SetWordWrap(value); if (!value) @@ -552,9 +552,9 @@ namespace Microsoft.Iris.InputHandlers private void CreateCommands() { - if (this.GetBit(TextEditingHandler.Bits.CommandsCreated)) + if (this.GetBit(Bits.CommandsCreated)) return; - this.SetBit(TextEditingHandler.Bits.CommandsCreated); + this.SetBit(Bits.CommandsCreated); this._undoCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Undo)); this._cutCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Cut)); this._copyCommand = new TextEditingHandler.TextEditingCommand(new SimpleCallback(this._editControl.Copy)); @@ -656,7 +656,7 @@ namespace Microsoft.Iris.InputHandlers private void UpdateSelectionAndReadOnlyCommands() { - if (!this.GetBit(TextEditingHandler.Bits.CommandsCreated)) + if (!this.GetBit(Bits.CommandsCreated)) return; bool flag1 = !this._selection.IsEmpty; bool flag2 = this._editData == null || this._editData.ReadOnly; @@ -670,10 +670,10 @@ namespace Microsoft.Iris.InputHandlers { if (!Application.IsApplicationThread) { - Application.DeferredInvoke(args => ((IRichTextCallbacks)args).TextChanged(), this, Microsoft.Iris.DeferredInvokePriority.Normal); + Application.DeferredInvoke(args => ((IRichTextCallbacks)args).TextChanged(), this, DeferredInvokePriority.Normal); return new HRESULT(0); } - if (this.GetBit(TextEditingHandler.Bits.CommandsCreated)) + if (this.GetBit(Bits.CommandsCreated)) this.UpdateTextBasedCommandAvailability(); if (this._editData != null && !this.InsideContentChangeOnRichEdit) { @@ -688,7 +688,7 @@ namespace Microsoft.Iris.InputHandlers { if (!Application.IsApplicationThread) { - Application.DeferredInvoke(args => ((IRichTextCallbacks)args).InvalidateContent(), this, Microsoft.Iris.DeferredInvokePriority.Normal); + Application.DeferredInvoke(args => ((IRichTextCallbacks)args).InvalidateContent(), this, DeferredInvokePriority.Normal); return new HRESULT(0); } if (this._textDisplay != null) @@ -883,11 +883,11 @@ namespace Microsoft.Iris.InputHandlers private void ScheduleScrollbarUpdate(bool vertical) { - bool flag = !this.GetBit(TextEditingHandler.Bits.PendingVerticalScrollbarUpdate) && !this.GetBit(TextEditingHandler.Bits.PendingHorizontalScrollbarUpdate); + bool flag = !this.GetBit(Bits.PendingVerticalScrollbarUpdate) && !this.GetBit(Bits.PendingHorizontalScrollbarUpdate); if (vertical) - this.SetBit(TextEditingHandler.Bits.PendingVerticalScrollbarUpdate); + this.SetBit(Bits.PendingVerticalScrollbarUpdate); else - this.SetBit(TextEditingHandler.Bits.PendingHorizontalScrollbarUpdate); + this.SetBit(Bits.PendingHorizontalScrollbarUpdate); if (!flag) return; if (this._updateScrollbars == null) @@ -897,15 +897,15 @@ namespace Microsoft.Iris.InputHandlers private void UpdateScrollbars() { - if (this.GetBit(TextEditingHandler.Bits.PendingVerticalScrollbarUpdate)) + if (this.GetBit(Bits.PendingVerticalScrollbarUpdate)) { - this.ClearBit(TextEditingHandler.Bits.PendingVerticalScrollbarUpdate); + this.ClearBit(Bits.PendingVerticalScrollbarUpdate); this._verticalScrollModel.UpdateState(this._pendingVerticalScrollState); this._pendingVerticalScrollState = new TextScrollModel.State(); } - if (!this.GetBit(TextEditingHandler.Bits.PendingHorizontalScrollbarUpdate)) + if (!this.GetBit(Bits.PendingHorizontalScrollbarUpdate)) return; - this.ClearBit(TextEditingHandler.Bits.PendingHorizontalScrollbarUpdate); + this.ClearBit(Bits.PendingHorizontalScrollbarUpdate); this._horizontalScrollModel.UpdateState(this._pendingHorizontalScrollState); this._pendingHorizontalScrollState = new TextScrollModel.State(); } @@ -982,50 +982,50 @@ namespace Microsoft.Iris.InputHandlers private bool HandledTabKeyDown { - get => this.GetBit(TextEditingHandler.Bits.HandledTabKeyDown); - set => this.SetBit(TextEditingHandler.Bits.HandledTabKeyDown, value); + get => this.GetBit(Bits.HandledTabKeyDown); + set => this.SetBit(Bits.HandledTabKeyDown, value); } private bool HandledEnterKeyDown { - get => this.GetBit(TextEditingHandler.Bits.HandledEnterKeyDown); - set => this.SetBit(TextEditingHandler.Bits.HandledEnterKeyDown, value); + get => this.GetBit(Bits.HandledEnterKeyDown); + set => this.SetBit(Bits.HandledEnterKeyDown, value); } private bool InputOffsetDirty { - get => this.GetBit(TextEditingHandler.Bits.InputOffsetDirty); - set => this.SetBit(TextEditingHandler.Bits.InputOffsetDirty, value); + get => this.GetBit(Bits.InputOffsetDirty); + set => this.SetBit(Bits.InputOffsetDirty, value); } private bool MousePrimaryDown { - get => this.GetBit(TextEditingHandler.Bits.MousePrimaryDown); - set => this.SetBit(TextEditingHandler.Bits.MousePrimaryDown, value); + get => this.GetBit(Bits.MousePrimaryDown); + set => this.SetBit(Bits.MousePrimaryDown, value); } private bool InsideValueChangeOnEditableTextData { - get => this.GetBit(TextEditingHandler.Bits.InsideValueChangeOnEditableTextData); - set => this.SetBit(TextEditingHandler.Bits.InsideValueChangeOnEditableTextData, value); + get => this.GetBit(Bits.InsideValueChangeOnEditableTextData); + set => this.SetBit(Bits.InsideValueChangeOnEditableTextData, value); } private bool InsideContentChangeOnRichEdit { - get => this.GetBit(TextEditingHandler.Bits.InsideContentChangeOnRichEdit); - set => this.SetBit(TextEditingHandler.Bits.InsideContentChangeOnRichEdit, value); + get => this.GetBit(Bits.InsideContentChangeOnRichEdit); + set => this.SetBit(Bits.InsideContentChangeOnRichEdit, value); } private bool RichEditCaretVisible { - get => this.GetBit(TextEditingHandler.Bits.RichEditCaretVisible); - set => this.SetBit(TextEditingHandler.Bits.RichEditCaretVisible, value); + get => this.GetBit(Bits.RichEditCaretVisible); + set => this.SetBit(Bits.RichEditCaretVisible, value); } private bool WindowIsActivated { - get => this.GetBit(TextEditingHandler.Bits.WindowIsActivated); - set => this.SetBit(TextEditingHandler.Bits.WindowIsActivated, value); + get => this.GetBit(Bits.WindowIsActivated); + set => this.SetBit(Bits.WindowIsActivated, value); } private bool GetBit(TextEditingHandler.Bits lookupBit) => ((TextEditingHandler.Bits)this._bits & lookupBit) != 0; diff --git a/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs b/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs index 040d81c..3b46a0f 100644 --- a/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layout/AreaOfInterestLayoutInput.cs @@ -33,9 +33,9 @@ namespace Microsoft.Iris.Layout public Inset Margins => this._margins; - DataCookie ILayoutInput.Data => AreaOfInterestLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; - public static DataCookie Data => AreaOfInterestLayoutInput.s_dataProperty; + public static DataCookie Data => s_dataProperty; public override string ToString() => InvariantString.Format("{0}({1})", this.GetType().Name, _id); } diff --git a/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs b/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs index c5e4869..4fc2a24 100644 --- a/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/AnchorLayout.cs @@ -48,9 +48,9 @@ namespace Microsoft.Iris.Layouts { packet = new AnchorLayout.Packet(); layoutNode.MeasureData = packet; - packet.ParentRecord = new AnchorLayout.Record("Parent", new Rectangle(Point.Zero, constraint), AnchorLayout.LayoutPhase.Done); - packet.ParentActualRecord = new AnchorLayout.Record("ParentActual", Rectangle.Zero, AnchorLayout.LayoutPhase.Arrange); - packet.AreaOfInterestRecord = new AnchorLayout.Record("Focus", Rectangle.Zero, AnchorLayout.LayoutPhase.Arrange); + packet.ParentRecord = new AnchorLayout.Record("Parent", new Rectangle(Point.Zero, constraint), LayoutPhase.Done); + packet.ParentActualRecord = new AnchorLayout.Record("ParentActual", Rectangle.Zero, LayoutPhase.Arrange); + packet.AreaOfInterestRecord = new AnchorLayout.Record("Focus", Rectangle.Zero, LayoutPhase.Arrange); packet.Records = new Vector(layoutNode.LayoutChildrenCount); } else @@ -90,7 +90,7 @@ namespace Microsoft.Iris.Layouts packet.Records.RemoveRange(index, packet.Records.Count - index); foreach (AnchorLayout.Record record in packet.Records) { - if (record.Phase == AnchorLayout.LayoutPhase.Untouched) + if (record.Phase == LayoutPhase.Untouched) { packet.CircularityBreakerRecord = null; this.MeasureChild(packet, record); @@ -100,13 +100,13 @@ namespace Microsoft.Iris.Layouts { foreach (AnchorLayout.Record record in packet.Records) { - if (record.Phase == AnchorLayout.LayoutPhase.Circular) - record.Phase = AnchorLayout.LayoutPhase.Untouched; + if (record.Phase == LayoutPhase.Circular) + record.Phase = LayoutPhase.Untouched; } packet.CircularitiesDetected = false; foreach (AnchorLayout.Record record in packet.Records) { - if (record.Phase == AnchorLayout.LayoutPhase.Untouched) + if (record.Phase == LayoutPhase.Untouched) this.MeasureChild(packet, record); } } @@ -134,13 +134,13 @@ namespace Microsoft.Iris.Layouts private void MeasureChild(AnchorLayout.Packet packet, AnchorLayout.Record record) { AnchorLayoutInput input = record.Input; - record.Phase = AnchorLayout.LayoutPhase.InProgress; + record.Phase = LayoutPhase.InProgress; bool allArrangePhase = true; bool anyArrangePhase = false; - int edge1 = this.ComputeEdge(packet, "Left", input.Left, AnchorLayout.s_anchorParent0, Orientation.Horizontal, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - int edge2 = this.ComputeEdge(packet, "Top", input.Top, AnchorLayout.s_anchorParent0, Orientation.Vertical, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - int edge3 = this.ComputeEdge(packet, "Right", input.Right, AnchorLayout.s_anchorParent1, Orientation.Horizontal, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); - int edge4 = this.ComputeEdge(packet, "Bottom", input.Bottom, AnchorLayout.s_anchorParent1, Orientation.Vertical, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); + int edge1 = this.ComputeEdge(packet, "Left", input.Left, s_anchorParent0, Orientation.Horizontal, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); + int edge2 = this.ComputeEdge(packet, "Top", input.Top, s_anchorParent0, Orientation.Vertical, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); + int edge3 = this.ComputeEdge(packet, "Right", input.Right, s_anchorParent1, Orientation.Horizontal, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); + int edge4 = this.ComputeEdge(packet, "Bottom", input.Bottom, s_anchorParent1, Orientation.Vertical, record, out AnchorLayout.Record _, ref allArrangePhase, ref anyArrangePhase); if (anyArrangePhase) { if (!allArrangePhase) @@ -153,27 +153,27 @@ namespace Microsoft.Iris.Layouts ErrorManager.ReportError("AnchorLayoutInput {0} cannot contribute to width or height.", record.Input); record.Invalid = true; } - record.Phase = AnchorLayout.LayoutPhase.Arrange; + record.Phase = LayoutPhase.Arrange; } else { - AnchorLayout.Normalize(ref edge1, ref edge3); - AnchorLayout.Normalize(ref edge2, ref edge4); + Normalize(ref edge1, ref edge3); + Normalize(ref edge2, ref edge4); int constraintMaxValue1; - AnchorLayout.ComputeConstraint(edge1, edge3, out constraintMaxValue1); + ComputeConstraint(edge1, edge3, out constraintMaxValue1); int constraintMaxValue2; - AnchorLayout.ComputeConstraint(edge2, edge4, out constraintMaxValue2); + ComputeConstraint(edge2, edge4, out constraintMaxValue2); Size constraint = new Size(constraintMaxValue1, constraintMaxValue2); record.LayoutNode.Measure(constraint); int size1; - int x = AnchorLayout.LocationFromEdges(input.Left, input.Right, edge1, edge3, record.LayoutNode.DesiredSize.Width, record.LayoutNode.AlignedSize.Width, record.LayoutNode.AlignmentOffset.X, out size1); + int x = LocationFromEdges(input.Left, input.Right, edge1, edge3, record.LayoutNode.DesiredSize.Width, record.LayoutNode.AlignedSize.Width, record.LayoutNode.AlignmentOffset.X, out size1); int size2; - int y = AnchorLayout.LocationFromEdges(input.Top, input.Bottom, edge2, edge4, record.LayoutNode.DesiredSize.Height, record.LayoutNode.AlignedSize.Height, record.LayoutNode.AlignmentOffset.Y, out size2); + int y = LocationFromEdges(input.Top, input.Bottom, edge2, edge4, record.LayoutNode.DesiredSize.Height, record.LayoutNode.AlignedSize.Height, record.LayoutNode.AlignmentOffset.Y, out size2); record.Bounds = new Rectangle(x, y, size1, size2); bool flag = packet.CircularityBreakerRecord == record; - if (record.Phase != AnchorLayout.LayoutPhase.InProgress && !flag) + if (record.Phase != LayoutPhase.InProgress && !flag) return; - record.Phase = AnchorLayout.LayoutPhase.Done; + record.Phase = LayoutPhase.Done; Rectangle bounds = record.Bounds; if (!input.ContributesToWidth) { @@ -207,31 +207,31 @@ namespace Microsoft.Iris.Layouts allArrangePhase = false; return 0; } - bool flag = recordRef.Phase == AnchorLayout.LayoutPhase.Arrange; + bool flag = recordRef.Phase == LayoutPhase.Arrange; allArrangePhase &= flag; anyArrangePhase |= flag; record.Visible &= recordRef.Visible; Rectangle bounds = recordRef.Bounds; - if (recordRef.Phase != AnchorLayout.LayoutPhase.Done && recordRef.Phase != AnchorLayout.LayoutPhase.Arrange) + if (recordRef.Phase != LayoutPhase.Done && recordRef.Phase != LayoutPhase.Arrange) { - record.Phase = AnchorLayout.LayoutPhase.Circular; + record.Phase = LayoutPhase.Circular; bounds = packet.ParentRecord.Bounds; - if (recordRef.Phase == AnchorLayout.LayoutPhase.InProgress && packet.CircularityBreakerRecord == null) + if (recordRef.Phase == LayoutPhase.InProgress && packet.CircularityBreakerRecord == null) { packet.CircularityBreakerRecord = recordRef; packet.CircularitiesDetected = true; } } - int val1 = AnchorLayout.Weigh(orientation == Orientation.Horizontal ? bounds.Width : bounds.Height, anchor.Percent) + (orientation == Orientation.Horizontal ? bounds.X : bounds.Y) + anchor.Offset; + int val1 = Weigh(orientation == Orientation.Horizontal ? bounds.Width : bounds.Height, anchor.Percent) + (orientation == Orientation.Horizontal ? bounds.X : bounds.Y) + anchor.Offset; int num = orientation == Orientation.Horizontal ? packet.ParentRecord.Bounds.Width : packet.ParentRecord.Bounds.Height; if (anchor.MaximumSet) { - int val2 = AnchorLayout.Weigh(num, anchor.MaximumPercent) + anchor.MaximumOffset; + int val2 = Weigh(num, anchor.MaximumPercent) + anchor.MaximumOffset; val1 = Math.Min(val1, val2); } if (anchor.MinimumSet) { - int val2 = AnchorLayout.Weigh(num, anchor.MinimumPercent) + anchor.MinimumOffset; + int val2 = Weigh(num, anchor.MinimumPercent) + anchor.MinimumOffset; val1 = Math.Max(val1, val2); } return val1; @@ -287,7 +287,7 @@ namespace Microsoft.Iris.Layouts AnchorLayout.Record record1 = null; foreach (AnchorLayout.Record record2 in measureData.Records) { - if (record2.Phase != AnchorLayout.LayoutPhase.Arrange) + if (record2.Phase != LayoutPhase.Arrange) { record2.LayoutNode.Arrange(slot, record2.Bounds); if (record1 == null && (record2.LayoutNode.ContainsAreaOfInterest(AreaOfInterestID.FocusOverride) || record2.LayoutNode.ContainsAreaOfInterest(AreaOfInterestID.Focus))) @@ -341,7 +341,7 @@ namespace Microsoft.Iris.Layouts { if (record.ID == id) { - if (record.Phase == AnchorLayout.LayoutPhase.Untouched) + if (record.Phase == LayoutPhase.Untouched) this.MeasureChild(packet, record); return record; } @@ -350,7 +350,7 @@ namespace Microsoft.Iris.Layouts return null; } - internal static DataCookie InputData => AnchorLayout.s_dataProperty; + internal static DataCookie InputData => s_dataProperty; internal enum LayoutPhase { @@ -377,12 +377,12 @@ namespace Microsoft.Iris.Layouts public void Initialize(ILayoutNode layoutNode) { this.LayoutNode = layoutNode; - this.Input = layoutNode.GetLayoutInput(AnchorLayout.InputData) as AnchorLayoutInput; + this.Input = layoutNode.GetLayoutInput(InputData) as AnchorLayoutInput; if (this.Input == null) - this.Input = AnchorLayout.Record.s_defaultInput; + this.Input = s_defaultInput; this.ID = ((ViewItem)layoutNode).Name; this.Bounds = Rectangle.Zero; - this.Phase = AnchorLayout.LayoutPhase.Untouched; + this.Phase = LayoutPhase.Untouched; this.Visible = true; this.Invalid = false; } diff --git a/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs index fafd6c2..de15e6c 100644 --- a/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layouts/AnchorLayoutInput.cs @@ -54,7 +54,7 @@ namespace Microsoft.Iris.Layouts set => this._contributesToHeightFlag = value; } - DataCookie ILayoutInput.Data => AnchorLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; internal static DataCookie Data => AnchorLayout.InputData; diff --git a/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs b/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs index 3d163c6..09082d2 100644 --- a/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/DefaultLayout.cs @@ -17,11 +17,11 @@ namespace Microsoft.Iris.Layouts { } - public static DefaultLayout Instance => DefaultLayout.s_sharedLayout; + public static DefaultLayout Instance => s_sharedLayout; public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) => DefaultLayout.Measure(layoutNode, constraint); + Size ILayout.Measure(ILayoutNode layoutNode, Size constraint) => Measure(layoutNode, constraint); public static Size Measure(ILayoutNode layoutNode, Size constraint) { @@ -35,7 +35,7 @@ namespace Microsoft.Iris.Layouts return sz1; } - void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) => DefaultLayout.Arrange(layoutNode, slot); + void ILayout.Arrange(ILayoutNode layoutNode, LayoutSlot slot) => Arrange(layoutNode, slot); public static void Arrange(ILayoutNode layoutNode, LayoutSlot slot) { diff --git a/UIX/Microsoft/Iris/Layouts/DockLayout.cs b/UIX/Microsoft/Iris/Layouts/DockLayout.cs index 5129726..88b50c4 100644 --- a/UIX/Microsoft/Iris/Layouts/DockLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/DockLayout.cs @@ -18,7 +18,7 @@ namespace Microsoft.Iris.Layouts private static DockLayoutInput s_defaultLayoutInput = DockLayoutInput.Client; private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - internal static DataCookie DockData => DockLayout.s_dataProperty; + internal static DataCookie DockData => s_dataProperty; public DockLayoutInput DefaultLayoutInput { @@ -61,7 +61,7 @@ namespace Microsoft.Iris.Layouts sz2_1 = Size.Max(size1 - constraint1 + sz2_2, sz2_1); } if (sz2_1.Width < size1.Width || sz2_1.Height < size1.Height) - layoutNode.RequestMoreChildren(DockLayout.s_numberOfAdditionalItemsToRequestAtATime); + layoutNode.RequestMoreChildren(s_numberOfAdditionalItemsToRequestAtATime); return sz2_1; } @@ -116,8 +116,8 @@ namespace Microsoft.Iris.Layouts private DockLayoutInput GetLayoutInputForNode(ILayoutNode node) { - if (!(node.GetLayoutInput(DockLayout.s_dataProperty) is DockLayoutInput dockLayoutInput)) - dockLayoutInput = this._defaultLayoutInput ?? DockLayout.s_defaultLayoutInput; + if (!(node.GetLayoutInput(s_dataProperty) is DockLayoutInput dockLayoutInput)) + dockLayoutInput = this._defaultLayoutInput ?? s_defaultLayoutInput; return dockLayoutInput; } } diff --git a/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs index f48edaa..ba24341 100644 --- a/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layouts/DockLayoutInput.cs @@ -21,7 +21,7 @@ namespace Microsoft.Iris.Layouts { } - DataCookie ILayoutInput.Data => DockLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; internal static DataCookie Data => DockLayout.DockData; @@ -29,13 +29,13 @@ namespace Microsoft.Iris.Layouts { get { - if (this == DockLayoutInput.Left) + if (this == Left) return "Left"; - if (this == DockLayoutInput.Top) + if (this == Top) return "Top"; - if (this == DockLayoutInput.Right) + if (this == Right) return "Right"; - return this == DockLayoutInput.Bottom ? "Bottom" : "Client"; + return this == Bottom ? "Bottom" : "Client"; } } diff --git a/UIX/Microsoft/Iris/Layouts/FlowLayout.cs b/UIX/Microsoft/Iris/Layouts/FlowLayout.cs index a237854..30d700e 100644 --- a/UIX/Microsoft/Iris/Layouts/FlowLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/FlowLayout.cs @@ -196,12 +196,12 @@ namespace Microsoft.Iris.Layouts vector = packet.Dividers; } FlowLayout.Record record1 = vector[dataIndex]; - if (FlowLayout.Record.IsNullOrEmpty(record1)) + if (Record.IsNullOrEmpty(record1)) { FlowLayout.Record record2 = record1; if (record2 == null) vector[dataIndex] = record2 = new FlowLayout.Record(); - record2.Initialize(FlowLayout.RecordSourceType.LayoutNode); + record2.Initialize(RecordSourceType.LayoutNode); if (record2.Nodes == null) record2.Nodes = new Vector(1); record2.Nodes.Add(layoutChild); @@ -239,7 +239,7 @@ namespace Microsoft.Iris.Layouts if (!this.AllowWrap) majorMinor = new MajorMinor(majorMinor.Major, 0); FlowLayout.Record record = packet.Records[index]; - if (!FlowLayout.Record.IsNullOrEmpty(record)) + if (!Record.IsNullOrEmpty(record)) { record.CachedSize = majorMinor; } @@ -247,7 +247,7 @@ namespace Microsoft.Iris.Layouts { if (record == null) packet.Records[index] = record = new FlowLayout.Record(); - record.Initialize(FlowLayout.RecordSourceType.SizeCache); + record.Initialize(RecordSourceType.SizeCache); record.Index = index; record.CachedSize = majorMinor; } @@ -294,7 +294,7 @@ namespace Microsoft.Iris.Layouts for (int index = 0; index < packet.Records.Count; ++index) { FlowLayout.Record record = packet.Records[index]; - if (!FlowLayout.Record.IsNullOrEmpty(record)) + if (!Record.IsNullOrEmpty(record)) { if (ListUtility.IsNullOrEmpty(record.Nodes)) ++count; @@ -324,11 +324,11 @@ namespace Microsoft.Iris.Layouts for (int index = 0; index < packet.Records.Count; ++index) { FlowLayout.Record record = packet.Records[index]; - if (FlowLayout.Record.IsNullOrEmpty(record)) + if (Record.IsNullOrEmpty(record)) { if (record == null) packet.Records[index] = record = new FlowLayout.Record(); - record.Initialize(FlowLayout.RecordSourceType.Fake); + record.Initialize(RecordSourceType.Fake); record.Index = index; record.CachedSize = a; } @@ -708,7 +708,7 @@ namespace Microsoft.Iris.Layouts public static bool IsNullOrEmpty(FlowLayout.Record record) => record == null || record.Index == int.MinValue; - public void Clear() => this.Initialize(FlowLayout.RecordSourceType.Unspecified); + public void Clear() => this.Initialize(RecordSourceType.Unspecified); public void Initialize(FlowLayout.RecordSourceType source) { diff --git a/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs index 28867a2..2843d6d 100644 --- a/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layouts/FlowSizeMemoryLayoutInput.cs @@ -24,9 +24,9 @@ namespace Microsoft.Iris.Layouts set => this._cache = value; } - DataCookie ILayoutInput.Data => FlowSizeMemoryLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; - public static DataCookie Data => FlowSizeMemoryLayoutInput.s_dataProperty; + public static DataCookie Data => s_dataProperty; public override string ToString() { diff --git a/UIX/Microsoft/Iris/Layouts/GridLayout.cs b/UIX/Microsoft/Iris/Layouts/GridLayout.cs index 67b3aa2..edf740a 100644 --- a/UIX/Microsoft/Iris/Layouts/GridLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/GridLayout.cs @@ -150,8 +150,8 @@ namespace Microsoft.Iris.Layouts bool roundUp1 = flag1; bool roundUp2 = flag2; MajorMinor a = MajorMinor.Zero; - a.Major = GridLayout.DivideIntegers(majorMinor5.Major, measureData.referenceWithSpacing.Major, roundUp1); - a.Minor = GridLayout.DivideIntegers(majorMinor5.Minor, measureData.referenceWithSpacing.Minor, roundUp2); + a.Major = DivideIntegers(majorMinor5.Major, measureData.referenceWithSpacing.Major, roundUp1); + a.Minor = DivideIntegers(majorMinor5.Minor, measureData.referenceWithSpacing.Minor, roundUp2); a.Minor = Math.Min(a.Minor, measureData.fitItems.Minor); bool flag3 = !measureData.wrapping ? measureData.totalItems.Major <= a.Major : measureData.totalItems.Minor <= a.Minor; bool flag4; @@ -288,8 +288,8 @@ namespace Microsoft.Iris.Layouts MajorMinor majorMinor5 = new MajorMinor(constraint, this.Orientation); MajorMinor majorMinor6 = majorMinor5 + majorMinor3; MajorMinor zero1 = MajorMinor.Zero; - zero1.Major = GridLayout.DivideIntegers(majorMinor6.Major, majorMinor4.Major, false); - zero1.Minor = GridLayout.DivideIntegers(majorMinor6.Minor, majorMinor4.Minor, false); + zero1.Major = DivideIntegers(majorMinor6.Major, majorMinor4.Major, false); + zero1.Minor = DivideIntegers(majorMinor6.Minor, majorMinor4.Minor, false); if (zero1.Major >= itemCount) flag = false; MajorMinor zero2 = MajorMinor.Zero; @@ -297,7 +297,7 @@ namespace Microsoft.Iris.Layouts zero2.Minor = 1; if (flag && zero2.Major > 0) { - zero2.Minor = GridLayout.DivideIntegers(itemCount, zero2.Major, true); + zero2.Minor = DivideIntegers(itemCount, zero2.Major, true); zero2.Minor = Math.Min(zero2.Minor, zero1.Minor); } MajorMinor majorMinor7 = majorMinor4 * zero2 - majorMinor3; @@ -390,13 +390,13 @@ namespace Microsoft.Iris.Layouts bool flag1 = true; bool flag2 = true; int index1; - bool flag3 = flag1 & this.GetViewIntersectionFromPosition(layoutNode, position1, generalInfo, GridLayout.ViewIntersectionType.BeginOffscreen, out index1); + bool flag3 = flag1 & this.GetViewIntersectionFromPosition(layoutNode, position1, generalInfo, ViewIntersectionType.BeginOffscreen, out index1); int index2; - bool flag4 = flag2 & this.GetViewIntersectionFromPosition(layoutNode, position2, generalInfo, GridLayout.ViewIntersectionType.BeginOnscreen, out index2); + bool flag4 = flag2 & this.GetViewIntersectionFromPosition(layoutNode, position2, generalInfo, ViewIntersectionType.BeginOnscreen, out index2); int index3; - bool flag5 = flag3 & this.GetViewIntersectionFromPosition(layoutNode, position3, generalInfo, GridLayout.ViewIntersectionType.EndOnscreen, out index3); + bool flag5 = flag3 & this.GetViewIntersectionFromPosition(layoutNode, position3, generalInfo, ViewIntersectionType.EndOnscreen, out index3); int index4; - bool flag6 = flag4 & this.GetViewIntersectionFromPosition(layoutNode, position4, generalInfo, GridLayout.ViewIntersectionType.EndOffscreen, out index4); + bool flag6 = flag4 & this.GetViewIntersectionFromPosition(layoutNode, position4, generalInfo, ViewIntersectionType.EndOffscreen, out index4); return !flag5 ? new GridLayout.IndexRangeInfo() : new GridLayout.IndexRangeInfo(index1, index3, index2, index4, generalInfo); } @@ -443,16 +443,16 @@ namespace Microsoft.Iris.Layouts bool flag1 = false; switch (intersectionType) { - case GridLayout.ViewIntersectionType.BeginOffscreen: - case GridLayout.ViewIntersectionType.BeginOnscreen: + case ViewIntersectionType.BeginOffscreen: + case ViewIntersectionType.BeginOnscreen: if (!generalInfo.repeating) flag1 = position.Major >= repeatInstanceSize.Major || position.Minor >= repeatInstanceSize.Minor; if (generalInfo.wrapping) position.Major = 0; biasUp = true; break; - case GridLayout.ViewIntersectionType.EndOnscreen: - case GridLayout.ViewIntersectionType.EndOffscreen: + case ViewIntersectionType.EndOnscreen: + case ViewIntersectionType.EndOffscreen: if (!generalInfo.repeating) flag1 = position.Major <= 0 || position.Minor <= 0; if (generalInfo.wrapping) @@ -605,8 +605,8 @@ namespace Microsoft.Iris.Layouts { if (!generalInfo.repeating) { - GridLayout.IndexRangeInfo.NormalizeRange(beginIndex, endIndex, generalInfo.itemsCount, out beginIndex, out endIndex); - GridLayout.IndexRangeInfo.NormalizeRange(realBeginIndex, realEndIndex, generalInfo.itemsCount, out realBeginIndex, out realEndIndex); + NormalizeRange(beginIndex, endIndex, generalInfo.itemsCount, out beginIndex, out endIndex); + NormalizeRange(realBeginIndex, realEndIndex, generalInfo.itemsCount, out realBeginIndex, out realEndIndex); } this._beginIndex = beginIndex; this._endIndex = endIndex; diff --git a/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs index c5e21eb..23abe89 100644 --- a/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layouts/KeepAliveLayoutInput.cs @@ -14,7 +14,7 @@ namespace Microsoft.Iris.Layouts private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); private int _count; - public static bool ShouldKeepVisible(ILayoutNode layoutNode) => layoutNode.GetLayoutInput(KeepAliveLayoutInput.Data) != null; + public static bool ShouldKeepVisible(ILayoutNode layoutNode) => layoutNode.GetLayoutInput(Data) != null; public int Count { @@ -22,9 +22,9 @@ namespace Microsoft.Iris.Layouts set => this._count = value; } - DataCookie ILayoutInput.Data => KeepAliveLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; - public static DataCookie Data => KeepAliveLayoutInput.s_dataProperty; + public static DataCookie Data => s_dataProperty; public override string ToString() => InvariantString.Format("{0}", this.GetType().Name); } diff --git a/UIX/Microsoft/Iris/Layouts/PlacementMode.cs b/UIX/Microsoft/Iris/Layouts/PlacementMode.cs index bf419d9..68cdddb 100644 --- a/UIX/Microsoft/Iris/Layouts/PlacementMode.cs +++ b/UIX/Microsoft/Iris/Layouts/PlacementMode.cs @@ -52,40 +52,40 @@ namespace Microsoft.Iris.Layouts public override string ToString() { - if (this == PlacementMode.s_origin) + if (this == s_origin) return "Origin"; - if (this == PlacementMode.s_bottom) + if (this == s_bottom) return "Bottom"; - if (this == PlacementMode.s_top) + if (this == s_top) return "Top"; - if (this == PlacementMode.s_left) + if (this == s_left) return "Left"; - if (this == PlacementMode.s_right) + if (this == s_right) return "Right"; - if (this == PlacementMode.s_center) + if (this == s_center) return "Center"; - if (this == PlacementMode.s_mouseOrigin) + if (this == s_mouseOrigin) return "MouseOrigin"; - if (this == PlacementMode.s_mouseBottom) + if (this == s_mouseBottom) return "MouseBottom"; - if (this == PlacementMode.s_followMouseOrigin) + if (this == s_followMouseOrigin) return "FollowMouseOrigin"; - return this == PlacementMode.s_followMouseBottom ? "FollowMouseBottom" : base.ToString(); + return this == s_followMouseBottom ? "FollowMouseBottom" : base.ToString(); } public static PlacementMode Origin { get { - if (PlacementMode.s_origin == null) + if (s_origin == null) { - PlacementMode.s_origin = new PlacementMode(); - PlacementMode.s_origin.PopupPositions = new PopupPosition[1] + s_origin = new PlacementMode(); + s_origin.PopupPositions = new PopupPosition[1] { new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopLeft, FlipDirection.None) }; } - return PlacementMode.s_origin; + return s_origin; } } @@ -93,16 +93,16 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_bottom == null) + if (s_bottom == null) { - PlacementMode.s_bottom = new PlacementMode(); - PlacementMode.s_bottom.PopupPositions = new PopupPosition[2] + s_bottom = new PlacementMode(); + s_bottom.PopupPositions = new PopupPosition[2] { new PopupPosition(InterestPoint.BottomLeft, InterestPoint.TopLeft, FlipDirection.None), new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomLeft, FlipDirection.Vertical) }; } - return PlacementMode.s_bottom; + return s_bottom; } } @@ -110,15 +110,15 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_center == null) + if (s_center == null) { - PlacementMode.s_center = new PlacementMode(); - PlacementMode.s_center.PopupPositions = new PopupPosition[1] + s_center = new PlacementMode(); + s_center.PopupPositions = new PopupPosition[1] { new PopupPosition(InterestPoint.Center, InterestPoint.Center, FlipDirection.None) }; } - return PlacementMode.s_center; + return s_center; } } @@ -126,10 +126,10 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_right == null) + if (s_right == null) { - PlacementMode.s_right = new PlacementMode(); - PlacementMode.s_right.PopupPositions = new PopupPosition[4] + s_right = new PlacementMode(); + s_right.PopupPositions = new PopupPosition[4] { new PopupPosition(InterestPoint.TopRight, InterestPoint.TopLeft, FlipDirection.None), new PopupPosition(InterestPoint.BottomRight, InterestPoint.BottomLeft, FlipDirection.Vertical), @@ -137,7 +137,7 @@ namespace Microsoft.Iris.Layouts new PopupPosition(InterestPoint.BottomLeft, InterestPoint.BottomRight, FlipDirection.Both) }; } - return PlacementMode.s_right; + return s_right; } } @@ -145,10 +145,10 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_left == null) + if (s_left == null) { - PlacementMode.s_left = new PlacementMode(); - PlacementMode.s_left.PopupPositions = new PopupPosition[4] + s_left = new PlacementMode(); + s_left.PopupPositions = new PopupPosition[4] { new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopRight, FlipDirection.None), new PopupPosition(InterestPoint.BottomLeft, InterestPoint.BottomRight, FlipDirection.Vertical), @@ -156,7 +156,7 @@ namespace Microsoft.Iris.Layouts new PopupPosition(InterestPoint.BottomRight, InterestPoint.BottomLeft, FlipDirection.Both) }; } - return PlacementMode.s_left; + return s_left; } } @@ -164,16 +164,16 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_top == null) + if (s_top == null) { - PlacementMode.s_top = new PlacementMode(); - PlacementMode.s_top.PopupPositions = new PopupPosition[2] + s_top = new PlacementMode(); + s_top.PopupPositions = new PopupPosition[2] { new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomLeft, FlipDirection.None), new PopupPosition(InterestPoint.BottomLeft, InterestPoint.TopLeft, FlipDirection.Vertical) }; } - return PlacementMode.s_top; + return s_top; } } @@ -181,11 +181,11 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_mouseOrigin == null) + if (s_mouseOrigin == null) { - PlacementMode.s_mouseOrigin = new PlacementMode(); - PlacementMode.s_mouseOrigin.MouseTarget = MouseTarget.Fixed; - PlacementMode.s_mouseOrigin.PopupPositions = new PopupPosition[4] + s_mouseOrigin = new PlacementMode(); + s_mouseOrigin.MouseTarget = MouseTarget.Fixed; + s_mouseOrigin.PopupPositions = new PopupPosition[4] { new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopLeft, FlipDirection.None), new PopupPosition(InterestPoint.TopLeft, InterestPoint.TopRight, FlipDirection.Horizontal), @@ -193,7 +193,7 @@ namespace Microsoft.Iris.Layouts new PopupPosition(InterestPoint.TopLeft, InterestPoint.BottomRight, FlipDirection.Both) }; } - return PlacementMode.s_mouseOrigin; + return s_mouseOrigin; } } @@ -201,13 +201,13 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_mouseBottom == null) + if (s_mouseBottom == null) { - PlacementMode.s_mouseBottom = new PlacementMode(); - PlacementMode.s_mouseBottom.MouseTarget = MouseTarget.Fixed; - PlacementMode.s_mouseBottom.PopupPositions = PlacementMode.Bottom.PopupPositions; + s_mouseBottom = new PlacementMode(); + s_mouseBottom.MouseTarget = MouseTarget.Fixed; + s_mouseBottom.PopupPositions = Bottom.PopupPositions; } - return PlacementMode.s_mouseBottom; + return s_mouseBottom; } } @@ -215,13 +215,13 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_followMouseOrigin == null) + if (s_followMouseOrigin == null) { - PlacementMode.s_followMouseOrigin = new PlacementMode(); - PlacementMode.s_followMouseOrigin.MouseTarget = MouseTarget.Follow; - PlacementMode.s_followMouseOrigin.PopupPositions = PlacementMode.MouseOrigin.PopupPositions; + s_followMouseOrigin = new PlacementMode(); + s_followMouseOrigin.MouseTarget = MouseTarget.Follow; + s_followMouseOrigin.PopupPositions = MouseOrigin.PopupPositions; } - return PlacementMode.s_followMouseOrigin; + return s_followMouseOrigin; } } @@ -229,13 +229,13 @@ namespace Microsoft.Iris.Layouts { get { - if (PlacementMode.s_followMouseBottom == null) + if (s_followMouseBottom == null) { - PlacementMode.s_followMouseBottom = new PlacementMode(); - PlacementMode.s_followMouseBottom.MouseTarget = MouseTarget.Follow; - PlacementMode.s_followMouseBottom.PopupPositions = PlacementMode.MouseBottom.PopupPositions; + s_followMouseBottom = new PlacementMode(); + s_followMouseBottom.MouseTarget = MouseTarget.Follow; + s_followMouseBottom.PopupPositions = MouseBottom.PopupPositions; } - return PlacementMode.s_followMouseBottom; + return s_followMouseBottom; } } } diff --git a/UIX/Microsoft/Iris/Layouts/PopupLayout.cs b/UIX/Microsoft/Iris/Layouts/PopupLayout.cs index bdb763c..b5bcfad 100644 --- a/UIX/Microsoft/Iris/Layouts/PopupLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/PopupLayout.cs @@ -20,11 +20,11 @@ namespace Microsoft.Iris.Layouts internal class PopupLayout : ILayout { private const float c_tolerance = 0.01f; - private static DeferredHandler s_checkForLayoutChanges = new DeferredHandler(PopupLayout.CheckForLayoutChanges); + private static DeferredHandler s_checkForLayoutChanges = new DeferredHandler(CheckForLayoutChanges); private Vector _followMouseSubjects; private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - internal static DataCookie DataCookie => PopupLayout.s_dataProperty; + internal static DataCookie DataCookie => s_dataProperty; public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; @@ -32,7 +32,7 @@ namespace Microsoft.Iris.Layouts { foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) { - if (!(layoutChild.GetLayoutInput(PopupLayout.s_dataProperty) is PopupLayoutInput layoutInput) || !layoutInput.ConstrainToTarget) + if (!(layoutChild.GetLayoutInput(s_dataProperty) is PopupLayoutInput layoutInput) || !layoutInput.ConstrainToTarget) layoutChild.Measure(constraint); } layoutNode.RequestMoreChildren(int.MaxValue); @@ -48,7 +48,7 @@ namespace Microsoft.Iris.Layouts RectangleF layoutBounds = new RectangleF(PointF.Zero, new SizeF(slot.Bounds.Width, slot.Bounds.Height)); foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) { - if (!(layoutChild.GetLayoutInput(PopupLayout.s_dataProperty) is PopupLayoutInput layoutInput)) + if (!(layoutChild.GetLayoutInput(s_dataProperty) is PopupLayoutInput layoutInput)) layoutInput = PopupLayoutInput.Default; if (layoutInput.TargetIsFollowMouse) hook = true; @@ -82,7 +82,7 @@ namespace Microsoft.Iris.Layouts PlacementMode placement = layoutInput.Placement; if (placement == null || ListUtility.IsNullOrEmpty(placement.PopupPositions)) return Point.Zero; - PointF[] interestPoints = PopupLayout.InterestPointsFromRect(placementRect); + PointF[] interestPoints = InterestPointsFromRect(placementRect); PointF[] childInterestPoints = this.GetChildInterestPoints(childNode); this.GetBounds(interestPoints); RectangleF bounds = this.GetBounds(childInterestPoints); @@ -151,7 +151,7 @@ namespace Microsoft.Iris.Layouts rectangleF = placementTarget.BoundsRelativeToAncestor(null); flag = true; PopupLayout.PlacementTargetInfo placementTargetInfo = new PopupLayout.PlacementTargetInfo(child, placementTarget, rectangleF); - DeferredCall.Post(DispatchPriority.LayoutSync, PopupLayout.s_checkForLayoutChanges, placementTargetInfo); + DeferredCall.Post(DispatchPriority.LayoutSync, s_checkForLayoutChanges, placementTargetInfo); } rectangleF.Offset(layoutInput.Offset.X, layoutInput.Offset.Y); if (flag) @@ -173,7 +173,7 @@ namespace Microsoft.Iris.Layouts private PointF[] GetChildInterestPoints(ILayoutNode childNode) { Size desiredSize = childNode.DesiredSize; - return PopupLayout.InterestPointsFromRect(new RectangleF(0.0f, 0.0f, desiredSize.Width, desiredSize.Height)); + return InterestPointsFromRect(new RectangleF(0.0f, 0.0f, desiredSize.Width, desiredSize.Height)); } private static PointF[] InterestPointsFromRect(RectangleF rect) => new PointF[5] diff --git a/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs index 53cc99f..20c7eec 100644 --- a/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layouts/PopupLayoutInput.cs @@ -69,7 +69,7 @@ namespace Microsoft.Iris.Layouts set => this._constrainToTarget = value; } - DataCookie ILayoutInput.Data => PopupLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; internal static DataCookie Data => PopupLayout.DataCookie; @@ -111,9 +111,9 @@ namespace Microsoft.Iris.Layouts { get { - if (PopupLayoutInput.s_default == null) - PopupLayoutInput.s_default = new PopupLayoutInput(); - return PopupLayoutInput.s_default; + if (s_default == null) + s_default = new PopupLayoutInput(); + return s_default; } } } diff --git a/UIX/Microsoft/Iris/Layouts/RotateLayout.cs b/UIX/Microsoft/Iris/Layouts/RotateLayout.cs index ecb1f83..415c282 100644 --- a/UIX/Microsoft/Iris/Layouts/RotateLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/RotateLayout.cs @@ -43,21 +43,21 @@ namespace Microsoft.Iris.Layouts { case 90: Point offset1 = new Point(rectangle.Width, rectangle.Width); - rectangle = RotateLayout.RotateRect90(rectangle, offset1); - slot.View = RotateLayout.RotateRect90(slot.View, offset1); - slot.PeripheralView = RotateLayout.RotateRect90(slot.PeripheralView, offset1); + rectangle = RotateRect90(rectangle, offset1); + slot.View = RotateRect90(slot.View, offset1); + slot.PeripheralView = RotateRect90(slot.PeripheralView, offset1); break; case 180: Point offset2 = new Point(2 * rectangle.Width, 2 * rectangle.Height); - rectangle = RotateLayout.RotateRect180(rectangle, offset2); - slot.View = RotateLayout.RotateRect180(slot.View, offset2); - slot.PeripheralView = RotateLayout.RotateRect180(slot.PeripheralView, offset2); + rectangle = RotateRect180(rectangle, offset2); + slot.View = RotateRect180(slot.View, offset2); + slot.PeripheralView = RotateRect180(slot.PeripheralView, offset2); break; case 270: Point offset3 = new Point(rectangle.Height, rectangle.Height); - rectangle = RotateLayout.RotateRect270(rectangle, offset3); - slot.View = RotateLayout.RotateRect270(slot.View, offset3); - slot.PeripheralView = RotateLayout.RotateRect270(slot.PeripheralView, offset3); + rectangle = RotateRect270(rectangle, offset3); + slot.View = RotateRect270(slot.View, offset3); + slot.PeripheralView = RotateRect270(slot.PeripheralView, offset3); break; } Rotation rotation = Rotation.Default; diff --git a/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs b/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs index e61f1ed..1f658c7 100644 --- a/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/ScaleLayout.cs @@ -78,8 +78,8 @@ namespace Microsoft.Iris.Layouts return; SizeF measureData = (SizeF)layoutNode.MeasureData; Vector3 scale = new Vector3(measureData.Width, measureData.Height, 1f); - slot.View = ScaleLayout.ScaleView(slot.View, measureData); - slot.PeripheralView = ScaleLayout.ScaleView(slot.PeripheralView, measureData); + slot.View = ScaleView(slot.View, measureData); + slot.PeripheralView = ScaleView(slot.PeripheralView, measureData); foreach (ILayoutNode layoutChild in layoutNode.LayoutChildren) layoutChild.Arrange(slot, new Rectangle(Point.Zero, layoutChild.DesiredSize), scale, Rotation.Default); } diff --git a/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs b/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs index a6b6b90..580c921 100644 --- a/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/ScrollingLayout.cs @@ -147,8 +147,8 @@ namespace Microsoft.Iris.Layouts if (flag2) areaOfInterestBounds = area1.Rectangle; if (this.IsFocusAreaOfInterest(area1.Id) && !sli.ScrollIntoViewDisposition.Enabled) - ScrollingLayout.DisallowScrollFocusIntoView(); - scrollAreaOfInterestIntoView &= ScrollingLayout.ScrollFocusIntoView; + DisallowScrollFocusIntoView(); + scrollAreaOfInterestIntoView &= ScrollFocusIntoView; if (area1.Id == AreaOfInterestID.ScrollIntoViewRequest && !areaOfInterestBounds.IsZero) { scrollAreaOfInterestIntoView = true; @@ -163,7 +163,7 @@ namespace Microsoft.Iris.Layouts ScrollingLayoutOutput scrollAmount1 = this.CalculateScrollAmount(layoutNode, viewBounds, rectangle1, sli, applyPendingScrollData, scrollAreaOfInterestIntoView, areaOfInterestBounds, ref scrollAmount); scrollAmount1.VisibleIndices = rangeLayoutOutput; scrollAmount1.ProcessedExplicitScrollIntoViewRequest = flag1; - scrollAmount1.ScrollFocusIntoView = ScrollingLayout.ScrollFocusIntoView; + scrollAmount1.ScrollFocusIntoView = ScrollFocusIntoView; return scrollAmount1; } @@ -324,10 +324,10 @@ namespace Microsoft.Iris.Layouts Major = 16777215 }.ToSize(this._orientation); - public static void ResetScrollFocusIntoView() => ScrollingLayout.s_allowScrollFocusIntoView = true; + public static void ResetScrollFocusIntoView() => s_allowScrollFocusIntoView = true; - public static bool ScrollFocusIntoView => ScrollingLayout.s_allowScrollFocusIntoView; + public static bool ScrollFocusIntoView => s_allowScrollFocusIntoView; - public static void DisallowScrollFocusIntoView() => ScrollingLayout.s_allowScrollFocusIntoView = false; + public static void DisallowScrollFocusIntoView() => s_allowScrollFocusIntoView = false; } } diff --git a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs b/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs index c3aefe6..ce08f15 100644 --- a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs +++ b/UIX/Microsoft/Iris/Layouts/ScrollingLayoutInput.cs @@ -110,9 +110,9 @@ namespace Microsoft.Iris.Layouts set => this._secondaryScrollIntoView = value; } - DataCookie ILayoutInput.Data => ScrollingLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; - public static DataCookie Data => ScrollingLayoutInput.s_dataProperty; + public static DataCookie Data => s_dataProperty; public override string ToString() => InvariantString.Format("{0}(ScrollAmount={1}, PageAmount={2}, PageStep={3}, Disposition=({4}))", this.GetType().Name, _pendingScrollAmount, _pendingPageCommands, _pageStep, _scrollIntoView); } diff --git a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs b/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs index a017ba0..e194005 100644 --- a/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs +++ b/UIX/Microsoft/Iris/Layouts/ScrollingLayoutOutput.cs @@ -77,9 +77,9 @@ namespace Microsoft.Iris.Layouts set => this._visibleIndices = value; } - public override DataCookie OutputID => ScrollingLayoutOutput.DataCookie; + public override DataCookie OutputID => DataCookie; - public static DataCookie DataCookie => ScrollingLayoutOutput.s_dataProperty; + public static DataCookie DataCookie => s_dataProperty; public override string ToString() => InvariantString.Format("{0}(CanScrollNegative={1}, CanScrollPositive={2}, CurrentPage={3}, TotalPages={4})", this.GetType().Name, _canScrollNegative, _canScrollPositive, _currentPage, _totalPages); } diff --git a/UIX/Microsoft/Iris/Layouts/StackLayout.cs b/UIX/Microsoft/Iris/Layouts/StackLayout.cs index ace8b78..602270c 100644 --- a/UIX/Microsoft/Iris/Layouts/StackLayout.cs +++ b/UIX/Microsoft/Iris/Layouts/StackLayout.cs @@ -16,7 +16,7 @@ namespace Microsoft.Iris.Layouts private static StackLayoutInput s_defaultLayoutInput = new StackLayoutInput(); private static readonly DataCookie s_dataProperty = DataCookie.ReserveSlot(); - internal static DataCookie Data => StackLayout.s_dataProperty; + internal static DataCookie Data => s_dataProperty; public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; @@ -92,8 +92,8 @@ namespace Microsoft.Iris.Layouts private StackLayoutInput GetLayoutInputForNode(ILayoutNode layoutNode) { - if (!(layoutNode.GetLayoutInput(StackLayout.s_dataProperty) is StackLayoutInput stackLayoutInput)) - stackLayoutInput = StackLayout.s_defaultLayoutInput; + if (!(layoutNode.GetLayoutInput(s_dataProperty) is StackLayoutInput stackLayoutInput)) + stackLayoutInput = s_defaultLayoutInput; return stackLayoutInput; } } diff --git a/UIX/Microsoft/Iris/Library/DataCookie.cs b/UIX/Microsoft/Iris/Library/DataCookie.cs index fc58dca..1e701c7 100644 --- a/UIX/Microsoft/Iris/Library/DataCookie.cs +++ b/UIX/Microsoft/Iris/Library/DataCookie.cs @@ -36,6 +36,6 @@ namespace Microsoft.Iris.Library internal static uint ToUInt32(DataCookie handle) => handle.m_value; - public static DataCookie ReserveSlot() => DataCookie.FromUInt32(KeyAllocator.ReserveSlot()); + public static DataCookie ReserveSlot() => FromUInt32(KeyAllocator.ReserveSlot()); } } diff --git a/UIX/Microsoft/Iris/Library/DynamicData.cs b/UIX/Microsoft/Iris/Library/DynamicData.cs index 17e0b9e..49f1700 100644 --- a/UIX/Microsoft/Iris/Library/DynamicData.cs +++ b/UIX/Microsoft/Iris/Library/DynamicData.cs @@ -14,15 +14,15 @@ namespace Microsoft.Iris.Library public void Create() => this._dataMap = new SmartMap(); - public object GetData(DataCookie cookie) => this._dataMap[DynamicData.GetKey(cookie)]; + public object GetData(DataCookie cookie) => this._dataMap[GetKey(cookie)]; - public void SetData(DataCookie cookie, object value) => this._dataMap[DynamicData.GetKey(cookie)] = value; + public void SetData(DataCookie cookie, object value) => this._dataMap[GetKey(cookie)] = value; - public Delegate GetEventHandler(EventCookie cookie) => this._dataMap[DynamicData.GetKey(cookie)] as Delegate; + public Delegate GetEventHandler(EventCookie cookie) => this._dataMap[GetKey(cookie)] as Delegate; public bool AddEventHandler(EventCookie cookie, Delegate handlerToAdd) { - uint key = DynamicData.GetKey(cookie); + uint key = GetKey(cookie); Delegate data = this._dataMap[key] as Delegate; this._dataMap[key] = Delegate.Combine(data, handlerToAdd); return (object)data == null; @@ -30,13 +30,13 @@ namespace Microsoft.Iris.Library public bool RemoveEventHandler(EventCookie cookie, Delegate handlerToRemove) { - uint key = DynamicData.GetKey(cookie); + uint key = GetKey(cookie); Delegate @delegate = Delegate.Remove(this._dataMap[key] as Delegate, handlerToRemove); this._dataMap[key] = @delegate; return (object)@delegate == null; } - public void RemoveEventHandlers(EventCookie cookie) => this._dataMap[DynamicData.GetKey(cookie)] = null; + public void RemoveEventHandlers(EventCookie cookie) => this._dataMap[GetKey(cookie)] = null; private static uint GetKey(DataCookie cookie) => DataCookie.ToUInt32(cookie); diff --git a/UIX/Microsoft/Iris/Library/EventCookie.cs b/UIX/Microsoft/Iris/Library/EventCookie.cs index b74fa04..4f5a437 100644 --- a/UIX/Microsoft/Iris/Library/EventCookie.cs +++ b/UIX/Microsoft/Iris/Library/EventCookie.cs @@ -36,6 +36,6 @@ namespace Microsoft.Iris.Library internal static uint ToUInt32(EventCookie handle) => handle.m_value; - public static EventCookie ReserveSlot() => EventCookie.FromUInt32(KeyAllocator.ReserveSlot()); + public static EventCookie ReserveSlot() => FromUInt32(KeyAllocator.ReserveSlot()); } } diff --git a/UIX/Microsoft/Iris/Library/KeyAllocator.cs b/UIX/Microsoft/Iris/Library/KeyAllocator.cs index f976f88..7f1a4f2 100644 --- a/UIX/Microsoft/Iris/Library/KeyAllocator.cs +++ b/UIX/Microsoft/Iris/Library/KeyAllocator.cs @@ -12,6 +12,6 @@ namespace Microsoft.Iris.Library { private static int s_idxKeyGen; - internal static uint ReserveSlot() => (uint)Interlocked.Increment(ref KeyAllocator.s_idxKeyGen); + internal static uint ReserveSlot() => (uint)Interlocked.Increment(ref s_idxKeyGen); } } diff --git a/UIX/Microsoft/Iris/Library/Math2.cs b/UIX/Microsoft/Iris/Library/Math2.cs index 154ba74..46cd1c5 100644 --- a/UIX/Microsoft/Iris/Library/Math2.cs +++ b/UIX/Microsoft/Iris/Library/Math2.cs @@ -8,7 +8,7 @@ namespace Microsoft.Iris.Library { internal class Math2 { - public static int FindPowerOf2(int value) => Math2.FindPowerOf2(value, 1); + public static int FindPowerOf2(int value) => FindPowerOf2(value, 1); public static int FindPowerOf2(int value, int startValue) { diff --git a/UIX/Microsoft/Iris/Library/TreeNode.cs b/UIX/Microsoft/Iris/Library/TreeNode.cs index 7a518cf..10731a6 100644 --- a/UIX/Microsoft/Iris/Library/TreeNode.cs +++ b/UIX/Microsoft/Iris/Library/TreeNode.cs @@ -31,12 +31,12 @@ namespace Microsoft.Iris.Library { base.OnDispose(); this.ChangeParent(null); - this.RemoveEventHandlers(TreeNode.s_deepParentChangeEvent); + this.RemoveEventHandlers(s_deepParentChangeEvent); } public bool IsZoned => this._zone != null; - public void ChangeParent(TreeNode nodeNewParent) => this.ChangeParent(nodeNewParent, null, TreeNode.LinkType.First); + public void ChangeParent(TreeNode nodeNewParent) => this.ChangeParent(nodeNewParent, null, LinkType.First); public void ChangeParent(TreeNode nodeNewParent, TreeNode nodeSibling, TreeNode.LinkType lt) { @@ -46,12 +46,12 @@ namespace Microsoft.Iris.Library TreeNode nodeParent = this._nodeParent; if (this._nodeParent != null) { - TreeNode.DoUnlink(this); + DoUnlink(this); nodeParent.OnChildrenChanged(); } if (nodeNewParent != null) { - TreeNode.DoLink(nodeNewParent, this, nodeSibling, lt); + DoLink(nodeNewParent, this, nodeSibling, lt); zone = nodeNewParent.Zone; nodeNewParent.OnChildrenChanged(); } @@ -75,8 +75,8 @@ namespace Microsoft.Iris.Library public void MoveNode(TreeNode nodeSibling, TreeNode.LinkType lt) { TreeNode nodeParent = this._nodeParent; - TreeNode.DoUnlink(this); - TreeNode.DoLink(nodeParent, this, nodeSibling, lt); + DoUnlink(this); + DoLink(nodeParent, this, nodeSibling, lt); } public void RemoveAllChildren(bool disposeChildrenFlag) @@ -99,8 +99,8 @@ namespace Microsoft.Iris.Library public event EventHandler DeepParentChange { - add => this.AddEventHandler(TreeNode.s_deepParentChangeEvent, value); - remove => this.RemoveEventHandler(TreeNode.s_deepParentChangeEvent, value); + add => this.AddEventHandler(s_deepParentChangeEvent, value); + remove => this.RemoveEventHandler(s_deepParentChangeEvent, value); } public UIZone Zone => this._zone; @@ -179,7 +179,7 @@ namespace Microsoft.Iris.Library { switch (lt) { - case TreeNode.LinkType.Before: + case LinkType.Before: nodeChange._nodeNext = nodeSibling; nodeChange._nodePrevious = nodeSibling._nodePrevious; nodeSibling._nodePrevious = nodeChange; @@ -190,7 +190,7 @@ namespace Microsoft.Iris.Library } nodeParent._nodeFirstChild = nodeChange; break; - case TreeNode.LinkType.Behind: + case LinkType.Behind: nodeChange._nodePrevious = nodeSibling; nodeChange._nodeNext = nodeSibling._nodeNext; nodeSibling._nodeNext = nodeChange; @@ -198,14 +198,14 @@ namespace Microsoft.Iris.Library break; nodeChange._nodeNext._nodePrevious = nodeChange; break; - case TreeNode.LinkType.First: + case LinkType.First: nodeParent._nodeFirstChild = nodeChange; nodeChange._nodeNext = nodeFirstChild; if (nodeFirstChild == null) break; nodeFirstChild._nodePrevious = nodeChange; break; - case TreeNode.LinkType.Last: + case LinkType.Last: TreeNode lastSibling = nodeFirstChild.LastSibling; lastSibling._nodeNext = nodeChange; nodeChange._nodePrevious = lastSibling; @@ -231,7 +231,7 @@ namespace Microsoft.Iris.Library { foreach (TreeNode child in this.Children) child.FireTreeChangeWorker(); - if (!(this.GetEventHandler(TreeNode.s_deepParentChangeEvent) is EventHandler eventHandler)) + if (!(this.GetEventHandler(s_deepParentChangeEvent) is EventHandler eventHandler)) return; eventHandler(this, EventArgs.Empty); } diff --git a/UIX/Microsoft/Iris/ListDataSet.cs b/UIX/Microsoft/Iris/ListDataSet.cs index 7a783e8..7f5903b 100644 --- a/UIX/Microsoft/Iris/ListDataSet.cs +++ b/UIX/Microsoft/Iris/ListDataSet.cs @@ -328,12 +328,12 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(ListDataSet.s_listContentsChangedEvent, value); + this.AddEventHandler(s_listContentsChangedEvent, value); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(ListDataSet.s_listContentsChangedEvent, value); + this.RemoveEventHandler(s_listContentsChangedEvent, value); } } @@ -342,18 +342,18 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(ListDataSet.s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); + this.AddEventHandler(s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(ListDataSet.s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); + this.RemoveEventHandler(s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); } } internal void FireSetChanged(UIListContentsChangeType type, int oldIndex, int newIndex) { - UIListContentsChangedHandler eventHandler = (UIListContentsChangedHandler)this.GetEventHandler(ListDataSet.s_listContentsChangedEvent); + UIListContentsChangedHandler eventHandler = (UIListContentsChangedHandler)this.GetEventHandler(s_listContentsChangedEvent); if (eventHandler != null) { UIListContentsChangedArgs args = new UIListContentsChangedArgs(type, oldIndex, newIndex); diff --git a/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs b/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs index deacc0c..b07c2fe 100644 --- a/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs +++ b/UIX/Microsoft/Iris/Markup/AssemblyLoadResult.cs @@ -44,7 +44,7 @@ namespace Microsoft.Iris.Markup } string leftName; string rightName; - AssemblyLoadResult.SplitAtLastWhack(valueName, out leftName, out rightName); + SplitAtLastWhack(valueName, out leftName, out rightName); AssemblyName name = null; try { @@ -64,9 +64,9 @@ namespace Microsoft.Iris.Markup if (name != null) { Exception assemblyLoadException; - Assembly assembly = AssemblyLoadResult.FindAssembly(name, out assemblyLoadException); + Assembly assembly = FindAssembly(name, out assemblyLoadException); if (assembly != null) - loadResult = AssemblyLoadResult.MapAssembly(assembly, rightName); + loadResult = MapAssembly(assembly, rightName); else if (assemblyLoadException != null) ErrorManager.ReportError("Failure loading assembly: '{0}'", assemblyLoadException.Message); else @@ -78,91 +78,91 @@ namespace Microsoft.Iris.Markup public static void Startup() { AssemblyObjectProxyHelper.InitializeStatics(); - MarkupSystem.RegisterFactoryByProtocol("assembly://", new CreateLoadResultHandler(AssemblyLoadResult.Create)); - Map typeCache1 = AssemblyLoadResult.s_typeCache; + MarkupSystem.RegisterFactoryByProtocol("assembly://", new CreateLoadResultHandler(Create)); + Map typeCache1 = s_typeCache; Type type1 = typeof(object); FrameworkCompatibleAssemblyPrimitiveTypeSchema primitiveTypeSchema; - AssemblyLoadResult.ObjectTypeSchema = primitiveTypeSchema = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(ObjectSchema.Type); + ObjectTypeSchema = primitiveTypeSchema = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(ObjectSchema.Type); TypeSchema typeA1 = primitiveTypeSchema; typeCache1[type1] = primitiveTypeSchema; TypeSchema.RegisterTwoWayEquivalence(typeA1, ObjectSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(void)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(VoidSchema.Type)), VoidSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(bool)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(BooleanSchema.Type)), BooleanSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(byte)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(ByteSchema.Type)), ByteSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(char)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(CharSchema.Type)), CharSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(double)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(DoubleSchema.Type)), DoubleSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(string)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(StringSchema.Type)), StringSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(float)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(SingleSchema.Type)), SingleSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(int)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(Int32Schema.Type)), Int32Schema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(long)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(Int64Schema.Type)), Int64Schema.Type); - Map typeCache2 = AssemblyLoadResult.s_typeCache; + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(void)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(VoidSchema.Type)), VoidSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(bool)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(BooleanSchema.Type)), BooleanSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(byte)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(ByteSchema.Type)), ByteSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(char)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(CharSchema.Type)), CharSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(double)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(DoubleSchema.Type)), DoubleSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(string)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(StringSchema.Type)), StringSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(float)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(SingleSchema.Type)), SingleSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(int)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(Int32Schema.Type)), Int32Schema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(long)] = new FrameworkCompatibleAssemblyPrimitiveTypeSchema(Int64Schema.Type)), Int64Schema.Type); + Map typeCache2 = s_typeCache; Type type2 = typeof(IList); FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema1; - AssemblyLoadResult.ListTypeSchema = assemblyTypeSchema1 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IList), typeof(IList), typeof(ArrayList)); + ListTypeSchema = assemblyTypeSchema1 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IList), typeof(IList), typeof(ArrayList)); TypeSchema typeA2 = assemblyTypeSchema1; typeCache2[type2] = assemblyTypeSchema1; TypeSchema.RegisterTwoWayEquivalence(typeA2, ListSchema.Type); - Map typeCache3 = AssemblyLoadResult.s_typeCache; + Map typeCache3 = s_typeCache; Type type3 = typeof(IEnumerator); FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema2; - AssemblyLoadResult.EnumeratorTypeSchema = assemblyTypeSchema2 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IEnumerator), typeof(IEnumerator)); + EnumeratorTypeSchema = assemblyTypeSchema2 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IEnumerator), typeof(IEnumerator)); TypeSchema typeA3 = assemblyTypeSchema2; typeCache3[type3] = assemblyTypeSchema2; TypeSchema.RegisterTwoWayEquivalence(typeA3, EnumeratorSchema.Type); - Map typeCache4 = AssemblyLoadResult.s_typeCache; + Map typeCache4 = s_typeCache; Type type4 = typeof(IDictionary); FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema3; - AssemblyLoadResult.DictionaryTypeSchema = assemblyTypeSchema3 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IDictionary), AssemblyObjectProxyHelper.ProxyDictionaryType, typeof(Dictionary)); + DictionaryTypeSchema = assemblyTypeSchema3 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IDictionary), AssemblyObjectProxyHelper.ProxyDictionaryType, typeof(Dictionary)); TypeSchema producer1 = assemblyTypeSchema3; typeCache4[type4] = assemblyTypeSchema3; TypeSchema.RegisterOneWayEquivalence(producer1, DictionarySchema.Type); - Map typeCache5 = AssemblyLoadResult.s_typeCache; + Map typeCache5 = s_typeCache; Type type5 = typeof(ICommand); FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema4; - AssemblyLoadResult.CommandTypeSchema = assemblyTypeSchema4 = new FrameworkCompatibleAssemblyTypeSchema(typeof(ICommand), AssemblyObjectProxyHelper.ProxyCommandType); + CommandTypeSchema = assemblyTypeSchema4 = new FrameworkCompatibleAssemblyTypeSchema(typeof(ICommand), AssemblyObjectProxyHelper.ProxyCommandType); TypeSchema producer2 = assemblyTypeSchema4; typeCache5[type5] = assemblyTypeSchema4; TypeSchema.RegisterOneWayEquivalence(producer2, CommandSchema.Type); - Map typeCache6 = AssemblyLoadResult.s_typeCache; + Map typeCache6 = s_typeCache; Type type6 = typeof(IValueRange); FrameworkCompatibleAssemblyTypeSchema assemblyTypeSchema5; - AssemblyLoadResult.ValueRangeTypeSchema = assemblyTypeSchema5 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IValueRange), AssemblyObjectProxyHelper.ProxyValueRangeType); + ValueRangeTypeSchema = assemblyTypeSchema5 = new FrameworkCompatibleAssemblyTypeSchema(typeof(IValueRange), AssemblyObjectProxyHelper.ProxyValueRangeType); TypeSchema producer3 = assemblyTypeSchema5; typeCache6[type6] = assemblyTypeSchema5; TypeSchema.RegisterOneWayEquivalence(producer3, ValueRangeSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(Group)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Group), typeof(IUIGroup))), GroupSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(Image)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Image), typeof(UIImage))), ImageSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(Type)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Type), typeof(TypeSchema), null, AssemblyLoadResult.ObjectTypeSchema)), TypeSchemaDefinition.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(VideoStream)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(VideoStream))), VideoStreamSchema.Type); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Group)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Group), typeof(IUIGroup))), GroupSchema.Type); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Image)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Image), typeof(UIImage))), ImageSchema.Type); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Type)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Type), typeof(TypeSchema), null, ObjectTypeSchema)), TypeSchemaDefinition.Type); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(VideoStream)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(VideoStream))), VideoStreamSchema.Type); TypeSchema producer4; - AssemblyLoadResult.s_typeCache[typeof(Microsoft.Iris.Choice)] = (FrameworkCompatibleAssemblyTypeSchema)(producer4 = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.Choice))); + s_typeCache[typeof(Microsoft.Iris.Choice)] = (FrameworkCompatibleAssemblyTypeSchema)(producer4 = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.Choice))); TypeSchema.RegisterOneWayEquivalence(producer4, ChoiceSchema.Type); TypeSchema.RegisterOneWayEquivalence(producer4, ValueRangeSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(Microsoft.Iris.BooleanChoice)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.BooleanChoice))), BooleanChoiceSchema.Type); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Microsoft.Iris.BooleanChoice)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.BooleanChoice))), BooleanChoiceSchema.Type); TypeSchema producer5; - AssemblyLoadResult.s_typeCache[typeof(Microsoft.Iris.RangedValue)] = (FrameworkCompatibleAssemblyTypeSchema)(producer5 = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.RangedValue))); + s_typeCache[typeof(Microsoft.Iris.RangedValue)] = (FrameworkCompatibleAssemblyTypeSchema)(producer5 = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.RangedValue))); TypeSchema.RegisterOneWayEquivalence(producer5, RangedValueSchema.Type); TypeSchema.RegisterOneWayEquivalence(producer5, ValueRangeSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(Microsoft.Iris.IntRangedValue)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.IntRangedValue))), IntRangedValueSchema.Type); - TypeSchema.RegisterOneWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(Microsoft.Iris.ByteRangedValue)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.ByteRangedValue))), ByteRangedValueSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(DataProviderQuery)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderQuery), typeof(MarkupDataQuery))), MarkupDataQueryInstanceSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(DataProviderObject)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderObject), typeof(MarkupDataType))), MarkupDataTypeInstanceSchema.Type); - TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(AssemblyLoadResult.s_typeCache[typeof(DataProviderQueryStatus)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderQueryStatus))), UIXLoadResultExports.DataQueryStatusType); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Microsoft.Iris.IntRangedValue)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.IntRangedValue))), IntRangedValueSchema.Type); + TypeSchema.RegisterOneWayEquivalence((TypeSchema)(s_typeCache[typeof(Microsoft.Iris.ByteRangedValue)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(Microsoft.Iris.ByteRangedValue))), ByteRangedValueSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(DataProviderQuery)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderQuery), typeof(MarkupDataQuery))), MarkupDataQueryInstanceSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(DataProviderObject)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderObject), typeof(MarkupDataType))), MarkupDataTypeInstanceSchema.Type); + TypeSchema.RegisterTwoWayEquivalence((TypeSchema)(s_typeCache[typeof(DataProviderQueryStatus)] = new FrameworkCompatibleAssemblyTypeSchema(typeof(DataProviderQueryStatus))), UIXLoadResultExports.DataQueryStatusType); } public static void Shutdown() { - foreach (SharedDisposableObject disposableObject in AssemblyLoadResult.s_assemblyCache.Values) + foreach (SharedDisposableObject disposableObject in s_assemblyCache.Values) disposableObject.UnregisterUsage(s_assemblyCache); - AssemblyLoadResult.s_assemblyCache.Clear(); - AssemblyLoadResult.s_assemblyCache = null; - foreach (AssemblyTypeSchema assemblyTypeSchema in AssemblyLoadResult.s_typeCache.Values) + s_assemblyCache.Clear(); + s_assemblyCache = null; + foreach (AssemblyTypeSchema assemblyTypeSchema in s_typeCache.Values) { AssemblyLoadResult owner = (AssemblyLoadResult)assemblyTypeSchema.Owner; assemblyTypeSchema.Dispose(owner); } - AssemblyLoadResult.s_typeCache.Clear(); - AssemblyLoadResult.s_typeCache = null; + s_typeCache.Clear(); + s_typeCache = null; } public string Namespace => this._namespace; @@ -175,7 +175,7 @@ namespace Microsoft.Iris.Markup if (type == null) return null; if (type.IsVisible) - return AssemblyLoadResult.MapType(type); + return MapType(type); ErrorManager.ReportError("Type '{0}' is not public in '{1}'", name, _assembly); return null; } @@ -184,13 +184,13 @@ namespace Microsoft.Iris.Markup { AssemblyLoadResult.MapAssemblyKey key = new AssemblyLoadResult.MapAssemblyKey(assembly, ns); AssemblyLoadResult assemblyLoadResult; - if (!AssemblyLoadResult.s_assemblyCache.TryGetValue(key, out assemblyLoadResult)) + if (!s_assemblyCache.TryGetValue(key, out assemblyLoadResult)) { string uri = "assembly://" + assembly.FullName; if (ns != null) uri = uri + "/" + ns; assemblyLoadResult = new AssemblyLoadResult(assembly, ns, uri); - AssemblyLoadResult.s_assemblyCache[key] = assemblyLoadResult; + s_assemblyCache[key] = assemblyLoadResult; assemblyLoadResult.RegisterUsage(s_assemblyCache); } return assemblyLoadResult; @@ -200,14 +200,14 @@ namespace Microsoft.Iris.Markup { object obj; AssemblyTypeSchema assemblyTypeSchema; - if (AssemblyLoadResult.s_typeCache.TryGetValue(type, out obj)) + if (s_typeCache.TryGetValue(type, out obj)) { assemblyTypeSchema = (AssemblyTypeSchema)obj; } else { assemblyTypeSchema = AssemblyObjectProxyHelper.CreateProxySchema(type); - AssemblyLoadResult.s_typeCache[type] = assemblyTypeSchema; + s_typeCache[type] = assemblyTypeSchema; } return assemblyTypeSchema; } @@ -235,7 +235,7 @@ namespace Microsoft.Iris.Markup Type[] typeArray = new Type[typeSchemaList.Length]; for (int index = 0; index < typeSchemaList.Length; ++index) { - typeArray[index] = AssemblyLoadResult.MapType(typeSchemaList[index]); + typeArray[index] = MapType(typeSchemaList[index]); if (typeArray[index] == null) return null; } @@ -247,7 +247,7 @@ namespace Microsoft.Iris.Markup TypeSchema[] typeSchemaArray = new TypeSchema[typeList.Length]; for (int index = 0; index < typeList.Length; ++index) { - typeSchemaArray[index] = AssemblyLoadResult.MapType(typeList[index]); + typeSchemaArray[index] = MapType(typeList[index]); if (typeSchemaArray[index] == null) return null; } @@ -266,7 +266,7 @@ namespace Microsoft.Iris.Markup return null; object[] objArray = new object[instanceList.Length]; for (int index = 0; index < objArray.Length; ++index) - objArray[index] = AssemblyLoadResult.UnwrapObject(instanceList[index]); + objArray[index] = UnwrapObject(instanceList[index]); return objArray; } diff --git a/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs b/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs index 735e96a..cd1ae3c 100644 --- a/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs +++ b/UIX/Microsoft/Iris/Markup/AssemblyObjectProxyHelper.cs @@ -23,8 +23,8 @@ namespace Microsoft.Iris.Markup public static void InitializeStatics() { - AssemblyObjectProxyHelper.s_typeofString = typeof(string); - AssemblyObjectProxyHelper.s_proxyTypeInfoTable = new AssemblyObjectProxyHelper.ProxyTypeInfo[7] + s_typeofString = typeof(string); + s_proxyTypeInfoTable = new AssemblyObjectProxyHelper.ProxyTypeInfo[7] { new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (ICommand), typeof (AssemblyObjectProxyHelper.ProxyCommand), CommandSchema.Type), new AssemblyObjectProxyHelper.ProxyTypeInfo(typeof (IValueRange), typeof (AssemblyObjectProxyHelper.ProxyValueRange), ValueRangeSchema.Type), @@ -38,7 +38,7 @@ namespace Microsoft.Iris.Markup public static AssemblyTypeSchema CreateProxySchema(Type assemblyType) { - foreach (AssemblyObjectProxyHelper.ProxyTypeInfo proxyTypeInfo in AssemblyObjectProxyHelper.s_proxyTypeInfoTable) + foreach (AssemblyObjectProxyHelper.ProxyTypeInfo proxyTypeInfo in s_proxyTypeInfoTable) { if (proxyTypeInfo.type.IsAssignableFrom(assemblyType)) { @@ -109,7 +109,7 @@ namespace Microsoft.Iris.Markup if (instance == null) return null; Type type = instance.GetType(); - if (type.IsPrimitive || type == AssemblyObjectProxyHelper.s_typeofString) + if (type.IsPrimitive || type == s_typeofString) return instance; switch (instance) { diff --git a/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs b/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs index 4c9654e..95878b7 100644 --- a/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/AssemblyTypeSchema.cs @@ -138,7 +138,7 @@ namespace Microsoft.Iris.Markup PropertySchema propertySchema; if (!this._propertyCache.TryGetValue(name, out propertySchema)) { - PropertyInfo propertyHelper = AssemblyTypeSchema.GetPropertyHelper(this._type, name); + PropertyInfo propertyHelper = GetPropertyHelper(this._type, name); if (propertyHelper != null) { propertySchema = new AssemblyPropertySchema(this, propertyHelper); @@ -171,7 +171,7 @@ namespace Microsoft.Iris.Markup { foreach (Type type1 in type.GetInterfaces()) { - propertyInfo = AssemblyTypeSchema.GetPropertyHelper(type1, name); + propertyInfo = GetPropertyHelper(type1, name); if (propertyInfo != null) break; } diff --git a/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs b/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs index 8b3b1d5..deed171 100644 --- a/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs +++ b/UIX/Microsoft/Iris/Markup/BooleanBoxes.cs @@ -11,6 +11,6 @@ namespace Microsoft.Iris.Markup internal static object TrueBox = true; internal static object FalseBox = false; - internal static object Box(bool value) => value ? BooleanBoxes.TrueBox : BooleanBoxes.FalseBox; + internal static object Box(bool value) => value ? TrueBox : FalseBox; } } diff --git a/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs b/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs index b21c197..b2719ad 100644 --- a/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs +++ b/UIX/Microsoft/Iris/Markup/ByteCodeReader.cs @@ -98,7 +98,7 @@ namespace Microsoft.Iris.Markup } if (this.CurrentOffset + num2 > this.Size) this.ThrowReadError(); - char[] chArray = num1 >= s_scratchCharArray.Length ? new char[num1] : ByteCodeReader.s_scratchCharArray; + char[] chArray = num1 >= s_scratchCharArray.Length ? new char[num1] : s_scratchCharArray; byte* numPtr1 = (byte*)(_buffer.ToInt32() + (int)CurrentOffset); if (flag) { diff --git a/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs b/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs index a5dbd2c..9ffa8f1 100644 --- a/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs +++ b/UIX/Microsoft/Iris/Markup/CompiledMarkupLoader.cs @@ -525,7 +525,7 @@ namespace Microsoft.Iris.Markup for (int index = 0; index < num2; ++index) { SymbolRecord symbolRecord = new SymbolRecord(); - symbolRecord.Name = CompiledMarkupLoader.ReadDataTableString(reader, binaryDataTable); + symbolRecord.Name = ReadDataTableString(reader, binaryDataTable); symbolRecord.SymbolOrigin = (SymbolOrigin)reader.ReadByte(); ushort num3 = reader.ReadUInt16(); symbolRecord.Type = owner.ImportTables.TypeImports[num3]; @@ -545,7 +545,7 @@ namespace Microsoft.Iris.Markup this._reader.CurrentOffset += this._reader.ReadUInt32(); } else - CompiledMarkupLoader.DecodeInheritableSymbolTable(typeExport, this._reader, IntPtr.Zero); + DecodeInheritableSymbolTable(typeExport, this._reader, IntPtr.Zero); } private void DepersistConstantsTable() @@ -560,7 +560,7 @@ namespace Microsoft.Iris.Markup this._reader.CurrentOffset += (uint)((num + 1) * 4); for (int index = 0; index < num; ++index) { - object obj = CompiledMarkupLoader.DepersistConstant(this._reader, _loadResultTarget); + object obj = DepersistConstant(this._reader, _loadResultTarget); runtimeList[index] = obj; } } @@ -584,11 +584,11 @@ namespace Microsoft.Iris.Markup instance = typeImport.DecodeBinary(reader); break; case MarkupConstantPersistMode.FromString: - string str = CompiledMarkupLoader.ReadDataTableString(reader, loadResult.BinaryDataTable); + string str = ReadDataTableString(reader, loadResult.BinaryDataTable); typeImport.TypeConverter(str, StringSchema.Type, out instance); break; case MarkupConstantPersistMode.Canonical: - string name = CompiledMarkupLoader.ReadDataTableString(reader, loadResult.BinaryDataTable); + string name = ReadDataTableString(reader, loadResult.BinaryDataTable); instance = typeImport.FindCanonicalInstance(name); break; } @@ -608,7 +608,7 @@ namespace Microsoft.Iris.Markup public static MarkupLineNumberTable DecodeLineNumberTable(IntPtr address) { uint size = (uint)(ByteCodeReader.ReadUInt16(address) * 12 + 2); - return CompiledMarkupLoader.DecodeLineNumberTable(new ByteCodeReader(address, size, false)); + return DecodeLineNumberTable(new ByteCodeReader(address, size, false)); } private void DepersistLineNumberTable() @@ -621,7 +621,7 @@ namespace Microsoft.Iris.Markup { uint currentOffset = this._reader.CurrentOffset; this._reader.CurrentOffset = this._lineNumberTableStart; - this._loadResultTarget.SetLineNumberTable(CompiledMarkupLoader.DecodeLineNumberTable(this._reader)); + this._loadResultTarget.SetLineNumberTable(DecodeLineNumberTable(this._reader)); this._reader.CurrentOffset = currentOffset; } } diff --git a/UIX/Microsoft/Iris/Markup/EnumSchema.cs b/UIX/Microsoft/Iris/Markup/EnumSchema.cs index 1885f02..98b0e91 100644 --- a/UIX/Microsoft/Iris/Markup/EnumSchema.cs +++ b/UIX/Microsoft/Iris/Markup/EnumSchema.cs @@ -176,7 +176,7 @@ namespace Microsoft.Iris.Markup public override object PerformOperation(object left, object right, OperationType op) { - bool flag = object.Equals(left, right); + bool flag = Equals(left, right); switch (op) { case OperationType.RelationalEquals: diff --git a/UIX/Microsoft/Iris/Markup/Interpreter.cs b/UIX/Microsoft/Iris/Markup/Interpreter.cs index 3ad64af..2cabc47 100644 --- a/UIX/Microsoft/Iris/Markup/Interpreter.cs +++ b/UIX/Microsoft/Iris/Markup/Interpreter.cs @@ -23,14 +23,14 @@ namespace Microsoft.Iris.Markup byteCodeReader = context.LoadResult.ObjectSection; num = (long)((ulong)byteCodeReader.CurrentOffset); byteCodeReader.CurrentOffset = context.InitialBytecodeOffset; - result = Interpreter.Run(context, byteCodeReader); + result = Run(context, byteCodeReader); flag = false; } finally { if (flag) { - Interpreter.ExceptionContext = context.ToString(); + ExceptionContext = context.ToString(); } ErrorManager.ExitContext(); if (byteCodeReader != null && num != -1L) @@ -50,7 +50,7 @@ namespace Microsoft.Iris.Markup MarkupConstantsTable constantsTable = loadResult.ConstantsTable; SymbolReference[] symbolReferenceTable = context.MarkupType.SymbolReferenceTable; Trace.IsCategoryEnabled(TraceCategory.Markup); - Stack stack = Interpreter._stack; + Stack stack = _stack; int count = stack.Count; if (instance != null) { @@ -70,10 +70,10 @@ namespace Microsoft.Iris.Markup int num = reader.ReadUInt16(); TypeSchema typeSchema = importTables.TypeImports[num]; object obj = typeSchema.ConstructDefault(); - Interpreter.ReportErrorOnNull(obj, "Construction", typeSchema.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj, "Construction", typeSchema.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { - Interpreter.RegisterDisposable(obj, typeSchema, instance); + RegisterDisposable(obj, typeSchema, instance); stack.Push(obj); } break; @@ -86,7 +86,7 @@ namespace Microsoft.Iris.Markup if (!typeSchema2.IsAssignableFrom(typeSchema3)) { ErrorManager.ReportError("Script runtime failure: Dynamic construction type override failed. Attempting to construct '{0}' in place of '{1}'", (typeSchema3 != null) ? typeSchema3.Name : "null", typeSchema2.Name); - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (ErrorsDetected(watermark, ref result, ref flag)) { break; } @@ -101,10 +101,10 @@ namespace Microsoft.Iris.Markup { obj2 = typeSchema3.ConstructDefault(); } - Interpreter.ReportErrorOnNull(obj2, "Construction", typeSchema3.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj2, "Construction", typeSchema3.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { - Interpreter.RegisterDisposable(obj2, typeSchema3, instance); + RegisterDisposable(obj2, typeSchema3, instance); stack.Push(obj2); } break; @@ -116,18 +116,18 @@ namespace Microsoft.Iris.Markup int num4 = reader.ReadUInt16(); ConstructorSchema constructorSchema = importTables.ConstructorImports[num4]; int i = constructorSchema.ParameterTypes.Length; - object[] array = Interpreter.ParameterListAllocator.Alloc(i); + object[] array = ParameterListAllocator.Alloc(i); for (i--; i >= 0; i--) { array[i] = stack.Pop(); } object obj3 = constructorSchema.Construct(array); - Interpreter.ReportErrorOnNull(obj3, "Construction", typeSchema4.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj3, "Construction", typeSchema4.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { - Interpreter.RegisterDisposable(obj3, typeSchema4, instance); + RegisterDisposable(obj3, typeSchema4, instance); stack.Push(obj3); - Interpreter.ParameterListAllocator.Free(array); + ParameterListAllocator.Free(array); } break; } @@ -139,10 +139,10 @@ namespace Microsoft.Iris.Markup string from = (string)constantsTable.Get(index); object obj4; typeSchema5.TypeConverter(from, StringSchema.Type, out obj4); - Interpreter.ReportErrorOnNull(obj4, "Construction", typeSchema5.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj4, "Construction", typeSchema5.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { - Interpreter.RegisterDisposable(obj4, typeSchema5, instance); + RegisterDisposable(obj4, typeSchema5, instance); stack.Push(obj4); } break; @@ -152,10 +152,10 @@ namespace Microsoft.Iris.Markup int num6 = reader.ReadUInt16(); TypeSchema typeSchema6 = importTables.TypeImports[num6]; object obj5 = typeSchema6.DecodeBinary(reader); - Interpreter.ReportErrorOnNull(obj5, "Construction", typeSchema6.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj5, "Construction", typeSchema6.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { - Interpreter.RegisterDisposable(obj5, typeSchema6, instance); + RegisterDisposable(obj5, typeSchema6, instance); stack.Push(obj5); } break; @@ -166,8 +166,8 @@ namespace Microsoft.Iris.Markup TypeSchema typeSchema7 = importTables.TypeImports[num7]; object obj6 = stack.Pop(); typeSchema7.InitializeInstance(ref obj6); - Interpreter.ReportErrorOnNull(obj6, "Initialize", typeSchema7.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj6, "Initialize", typeSchema7.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { stack.Push(obj6); } @@ -178,8 +178,8 @@ namespace Microsoft.Iris.Markup TypeSchema typeSchema8 = (TypeSchema)stack.Pop(); object obj7 = stack.Pop(); typeSchema8.InitializeInstance(ref obj7); - Interpreter.ReportErrorOnNull(obj7, "Initialize", typeSchema8.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj7, "Initialize", typeSchema8.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { stack.Push(obj7); } @@ -231,8 +231,8 @@ namespace Microsoft.Iris.Markup PropertySchema propertySchema = importTables.PropertyImports[num11]; object obj9 = stack.Pop(); object obj10 = stack.Pop(); - Interpreter.ReportErrorOnNull(obj10, "Property Set", propertySchema.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj10, "Property Set", propertySchema.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { if (flag2) { @@ -244,16 +244,16 @@ namespace Microsoft.Iris.Markup { string param = TypeSchema.NameFromInstance(obj9); ErrorManager.ReportError("Script runtime failure: Incompatible value for property '{0}' supplied (expecting values of type '{1}' but got '{2}') while constructing runtime replacement type '{3}' (original type '{4}')", propertySchema.Name, propertyType.Name, param, typeSchema9.Name, propertySchema.Owner.Name); - result = Interpreter.ScriptError; + result = ScriptError; } - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (ErrorsDetected(watermark, ref result, ref flag)) { break; } } } propertySchema.SetValue(ref obj10, obj9); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (!ErrorsDetected(watermark, ref result, ref flag)) { stack.Push(obj10); } @@ -264,12 +264,12 @@ namespace Microsoft.Iris.Markup { int propertyIndex = reader.ReadUInt16(); object value2 = stack.Pop(); - object collection = Interpreter.GetCollection(stack.Peek(), importTables, propertyIndex); - Interpreter.ReportErrorOnNull(collection, "List Add"); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + object collection = GetCollection(stack.Peek(), importTables, propertyIndex); + ReportErrorOnNull(collection, "List Add"); + if (!ErrorsDetected(watermark, ref result, ref flag)) { ((IList)collection).Add(value2); - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (ErrorsDetected(watermark, ref result, ref flag)) { } } @@ -281,12 +281,12 @@ namespace Microsoft.Iris.Markup int index2 = reader.ReadUInt16(); string key = (string)constantsTable.Get(index2); object value3 = stack.Pop(); - object collection2 = Interpreter.GetCollection(stack.Peek(), importTables, propertyIndex2); - Interpreter.ReportErrorOnNull(collection2, "Dictionary Add"); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + object collection2 = GetCollection(stack.Peek(), importTables, propertyIndex2); + ReportErrorOnNull(collection2, "Dictionary Add"); + if (!ErrorsDetected(watermark, ref result, ref flag)) { ((IDictionary)collection2)[key] = value3; - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (ErrorsDetected(watermark, ref result, ref flag)) { } } @@ -301,15 +301,15 @@ namespace Microsoft.Iris.Markup if (opCode == OpCode.PropertyAssign) { instance2 = stack.Pop(); - Interpreter.ReportErrorOnNullOrDisposed(instance2, "Property Set", propertySchema3.Name, propertySchema3.Owner); - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNullOrDisposed(instance2, "Property Set", propertySchema3.Name, propertySchema3.Owner); + if (ErrorsDetected(watermark, ref result, ref flag)) { break; } } object value4 = stack.Peek(); propertySchema3.SetValue(ref instance2, value4); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag) && Trace.IsCategoryEnabled(TraceCategory.Markup)) + if (!ErrorsDetected(watermark, ref result, ref flag) && Trace.IsCategoryEnabled(TraceCategory.Markup)) { } break; @@ -324,14 +324,14 @@ namespace Microsoft.Iris.Markup if (opCode != OpCode.PropertyGetStatic) { instance3 = ((opCode == OpCode.PropertyGet) ? stack.Pop() : stack.Peek()); - Interpreter.ReportErrorOnNullOrDisposed(instance3, "Property Get", propertySchema4.Name, propertySchema4.Owner); - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNullOrDisposed(instance3, "Property Get", propertySchema4.Name, propertySchema4.Owner); + if (ErrorsDetected(watermark, ref result, ref flag)) { break; } } object value5 = propertySchema4.GetValue(instance3); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (!ErrorsDetected(watermark, ref result, ref flag)) { stack.Push(value5); if (Trace.IsCategoryEnabled(TraceCategory.Markup)) @@ -349,7 +349,7 @@ namespace Microsoft.Iris.Markup int num14 = reader.ReadUInt16(); MethodSchema methodSchema = importTables.MethodImports[num14]; int j = methodSchema.ParameterTypes.Length; - object[] array2 = Interpreter.ParameterListAllocator.Alloc(j); + object[] array2 = ParameterListAllocator.Alloc(j); for (j--; j >= 0; j--) { array2[j] = stack.Pop(); @@ -368,14 +368,14 @@ namespace Microsoft.Iris.Markup { instance4 = stack.Peek(); } - Interpreter.ReportErrorOnNullOrDisposed(instance4, "Method Invoke", methodSchema.Name, methodSchema.Owner); - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNullOrDisposed(instance4, "Method Invoke", methodSchema.Name, methodSchema.Owner); + if (ErrorsDetected(watermark, ref result, ref flag)) { break; } } object obj11 = methodSchema.Invoke(instance4, array2); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (!ErrorsDetected(watermark, ref result, ref flag)) { if (!flag5) { @@ -388,7 +388,7 @@ namespace Microsoft.Iris.Markup { stack.Push(array2[array2.Length - 1]); } - Interpreter.ParameterListAllocator.Free(array2); + ParameterListAllocator.Free(array2); } break; } @@ -404,16 +404,16 @@ namespace Microsoft.Iris.Markup string param2 = TypeSchema.NameFromInstance(obj12); string name = typeSchema10.Name; ErrorManager.ReportError("Script runtime failure: Invalid type cast while attempting to cast an instance with a runtime type of '{0}' to '{1}'", param2, name); - result = Interpreter.ScriptError; + result = ScriptError; } - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (ErrorsDetected(watermark, ref result, ref flag)) { } } else if (!typeSchema10.IsNullAssignable) { - Interpreter.ReportErrorOnNull(obj12, "Verify Type Cast", typeSchema10.Name); - if (Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj12, "Verify Type Cast", typeSchema10.Name); + if (ErrorsDetected(watermark, ref result, ref flag)) { } } @@ -426,8 +426,8 @@ namespace Microsoft.Iris.Markup int num17 = reader.ReadUInt16(); TypeSchema fromType = importTables.TypeImports[num17]; object obj13 = stack.Pop(); - Interpreter.ReportErrorOnNull(obj13, "Type Conversion", typeSchema11.Name); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + ReportErrorOnNull(obj13, "Type Conversion", typeSchema11.Name); + if (!ErrorsDetected(watermark, ref result, ref flag)) { object obj14; Result result2 = typeSchema11.TypeConverter(obj13, fromType, out obj14); @@ -435,7 +435,7 @@ namespace Microsoft.Iris.Markup { ErrorManager.ReportError("Script runtime failure: Type conversion failed while attempting to convert to '{0}' ({1})", typeSchema11.Name, result2.Error); } - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (!ErrorsDetected(watermark, ref result, ref flag)) { stack.Push(obj14); } @@ -454,7 +454,7 @@ namespace Microsoft.Iris.Markup } object left = stack.Pop(); object obj15 = typeSchema12.PerformOperationDeep(left, right, op); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + if (!ErrorsDetected(watermark, ref result, ref flag)) { stack.Push(obj15); if (Trace.IsCategoryEnabled(TraceCategory.Markup)) @@ -525,7 +525,7 @@ namespace Microsoft.Iris.Markup break; } case OpCode.ReturnVoid: - result = Interpreter.VoidReturnValue; + result = VoidReturnValue; flag = true; break; case OpCode.JumpIfFalse: @@ -552,9 +552,9 @@ namespace Microsoft.Iris.Markup ushort index4 = reader.ReadUInt16(); uint currentOffset2 = reader.ReadUInt32(); string key2 = (string)constantsTable.Get(index4); - object collection3 = Interpreter.GetCollection(stack.Peek(), importTables, propertyIndex3); - Interpreter.ReportErrorOnNull(collection3, "Dictionary Contains"); - if (!Interpreter.ErrorsDetected(watermark, ref result, ref flag)) + object collection3 = GetCollection(stack.Peek(), importTables, propertyIndex3); + ReportErrorOnNull(collection3, "Dictionary Contains"); + if (!ErrorsDetected(watermark, ref result, ref flag)) { bool flag8 = ((IDictionary)collection3).Contains(key2); Trace.IsCategoryEnabled(TraceCategory.Markup); @@ -671,7 +671,7 @@ namespace Microsoft.Iris.Markup { if (watermark.ErrorsDetected) { - result = Interpreter.ScriptError; + result = ScriptError; done = true; return true; } @@ -700,7 +700,7 @@ namespace Microsoft.Iris.Markup else { PropertySchema propertySchema = importTables.PropertyImports[propertyIndex]; - Interpreter.ReportErrorOnNull(stackInstance, "Property Get", propertySchema.Name); + ReportErrorOnNull(stackInstance, "Property Get", propertySchema.Name); if (stackInstance != null) { result = propertySchema.GetValue(stackInstance); @@ -774,14 +774,14 @@ namespace Microsoft.Iris.Markup object[] array; if (count == 0) { - array = Interpreter.ParameterListAllocator.s_params0; + array = s_params0; } else if (count < 20) { - array = Interpreter.ParameterListAllocator.s_cachedLists[count]; + array = s_cachedLists[count]; if (array != null) { - Interpreter.ParameterListAllocator.s_cachedLists[count] = null; + s_cachedLists[count] = null; } else { @@ -799,10 +799,10 @@ namespace Microsoft.Iris.Markup public static void Free(object[] paramList) { int num = paramList.Length; - if (num != 0 && num < 20 && Interpreter.ParameterListAllocator.s_cachedLists[num] == null) + if (num != 0 && num < 20 && s_cachedLists[num] == null) { Array.Clear(paramList, 0, paramList.Length); - Interpreter.ParameterListAllocator.s_cachedLists[num] = paramList; + s_cachedLists[num] = paramList; } } diff --git a/UIX/Microsoft/Iris/Markup/InterpreterContext.cs b/UIX/Microsoft/Iris/Markup/InterpreterContext.cs index ebb0817..017c3bb 100644 --- a/UIX/Microsoft/Iris/Markup/InterpreterContext.cs +++ b/UIX/Microsoft/Iris/Markup/InterpreterContext.cs @@ -91,8 +91,8 @@ namespace Microsoft.Iris.Markup ParameterContext parameterContext) { InterpreterContext interpreterContext = null; - if (InterpreterContext.s_cache.Count != 0) - interpreterContext = (InterpreterContext)InterpreterContext.s_cache.Pop(); + if (s_cache.Count != 0) + interpreterContext = (InterpreterContext)s_cache.Pop(); if (interpreterContext == null) interpreterContext = new InterpreterContext(); interpreterContext._instance = instance; @@ -112,7 +112,7 @@ namespace Microsoft.Iris.Markup context._parameterContext = new ParameterContext(null, null); if (context._scopedLocals != null) context._scopedLocals.Clear(); - InterpreterContext.s_cache.Push(context); + s_cache.Push(context); } public override string ToString() diff --git a/UIX/Microsoft/Iris/Markup/LoadResult.cs b/UIX/Microsoft/Iris/Markup/LoadResult.cs index daddcb0..82098c0 100644 --- a/UIX/Microsoft/Iris/Markup/LoadResult.cs +++ b/UIX/Microsoft/Iris/Markup/LoadResult.cs @@ -90,7 +90,7 @@ namespace Microsoft.Iris.Markup public abstract LoadResultStatus Status { get; } - public virtual LoadResult[] Dependencies => LoadResult.EmptyList; + public virtual LoadResult[] Dependencies => EmptyList; public virtual TypeSchema[] ExportTable => TypeSchema.EmptyList; diff --git a/UIX/Microsoft/Iris/Markup/LoadResultCache.cs b/UIX/Microsoft/Iris/Markup/LoadResultCache.cs index c1a02c9..60f184b 100644 --- a/UIX/Microsoft/Iris/Markup/LoadResultCache.cs +++ b/UIX/Microsoft/Iris/Markup/LoadResultCache.cs @@ -16,20 +16,20 @@ namespace Microsoft.Iris.Markup public static LoadResult Read(string uri) { LoadResult loadResult; - LoadResultCache.s_cache.TryGetValue(uri, out loadResult); + s_cache.TryGetValue(uri, out loadResult); return loadResult; } public static void Write(string uri, LoadResult loadResult) { - LoadResultCache.s_cache[uri] = loadResult; + s_cache[uri] = loadResult; loadResult.RegisterUsage(s_cache); } public static void Remove(uint islandId) { Vector vector = new Vector(); - foreach (KeyValuePair keyValuePair in LoadResultCache.s_cache) + foreach (KeyValuePair keyValuePair in s_cache) { LoadResult loadResult = keyValuePair.Value; if ((loadResult.IslandReferences & islandId) > 0U) @@ -41,17 +41,17 @@ namespace Microsoft.Iris.Markup } } foreach (string key in vector) - LoadResultCache.s_cache.Remove(key); + s_cache.Remove(key); } public static void Clear() { - foreach (LoadResult loadResult in LoadResultCache.s_cache.Values) + foreach (LoadResult loadResult in s_cache.Values) { loadResult.RemoveAllReferences(); loadResult.UnregisterUsage(s_cache); } - LoadResultCache.s_cache.Clear(); + s_cache.Clear(); } } } diff --git a/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs b/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs index 6cced92..f1e54c1 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupCompiler.cs @@ -70,12 +70,12 @@ namespace Microsoft.Iris.Markup for (int index = 0; index < compilands.Length; ++index) { ErrorWatermark watermark2 = ErrorManager.Watermark; - ByteCodeWriter writer = MarkupCompiler.Run((MarkupLoadResult)vector[index], markupBinaryDataTable); + ByteCodeWriter writer = Run((MarkupLoadResult)vector[index], markupBinaryDataTable); if (!watermark2.ErrorsDetected) - MarkupCompiler.SaveCompiledOutput(writer, compilands[index].OutputFileName); + SaveCompiledOutput(writer, compilands[index].OutputFileName); } if (markupBinaryDataTable != null) - MarkupCompiler.SaveCompiledOutput(MarkupCompiler.CompileBinaryDataTable(markupBinaryDataTable), dataTableCompiland.OutputFileName); + SaveCompiledOutput(CompileBinaryDataTable(markupBinaryDataTable), dataTableCompiland.OutputFileName); } return !watermark1.ErrorsDetected; } @@ -595,7 +595,7 @@ namespace Microsoft.Iris.Markup markupLoadResult.SetLineNumberTable(new MarkupLineNumberTable()); markupLoadResult.LineNumberTable.PrepareForRuntimeUse(); markupLoadResult.SetObjectSection(new ByteCodeWriter().CreateReader()); - ByteCodeWriter byteCodeWriter = MarkupCompiler.Run(markupLoadResult, null); + ByteCodeWriter byteCodeWriter = Run(markupLoadResult, null); markupLoadResult.UnregisterUsage(markupLoadResult); return byteCodeWriter; } diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs b/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs index 007465b..dc0070b 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupDataProvider.cs @@ -17,8 +17,8 @@ namespace Microsoft.Iris.Markup public static void AddDataMapping(MarkupDataMapping mapping) { MarkupDataProvider.MappingKey key = new MarkupDataProvider.MappingKey(mapping.TargetType, mapping.Provider); - if (!MarkupDataProvider.s_mappings.ContainsKey(key)) - MarkupDataProvider.s_mappings[key] = mapping; + if (!s_mappings.ContainsKey(key)) + s_mappings[key] = mapping; else ErrorManager.ReportError("Data mapping already defined for type '{0}', provider '{1}'", mapping.TargetType.Name, mapping.Provider); } @@ -26,7 +26,7 @@ namespace Microsoft.Iris.Markup public static void RemoveDataMapping(MarkupDataMapping mapping) { MarkupDataProvider.MappingKey key = new MarkupDataProvider.MappingKey(mapping.TargetType, mapping.Provider); - MarkupDataProvider.s_mappings.Remove(key); + s_mappings.Remove(key); } public static MarkupDataMapping FindDataMapping( @@ -35,23 +35,23 @@ namespace Microsoft.Iris.Markup { MarkupDataProvider.MappingKey key = new MarkupDataProvider.MappingKey(typeSchema, providerName); MarkupDataMapping markupDataMapping; - if (!MarkupDataProvider.s_mappings.TryGetValue(key, out markupDataMapping)) + if (!s_mappings.TryGetValue(key, out markupDataMapping)) { markupDataMapping = new MarkupDataMapping(null); markupDataMapping.Provider = providerName; markupDataMapping.TargetType = typeSchema; - markupDataMapping.Mappings = MarkupDataProvider.FillInDefaultMappings(typeSchema, null); - MarkupDataProvider.s_mappings[key] = markupDataMapping; + markupDataMapping.Mappings = FillInDefaultMappings(typeSchema, null); + s_mappings[key] = markupDataMapping; } return markupDataMapping; } - public static void RegisterDataProvider(IDataProvider provider) => MarkupDataProvider.s_providers[provider.Name] = provider; + public static void RegisterDataProvider(IDataProvider provider) => s_providers[provider.Name] = provider; public static IDataProvider GetDataProvider(string providerName) { IDataProvider dataProvider; - return MarkupDataProvider.s_providers.TryGetValue(providerName, out dataProvider) ? dataProvider : null; + return s_providers.TryGetValue(providerName, out dataProvider) ? dataProvider : null; } public static object GetDefaultValueForType(TypeSchema type) => type.IsNullAssignable ? null : type.ConstructDefault(); @@ -70,7 +70,7 @@ namespace Microsoft.Iris.Markup entries[property.Name] = new MarkupDataMappingEntry() { Property = property, - DefaultValue = MarkupDataProvider.GetDefaultValueForType(property.PropertyType) + DefaultValue = GetDefaultValueForType(property.PropertyType) }; } } diff --git a/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs b/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs index cd6e702..c34e7e2 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupDataQuerySchema.cs @@ -42,9 +42,9 @@ namespace Microsoft.Iris.Markup base.BuildProperties(); this._predefinedProperties = new MarkupDataQueryPreDefinedPropertySchema[3] { - this._resultProperty = new MarkupDataQueryPreDefinedPropertySchema(this, this._resultType != null ? this._resultType : ObjectSchema.Type, "Result", new GetValueHandler(MarkupDataQuerySchema.GetResultProperty), null), - new MarkupDataQueryPreDefinedPropertySchema(this, UIXLoadResultExports.DataQueryStatusType, "Status", new GetValueHandler(MarkupDataQuerySchema.GetStatusProperty), null), - new MarkupDataQueryPreDefinedPropertySchema(this, BooleanSchema.Type, "Enabled", new GetValueHandler(MarkupDataQuerySchema.GetEnabledProperty), new SetValueHandler(MarkupDataQuerySchema.SetEnabledProperty)) + this._resultProperty = new MarkupDataQueryPreDefinedPropertySchema(this, this._resultType != null ? this._resultType : ObjectSchema.Type, "Result", new GetValueHandler(GetResultProperty), null), + new MarkupDataQueryPreDefinedPropertySchema(this, UIXLoadResultExports.DataQueryStatusType, "Status", new GetValueHandler(GetStatusProperty), null), + new MarkupDataQueryPreDefinedPropertySchema(this, BooleanSchema.Type, "Enabled", new GetValueHandler(GetEnabledProperty), new SetValueHandler(SetEnabledProperty)) }; this._refreshMethod = new MarkupDataQueryRefreshMethodSchema(this); } diff --git a/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs b/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs index 5b507bc..7d22fc7 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupEncoder.cs @@ -846,16 +846,16 @@ namespace Microsoft.Iris.Markup } [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode) => Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); + private void DEBUG_EmitStop(OpCode opCode) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode, object param) => Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); + private void DEBUG_EmitStop(OpCode opCode, object param) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode, object param, object param2) => Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); + private void DEBUG_EmitStop(OpCode opCode, object param, object param2) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); [Conditional("DEBUG")] - private void DEBUG_EmitStop(OpCode opCode, object param, object param2, object param3) => Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); + private void DEBUG_EmitStop(OpCode opCode, object param, object param2, object param3) => Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); [Conditional("DEBUG")] private void DEBUG_EmitStop( @@ -865,7 +865,7 @@ namespace Microsoft.Iris.Markup object param3, object param4) { - Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); + Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); } [Conditional("DEBUG")] @@ -877,7 +877,7 @@ namespace Microsoft.Iris.Markup object param4, object param5) { - Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); + Debug.Trace.IsCategoryEnabled(TraceCategory.MarkupEncoding); } [Conditional("DEBUG")] diff --git a/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs b/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs index e99bb28..161e31e 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupLineNumberTable.cs @@ -27,8 +27,8 @@ namespace Microsoft.Iris.Markup public void AddRecord(uint offset, int line, int column) { - ulong num = MarkupLineNumberTable.Pack(offset, line, column); - if (this._lookupTable.Count > 0 && (int)MarkupLineNumberTable.UnpackOffset(this._lookupTable[this._lookupTable.Count - 1]) == (int)offset) + ulong num = Pack(offset, line, column); + if (this._lookupTable.Count > 0 && (int)UnpackOffset(this._lookupTable[this._lookupTable.Count - 1]) == (int)offset) this._lookupTable[this._lookupTable.Count - 1] = num; else this._lookupTable.Add(num); @@ -46,12 +46,12 @@ namespace Microsoft.Iris.Markup { int length = this._runtimeList.Length; int index = 0; - while (index < length && (offset < MarkupLineNumberTable.UnpackOffset(this._runtimeList[index]) || index != length - 1 && offset >= MarkupLineNumberTable.UnpackOffset(this._runtimeList[index + 1]))) + while (index < length && (offset < UnpackOffset(this._runtimeList[index]) || index != length - 1 && offset >= UnpackOffset(this._runtimeList[index + 1]))) ++index; if (index < length) { - line = MarkupLineNumberTable.UnpackLine(this._runtimeList[index]); - column = MarkupLineNumberTable.UnpackColumn(this._runtimeList[index]); + line = UnpackLine(this._runtimeList[index]); + column = UnpackColumn(this._runtimeList[index]); } else { diff --git a/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs b/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs index e77e060..bcaac38 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupLoadResult.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.Markup { internal abstract class MarkupLoadResult : LoadResult { - private LoadResult[] _dependenciesTable = LoadResult.EmptyList; + private LoadResult[] _dependenciesTable = EmptyList; private ByteCodeReader _reader; protected MarkupBinaryDataTable _binaryDataTable; protected MarkupLineNumberTable _lineNumberTable; diff --git a/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs b/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs index a7a12c5..12ee7cf 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupMethodSchema.cs @@ -46,14 +46,14 @@ namespace Microsoft.Iris.Markup TypeSchema[] parameterTypes, string[] parameterNames) { - return MarkupMethodSchema.Build(markupTypeBase, owner, name, returnType, parameterTypes, parameterNames, false); + return Build(markupTypeBase, owner, name, returnType, parameterTypes, parameterNames, false); } public static MarkupMethodSchema BuildVirtualThunk( TypeSchema markupTypeBase, MarkupMethodSchema virtualMethod) { - return MarkupMethodSchema.Build(markupTypeBase, (MarkupTypeSchema)virtualMethod.Owner, virtualMethod.Name, virtualMethod.ReturnType, virtualMethod.ParameterTypes, virtualMethod.ParameterNames, true); + return Build(markupTypeBase, (MarkupTypeSchema)virtualMethod.Owner, virtualMethod.Name, virtualMethod.ReturnType, virtualMethod.ParameterTypes, virtualMethod.ParameterNames, true); } protected MarkupMethodSchema( diff --git a/UIX/Microsoft/Iris/Markup/MarkupServices.cs b/UIX/Microsoft/Iris/Markup/MarkupServices.cs index cce4882..5d21c0b 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupServices.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupServices.cs @@ -23,9 +23,9 @@ namespace Microsoft.Iris.Markup { get { - if (MarkupServices.s_instance == null) - MarkupServices.s_instance = new MarkupServices(); - return MarkupServices.s_instance; + if (s_instance == null) + s_instance = new MarkupServices(); + return s_instance; } } diff --git a/UIX/Microsoft/Iris/Markup/MarkupSystem.cs b/UIX/Microsoft/Iris/Markup/MarkupSystem.cs index dcb6cfc..f3ae176 100644 --- a/UIX/Microsoft/Iris/Markup/MarkupSystem.cs +++ b/UIX/Microsoft/Iris/Markup/MarkupSystem.cs @@ -35,13 +35,13 @@ namespace Microsoft.Iris.Markup public static void Startup(bool compileMode) { - MarkupSystem.MarkupSystemActive = true; - MarkupSystem.CompileMode = compileMode; - MarkupSystem.s_factoriesByProtocol = new Vector(); - MarkupSystem.s_factoriesByExtension = new Vector(); - MarkupSystem.s_rootIslandId = MarkupSystem.AllocateIslandId(); - MarkupSystem.UIXGlobal = new UIXLoadResult("http://schemas.microsoft.com/2007/uix"); - MarkupSystem.UIXGlobal.RegisterUsage(typeof(MarkupSystem)); + MarkupSystemActive = true; + CompileMode = compileMode; + s_factoriesByProtocol = new Vector(); + s_factoriesByExtension = new Vector(); + s_rootIslandId = AllocateIslandId(); + UIXGlobal = new UIXLoadResult("http://schemas.microsoft.com/2007/uix"); + UIXGlobal.RegisterUsage(typeof(MarkupSystem)); UIXLoadResult.InitializeStatics(); ValidateContext.InitializeStatics(); ValidateUI.InitializeStatics(); @@ -51,8 +51,8 @@ namespace Microsoft.Iris.Markup TypeRestriction.InitializeStatics(); NativeMarkupDataQuery.InitializeStatics(); NativeMarkupDataType.InitializeStatics(); - MarkupSystem.RootGlobal = new RootLoadResult("Root"); - MarkupSystem.RootGlobal.RegisterUsage(typeof(MarkupSystem)); + RootGlobal = new RootLoadResult("Root"); + RootGlobal.RegisterUsage(typeof(MarkupSystem)); AssemblyLoadResult.Startup(); DllLoadResult.Startup(); ResourceManager.Instance.RegisterSource("res", DllResources.Instance); @@ -62,27 +62,27 @@ namespace Microsoft.Iris.Markup public static void Shutdown() { - MarkupSystem.UnloadAll(); + UnloadAll(); AssemblyLoadResult.Shutdown(); DllLoadResult.Shutdown(); - MarkupSystem.RootGlobal.UnregisterUsage(typeof(MarkupSystem)); - MarkupSystem.RootGlobal = null; - MarkupSystem.UIXGlobal.UnregisterUsage(typeof(MarkupSystem)); - MarkupSystem.UIXGlobal = null; + RootGlobal.UnregisterUsage(typeof(MarkupSystem)); + RootGlobal = null; + UIXGlobal.UnregisterUsage(typeof(MarkupSystem)); + UIXGlobal = null; HttpResources.Shutdown(); - if (MarkupSystem.s_factoriesByProtocol != null) - MarkupSystem.s_factoriesByProtocol.Clear(); - if (MarkupSystem.s_factoriesByExtension != null) - MarkupSystem.s_factoriesByExtension.Clear(); - MarkupSystem.MarkupSystemActive = false; + if (s_factoriesByProtocol != null) + s_factoriesByProtocol.Clear(); + if (s_factoriesByExtension != null) + s_factoriesByExtension.Clear(); + MarkupSystemActive = false; } - public static void EnableMetadataTracking() => MarkupSystem.TrackAdditionalMetadata = true; + public static void EnableMetadataTracking() => TrackAdditionalMetadata = true; public static LoadResult Load(string uri, uint islandId) { ErrorManager.EnterContext(uri); - LoadResult loadResult = MarkupSystem.ResolveLoadResult(uri, islandId); + LoadResult loadResult = ResolveLoadResult(uri, islandId); if (loadResult != null) { loadResult.Load(LoadPass.DeclareTypes); @@ -97,13 +97,13 @@ namespace Microsoft.Iris.Markup public static LoadResult ResolveLoadResult(string uri, uint islandId) { ErrorManager.EnterContext(uri); - uri = MarkupSystem.ApplyImportRedirects(uri); + uri = ApplyImportRedirects(uri); LoadResult loadResult = LoadResultCache.Read(uri); if (loadResult == null) { bool flag = false; bool cacheResult = true; - foreach (MarkupSystem.Factory factory in MarkupSystem.s_factoriesByProtocol) + foreach (MarkupSystem.Factory factory in s_factoriesByProtocol) { if (uri.StartsWith(factory.key, StringComparison.Ordinal)) { @@ -114,7 +114,7 @@ namespace Microsoft.Iris.Markup } if (!flag) { - foreach (MarkupSystem.Factory factory in MarkupSystem.s_factoriesByExtension) + foreach (MarkupSystem.Factory factory in s_factoriesByExtension) { if (uri.EndsWith(factory.key, StringComparison.Ordinal)) { @@ -125,7 +125,7 @@ namespace Microsoft.Iris.Markup } } if (!flag) - loadResult = MarkupSystem.CreateMarkupLoadResult(uri, ref cacheResult); + loadResult = CreateMarkupLoadResult(uri, ref cacheResult); if (loadResult == null) loadResult = new ErrorLoadResult(uri); if (cacheResult && loadResult.Cachable) @@ -163,17 +163,17 @@ namespace Microsoft.Iris.Markup return loadResult; } - public static uint RootIslandId => MarkupSystem.s_rootIslandId; + public static uint RootIslandId => s_rootIslandId; public static uint AllocateIslandId() { - int num1 = ~(int)MarkupSystem.s_activeIslands; + int num1 = ~(int)s_activeIslands; uint num2 = (uint)(num1 & -num1); - MarkupSystem.s_activeIslands |= num2; + s_activeIslands |= num2; return num2; } - public static void FreeIslandId(uint islandId) => MarkupSystem.s_activeIslands &= ~islandId; + public static void FreeIslandId(uint islandId) => s_activeIslands &= ~islandId; public static void UnloadIsland(uint islandId) => LoadResultCache.Remove(islandId); @@ -187,14 +187,14 @@ namespace Microsoft.Iris.Markup protocol += "://"; if (flag) { - foreach (MarkupSystem.Factory factory in MarkupSystem.s_factoriesByProtocol) + foreach (MarkupSystem.Factory factory in s_factoriesByProtocol) { if (factory.key == protocol) flag = false; } } if (flag) - MarkupSystem.s_factoriesByProtocol.Add(new MarkupSystem.Factory() + s_factoriesByProtocol.Add(new MarkupSystem.Factory() { key = protocol, handler = handler @@ -207,13 +207,13 @@ namespace Microsoft.Iris.Markup bool flag = true; if (!extension.StartsWith(".", StringComparison.Ordinal)) extension = "." + extension; - foreach (MarkupSystem.Factory factory in MarkupSystem.s_factoriesByExtension) + foreach (MarkupSystem.Factory factory in s_factoriesByExtension) { if (factory.key == extension) flag = false; } if (flag) - MarkupSystem.s_factoriesByExtension.Add(new MarkupSystem.Factory() + s_factoriesByExtension.Add(new MarkupSystem.Factory() { handler = handler, key = extension @@ -223,26 +223,26 @@ namespace Microsoft.Iris.Markup public static void AddImportRedirect(string fromPrefix, string toPrefix) { - if (MarkupSystem.s_importRedirectsFrom == null) + if (s_importRedirectsFrom == null) { - MarkupSystem.s_importRedirectsFrom = new Vector(); - MarkupSystem.s_importRedirectsTo = new Vector(); + s_importRedirectsFrom = new Vector(); + s_importRedirectsTo = new Vector(); } - MarkupSystem.s_importRedirectsFrom.Add(fromPrefix); - MarkupSystem.s_importRedirectsTo.Add(toPrefix); + s_importRedirectsFrom.Add(fromPrefix); + s_importRedirectsTo.Add(toPrefix); } private static string ApplyImportRedirects(string uri) { - if (MarkupSystem.s_importRedirectsFrom != null) + if (s_importRedirectsFrom != null) { - for (int index = 0; index < MarkupSystem.s_importRedirectsFrom.Count; ++index) + for (int index = 0; index < s_importRedirectsFrom.Count; ++index) { - string str = MarkupSystem.s_importRedirectsFrom[index]; + string str = s_importRedirectsFrom[index]; if (uri.StartsWith(str, StringComparison.Ordinal)) { uri = uri.Substring(str.Length); - uri = MarkupSystem.s_importRedirectsTo[index] + uri; + uri = s_importRedirectsTo[index] + uri; break; } } @@ -250,7 +250,7 @@ namespace Microsoft.Iris.Markup return uri; } - public static bool IsDebuggingEnabled(byte level) => !MarkupSystem.CompileMode && Trace.IsCategoryEnabled(TraceCategory.MarkupDebug, level); + public static bool IsDebuggingEnabled(byte level) => !CompileMode && Trace.IsCategoryEnabled(TraceCategory.MarkupDebug, level); internal class Factory { diff --git a/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs b/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs index 6f1edd1..d1e9fc4 100644 --- a/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs +++ b/UIX/Microsoft/Iris/Markup/NativeMarkupDataQuery.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup private ulong _resultTypeHandle; private static MarkupDataQueryHandleTable s_handleTable; - public static void InitializeStatics() => NativeMarkupDataQuery.s_handleTable = new MarkupDataQueryHandleTable(); + public static void InitializeStatics() => s_handleTable = new MarkupDataQueryHandleTable(); public NativeMarkupDataQuery(MarkupDataQuerySchema type, NativeDataProviderWrapper provider) : base(type) { - this._handleToMe = NativeMarkupDataQuery.s_handleTable.RegisterProxy(this); + this._handleToMe = s_handleTable.RegisterProxy(this); this._typeHandle = type.UniqueId; this._resultTypeHandle = type.ResultType.UniqueId; this._externalQuery = provider.ConstructQuery(type.ProviderName, this._typeHandle, this._resultTypeHandle, this._handleToMe); @@ -39,7 +39,7 @@ namespace Microsoft.Iris.Markup protected override void OnDispose() { base.OnDispose(); - NativeMarkupDataQuery.s_handleTable.ReleaseProxy(this._handleToMe); + s_handleTable.ReleaseProxy(this._handleToMe); int num = (int)NativeApi.SpDataBaseObjectSetInternalHandle(this._externalQuery, 0UL); NativeApi.SpReleaseExternalObject(this._externalQuery); } @@ -116,7 +116,7 @@ namespace Microsoft.Iris.Markup public static MarkupDataQuery LookupByHandle(ulong handle) { MarkupDataQuery markupDataQuery; - NativeMarkupDataQuery.s_handleTable.LookupByHandle(handle, out markupDataQuery); + s_handleTable.LookupByHandle(handle, out markupDataQuery); return markupDataQuery; } } diff --git a/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs b/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs index 64fcdbd..2327b2b 100644 --- a/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs +++ b/UIX/Microsoft/Iris/Markup/NativeMarkupDataType.cs @@ -25,17 +25,17 @@ namespace Microsoft.Iris.Markup public static void InitializeStatics() { - NativeMarkupDataType.s_handleTable = new MarkupDataTypeHandleTable(); - NativeMarkupDataType.s_finalizeLock = new object(); - NativeMarkupDataType.s_pendingAppThreadRelease = false; - NativeMarkupDataType.s_releaseOnAppThread = new SimpleCallback(NativeMarkupDataType.ReleaseFinalizedObjects); + s_handleTable = new MarkupDataTypeHandleTable(); + s_finalizeLock = new object(); + s_pendingAppThreadRelease = false; + s_releaseOnAppThread = new SimpleCallback(ReleaseFinalizedObjects); } private NativeMarkupDataType(MarkupDataTypeSchema type, IntPtr externalObject) : base(type) { this._externalObject = externalObject; - this._handleToMe = NativeMarkupDataType.s_handleTable.RegisterProxy(this); + this._handleToMe = s_handleTable.RegisterProxy(this); this._typeHandle = type.UniqueId; NativeApi.SpAddRefExternalObject(this._externalObject); int num = (int)NativeApi.SpDataBaseObjectSetInternalHandle(this._externalObject, this._handleToMe); @@ -44,22 +44,22 @@ namespace Microsoft.Iris.Markup protected override void OnDispose() { - NativeMarkupDataType.ReleaseNativeObject(this._externalObject, this._handleToMe, this._typeHandle); + ReleaseNativeObject(this._externalObject, this._handleToMe, this._typeHandle); GC.SuppressFinalize(this); base.OnDispose(); } ~NativeMarkupDataType() { - lock (NativeMarkupDataType.s_finalizeLock) + lock (s_finalizeLock) { - if (NativeMarkupDataType.s_pendingReleases == null) - NativeMarkupDataType.s_pendingReleases = new Vector(); - NativeMarkupDataType.s_pendingReleases.Add(new NativeMarkupDataType.AppThreadReleaseEntry(this._externalObject, this._handleToMe, this._typeHandle)); - if (NativeMarkupDataType.s_pendingAppThreadRelease) + if (s_pendingReleases == null) + s_pendingReleases = new Vector(); + s_pendingReleases.Add(new NativeMarkupDataType.AppThreadReleaseEntry(this._externalObject, this._handleToMe, this._typeHandle)); + if (s_pendingAppThreadRelease) return; - NativeMarkupDataType.s_pendingAppThreadRelease = true; - DeferredCall.Post(DispatchPriority.Idle, NativeMarkupDataType.s_releaseOnAppThread); + s_pendingAppThreadRelease = true; + DeferredCall.Post(DispatchPriority.Idle, s_releaseOnAppThread); } } @@ -88,7 +88,7 @@ namespace Microsoft.Iris.Markup public static NativeMarkupDataType LookupByHandle(ulong handle) { MarkupDataType markupDataType; - NativeMarkupDataType.s_handleTable.LookupByHandle(handle, out markupDataType); + s_handleTable.LookupByHandle(handle, out markupDataType); return (NativeMarkupDataType)markupDataType; } @@ -101,33 +101,33 @@ namespace Microsoft.Iris.Markup public static void ReleaseOutstandingProxies() { - NativeMarkupDataType.s_pendingAppThreadRelease = true; + s_pendingAppThreadRelease = true; GC.Collect(); GC.WaitForPendingFinalizers(); foreach (IDisposableObject disposableObject in s_handleTable) disposableObject.Dispose(disposableObject); - NativeMarkupDataType.ReleaseFinalizedObjects(); + ReleaseFinalizedObjects(); } private static void ReleaseFinalizedObjects() { Vector pendingReleases; - lock (NativeMarkupDataType.s_finalizeLock) + lock (s_finalizeLock) { - pendingReleases = NativeMarkupDataType.s_pendingReleases; - NativeMarkupDataType.s_pendingReleases = null; - NativeMarkupDataType.s_pendingAppThreadRelease = false; + pendingReleases = s_pendingReleases; + s_pendingReleases = null; + s_pendingAppThreadRelease = false; } if (pendingReleases == null || pendingReleases.Count == 0) return; foreach (NativeMarkupDataType.AppThreadReleaseEntry threadReleaseEntry in pendingReleases) - NativeMarkupDataType.ReleaseNativeObject(threadReleaseEntry._nativeObject, threadReleaseEntry._handle, threadReleaseEntry._typeHandle); - lock (NativeMarkupDataType.s_finalizeLock) + ReleaseNativeObject(threadReleaseEntry._nativeObject, threadReleaseEntry._handle, threadReleaseEntry._typeHandle); + lock (s_finalizeLock) { - if (NativeMarkupDataType.s_pendingAppThreadRelease) + if (s_pendingAppThreadRelease) return; pendingReleases.Clear(); - NativeMarkupDataType.s_pendingReleases = pendingReleases; + s_pendingReleases = pendingReleases; } } @@ -136,7 +136,7 @@ namespace Microsoft.Iris.Markup ulong proxyHandle, ulong typeHandle) { - NativeMarkupDataType.s_handleTable.ReleaseProxy(proxyHandle); + s_handleTable.ReleaseProxy(proxyHandle); ulong frameworkQuery; int internalHandle = (int)NativeApi.SpDataBaseObjectGetInternalHandle(nativeObject, out frameworkQuery); if ((long)proxyHandle == (long)frameworkQuery) diff --git a/UIX/Microsoft/Iris/Markup/NotifyService.cs b/UIX/Microsoft/Iris/Markup/NotifyService.cs index e09075f..4a00fb1 100644 --- a/UIX/Microsoft/Iris/Markup/NotifyService.cs +++ b/UIX/Microsoft/Iris/Markup/NotifyService.cs @@ -21,14 +21,14 @@ namespace Microsoft.Iris.Markup for (ListenerNodeBase next = this._listenerRoot.Next; next != this._listenerRoot; next = next.Next) { Listener listener = (Listener)next; - if (object.ReferenceEquals(listener.Watch, id)) + if (ReferenceEquals(listener.Watch, id)) listener.OnNotify(); } } public void FireThreadSafe(string id) { - id = NotifyService.CanonicalizeString(id); + id = CanonicalizeString(id); if (UIDispatcher.IsUIThread) this.Fire(id); else @@ -56,20 +56,20 @@ namespace Microsoft.Iris.Markup this._listenerRoot = null; } - public static string CanonicalizeString(string value) => NotifyService.GetCanonicalizedString(value, true); + public static string CanonicalizeString(string value) => GetCanonicalizedString(value, true); private static string GetCanonicalizedString(string value, bool addIfNotFound) { object obj = null; - if (!NotifyService.s_canonicalizedStrings.TryGetValue(value, out obj) && addIfNotFound) + if (!s_canonicalizedStrings.TryGetValue(value, out obj) && addIfNotFound) { - NotifyService.s_canonicalizedStrings[value] = value; + s_canonicalizedStrings[value] = value; obj = value; } return (string)obj; } [Conditional("DEBUG")] - public static void AssertIsCanonicalized(string value) => NotifyService.GetCanonicalizedString(value, false); + public static void AssertIsCanonicalized(string value) => GetCanonicalizedString(value, false); } } diff --git a/UIX/Microsoft/Iris/Markup/ParseResult.cs b/UIX/Microsoft/Iris/Markup/ParseResult.cs index 646a5da..0d7e7e4 100644 --- a/UIX/Microsoft/Iris/Markup/ParseResult.cs +++ b/UIX/Microsoft/Iris/Markup/ParseResult.cs @@ -15,8 +15,8 @@ namespace Microsoft.Iris.Markup public ValidateNamespace XmlnsList; public bool HasErrors; public Vector ClassList = new Vector(4); - public Vector AliasList = ParseResult.s_EmptyAliasList; - public Vector DataMappingList = ParseResult.s_EmptyDataMappingList; + public Vector AliasList = s_EmptyAliasList; + public Vector DataMappingList = s_EmptyDataMappingList; public static Vector s_EmptyAliasList = new Vector(0); public static Vector s_EmptyDataMappingList = new Vector(0); } diff --git a/UIX/Microsoft/Iris/Markup/Parser.cs b/UIX/Microsoft/Iris/Markup/Parser.cs index b889abc..7d16bde 100644 --- a/UIX/Microsoft/Iris/Markup/Parser.cs +++ b/UIX/Microsoft/Iris/Markup/Parser.cs @@ -56,7 +56,7 @@ namespace Microsoft.Iris.Markup parseResult.XmlnsList.AppendToEnd(validateNamespace); } else - Parser.ReportError(xmlReader, "Unexpected attribute '{0}' on root tag", name); + ReportError(xmlReader, "Unexpected attribute '{0}' on root tag", name); } } } @@ -67,7 +67,7 @@ namespace Microsoft.Iris.Markup case NativeXmlNodeType.Element: if (flag) { - Parser.ReportError(xmlReader, "Script tag may not contain XML elements, found: '{0}'", xmlReader.Name); + ReportError(xmlReader, "Script tag may not contain XML elements, found: '{0}'", xmlReader.Name); continue; } bool isEmptyElement = xmlReader.IsEmptyElement; @@ -80,7 +80,7 @@ namespace Microsoft.Iris.Markup flag = true; parseStack.Push(new Parser.ScriptBlock(xmlReader.LineNumber, xmlReader.LinePosition)); if (xmlReader.ReadAttribute()) - Parser.ReportError(xmlReader, "Script tag may not have XML attributes"); + ReportError(xmlReader, "Script tag may not have XML attributes"); } else { @@ -91,12 +91,12 @@ namespace Microsoft.Iris.Markup { if (xmlReader.Prefix == string.Empty) { - ValidateObject objectFromString = Parser.CreateValidateObjectFromString(owner, xmlReader); + ValidateObject objectFromString = CreateValidateObjectFromString(owner, xmlReader); ValidateProperty property = new ValidateProperty(owner, xmlReader.LocalName, objectFromString, xmlReader.LineNumber, xmlReader.LinePosition); objectTagValidator.AddProperty(property); } else - Parser.ReportError(xmlReader, "Property or Object tag may not have prefixed attributes: '{0}'", xmlReader.Name); + ReportError(xmlReader, "Property or Object tag may not have prefixed attributes: '{0}'", xmlReader.Name); } parseStack.Push(objectTagValidator); if (additionalMetadata && !string.IsNullOrEmpty(str1)) @@ -109,13 +109,13 @@ namespace Microsoft.Iris.Markup else { if (prefix1 != string.Empty) - Parser.ReportError(xmlReader, "Property tag may not be prefixed: '{0}'", xmlReader.Name); + ReportError(xmlReader, "Property tag may not be prefixed: '{0}'", xmlReader.Name); if (localName == "Methods") { flag = true; - parseStack.Push(new Parser.ScriptBlock(xmlReader.LineNumber, xmlReader.LinePosition, Parser.CodeType.Methods)); + parseStack.Push(new Parser.ScriptBlock(xmlReader.LineNumber, xmlReader.LinePosition, CodeType.Methods)); if (xmlReader.ReadAttribute()) - Parser.ReportError(xmlReader, "Script tag may not have XML attributes"); + ReportError(xmlReader, "Script tag may not have XML attributes"); } else { @@ -129,7 +129,7 @@ namespace Microsoft.Iris.Markup Value = xmlReader.Value }); else - Parser.ReportError(xmlReader, "Property or Object tag may not have prefixed attributes: '{0}'", xmlReader.Name); + ReportError(xmlReader, "Property or Object tag may not have prefixed attributes: '{0}'", xmlReader.Name); } parseStack.Push(validateProperty); } @@ -137,7 +137,7 @@ namespace Microsoft.Iris.Markup if (isEmptyElement) { flag = false; - Parser.HandleEndElement(owner, parseResult, parseStack); + HandleEndElement(owner, parseResult, parseStack); continue; } continue; @@ -145,7 +145,7 @@ namespace Microsoft.Iris.Markup case NativeXmlNodeType.CDATA: if (parseStack.Count == 0) { - Parser.ReportError(xmlReader, "Text/CDATA is not allowed under root tag ('{0}')", xmlReader.Value.Trim()); + ReportError(xmlReader, "Text/CDATA is not allowed under root tag ('{0}')", xmlReader.Value.Trim()); continue; } switch (parseStack.Peek()) @@ -153,26 +153,26 @@ namespace Microsoft.Iris.Markup case ValidateProperty validateProperty: if (validateProperty.Value == null) { - validateProperty.Value = Parser.CreateValidateObjectFromString(owner, xmlReader); + validateProperty.Value = CreateValidateObjectFromString(owner, xmlReader); continue; } if (validateProperty.Value is ValidateFromString) { - Parser.ReportError(xmlReader, "Property tag may only contain one Text/CDATA, found more text: '{0}'", xmlReader.Value.Trim()); + ReportError(xmlReader, "Property tag may only contain one Text/CDATA, found more text: '{0}'", xmlReader.Value.Trim()); continue; } - Parser.ReportError(xmlReader, "Property tag already has objects, may not also add Text/CDATA: '{0}'", xmlReader.Value.Trim()); + ReportError(xmlReader, "Property tag already has objects, may not also add Text/CDATA: '{0}'", xmlReader.Value.Trim()); continue; case Parser.ScriptBlock scriptBlock: if (scriptBlock.ValidateValue == null) { - scriptBlock.ValidateValue = Parser.ParseCode(owner, xmlReader, scriptBlock.CodeType); + scriptBlock.ValidateValue = ParseCode(owner, xmlReader, scriptBlock.CodeType); continue; } - Parser.ReportError(xmlReader, "Script tag may only contain one Text/CDATA, found more text: '{0}'", xmlReader.Value.Trim()); + ReportError(xmlReader, "Script tag may only contain one Text/CDATA, found more text: '{0}'", xmlReader.Value.Trim()); continue; default: - Parser.ReportError(xmlReader, "Object tag may not contain Text/CDATA: '{0}'", xmlReader.Value.Trim()); + ReportError(xmlReader, "Object tag may not contain Text/CDATA: '{0}'", xmlReader.Value.Trim()); continue; } case NativeXmlNodeType.Comment: @@ -186,13 +186,13 @@ namespace Microsoft.Iris.Markup { if (str2 == null) str2 = xmlReader.Value; - Parser.ReportError(xmlReader, "Script tag may not contain XML comments, found: '{0}'", str2.Trim()); + ReportError(xmlReader, "Script tag may not contain XML comments, found: '{0}'", str2.Trim()); continue; } continue; case NativeXmlNodeType.EndElement: flag = false; - Parser.HandleEndElement(owner, parseResult, parseStack); + HandleEndElement(owner, parseResult, parseStack); continue; default: continue; @@ -294,7 +294,7 @@ namespace Microsoft.Iris.Markup NativeXmlReader xmlReader) { if (xmlReader.IsInlineExpression) - return (ValidateObject)Parser.ParseCode(owner, xmlReader, Parser.CodeType.InlineExpression); + return (ValidateObject)ParseCode(owner, xmlReader, CodeType.InlineExpression); string fromString = xmlReader.Value; bool expandEscapes = true; if (fromString.Length > 0 && fromString[0] == '@') @@ -311,20 +311,20 @@ namespace Microsoft.Iris.Markup Parser.CodeType codeType) { Validate validate = null; - if (Parser.s_lexTable == null) + if (s_lexTable == null) { - Parser.s_lexTable = new ParserLexTable(); - Parser.s_yaccTable = new ParserYaccTable(); - Parser.s_lex = new ParserLexClass(Parser.s_lexTable); - Parser.s_yacc = new ParserYaccClass(Parser.s_yaccTable, s_lex); + s_lexTable = new ParserLexTable(); + s_yaccTable = new ParserYaccTable(); + s_lex = new ParserLexClass(s_lexTable); + s_yacc = new ParserYaccClass(s_yaccTable, s_lex); } string prefix; switch (codeType) { - case Parser.CodeType.Methods: + case CodeType.Methods: prefix = "%%"; break; - case Parser.CodeType.InlineExpression: + case CodeType.InlineExpression: prefix = "$$"; break; default: @@ -332,19 +332,19 @@ namespace Microsoft.Iris.Markup break; } SSLexUnicodeBufferConsumer unicodeBufferConsumer = xmlReader.LexConsumerForValueWithPrefix(prefix); - Parser.s_lex.Reset(unicodeBufferConsumer); - Parser.s_yacc.Reset(owner); - Parser.s_parserActive = true; - Parser.s_yacc.parse(); - if (!Parser.s_yacc.HasErrors) + s_lex.Reset(unicodeBufferConsumer); + s_yacc.Reset(owner); + s_parserActive = true; + s_yacc.parse(); + if (!s_yacc.HasErrors) { - validate = (Validate)Parser.s_yacc.treeRoot().Object; + validate = (Validate)s_yacc.treeRoot().Object; if (MarkupSystem.TrackAdditionalMetadata) validate.Metadata.OriginalValue = xmlReader.Value; } - Parser.s_lex.Reset(null); - Parser.s_yacc.Reset(null); - Parser.s_parserActive = false; + s_lex.Reset(null); + s_yacc.Reset(null); + s_parserActive = false; return validate; } diff --git a/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs b/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs index 3714af5..69a3ca8 100644 --- a/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs +++ b/UIX/Microsoft/Iris/Markup/ReflectionHelper.cs @@ -33,7 +33,7 @@ namespace Microsoft.Iris.Markup { typeof (object), typeof (object[]) - }, ReflectionHelper.s_irisModule, true); + }, s_irisModule, true); ILGenerator ilGenerator = dynamicMethod.GetILGenerator(); ParameterInfo[] parameters = methodBase.GetParameters(); Type[] typeArray = new Type[parameters.Length]; @@ -45,7 +45,7 @@ namespace Microsoft.Iris.Markup methodInfo = (MethodInfo)methodBase; ilGenerator.Emit(OpCodes.Ldarg_0); Type declaringType = methodInfo.DeclaringType; - ReflectionHelper.EmitCastToType(ilGenerator, declaringType); + EmitCastToType(ilGenerator, declaringType); if (declaringType.IsValueType) { LocalBuilder local = ilGenerator.DeclareLocal(declaringType); @@ -56,12 +56,12 @@ namespace Microsoft.Iris.Markup for (int index = 0; index < typeArray.Length; ++index) { ilGenerator.Emit(OpCodes.Ldarg_1); - if (index < ReflectionHelper.s_loadInts.Length) - ilGenerator.Emit(ReflectionHelper.s_loadInts[index]); + if (index < s_loadInts.Length) + ilGenerator.Emit(s_loadInts[index]); else ilGenerator.Emit(OpCodes.Ldc_I4, index); ilGenerator.Emit(OpCodes.Ldelem_Ref); - ReflectionHelper.EmitCastToType(ilGenerator, typeArray[index]); + EmitCastToType(ilGenerator, typeArray[index]); } Type cls; if (methodInfo != null) diff --git a/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs b/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs index 52529d9..8fced3a 100644 --- a/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs +++ b/UIX/Microsoft/Iris/Markup/ScriptRunScheduler.cs @@ -18,7 +18,7 @@ namespace Microsoft.Iris.Markup public void ScheduleRun(uint scriptId, bool ignoreErrors) { if (this._pendingList == null) - this._pendingList = ScriptRunScheduler.s_listCache.Acquire(); + this._pendingList = s_listCache.Acquire(); int index; for (index = 0; index < this._pendingList.Count; ++index) { @@ -42,7 +42,7 @@ namespace Microsoft.Iris.Markup ScriptRunScheduler.PendingScript pendingScript = pendingList[index]; markupTypeBase.RunScript(pendingScript.ScriptId, pendingScript.IgnoreErrors, new ParameterContext()); } - ScriptRunScheduler.s_listCache.Release(pendingList); + s_listCache.Release(pendingList); } internal struct PendingScript diff --git a/UIX/Microsoft/Iris/Markup/TypeSchema.cs b/UIX/Microsoft/Iris/Markup/TypeSchema.cs index bd4037e..54d8161 100644 --- a/UIX/Microsoft/Iris/Markup/TypeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/TypeSchema.cs @@ -22,14 +22,14 @@ namespace Microsoft.Iris.Markup public TypeSchema(LoadResult owner) { this._owner = owner; - this._id = ++TypeSchema.s_uniqueId; - TypeSchema.s_idToTypeSchema[this._id] = this; + this._id = ++s_uniqueId; + s_idToTypeSchema[this._id] = this; this.DeclareOwner(owner); } protected override void OnDispose() { - TypeSchema.s_idToTypeSchema.Remove(this._id); + s_idToTypeSchema.Remove(this._id); base.OnDispose(); } @@ -226,8 +226,8 @@ namespace Microsoft.Iris.Markup public static void RegisterTwoWayEquivalence(TypeSchema typeA, TypeSchema typeB) { - TypeSchema.RegisterOneWayEquivalence(typeA, typeB); - TypeSchema.RegisterOneWayEquivalence(typeB, typeA); + RegisterOneWayEquivalence(typeA, typeB); + RegisterOneWayEquivalence(typeB, typeA); } public void ShareEquivalents(Vector equivalents) => this._equivalents = equivalents; @@ -241,7 +241,7 @@ namespace Microsoft.Iris.Markup public static TypeSchema LookupById(ulong id) { TypeSchema typeSchema; - TypeSchema.s_idToTypeSchema.TryGetValue(id, out typeSchema); + s_idToTypeSchema.TryGetValue(id, out typeSchema); return typeSchema; } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs index aa2e4ae..e8de2e5 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AccessibleSchema.cs @@ -117,37 +117,37 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Accessible(); - public static void Pass1Initialize() => AccessibleSchema.Type = new UIXTypeSchema(0, "Accessible", null, 153, typeof(Accessible), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(0, "Accessible", null, 153, typeof(Accessible), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(0, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetEnabled), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(0, "DefaultAction", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetDefaultAction), new SetValueHandler(AccessibleSchema.SetDefaultAction), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(0, "DefaultActionCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetDefaultActionCommand), new SetValueHandler(AccessibleSchema.SetDefaultActionCommand), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(0, "Description", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetDescription), new SetValueHandler(AccessibleSchema.SetDescription), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(0, "HasPopup", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetHasPopup), new SetValueHandler(AccessibleSchema.SetHasPopup), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(0, "Help", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetHelp), new SetValueHandler(AccessibleSchema.SetHelp), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(0, "HelpTopic", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetHelpTopic), new SetValueHandler(AccessibleSchema.SetHelpTopic), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(0, "IsAnimated", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsAnimated), new SetValueHandler(AccessibleSchema.SetIsAnimated), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(0, "IsBusy", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsBusy), new SetValueHandler(AccessibleSchema.SetIsBusy), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(0, "IsChecked", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsChecked), new SetValueHandler(AccessibleSchema.SetIsChecked), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(0, "IsCollapsed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsCollapsed), new SetValueHandler(AccessibleSchema.SetIsCollapsed), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(0, "IsDefault", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsDefault), new SetValueHandler(AccessibleSchema.SetIsDefault), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(0, "IsExpanded", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsExpanded), new SetValueHandler(AccessibleSchema.SetIsExpanded), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(0, "IsMarquee", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsMarquee), new SetValueHandler(AccessibleSchema.SetIsMarquee), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(0, "IsMixed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsMixed), new SetValueHandler(AccessibleSchema.SetIsMixed), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(0, "IsMultiSelectable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsMultiSelectable), new SetValueHandler(AccessibleSchema.SetIsMultiSelectable), false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(0, "IsPressed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsPressed), new SetValueHandler(AccessibleSchema.SetIsPressed), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(0, "IsProtected", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsProtected), new SetValueHandler(AccessibleSchema.SetIsProtected), false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(0, "IsSelectable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsSelectable), new SetValueHandler(AccessibleSchema.SetIsSelectable), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(0, "IsSelected", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsSelected), new SetValueHandler(AccessibleSchema.SetIsSelected), false); - UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(0, "IsTraversed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsTraversed), new SetValueHandler(AccessibleSchema.SetIsTraversed), false); - UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(0, "IsUnavailable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetIsUnavailable), new SetValueHandler(AccessibleSchema.SetIsUnavailable), false); - UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(0, "KeyboardShortcut", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetKeyboardShortcut), new SetValueHandler(AccessibleSchema.SetKeyboardShortcut), false); - UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(0, "Name", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetName), new SetValueHandler(AccessibleSchema.SetName), false); - UIXPropertySchema uixPropertySchema25 = new UIXPropertySchema(0, "Role", 1, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetRole), new SetValueHandler(AccessibleSchema.SetRole), false); - UIXPropertySchema uixPropertySchema26 = new UIXPropertySchema(0, "Value", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AccessibleSchema.GetValue), new SetValueHandler(AccessibleSchema.SetValue), false); - AccessibleSchema.Type.Initialize(new DefaultConstructHandler(AccessibleSchema.Construct), null, new PropertySchema[26] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(0, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(0, "DefaultAction", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultAction), new SetValueHandler(SetDefaultAction), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(0, "DefaultActionCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultActionCommand), new SetValueHandler(SetDefaultActionCommand), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(0, "Description", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDescription), new SetValueHandler(SetDescription), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(0, "HasPopup", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasPopup), new SetValueHandler(SetHasPopup), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(0, "Help", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHelp), new SetValueHandler(SetHelp), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(0, "HelpTopic", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHelpTopic), new SetValueHandler(SetHelpTopic), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(0, "IsAnimated", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsAnimated), new SetValueHandler(SetIsAnimated), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(0, "IsBusy", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsBusy), new SetValueHandler(SetIsBusy), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(0, "IsChecked", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsChecked), new SetValueHandler(SetIsChecked), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(0, "IsCollapsed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsCollapsed), new SetValueHandler(SetIsCollapsed), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(0, "IsDefault", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsDefault), new SetValueHandler(SetIsDefault), false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(0, "IsExpanded", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsExpanded), new SetValueHandler(SetIsExpanded), false); + UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(0, "IsMarquee", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsMarquee), new SetValueHandler(SetIsMarquee), false); + UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(0, "IsMixed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsMixed), new SetValueHandler(SetIsMixed), false); + UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(0, "IsMultiSelectable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsMultiSelectable), new SetValueHandler(SetIsMultiSelectable), false); + UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(0, "IsPressed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsPressed), new SetValueHandler(SetIsPressed), false); + UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(0, "IsProtected", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsProtected), new SetValueHandler(SetIsProtected), false); + UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(0, "IsSelectable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsSelectable), new SetValueHandler(SetIsSelectable), false); + UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(0, "IsSelected", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsSelected), new SetValueHandler(SetIsSelected), false); + UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(0, "IsTraversed", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsTraversed), new SetValueHandler(SetIsTraversed), false); + UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(0, "IsUnavailable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsUnavailable), new SetValueHandler(SetIsUnavailable), false); + UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(0, "KeyboardShortcut", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyboardShortcut), new SetValueHandler(SetKeyboardShortcut), false); + UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(0, "Name", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetName), new SetValueHandler(SetName), false); + UIXPropertySchema uixPropertySchema25 = new UIXPropertySchema(0, "Role", 1, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRole), new SetValueHandler(SetRole), false); + UIXPropertySchema uixPropertySchema26 = new UIXPropertySchema(0, "Value", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[26] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs index 10d745f..95c1311 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AliasSchema.cs @@ -14,12 +14,12 @@ namespace Microsoft.Iris.Markup.UIX { } - public static void Pass1Initialize() => AliasSchema.Type = new UIXTypeSchema(2, "Alias", null, -1, typeof(object), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(2, "Alias", null, -1, typeof(object), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(2, "Type", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(AliasSchema.SetType), false); - AliasSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(2, "Type", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetType), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs index 8727c83..0279f58 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AlphaKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new AlphaKeyframe(); - public static void Pass1Initialize() => AlphaKeyframeSchema.Type = new UIXTypeSchema(4, "AlphaKeyframe", null, 130, typeof(AlphaKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(4, "AlphaKeyframe", null, 130, typeof(AlphaKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(4, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AlphaKeyframeSchema.GetValue), new SetValueHandler(AlphaKeyframeSchema.SetValue), false); - AlphaKeyframeSchema.Type.Initialize(new DefaultConstructHandler(AlphaKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(4, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs index 10a09ba..734c0d0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AnchorEdgeSchema.cs @@ -46,9 +46,9 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructIdPercent(object[] parameters) { - object instanceObj = AnchorEdgeSchema.Construct(); - AnchorEdgeSchema.SetId(ref instanceObj, parameters[0]); - AnchorEdgeSchema.SetPercent(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetId(ref instanceObj, parameters[0]); + SetPercent(ref instanceObj, parameters[1]); return instanceObj; } @@ -56,26 +56,26 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = AnchorEdgeSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result1.Error); - AnchorEdgeSchema.SetId(ref instance, valueObj1); + SetId(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result2.Error); - AnchorEdgeSchema.SetPercent(ref instance, valueObj2); + SetPercent(ref instance, valueObj2); return result2; } private static object ConstructIdPercentOffset(object[] parameters) { - object instanceObj = AnchorEdgeSchema.Construct(); - AnchorEdgeSchema.SetId(ref instanceObj, parameters[0]); - AnchorEdgeSchema.SetPercent(ref instanceObj, parameters[1]); - AnchorEdgeSchema.SetOffset(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetId(ref instanceObj, parameters[0]); + SetPercent(ref instanceObj, parameters[1]); + SetOffset(ref instanceObj, parameters[2]); return instanceObj; } @@ -83,22 +83,22 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = AnchorEdgeSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result1.Error); - AnchorEdgeSchema.SetId(ref instance, valueObj1); + SetId(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result2.Error); - AnchorEdgeSchema.SetPercent(ref instance, valueObj2); + SetPercent(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], Int32Schema.Type, null, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorEdge", result3.Error); - AnchorEdgeSchema.SetOffset(ref instance, valueObj3); + SetOffset(ref instance, valueObj3); return result3; } @@ -117,12 +117,12 @@ namespace Microsoft.Iris.Markup.UIX switch (splitString.Length) { case 2: - result = AnchorEdgeSchema.ConvertFromStringIdPercent(splitString, out instance); + result = ConvertFromStringIdPercent(splitString, out instance); if (!result.Failed) return result; break; case 3: - result = AnchorEdgeSchema.ConvertFromStringIdPercentOffset(splitString, out instance); + result = ConvertFromStringIdPercentOffset(splitString, out instance); if (!result.Failed) return result; break; @@ -134,29 +134,29 @@ namespace Microsoft.Iris.Markup.UIX return result; } - public static void Pass1Initialize() => AnchorEdgeSchema.Type = new UIXTypeSchema(6, "AnchorEdge", null, 153, typeof(AnchorEdge), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(6, "AnchorEdge", null, 153, typeof(AnchorEdge), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(6, "Id", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetId), new SetValueHandler(AnchorEdgeSchema.SetId), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(6, "Percent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetPercent), new SetValueHandler(AnchorEdgeSchema.SetPercent), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(6, "Offset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetOffset), new SetValueHandler(AnchorEdgeSchema.SetOffset), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(6, "MaximumPercent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetMaximumPercent), new SetValueHandler(AnchorEdgeSchema.SetMaximumPercent), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(6, "MaximumOffset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetMaximumOffset), new SetValueHandler(AnchorEdgeSchema.SetMaximumOffset), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(6, "MinimumPercent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetMinimumPercent), new SetValueHandler(AnchorEdgeSchema.SetMinimumPercent), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(6, "MinimumOffset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorEdgeSchema.GetMinimumOffset), new SetValueHandler(AnchorEdgeSchema.SetMinimumOffset), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(6, "Id", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetId), new SetValueHandler(SetId), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(6, "Percent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPercent), new SetValueHandler(SetPercent), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(6, "Offset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOffset), new SetValueHandler(SetOffset), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(6, "MaximumPercent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaximumPercent), new SetValueHandler(SetMaximumPercent), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(6, "MaximumOffset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaximumOffset), new SetValueHandler(SetMaximumOffset), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(6, "MinimumPercent", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumPercent), new SetValueHandler(SetMinimumPercent), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(6, "MinimumOffset", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumOffset), new SetValueHandler(SetMinimumOffset), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(6, new short[2] { 208, 194 - }, new ConstructHandler(AnchorEdgeSchema.ConstructIdPercent)); + }, new ConstructHandler(ConstructIdPercent)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(6, new short[3] { 208, 194, 115 - }, new ConstructHandler(AnchorEdgeSchema.ConstructIdPercentOffset)); - AnchorEdgeSchema.Type.Initialize(new DefaultConstructHandler(AnchorEdgeSchema.Construct), new ConstructorSchema[2] + }, new ConstructHandler(ConstructIdPercentOffset)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[2] { constructorSchema1, constructorSchema2 @@ -169,7 +169,7 @@ namespace Microsoft.Iris.Markup.UIX uixPropertySchema6, uixPropertySchema3, uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(AnchorEdgeSchema.TryConvertFrom), new SupportsTypeConversionHandler(AnchorEdgeSchema.IsConversionSupported), null, null, null, null); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs index 404e06a..6a90d20 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutInputSchema.cs @@ -64,7 +64,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = AnchorLayoutInputSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -78,25 +78,25 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; AnchorLayoutInput parameter2 = (AnchorLayoutInput)parameters[1]; object instanceObj1; - return AnchorLayoutInputSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => AnchorLayoutInputSchema.Type = new UIXTypeSchema(8, "AnchorLayoutInput", null, 133, typeof(AnchorLayoutInput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(8, "AnchorLayoutInput", null, 133, typeof(AnchorLayoutInput), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(8, "Left", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutInputSchema.GetLeft), new SetValueHandler(AnchorLayoutInputSchema.SetLeft), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(8, "Top", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutInputSchema.GetTop), new SetValueHandler(AnchorLayoutInputSchema.SetTop), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(8, "Right", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutInputSchema.GetRight), new SetValueHandler(AnchorLayoutInputSchema.SetRight), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(8, "Bottom", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutInputSchema.GetBottom), new SetValueHandler(AnchorLayoutInputSchema.SetBottom), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(8, "ContributesToWidth", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutInputSchema.GetContributesToWidth), new SetValueHandler(AnchorLayoutInputSchema.SetContributesToWidth), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(8, "ContributesToHeight", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutInputSchema.GetContributesToHeight), new SetValueHandler(AnchorLayoutInputSchema.SetContributesToHeight), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(8, "Left", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLeft), new SetValueHandler(SetLeft), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(8, "Top", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTop), new SetValueHandler(SetTop), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(8, "Right", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRight), new SetValueHandler(SetRight), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(8, "Bottom", 6, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBottom), new SetValueHandler(SetBottom), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(8, "ContributesToWidth", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContributesToWidth), new SetValueHandler(SetContributesToWidth), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(8, "ContributesToHeight", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContributesToHeight), new SetValueHandler(SetContributesToHeight), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(8, "TryParse", new short[2] { 208, 8 - }, 8, new InvokeHandler(AnchorLayoutInputSchema.CallTryParseStringAnchorLayoutInput), true); - AnchorLayoutInputSchema.Type.Initialize(new DefaultConstructHandler(AnchorLayoutInputSchema.Construct), null, new PropertySchema[6] + }, 8, new InvokeHandler(CallTryParseStringAnchorLayoutInput), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema4, uixPropertySchema6, @@ -107,7 +107,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(AnchorLayoutInputSchema.TryConvertFrom), new SupportsTypeConversionHandler(AnchorLayoutInputSchema.IsConversionSupported), null, null, null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs index 8cd959b..f0553a3 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AnchorLayoutSchema.cs @@ -32,9 +32,9 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructSizeToHorizontalChildrenSizeToVerticalChildren( object[] parameters) { - object instanceObj = AnchorLayoutSchema.Construct(); - AnchorLayoutSchema.SetSizeToHorizontalChildren(ref instanceObj, parameters[0]); - AnchorLayoutSchema.SetSizeToVerticalChildren(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetSizeToHorizontalChildren(ref instanceObj, parameters[0]); + SetSizeToVerticalChildren(ref instanceObj, parameters[1]); return instanceObj; } @@ -42,17 +42,17 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = AnchorLayoutSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], BooleanSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorLayout", result1.Error); - AnchorLayoutSchema.SetSizeToHorizontalChildren(ref instance, valueObj1); + SetSizeToHorizontalChildren(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], BooleanSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "AnchorLayout", result2.Error); - AnchorLayoutSchema.SetSizeToVerticalChildren(ref instance, valueObj2); + SetSizeToVerticalChildren(ref instance, valueObj2); return result2; } @@ -70,7 +70,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = AnchorLayoutSchema.ConvertFromStringSizeToHorizontalChildrenSizeToVerticalChildren(splitString, out instance); + result = ConvertFromStringSizeToHorizontalChildrenSizeToVerticalChildren(splitString, out instance); if (!result.Failed) return result; } @@ -80,19 +80,19 @@ namespace Microsoft.Iris.Markup.UIX return result; } - public static void Pass1Initialize() => AnchorLayoutSchema.Type = new UIXTypeSchema(7, "AnchorLayout", null, 132, typeof(AnchorLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(7, "AnchorLayout", null, 132, typeof(AnchorLayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(7, "SizeToHorizontalChildren", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutSchema.GetSizeToHorizontalChildren), new SetValueHandler(AnchorLayoutSchema.SetSizeToHorizontalChildren), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(7, "SizeToVerticalChildren", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutSchema.GetSizeToVerticalChildren), new SetValueHandler(AnchorLayoutSchema.SetSizeToVerticalChildren), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(7, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnchorLayoutSchema.GetDefaultChildAlignment), new SetValueHandler(AnchorLayoutSchema.SetDefaultChildAlignment), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(7, "SizeToHorizontalChildren", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSizeToHorizontalChildren), new SetValueHandler(SetSizeToHorizontalChildren), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(7, "SizeToVerticalChildren", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSizeToVerticalChildren), new SetValueHandler(SetSizeToVerticalChildren), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(7, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(7, new short[2] { 15, 15 - }, new ConstructHandler(AnchorLayoutSchema.ConstructSizeToHorizontalChildrenSizeToVerticalChildren)); - AnchorLayoutSchema.Type.Initialize(new DefaultConstructHandler(AnchorLayoutSchema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructSizeToHorizontalChildrenSizeToVerticalChildren)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[3] @@ -100,7 +100,7 @@ namespace Microsoft.Iris.Markup.UIX uixPropertySchema3, uixPropertySchema1, uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(AnchorLayoutSchema.TryConvertFrom), new SupportsTypeConversionHandler(AnchorLayoutSchema.IsConversionSupported), null, null, null, null); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs index b084657..86124a9 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AnimationHandleSchema.cs @@ -16,13 +16,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new AnimationHandle(); - public static void Pass1Initialize() => AnimationHandleSchema.Type = new UIXTypeSchema(11, "AnimationHandle", null, 153, typeof(AnimationHandle), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(11, "AnimationHandle", null, 153, typeof(AnimationHandle), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(11, "Playing", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(AnimationHandleSchema.GetPlaying), null, false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(11, "Playing", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPlaying), null, false); UIXEventSchema uixEventSchema = new UIXEventSchema(11, "Completed"); - AnimationHandleSchema.Type.Initialize(new DefaultConstructHandler(AnimationHandleSchema.Construct), null, new PropertySchema[1] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, new EventSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs index f2477fa..0ff6ca5 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/AnimationSchema.cs @@ -13,7 +13,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class AnimationSchema { - public static RangeValidator ValidateLoopValue = new RangeValidator(AnimationSchema.RangeValidateLoopValue); + public static RangeValidator ValidateLoopValue = new RangeValidator(RangeValidateLoopValue); public static UIXTypeSchema Type; private static object GetCenterPointPercent(object instanceObj) => ((Animation)instanceObj).CenterPointPercent; @@ -32,7 +32,7 @@ namespace Microsoft.Iris.Markup.UIX { Animation animation = (Animation)instanceObj; int num = (int)valueObj; - Result result = AnimationSchema.ValidateLoopValue(valueObj); + Result result = ValidateLoopValue(valueObj); if (result.Failed) ErrorManager.ReportError(result.Error); else @@ -55,17 +55,17 @@ namespace Microsoft.Iris.Markup.UIX return num < -1 ? Result.Fail("Expecting a value no smaller than {0}, but got {1}", "-1", num.ToString()) : Result.Success; } - public static void Pass1Initialize() => AnimationSchema.Type = new UIXTypeSchema(9, "Animation", null, 104, typeof(Animation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(9, "Animation", null, 104, typeof(Animation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(9, "CenterPointPercent", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnimationSchema.GetCenterPointPercent), new SetValueHandler(AnimationSchema.SetCenterPointPercent), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(9, "DisableMouseInput", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnimationSchema.GetDisableMouseInput), new SetValueHandler(AnimationSchema.SetDisableMouseInput), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(9, "Keyframes", 138, 130, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnimationSchema.GetKeyframes), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(9, "Loop", 115, -1, ExpressionRestriction.None, false, AnimationSchema.ValidateLoopValue, false, new GetValueHandler(AnimationSchema.GetLoop), new SetValueHandler(AnimationSchema.SetLoop), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(9, "RotationAxis", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnimationSchema.GetRotationAxis), new SetValueHandler(AnimationSchema.SetRotationAxis), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(9, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(AnimationSchema.GetType), new SetValueHandler(AnimationSchema.SetType), false); - AnimationSchema.Type.Initialize(new DefaultConstructHandler(AnimationSchema.Construct), null, new PropertySchema[6] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(9, "CenterPointPercent", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetCenterPointPercent), new SetValueHandler(SetCenterPointPercent), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(9, "DisableMouseInput", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDisableMouseInput), new SetValueHandler(SetDisableMouseInput), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(9, "Keyframes", 138, 130, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(9, "Loop", 115, -1, ExpressionRestriction.None, false, ValidateLoopValue, false, new GetValueHandler(GetLoop), new SetValueHandler(SetLoop), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(9, "RotationAxis", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRotationAxis), new SetValueHandler(SetRotationAxis), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(9, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs index 5c67b3b..da5df4c 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/BlendSchema.cs @@ -30,15 +30,15 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new BlendElement(); - public static void Pass1Initialize() => BlendSchema.Type = new UIXTypeSchema(13, "Blend", null, 77, typeof(BlendElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(13, "Blend", null, 77, typeof(BlendElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(13, "Input1", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlendSchema.GetInput1), new SetValueHandler(BlendSchema.SetInput1), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(13, "Input2", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlendSchema.GetInput2), new SetValueHandler(BlendSchema.SetInput2), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(13, "ColorOperation", 38, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlendSchema.GetColorOperation), new SetValueHandler(BlendSchema.SetColorOperation), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(13, "AlphaOperation", 5, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlendSchema.GetAlphaOperation), new SetValueHandler(BlendSchema.SetAlphaOperation), false); - BlendSchema.Type.Initialize(new DefaultConstructHandler(BlendSchema.Construct), null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(13, "Input1", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput1), new SetValueHandler(SetInput1), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(13, "Input2", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput2), new SetValueHandler(SetInput2), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(13, "ColorOperation", 38, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetColorOperation), new SetValueHandler(SetColorOperation), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(13, "AlphaOperation", 5, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAlphaOperation), new SetValueHandler(SetAlphaOperation), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema4, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs index e5b4b73..6b302c5 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/BlurSchema.cs @@ -26,14 +26,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new GaussianBlurElement(); - public static void Pass1Initialize() => BlurSchema.Type = new UIXTypeSchema(14, "Blur", null, 80, typeof(GaussianBlurElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(14, "Blur", null, 80, typeof(GaussianBlurElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(14, "Mode", 96, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlurSchema.GetMode), new SetValueHandler(BlurSchema.SetMode), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(14, "KernelRadius", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlurSchema.GetKernelRadius), new SetValueHandler(BlurSchema.SetKernelRadius), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(14, "Bluriness", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BlurSchema.GetBluriness), new SetValueHandler(BlurSchema.SetBluriness), false); - BlurSchema.Type.Initialize(new DefaultConstructHandler(BlurSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(14, "Mode", 96, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMode), new SetValueHandler(SetMode), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(14, "KernelRadius", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKernelRadius), new SetValueHandler(SetKernelRadius), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(14, "Bluriness", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBluriness), new SetValueHandler(SetBluriness), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs index b46bf12..830b679 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/BooleanChoiceSchema.cs @@ -25,12 +25,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Microsoft.Iris.ModelItems.BooleanChoice(); - public static void Pass1Initialize() => BooleanChoiceSchema.Type = new UIXTypeSchema(16, "BooleanChoice", null, 28, typeof(IUIBooleanChoice), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(16, "BooleanChoice", null, 28, typeof(IUIBooleanChoice), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(16, "Value", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(BooleanChoiceSchema.GetValue), new SetValueHandler(BooleanChoiceSchema.SetValue), false); - BooleanChoiceSchema.Type.Initialize(new DefaultConstructHandler(BooleanChoiceSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(16, "Value", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs index 4435954..ef9f7c9 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/BooleanSchema.cs @@ -80,31 +80,31 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (DoubleSchema.Type.IsAssignableFrom(fromType)) { - result = BooleanSchema.ConvertFromDouble(from, out instance); + result = ConvertFromDouble(from, out instance); if (!result.Failed) return result; } if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = BooleanSchema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (Int64Schema.Type.IsAssignableFrom(fromType)) { - result = BooleanSchema.ConvertFromInt64(from, out instance); + result = ConvertFromInt64(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = BooleanSchema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = BooleanSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -152,10 +152,10 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; bool parameter2 = (bool)parameters[1]; object instanceObj1; - return BooleanSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => BooleanSchema.Type = new UIXTypeSchema(15, "Boolean", "bool", 153, typeof(bool), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(15, "Boolean", "bool", 153, typeof(bool), UIXTypeFlags.Immutable); public static void Pass2Initialize() { @@ -163,11 +163,11 @@ namespace Microsoft.Iris.Markup.UIX { 208, 15 - }, 15, new InvokeHandler(BooleanSchema.CallTryParseStringBoolean), true); - BooleanSchema.Type.Initialize(new DefaultConstructHandler(BooleanSchema.Construct), null, null, new MethodSchema[1] + }, 15, new InvokeHandler(CallTryParseStringBoolean), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(BooleanSchema.TryConvertFrom), new SupportsTypeConversionHandler(BooleanSchema.IsConversionSupported), new EncodeBinaryHandler(BooleanSchema.EncodeBinary), new DecodeBinaryHandler(BooleanSchema.DecodeBinary), new PerformOperationHandler(BooleanSchema.ExecuteOperation), new SupportsOperationHandler(BooleanSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs index 27388fe..1e2afe6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/BrightnessInstanceSchema.cs @@ -23,16 +23,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => BrightnessInstanceSchema.Type = new UIXTypeSchema(18, "BrightnessInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(18, "BrightnessInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(18, "Brightness", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(BrightnessInstanceSchema.SetBrightness), false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(18, "Brightness", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetBrightness), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(18, "PlayBrightnessAnimation", new short[1] { 75 - }, 240, new InvokeHandler(BrightnessInstanceSchema.CallPlayBrightnessAnimationEffectFloatAnimation), false); - BrightnessInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + }, 240, new InvokeHandler(CallPlayBrightnessAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs index 40f5caf..c168e9b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/BrightnessSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new BrightnessElement(); - public static void Pass1Initialize() => BrightnessSchema.Type = new UIXTypeSchema(17, "Brightness", null, 80, typeof(BrightnessElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(17, "Brightness", null, 80, typeof(BrightnessElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(17, "Brightness", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(BrightnessSchema.GetBrightness), new SetValueHandler(BrightnessSchema.SetBrightness), false); - BrightnessSchema.Type.Initialize(new DefaultConstructHandler(BrightnessSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(17, "Brightness", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBrightness), new SetValueHandler(SetBrightness), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs index 24d3346..3a11a50 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ByteRangedValueSchema.cs @@ -47,15 +47,15 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Microsoft.Iris.ModelItems.ByteRangedValue(); - public static void Pass1Initialize() => ByteRangedValueSchema.Type = new UIXTypeSchema(20, "ByteRangedValue", null, 168, typeof(IUIByteRangedValue), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(20, "ByteRangedValue", null, 168, typeof(IUIByteRangedValue), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(20, "MinValue", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ByteRangedValueSchema.GetMinValue), new SetValueHandler(ByteRangedValueSchema.SetMinValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(20, "MaxValue", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ByteRangedValueSchema.GetMaxValue), new SetValueHandler(ByteRangedValueSchema.SetMaxValue), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(20, "Step", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ByteRangedValueSchema.GetStep), new SetValueHandler(ByteRangedValueSchema.SetStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(20, "Value", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ByteRangedValueSchema.GetValue), new SetValueHandler(ByteRangedValueSchema.SetValue), false); - ByteRangedValueSchema.Type.Initialize(new DefaultConstructHandler(ByteRangedValueSchema.Construct), null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(20, "MinValue", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMinValue), new SetValueHandler(SetMinValue), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(20, "MaxValue", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaxValue), new SetValueHandler(SetMaxValue), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(20, "Step", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStep), new SetValueHandler(SetStep), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(20, "Value", 19, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema2, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs index e494395..5296b8a 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ByteSchema.cs @@ -94,37 +94,37 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (BooleanSchema.Type.IsAssignableFrom(fromType)) { - result = ByteSchema.ConvertFromBoolean(from, out instance); + result = ConvertFromBoolean(from, out instance); if (!result.Failed) return result; } if (DoubleSchema.Type.IsAssignableFrom(fromType)) { - result = ByteSchema.ConvertFromDouble(from, out instance); + result = ConvertFromDouble(from, out instance); if (!result.Failed) return result; } if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = ByteSchema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (Int64Schema.Type.IsAssignableFrom(fromType)) { - result = ByteSchema.ConvertFromInt64(from, out instance); + result = ConvertFromInt64(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = ByteSchema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = ByteSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -190,27 +190,27 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; byte parameter2 = (byte)parameters[1]; object instanceObj1; - return ByteSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => ByteSchema.Type = new UIXTypeSchema(19, "Byte", "byte", 153, typeof(byte), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(19, "Byte", "byte", 153, typeof(byte), UIXTypeFlags.Immutable); public static void Pass2Initialize() { UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(19, "ToString", new short[1] { 208 - }, 208, new InvokeHandler(ByteSchema.CallToStringString), false); + }, 208, new InvokeHandler(CallToStringString), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(19, "TryParse", new short[2] { 208, 19 - }, 19, new InvokeHandler(ByteSchema.CallTryParseStringByte), true); - ByteSchema.Type.Initialize(new DefaultConstructHandler(ByteSchema.Construct), null, null, new MethodSchema[2] + }, 19, new InvokeHandler(CallTryParseStringByte), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[2] { uixMethodSchema1, uixMethodSchema2 - }, null, null, new TypeConverterHandler(ByteSchema.TryConvertFrom), new SupportsTypeConversionHandler(ByteSchema.IsConversionSupported), new EncodeBinaryHandler(ByteSchema.EncodeBinary), new DecodeBinaryHandler(ByteSchema.DecodeBinary), new PerformOperationHandler(ByteSchema.ExecuteOperation), new SupportsOperationHandler(ByteSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs index 1c5e6b9..37f0a19 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CameraAtKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new CameraAtKeyframe(); - public static void Pass1Initialize() => CameraAtKeyframeSchema.Type = new UIXTypeSchema(22, "CameraAtKeyframe", null, 130, typeof(CameraAtKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(22, "CameraAtKeyframe", null, 130, typeof(CameraAtKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(22, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(CameraAtKeyframeSchema.GetValue), new SetValueHandler(CameraAtKeyframeSchema.SetValue), false); - CameraAtKeyframeSchema.Type.Initialize(new DefaultConstructHandler(CameraAtKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(22, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs index f66de7c..ed1de48 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CameraEyeKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new CameraEyeKeyframe(); - public static void Pass1Initialize() => CameraEyeKeyframeSchema.Type = new UIXTypeSchema(23, "CameraEyeKeyframe", null, 130, typeof(CameraEyeKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(23, "CameraEyeKeyframe", null, 130, typeof(CameraEyeKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(23, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(CameraEyeKeyframeSchema.GetValue), new SetValueHandler(CameraEyeKeyframeSchema.SetValue), false); - CameraEyeKeyframeSchema.Type.Initialize(new DefaultConstructHandler(CameraEyeKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(23, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs index 8184921..d90650c 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CameraSchema.cs @@ -87,29 +87,29 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => CameraSchema.Type = new UIXTypeSchema(21, "Camera", null, 153, typeof(Camera), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(21, "Camera", null, 153, typeof(Camera), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(21, "Eye", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetEye), new SetValueHandler(CameraSchema.SetEye), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(21, "At", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetAt), new SetValueHandler(CameraSchema.SetAt), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(21, "Up", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetUp), new SetValueHandler(CameraSchema.SetUp), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(21, "Zn", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetZn), new SetValueHandler(CameraSchema.SetZn), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(21, "EyeAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetEyeAnimation), new SetValueHandler(CameraSchema.SetEyeAnimation), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(21, "AtAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetAtAnimation), new SetValueHandler(CameraSchema.SetAtAnimation), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(21, "UpAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetUpAnimation), new SetValueHandler(CameraSchema.SetUpAnimation), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(21, "ZnAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetZnAnimation), new SetValueHandler(CameraSchema.SetZnAnimation), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(21, "Perspective", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CameraSchema.GetPerspective), new SetValueHandler(CameraSchema.SetPerspective), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(21, "Eye", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEye), new SetValueHandler(SetEye), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(21, "At", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAt), new SetValueHandler(SetAt), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(21, "Up", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUp), new SetValueHandler(SetUp), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(21, "Zn", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetZn), new SetValueHandler(SetZn), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(21, "EyeAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEyeAnimation), new SetValueHandler(SetEyeAnimation), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(21, "AtAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAtAnimation), new SetValueHandler(SetAtAnimation), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(21, "UpAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUpAnimation), new SetValueHandler(SetUpAnimation), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(21, "ZnAnimation", 104, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetZnAnimation), new SetValueHandler(SetZnAnimation), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(21, "Perspective", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPerspective), new SetValueHandler(SetPerspective), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(21, "PlayAnimation", new short[1] { 104 - }, 240, new InvokeHandler(CameraSchema.CallPlayAnimationIAnimation), false); + }, 240, new InvokeHandler(CallPlayAnimationIAnimation), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(21, "PlayAnimation", new short[2] { 104, 11 - }, 240, new InvokeHandler(CameraSchema.CallPlayAnimationIAnimationAnimationHandle), false); - CameraSchema.Type.Initialize(new DefaultConstructHandler(CameraSchema.Construct), null, new PropertySchema[9] + }, 240, new InvokeHandler(CallPlayAnimationIAnimationAnimationHandle), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] { uixPropertySchema2, uixPropertySchema6, diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs index 1a9fe48..0e75808 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CameraUpKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new CameraUpKeyframe(); - public static void Pass1Initialize() => CameraUpKeyframeSchema.Type = new UIXTypeSchema(24, "CameraUpKeyframe", null, 130, typeof(CameraUpKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(24, "CameraUpKeyframe", null, 130, typeof(CameraUpKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(24, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(CameraUpKeyframeSchema.GetValue), new SetValueHandler(CameraUpKeyframeSchema.SetValue), false); - CameraUpKeyframeSchema.Type.Initialize(new DefaultConstructHandler(CameraUpKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(24, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs index 653eb74..d52ff12 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CameraZnKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new CameraZnKeyframe(); - public static void Pass1Initialize() => CameraZnKeyframeSchema.Type = new UIXTypeSchema(25, "CameraZnKeyframe", null, 130, typeof(CameraZnKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(25, "CameraZnKeyframe", null, 130, typeof(CameraZnKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(25, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(CameraZnKeyframeSchema.GetValue), new SetValueHandler(CameraZnKeyframeSchema.SetValue), false); - CameraZnKeyframeSchema.Type.Initialize(new DefaultConstructHandler(CameraZnKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(25, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs index 2aab6ff..c6e7ac3 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CaretInfoSchema.cs @@ -26,16 +26,16 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new CaretInfo(); - public static void Pass1Initialize() => CaretInfoSchema.Type = new UIXTypeSchema(26, "CaretInfo", null, 153, typeof(CaretInfo), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(26, "CaretInfo", null, 153, typeof(CaretInfo), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(26, "BlinkTime", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CaretInfoSchema.GetBlinkTime), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(26, "IdealWidth", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CaretInfoSchema.GetIdealWidth), new SetValueHandler(CaretInfoSchema.SetIdealWidth), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(26, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CaretInfoSchema.GetVisible), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(26, "Position", 158, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CaretInfoSchema.GetPosition), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(26, "SuggestedSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CaretInfoSchema.GetSuggestedSize), null, false); - CaretInfoSchema.Type.Initialize(new DefaultConstructHandler(CaretInfoSchema.Construct), null, new PropertySchema[5] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(26, "BlinkTime", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBlinkTime), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(26, "IdealWidth", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIdealWidth), new SetValueHandler(SetIdealWidth), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(26, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVisible), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(26, "Position", 158, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPosition), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(26, "SuggestedSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSuggestedSize), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs index ceff0a2..c45b9a3 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CharSchema.cs @@ -44,7 +44,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = CharSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -83,10 +83,10 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; char parameter2 = (char)parameters[1]; object instanceObj1; - return CharSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => CharSchema.Type = new UIXTypeSchema(27, "Char", "char", 153, typeof(char), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(27, "Char", "char", 153, typeof(char), UIXTypeFlags.Immutable); public static void Pass2Initialize() { @@ -94,11 +94,11 @@ namespace Microsoft.Iris.Markup.UIX { 208, 27 - }, 27, new InvokeHandler(CharSchema.CallTryParseStringChar), true); - CharSchema.Type.Initialize(new DefaultConstructHandler(CharSchema.Construct), null, null, new MethodSchema[1] + }, 27, new InvokeHandler(CallTryParseStringChar), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(CharSchema.TryConvertFrom), new SupportsTypeConversionHandler(CharSchema.IsConversionSupported), new EncodeBinaryHandler(CharSchema.EncodeBinary), new DecodeBinaryHandler(CharSchema.DecodeBinary), new PerformOperationHandler(CharSchema.ExecuteOperation), new SupportsOperationHandler(CharSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs index b67c574..1f72e03 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ChoiceSchema.cs @@ -106,31 +106,31 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ChoiceSchema.Type = new UIXTypeSchema(28, "Choice", null, 231, typeof(IUIChoice), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(28, "Choice", null, 231, typeof(IUIChoice), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(28, "ChosenValue", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetChosenValue), new SetValueHandler(ChoiceSchema.SetChosenValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(28, "ChosenIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetChosenIndex), new SetValueHandler(ChoiceSchema.SetChosenIndex), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(28, "DefaultIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetDefaultIndex), new SetValueHandler(ChoiceSchema.SetDefaultIndex), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(28, "Options", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetOptions), new SetValueHandler(ChoiceSchema.SetOptions), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(28, "HasSelection", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetHasSelection), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(28, "Wrap", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetWrap), new SetValueHandler(ChoiceSchema.SetWrap), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(28, "HasPreviousValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetHasPreviousValue), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(28, "HasNextValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ChoiceSchema.GetHasNextValue), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(28, "PreviousValue", null, 240, new InvokeHandler(ChoiceSchema.CallPreviousValue), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(28, "ChosenValue", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetChosenValue), new SetValueHandler(SetChosenValue), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(28, "ChosenIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetChosenIndex), new SetValueHandler(SetChosenIndex), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(28, "DefaultIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultIndex), new SetValueHandler(SetDefaultIndex), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(28, "Options", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOptions), new SetValueHandler(SetOptions), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(28, "HasSelection", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasSelection), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(28, "Wrap", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetWrap), new SetValueHandler(SetWrap), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(28, "HasPreviousValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasPreviousValue), null, false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(28, "HasNextValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasNextValue), null, false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(28, "PreviousValue", null, 240, new InvokeHandler(CallPreviousValue), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(28, "PreviousValue", new short[1] { 15 - }, 240, new InvokeHandler(ChoiceSchema.CallPreviousValueBoolean), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(28, "NextValue", null, 240, new InvokeHandler(ChoiceSchema.CallNextValue), false); + }, 240, new InvokeHandler(CallPreviousValueBoolean), false); + UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(28, "NextValue", null, 240, new InvokeHandler(CallNextValue), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(28, "NextValue", new short[1] { 15 - }, 240, new InvokeHandler(ChoiceSchema.CallNextValueBoolean), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(28, "DefaultValue", null, 240, new InvokeHandler(ChoiceSchema.CallDefaultValue), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(28, "Clear", null, 240, new InvokeHandler(ChoiceSchema.CallClear), false); - ChoiceSchema.Type.Initialize(new DefaultConstructHandler(ChoiceSchema.Construct), null, new PropertySchema[8] + }, 240, new InvokeHandler(CallNextValueBoolean), false); + UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(28, "DefaultValue", null, 240, new InvokeHandler(CallDefaultValue), false); + UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(28, "Clear", null, 240, new InvokeHandler(CallClear), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema2, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs index f12ea4c..7b3031d 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ClassSchema.cs @@ -29,16 +29,16 @@ namespace Microsoft.Iris.Markup.UIX private static object GetScripts(object instanceObj) => (object)null; - public static void Pass1Initialize() => ClassSchema.Type = new UIXTypeSchema(29, "Class", null, -1, typeof(Class), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(29, "Class", null, -1, typeof(Class), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(29, "Shared", 15, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(ClassSchema.SetShared), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(29, "Base", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(ClassSchema.SetBase), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(29, "Properties", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(ClassSchema.GetProperties), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(29, "Locals", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(ClassSchema.GetLocals), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(29, "Scripts", 138, 240, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(ClassSchema.GetScripts), null, false); - ClassSchema.Type.Initialize(null, null, new PropertySchema[5] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(29, "Shared", 15, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetShared), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(29, "Base", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetBase), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(29, "Properties", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetProperties), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(29, "Locals", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetLocals), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(29, "Scripts", 138, 240, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetScripts), null, false); + Type.Initialize(null, null, new PropertySchema[5] { uixPropertySchema2, uixPropertySchema4, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs index 7c471e6..eae6ab5 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ClassStateSchema.cs @@ -34,15 +34,15 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ClassStateSchema.Type = new UIXTypeSchema(30, "ClassState", null, -1, typeof(Class), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(30, "ClassState", null, -1, typeof(Class), UIXTypeFlags.None); public static void Pass2Initialize() { UIXMethodSchema uixMethodSchema = new UIXMethodSchema(30, "DisposeOwnedObject", new short[1] { 153 - }, 240, new InvokeHandler(ClassStateSchema.CallDisposeOwnedObjectObject), false); - ClassStateSchema.Type.Initialize(null, null, null, new MethodSchema[1] + }, 240, new InvokeHandler(CallDisposeOwnedObjectObject), false); + Type.Initialize(null, null, null, new MethodSchema[1] { uixMethodSchema }, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs index e9f0781..a06fbee 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ClickHandlerSchema.cs @@ -84,25 +84,25 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ClickHandler(); - public static void Pass1Initialize() => ClickHandlerSchema.Type = new UIXTypeSchema(32, "ClickHandler", null, 110, typeof(ClickHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(32, "ClickHandler", null, 110, typeof(ClickHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(32, "Clicking", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetClicking), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(32, "ClickCount", 31, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetClickCount), new SetValueHandler(ClickHandlerSchema.SetClickCount), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(32, "ClickType", 33, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetClickType), new SetValueHandler(ClickHandlerSchema.SetClickType), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(32, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetCommand), new SetValueHandler(ClickHandlerSchema.SetCommand), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(32, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetHandle), new SetValueHandler(ClickHandlerSchema.SetHandle), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(32, "HandlerTransition", 113, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetHandlerTransition), new SetValueHandler(ClickHandlerSchema.SetHandlerTransition), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(32, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetRequiredModifiers), new SetValueHandler(ClickHandlerSchema.SetRequiredModifiers), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(32, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetDisallowedModifiers), new SetValueHandler(ClickHandlerSchema.SetDisallowedModifiers), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(32, "Repeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetRepeat), new SetValueHandler(ClickHandlerSchema.SetRepeat), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(32, "RepeatDelay", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(ClickHandlerSchema.GetRepeatDelay), new SetValueHandler(ClickHandlerSchema.SetRepeatDelay), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(32, "RepeatRate", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(ClickHandlerSchema.GetRepeatRate), new SetValueHandler(ClickHandlerSchema.SetRepeatRate), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(32, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetHandlerStage), new SetValueHandler(ClickHandlerSchema.SetHandlerStage), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(32, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClickHandlerSchema.GetEventContext), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(32, "Clicking", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClicking), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(32, "ClickCount", 31, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClickCount), new SetValueHandler(SetClickCount), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(32, "ClickType", 33, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClickType), new SetValueHandler(SetClickType), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(32, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCommand), new SetValueHandler(SetCommand), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(32, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(32, "HandlerTransition", 113, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerTransition), new SetValueHandler(SetHandlerTransition), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(32, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRequiredModifiers), new SetValueHandler(SetRequiredModifiers), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(32, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisallowedModifiers), new SetValueHandler(SetDisallowedModifiers), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(32, "Repeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(32, "RepeatDelay", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetRepeatDelay), new SetValueHandler(SetRepeatDelay), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(32, "RepeatRate", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetRepeatRate), new SetValueHandler(SetRepeatRate), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(32, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(32, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEventContext), null, false); UIXEventSchema uixEventSchema = new UIXEventSchema(32, "Invoked"); - ClickHandlerSchema.Type.Initialize(new DefaultConstructHandler(ClickHandlerSchema.Construct), null, new PropertySchema[13] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[13] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs index b837bf1..ebd562b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ClipSchema.cs @@ -70,22 +70,22 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Clip(); - public static void Pass1Initialize() => ClipSchema.Type = new UIXTypeSchema(34, "Clip", null, 239, typeof(Clip), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(34, "Clip", null, 239, typeof(Clip), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(34, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(ClipSchema.GetChildren), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(34, "Orientation", 154, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetOrientation), new SetValueHandler(ClipSchema.SetOrientation), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(34, "FadeSize", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetFadeSize), new SetValueHandler(ClipSchema.SetFadeSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(34, "NearOffset", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetNearOffset), new SetValueHandler(ClipSchema.SetNearOffset), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(34, "FarOffset", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetFarOffset), new SetValueHandler(ClipSchema.SetFarOffset), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(34, "NearPercent", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetNearPercent), new SetValueHandler(ClipSchema.SetNearPercent), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(34, "FarPercent", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetFarPercent), new SetValueHandler(ClipSchema.SetFarPercent), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(34, "ShowNear", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetShowNear), new SetValueHandler(ClipSchema.SetShowNear), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(34, "ShowFar", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetShowFar), new SetValueHandler(ClipSchema.SetShowFar), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(34, "ColorMask", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ClipSchema.GetColorMask), new SetValueHandler(ClipSchema.SetColorMask), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(34, "FadeAmount", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, true, new GetValueHandler(ClipSchema.GetFadeAmount), new SetValueHandler(ClipSchema.SetFadeAmount), false); - ClipSchema.Type.Initialize(new DefaultConstructHandler(ClipSchema.Construct), null, new PropertySchema[11] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(34, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(34, "Orientation", 154, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOrientation), new SetValueHandler(SetOrientation), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(34, "FadeSize", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFadeSize), new SetValueHandler(SetFadeSize), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(34, "NearOffset", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNearOffset), new SetValueHandler(SetNearOffset), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(34, "FarOffset", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFarOffset), new SetValueHandler(SetFarOffset), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(34, "NearPercent", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNearPercent), new SetValueHandler(SetNearPercent), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(34, "FarPercent", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFarPercent), new SetValueHandler(SetFarPercent), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(34, "ShowNear", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowNear), new SetValueHandler(SetShowNear), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(34, "ShowFar", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowFar), new SetValueHandler(SetShowFar), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(34, "ColorMask", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColorMask), new SetValueHandler(SetColorMask), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(34, "FadeAmount", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, true, new GetValueHandler(GetFadeAmount), new SetValueHandler(SetFadeAmount), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[11] { uixPropertySchema1, uixPropertySchema10, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs index cb278e0..2197dfd 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ColorElementInstanceSchema.cs @@ -24,16 +24,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ColorElementInstanceSchema.Type = new UIXTypeSchema(37, "ColorElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(37, "ColorElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(37, "Color", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(ColorElementInstanceSchema.SetColor), false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(37, "Color", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetColor), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(37, "PlayColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(ColorElementInstanceSchema.CallPlayColorAnimationEffectColorAnimation), false); - ColorElementInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + }, 240, new InvokeHandler(CallPlayColorAnimationEffectColorAnimation), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs index 4dc54a6..2bd6d79 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ColorElementSchema.cs @@ -17,12 +17,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ColorElement(); - public static void Pass1Initialize() => ColorElementSchema.Type = new UIXTypeSchema(36, "ColorElement", null, 77, typeof(ColorElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(36, "ColorElement", null, 77, typeof(ColorElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(36, "Color", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(ColorElementSchema.SetColor), false); - ColorElementSchema.Type.Initialize(new DefaultConstructHandler(ColorElementSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(36, "Color", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetColor), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs index ad6501c..1dcbab0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ColorSchema.cs @@ -130,15 +130,15 @@ namespace Microsoft.Iris.Markup.UIX instanceObj = color; } - private static object Construct() => ColorSchema.s_Default; + private static object Construct() => s_Default; private static object ConstructAlphaRedGreenBlue(object[] parameters) { - object instanceObj = ColorSchema.Construct(); - ColorSchema.SetAlpha(ref instanceObj, parameters[0]); - ColorSchema.SetRed(ref instanceObj, parameters[1]); - ColorSchema.SetGreen(ref instanceObj, parameters[2]); - ColorSchema.SetBlue(ref instanceObj, parameters[3]); + object instanceObj = Construct(); + SetAlpha(ref instanceObj, parameters[0]); + SetRed(ref instanceObj, parameters[1]); + SetGreen(ref instanceObj, parameters[2]); + SetBlue(ref instanceObj, parameters[3]); return instanceObj; } @@ -146,72 +146,72 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = ColorSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - ColorSchema.SetAlpha(ref instance, valueObj1); + SetAlpha(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - ColorSchema.SetRed(ref instance, valueObj2); + SetRed(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - ColorSchema.SetGreen(ref instance, valueObj3); + SetGreen(ref instance, valueObj3); object valueObj4; Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj4); if (result4.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result4.Error); - ColorSchema.SetBlue(ref instance, valueObj4); + SetBlue(ref instance, valueObj4); return result4; } private static object ConstructARGB(object[] parameters) { - object instanceObj = ColorSchema.Construct(); - ColorSchema.SetA(ref instanceObj, parameters[0]); - ColorSchema.SetR(ref instanceObj, parameters[1]); - ColorSchema.SetG(ref instanceObj, parameters[2]); - ColorSchema.SetB(ref instanceObj, parameters[3]); + object instanceObj = Construct(); + SetA(ref instanceObj, parameters[0]); + SetR(ref instanceObj, parameters[1]); + SetG(ref instanceObj, parameters[2]); + SetB(ref instanceObj, parameters[3]); return instanceObj; } private static Result ConvertFromStringARGB(string[] splitString, out object instance) { - instance = ColorSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], ByteSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - ColorSchema.SetA(ref instance, valueObj1); + SetA(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], ByteSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - ColorSchema.SetR(ref instance, valueObj2); + SetR(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], ByteSchema.Type, null, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - ColorSchema.SetG(ref instance, valueObj3); + SetG(ref instance, valueObj3); object valueObj4; Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], ByteSchema.Type, null, out valueObj4); if (result4.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result4.Error); - ColorSchema.SetB(ref instance, valueObj4); + SetB(ref instance, valueObj4); return result4; } private static object ConstructRedGreenBlue(object[] parameters) { - object instanceObj = ColorSchema.Construct(); - ColorSchema.SetRed(ref instanceObj, parameters[0]); - ColorSchema.SetGreen(ref instanceObj, parameters[1]); - ColorSchema.SetBlue(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetRed(ref instanceObj, parameters[0]); + SetGreen(ref instanceObj, parameters[1]); + SetBlue(ref instanceObj, parameters[2]); return instanceObj; } @@ -219,52 +219,52 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = ColorSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - ColorSchema.SetRed(ref instance, valueObj1); + SetRed(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - ColorSchema.SetGreen(ref instance, valueObj2); + SetGreen(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.Validate0to1, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - ColorSchema.SetBlue(ref instance, valueObj3); + SetBlue(ref instance, valueObj3); return result3; } private static object ConstructRGB(object[] parameters) { - object instanceObj = ColorSchema.Construct(); - ColorSchema.SetR(ref instanceObj, parameters[0]); - ColorSchema.SetG(ref instanceObj, parameters[1]); - ColorSchema.SetB(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetR(ref instanceObj, parameters[0]); + SetG(ref instanceObj, parameters[1]); + SetB(ref instanceObj, parameters[2]); return instanceObj; } private static Result ConvertFromStringRGB(string[] splitString, out object instance) { - instance = ColorSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], ByteSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result1.Error); - ColorSchema.SetR(ref instance, valueObj1); + SetR(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], ByteSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result2.Error); - ColorSchema.SetG(ref instance, valueObj2); + SetG(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], ByteSchema.Type, null, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Color", result3.Error); - ColorSchema.SetB(ref instance, valueObj3); + SetB(ref instance, valueObj3); return result3; } @@ -281,7 +281,7 @@ namespace Microsoft.Iris.Markup.UIX string str = (string)valueObj; instanceObj = null; uint num; - if (!ColorSchema.s_NameToColorMap.TryGetValue(str.ToLowerInvariant(), out num)) + if (!s_NameToColorMap.TryGetValue(str.ToLowerInvariant(), out num)) return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Color"); Color color = new Color(num); instanceObj = color; @@ -291,7 +291,7 @@ namespace Microsoft.Iris.Markup.UIX private static object FindCanonicalInstance(string name) { uint num; - return ColorSchema.s_NameToColorMap.TryGetValue(name.ToLowerInvariant(), out num) ? new Color(num) : (object)null; + return s_NameToColorMap.TryGetValue(name.ToLowerInvariant(), out num) ? new Color(num) : (object)null; } private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); @@ -305,7 +305,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result1 = ColorSchema.ConvertFromString(from, out instance); + result1 = ConvertFromString(from, out instance); if (!result1.Failed) return result1; } @@ -315,18 +315,18 @@ namespace Microsoft.Iris.Markup.UIX switch (splitString.Length) { case 3: - Result result2 = ColorSchema.ConvertFromStringRedGreenBlue(splitString, out instance); + Result result2 = ConvertFromStringRedGreenBlue(splitString, out instance); if (!result2.Failed) return result2; - result1 = ColorSchema.ConvertFromStringRGB(splitString, out instance); + result1 = ConvertFromStringRGB(splitString, out instance); if (!result1.Failed) return result1; break; case 4: - Result result3 = ColorSchema.ConvertFromStringAlphaRedGreenBlue(splitString, out instance); + Result result3 = ConvertFromStringAlphaRedGreenBlue(splitString, out instance); if (!result3.Failed) return result3; - result1 = ColorSchema.ConvertFromStringARGB(splitString, out instance); + result1 = ConvertFromStringARGB(splitString, out instance); if (!result1.Failed) return result1; break; @@ -343,10 +343,10 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; Color parameter2 = (Color)parameters[1]; object instanceObj1; - return ColorSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - static ColorSchema() => ColorSchema.s_NameToColorMap = new Dictionary(153) + static ColorSchema() => s_NameToColorMap = new Dictionary(153) { { "aliceblue", @@ -962,50 +962,50 @@ namespace Microsoft.Iris.Markup.UIX } }; - public static void Pass1Initialize() => ColorSchema.Type = new UIXTypeSchema(35, "Color", null, 153, typeof(Color), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(35, "Color", null, 153, typeof(Color), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(35, "Alpha", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(ColorSchema.GetAlpha), new SetValueHandler(ColorSchema.SetAlpha), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(35, "Red", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(ColorSchema.GetRed), new SetValueHandler(ColorSchema.SetRed), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(35, "Green", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(ColorSchema.GetGreen), new SetValueHandler(ColorSchema.SetGreen), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(35, "Blue", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(ColorSchema.GetBlue), new SetValueHandler(ColorSchema.SetBlue), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(35, "A", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ColorSchema.GetA), new SetValueHandler(ColorSchema.SetA), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(35, "R", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ColorSchema.GetR), new SetValueHandler(ColorSchema.SetR), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(35, "G", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ColorSchema.GetG), new SetValueHandler(ColorSchema.SetG), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(35, "B", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ColorSchema.GetB), new SetValueHandler(ColorSchema.SetB), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(35, "Alpha", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetAlpha), new SetValueHandler(SetAlpha), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(35, "Red", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetRed), new SetValueHandler(SetRed), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(35, "Green", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetGreen), new SetValueHandler(SetGreen), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(35, "Blue", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetBlue), new SetValueHandler(SetBlue), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(35, "A", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetA), new SetValueHandler(SetA), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(35, "R", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetR), new SetValueHandler(SetR), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(35, "G", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetG), new SetValueHandler(SetG), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(35, "B", 19, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetB), new SetValueHandler(SetB), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(35, new short[4] { 194, 194, 194, 194 - }, new ConstructHandler(ColorSchema.ConstructAlphaRedGreenBlue)); + }, new ConstructHandler(ConstructAlphaRedGreenBlue)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(35, new short[4] { 19, 19, 19, 19 - }, new ConstructHandler(ColorSchema.ConstructARGB)); + }, new ConstructHandler(ConstructARGB)); UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(35, new short[3] { 194, 194, 194 - }, new ConstructHandler(ColorSchema.ConstructRedGreenBlue)); + }, new ConstructHandler(ConstructRedGreenBlue)); UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(35, new short[3] { 19, 19, 19 - }, new ConstructHandler(ColorSchema.ConstructRGB)); + }, new ConstructHandler(ConstructRGB)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(35, "TryParse", new short[2] { 208, 35 - }, 35, new InvokeHandler(ColorSchema.CallTryParseStringColor), true); - ColorSchema.Type.Initialize(new DefaultConstructHandler(ColorSchema.Construct), new ConstructorSchema[4] + }, 35, new InvokeHandler(CallTryParseStringColor), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[4] { constructorSchema1, constructorSchema2, @@ -1024,7 +1024,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, new FindCanonicalInstanceHandler(ColorSchema.FindCanonicalInstance), new TypeConverterHandler(ColorSchema.TryConvertFrom), new SupportsTypeConversionHandler(ColorSchema.IsConversionSupported), new EncodeBinaryHandler(ColorSchema.EncodeBinary), new DecodeBinaryHandler(ColorSchema.DecodeBinary), null, null); + }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs index b513351..0bb33dd 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/CommandSchema.cs @@ -28,15 +28,15 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => CommandSchema.Type = new UIXTypeSchema(40, "Command", null, 153, typeof(IUICommand), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(40, "Command", null, 153, typeof(IUICommand), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(40, "Available", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CommandSchema.GetAvailable), new SetValueHandler(CommandSchema.SetAvailable), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(40, "Priority", 126, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(CommandSchema.GetPriority), new SetValueHandler(CommandSchema.SetPriority), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(40, "Available", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAvailable), new SetValueHandler(SetAvailable), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(40, "Priority", 126, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPriority), new SetValueHandler(SetPriority), false); UIXEventSchema uixEventSchema = new UIXEventSchema(40, "Invoked"); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(40, "Invoke", null, 240, new InvokeHandler(CommandSchema.CallInvoke), false); - CommandSchema.Type.Initialize(new DefaultConstructHandler(CommandSchema.Construct), null, new PropertySchema[2] + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(40, "Invoke", null, 240, new InvokeHandler(CallInvoke), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs index 6323c0b..1131334 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ContrastInstanceSchema.cs @@ -34,16 +34,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ContrastInstanceSchema.Type = new UIXTypeSchema(43, "ContrastInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(43, "ContrastInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(43, "Contrast", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(ContrastInstanceSchema.SetContrast), false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(43, "Contrast", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SetContrast), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(43, "PlayContrastAnimation", new short[1] { 75 - }, 240, new InvokeHandler(ContrastInstanceSchema.CallPlayContrastAnimationEffectFloatAnimation), false); - ContrastInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + }, 240, new InvokeHandler(CallPlayContrastAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs index b706297..30c638d 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ContrastSchema.cs @@ -29,12 +29,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ContrastElement(); - public static void Pass1Initialize() => ContrastSchema.Type = new UIXTypeSchema(42, "Contrast", null, 80, typeof(ContrastElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(42, "Contrast", null, 80, typeof(ContrastElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(42, "Contrast", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(ContrastSchema.GetContrast), new SetValueHandler(ContrastSchema.SetContrast), false); - ContrastSchema.Type.Initialize(new DefaultConstructHandler(ContrastSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(42, "Contrast", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetContrast), new SetValueHandler(SetContrast), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs index 5b3401d..d1d1a8b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DataMappingSchema.cs @@ -20,14 +20,14 @@ namespace Microsoft.Iris.Markup.UIX private static object GetMappings(object instanceObj) => (object)null; - public static void Pass1Initialize() => DataMappingSchema.Type = new UIXTypeSchema(45, "DataMapping", null, -1, typeof(object), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(45, "DataMapping", null, -1, typeof(object), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(45, "TargetType", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(DataMappingSchema.SetTargetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(45, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(DataMappingSchema.SetProvider), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(45, "Mappings", 138, 140, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(DataMappingSchema.GetMappings), null, false); - DataMappingSchema.Type.Initialize(null, null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(45, "TargetType", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetTargetType), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(45, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProvider), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(45, "Mappings", 138, 140, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetMappings), null, false); + Type.Initialize(null, null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs index b72ab1f..e27d7ac 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DataQuerySchema.cs @@ -20,13 +20,13 @@ namespace Microsoft.Iris.Markup.UIX MarkupDataQuery markupDataQuery = (MarkupDataQuery)instanceObj; } - public static void Pass1Initialize() => DataQuerySchema.Type = new UIXTypeSchema(46, "DataQuery", null, 29, typeof(MarkupDataQuery), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(46, "DataQuery", null, 29, typeof(MarkupDataQuery), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(46, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(DataQuerySchema.SetProvider), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(46, "ResultType", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(DataQuerySchema.SetResultType), false); - DataQuerySchema.Type.Initialize(null, null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(46, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProvider), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(46, "ResultType", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetResultType), false); + Type.Initialize(null, null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs index eefbdb6..9764c6a 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DataTypeSchema.cs @@ -15,12 +15,12 @@ namespace Microsoft.Iris.Markup.UIX MarkupDataType markupDataType = (MarkupDataType)instanceObj; } - public static void Pass1Initialize() => DataTypeSchema.Type = new UIXTypeSchema(48, "DataType", null, 29, typeof(MarkupDataType), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(48, "DataType", null, 29, typeof(MarkupDataType), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(48, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(DataTypeSchema.SetProvider), false); - DataTypeSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(48, "Provider", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProvider), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs index 6775947..bb265ef 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DebugOutlinesSchema.cs @@ -80,25 +80,25 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => DebugOutlinesSchema.Type = new UIXTypeSchema(52, "DebugOutlines", null, 239, typeof(DebugOutlines), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(52, "DebugOutlines", null, 239, typeof(DebugOutlines), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(52, "Root", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetRoot), new SetValueHandler(DebugOutlinesSchema.SetRoot), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(52, "Enabled", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(DebugOutlinesSchema.GetEnabled), new SetValueHandler(DebugOutlinesSchema.SetEnabled), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(52, "OutlineLabel", 50, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetOutlineLabel), new SetValueHandler(DebugOutlinesSchema.SetOutlineLabel), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(52, "OutlineScope", 51, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetOutlineScope), new SetValueHandler(DebugOutlinesSchema.SetOutlineScope), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(52, "OutlineColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetOutlineColor), new SetValueHandler(DebugOutlinesSchema.SetOutlineColor), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(52, "HostOutlineColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetHostOutlineColor), new SetValueHandler(DebugOutlinesSchema.SetHostOutlineColor), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(52, "TextColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetTextColor), new SetValueHandler(DebugOutlinesSchema.SetTextColor), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(52, "TextFont", 93, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetTextFont), new SetValueHandler(DebugOutlinesSchema.SetTextFont), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(52, "MouseInteractiveImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetMouseInteractiveImage), new SetValueHandler(DebugOutlinesSchema.SetMouseInteractiveImage), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(52, "MouseFocusImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetMouseFocusImage), new SetValueHandler(DebugOutlinesSchema.SetMouseFocusImage), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(52, "KeyInteractiveImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetKeyInteractiveImage), new SetValueHandler(DebugOutlinesSchema.SetKeyInteractiveImage), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(52, "KeyFocusImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DebugOutlinesSchema.GetKeyFocusImage), new SetValueHandler(DebugOutlinesSchema.SetKeyFocusImage), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(52, "NextScopeMode", null, 240, new InvokeHandler(DebugOutlinesSchema.CallNextScopeMode), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(52, "NextLabelMode", null, 240, new InvokeHandler(DebugOutlinesSchema.CallNextLabelMode), false); - DebugOutlinesSchema.Type.Initialize(new DefaultConstructHandler(DebugOutlinesSchema.Construct), null, new PropertySchema[12] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(52, "Root", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRoot), new SetValueHandler(SetRoot), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(52, "Enabled", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(52, "OutlineLabel", 50, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOutlineLabel), new SetValueHandler(SetOutlineLabel), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(52, "OutlineScope", 51, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOutlineScope), new SetValueHandler(SetOutlineScope), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(52, "OutlineColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOutlineColor), new SetValueHandler(SetOutlineColor), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(52, "HostOutlineColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHostOutlineColor), new SetValueHandler(SetHostOutlineColor), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(52, "TextColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextColor), new SetValueHandler(SetTextColor), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(52, "TextFont", 93, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextFont), new SetValueHandler(SetTextFont), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(52, "MouseInteractiveImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseInteractiveImage), new SetValueHandler(SetMouseInteractiveImage), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(52, "MouseFocusImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseFocusImage), new SetValueHandler(SetMouseFocusImage), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(52, "KeyInteractiveImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyInteractiveImage), new SetValueHandler(SetKeyInteractiveImage), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(52, "KeyFocusImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocusImage), new SetValueHandler(SetKeyFocusImage), false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(52, "NextScopeMode", null, 240, new InvokeHandler(CallNextScopeMode), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(52, "NextLabelMode", null, 240, new InvokeHandler(CallNextLabelMode), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[12] { uixPropertySchema2, uixPropertySchema6, diff --git a/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs index cd6db1f..9abe523 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DebugSchema.cs @@ -21,19 +21,19 @@ namespace Microsoft.Iris.Markup.UIX private static object CallTraceStringObject(object instanceObj, object[] parameters) { - DebugSchema.Trace((string)parameters[0], parameters[1], null, null, null, null); + Trace((string)parameters[0], parameters[1], null, null, null, null); return null; } private static object CallTraceStringObjectObject(object instanceObj, object[] parameters) { - DebugSchema.Trace((string)parameters[0], parameters[1], parameters[2], null, null, null); + Trace((string)parameters[0], parameters[1], parameters[2], null, null, null); return null; } private static object CallTraceStringObjectObjectObject(object instanceObj, object[] parameters) { - DebugSchema.Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], null, null); + Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], null, null); return null; } @@ -41,7 +41,7 @@ namespace Microsoft.Iris.Markup.UIX object instanceObj, object[] parameters) { - DebugSchema.Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], parameters[4], null); + Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], parameters[4], null); return null; } @@ -49,7 +49,7 @@ namespace Microsoft.Iris.Markup.UIX object instanceObj, object[] parameters) { - DebugSchema.Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], parameters[4], parameters[5]); + Trace((string)parameters[0], parameters[1], parameters[2], parameters[3], parameters[4], parameters[5]); return null; } @@ -73,32 +73,32 @@ namespace Microsoft.Iris.Markup.UIX NativeApi.SpLogTrace(null, message, 0); } - public static void Pass1Initialize() => DebugSchema.Type = new UIXTypeSchema(49, "Debug", null, 153, typeof(object), UIXTypeFlags.Static); + public static void Pass1Initialize() => Type = new UIXTypeSchema(49, "Debug", null, 153, typeof(object), UIXTypeFlags.Static); public static void Pass2Initialize() { UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(49, "Trace", new short[1] { 208 - }, 240, new InvokeHandler(DebugSchema.CallTraceString), true); + }, 240, new InvokeHandler(CallTraceString), true); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(49, "Trace", new short[2] { 208, 153 - }, 240, new InvokeHandler(DebugSchema.CallTraceStringObject), true); + }, 240, new InvokeHandler(CallTraceStringObject), true); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(49, "Trace", new short[3] { 208, 153, 153 - }, 240, new InvokeHandler(DebugSchema.CallTraceStringObjectObject), true); + }, 240, new InvokeHandler(CallTraceStringObjectObject), true); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(49, "Trace", new short[4] { 208, 153, 153, 153 - }, 240, new InvokeHandler(DebugSchema.CallTraceStringObjectObjectObject), true); + }, 240, new InvokeHandler(CallTraceStringObjectObjectObject), true); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(49, "Trace", new short[5] { 208, @@ -106,7 +106,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 153, 153 - }, 240, new InvokeHandler(DebugSchema.CallTraceStringObjectObjectObjectObject), true); + }, 240, new InvokeHandler(CallTraceStringObjectObjectObjectObject), true); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(49, "Trace", new short[6] { 208, @@ -115,8 +115,8 @@ namespace Microsoft.Iris.Markup.UIX 153, 153, 153 - }, 240, new InvokeHandler(DebugSchema.CallTraceStringObjectObjectObjectObjectObject), true); - DebugSchema.Type.Initialize(null, null, null, new MethodSchema[6] + }, 240, new InvokeHandler(CallTraceStringObjectObjectObjectObjectObject), true); + Type.Initialize(null, null, null, new MethodSchema[6] { uixMethodSchema1, uixMethodSchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs index a30ec20..f955388 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DefaultLayoutSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => DefaultLayout.Instance; - public static void Pass1Initialize() => DefaultLayoutSchema.Type = new UIXTypeSchema(53, "DefaultLayout", null, 132, typeof(DefaultLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(53, "DefaultLayout", null, 132, typeof(DefaultLayout), UIXTypeFlags.Immutable); - public static void Pass2Initialize() => DefaultLayoutSchema.Type.Initialize(new DefaultConstructHandler(DefaultLayoutSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs index 6590865..3e68041 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DesaturateInstanceSchema.cs @@ -34,16 +34,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => DesaturateInstanceSchema.Type = new UIXTypeSchema(55, "DesaturateInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(55, "DesaturateInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(55, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(DesaturateInstanceSchema.SetDesaturate), false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(55, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(SetDesaturate), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(55, "PlayDesaturateAnimation", new short[1] { 75 - }, 240, new InvokeHandler(DesaturateInstanceSchema.CallPlayDesaturateAnimationEffectFloatAnimation), false); - DesaturateInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + }, 240, new InvokeHandler(CallPlayDesaturateAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs index 550b3ef..5fb7ce4 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DesaturateSchema.cs @@ -29,12 +29,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new DesaturateElement(); - public static void Pass1Initialize() => DesaturateSchema.Type = new UIXTypeSchema(54, "Desaturate", null, 80, typeof(DesaturateElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(54, "Desaturate", null, 80, typeof(DesaturateElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(54, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(DesaturateSchema.GetDesaturate), new SetValueHandler(DesaturateSchema.SetDesaturate), false); - DesaturateSchema.Type.Initialize(new DefaultConstructHandler(DesaturateSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(54, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDesaturate), new SetValueHandler(SetDesaturate), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs index 08946bf..843fb45 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DestinationElementInstanceSchema.cs @@ -26,17 +26,17 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => DestinationElementInstanceSchema.Type = new UIXTypeSchema(57, "DestinationElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(57, "DestinationElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(57, "Downsample", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(DestinationElementInstanceSchema.SetDownsample), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(57, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(DestinationElementInstanceSchema.SetUVOffset), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(57, "Downsample", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDownsample), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(57, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetUVOffset), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(57, "PlayDownsampleAnimation", new short[1] { 75 - }, 240, new InvokeHandler(DestinationElementInstanceSchema.CallPlayDownsampleAnimationEffectFloatAnimation), false); - DestinationElementInstanceSchema.Type.Initialize(null, null, new PropertySchema[2] + }, 240, new InvokeHandler(CallPlayDownsampleAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs index 3d11e25..f250233 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DestinationElementSchema.cs @@ -33,13 +33,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new DestinationElement(); - public static void Pass1Initialize() => DestinationElementSchema.Type = new UIXTypeSchema(56, "DestinationElement", null, 77, typeof(DestinationElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(56, "DestinationElement", null, 77, typeof(DestinationElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(56, "Downsample", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(DestinationElementSchema.GetDownsample), new SetValueHandler(DestinationElementSchema.SetDownsample), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(56, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(DestinationElementSchema.GetUVOffset), new SetValueHandler(DestinationElementSchema.SetUVOffset), false); - DestinationElementSchema.Type.Initialize(new DefaultConstructHandler(DestinationElementSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(56, "Downsample", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDownsample), new SetValueHandler(SetDownsample), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(56, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetUVOffset), new SetValueHandler(SetUVOffset), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs index 507ce60..8bc43ef 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DictionarySchema.cs @@ -52,25 +52,25 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => DictionarySchema.Type = new UIXTypeSchema(58, "Dictionary", null, 153, typeof(IDictionary), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(58, "Dictionary", null, 153, typeof(IDictionary), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(58, "Source", 58, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DictionarySchema.GetSource), null, false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(58, "Source", 58, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), null, false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(58, "get_Item", new short[1] { 153 - }, 153, new InvokeHandler(DictionarySchema.Callget_ItemObject), false); + }, 153, new InvokeHandler(Callget_ItemObject), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(58, "Contains", new short[1] { 153 - }, 15, new InvokeHandler(DictionarySchema.CallContainsObject), false); + }, 15, new InvokeHandler(CallContainsObject), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(58, "set_Item", new short[2] { 153, 153 - }, 240, new InvokeHandler(DictionarySchema.Callset_ItemObjectObject), false); - DictionarySchema.Type.Initialize(new DefaultConstructHandler(DictionarySchema.Construct), null, new PropertySchema[1] + }, 240, new InvokeHandler(Callset_ItemObjectObject), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[3] diff --git a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs index 7f95b79..cd93981 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DockLayoutInputSchema.cs @@ -19,14 +19,14 @@ namespace Microsoft.Iris.Markup.UIX { string str = (string)valueObj; instanceObj = null; - DockLayoutInput instance = DockLayoutInputSchema.StringToInstance(str); + DockLayoutInput instance = StringToInstance(str); if (instance == null) return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "DockLayoutInput"); instanceObj = instance; return Result.Success; } - private static object FindCanonicalInstance(string name) => DockLayoutInputSchema.StringToInstance(name); + private static object FindCanonicalInstance(string name) => StringToInstance(name); private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); @@ -39,7 +39,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = DockLayoutInputSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -51,7 +51,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; DockLayoutInput parameter2 = (DockLayoutInput)parameters[1]; object instanceObj1; - return DockLayoutInputSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static DockLayoutInput StringToInstance(string value) @@ -67,7 +67,7 @@ namespace Microsoft.Iris.Markup.UIX return value == "Client" ? DockLayoutInput.Client : null; } - public static void Pass1Initialize() => DockLayoutInputSchema.Type = new UIXTypeSchema(60, "DockLayoutInput", null, 133, typeof(DockLayoutInput), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(60, "DockLayoutInput", null, 133, typeof(DockLayoutInput), UIXTypeFlags.Immutable); public static void Pass2Initialize() { @@ -75,11 +75,11 @@ namespace Microsoft.Iris.Markup.UIX { 208, 60 - }, 60, new InvokeHandler(DockLayoutInputSchema.CallTryParseStringDockLayoutInput), true); - DockLayoutInputSchema.Type.Initialize(new DefaultConstructHandler(DockLayoutInputSchema.Construct), null, null, new MethodSchema[1] + }, 60, new InvokeHandler(CallTryParseStringDockLayoutInput), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[1] { uixMethodSchema - }, null, new FindCanonicalInstanceHandler(DockLayoutInputSchema.FindCanonicalInstance), new TypeConverterHandler(DockLayoutInputSchema.TryConvertFrom), new SupportsTypeConversionHandler(DockLayoutInputSchema.IsConversionSupported), null, null, null, null); + }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs index 6961d45..4f4f0ca 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DockLayoutSchema.cs @@ -23,13 +23,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new DockLayout(); - public static void Pass1Initialize() => DockLayoutSchema.Type = new UIXTypeSchema(59, "DockLayout", null, 132, typeof(DockLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(59, "DockLayout", null, 132, typeof(DockLayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(59, "DefaultLayoutInput", 60, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(DockLayoutSchema.GetDefaultLayoutInput), new SetValueHandler(DockLayoutSchema.SetDefaultLayoutInput), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(59, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(DockLayoutSchema.GetDefaultChildAlignment), new SetValueHandler(DockLayoutSchema.SetDefaultChildAlignment), false); - DockLayoutSchema.Type.Initialize(new DefaultConstructHandler(DockLayoutSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(59, "DefaultLayoutInput", 60, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultLayoutInput), new SetValueHandler(SetDefaultLayoutInput), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(59, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs index cdb53d8..a2195f0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DoubleSchema.cs @@ -99,37 +99,37 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (BooleanSchema.Type.IsAssignableFrom(fromType)) { - result = DoubleSchema.ConvertFromBoolean(from, out instance); + result = ConvertFromBoolean(from, out instance); if (!result.Failed) return result; } if (ByteSchema.Type.IsAssignableFrom(fromType)) { - result = DoubleSchema.ConvertFromByte(from, out instance); + result = ConvertFromByte(from, out instance); if (!result.Failed) return result; } if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = DoubleSchema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (Int64Schema.Type.IsAssignableFrom(fromType)) { - result = DoubleSchema.ConvertFromInt64(from, out instance); + result = ConvertFromInt64(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = DoubleSchema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = DoubleSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -198,42 +198,42 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; double parameter2 = (double)parameters[1]; object instanceObj1; - return DoubleSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => DoubleSchema.Type = new UIXTypeSchema(61, "Double", "double", 153, typeof(double), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(61, "Double", "double", 153, typeof(double), UIXTypeFlags.Immutable); public static void Pass2Initialize() { UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(61, "ToString", new short[1] { 208 - }, 208, new InvokeHandler(DoubleSchema.CallToStringString), false); + }, 208, new InvokeHandler(CallToStringString), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(61, "IsNaN", new short[1] { 61 - }, 15, new InvokeHandler(DoubleSchema.CallIsNaNDouble), true); + }, 15, new InvokeHandler(CallIsNaNDouble), true); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(61, "IsNegativeInfinity", new short[1] { 61 - }, 15, new InvokeHandler(DoubleSchema.CallIsNegativeInfinityDouble), true); + }, 15, new InvokeHandler(CallIsNegativeInfinityDouble), true); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(61, "IsPositiveInfinity", new short[1] { 61 - }, 15, new InvokeHandler(DoubleSchema.CallIsPositiveInfinityDouble), true); + }, 15, new InvokeHandler(CallIsPositiveInfinityDouble), true); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(61, "TryParse", new short[2] { 208, 61 - }, 61, new InvokeHandler(DoubleSchema.CallTryParseStringDouble), true); - DoubleSchema.Type.Initialize(new DefaultConstructHandler(DoubleSchema.Construct), null, null, new MethodSchema[5] + }, 61, new InvokeHandler(CallTryParseStringDouble), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[5] { uixMethodSchema1, uixMethodSchema2, uixMethodSchema3, uixMethodSchema4, uixMethodSchema5 - }, null, null, new TypeConverterHandler(DoubleSchema.TryConvertFrom), new SupportsTypeConversionHandler(DoubleSchema.IsConversionSupported), new EncodeBinaryHandler(DoubleSchema.EncodeBinary), new DecodeBinaryHandler(DoubleSchema.DecodeBinary), new PerformOperationHandler(DoubleSchema.ExecuteOperation), new SupportsOperationHandler(DoubleSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs index 2513fc8..431f527 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DragHandlerSchema.cs @@ -68,31 +68,31 @@ namespace Microsoft.Iris.Markup.UIX private static object CallGetRemovedEventContexts(object instanceObj, object[] parameters) => ((DragHandler)instanceObj).GetRemovedEventContexts(); - public static void Pass1Initialize() => DragHandlerSchema.Type = new UIXTypeSchema(62, "DragHandler", null, 110, typeof(DragHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(62, "DragHandler", null, 110, typeof(DragHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(62, "BeginDragPolicy", 12, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetBeginDragPolicy), new SetValueHandler(DragHandlerSchema.SetBeginDragPolicy), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(62, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetDragging), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(62, "BeginPosition", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetBeginPosition), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(62, "EndPosition", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetEndPosition), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(62, "ScreenDragSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetScreenDragSize), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(62, "LocalDragSize", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetLocalDragSize), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(62, "RelativeDragSize", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetRelativeDragSize), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(62, "ActiveModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetActiveModifiers), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(62, "DragCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetDragCursor), new SetValueHandler(DragHandlerSchema.SetDragCursor), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(62, "CancelOnEscape", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetCancelOnEscape), new SetValueHandler(DragHandlerSchema.SetCancelOnEscape), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(62, "RelativeTo", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetRelativeTo), new SetValueHandler(DragHandlerSchema.SetRelativeTo), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(62, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragHandlerSchema.GetHandlerStage), new SetValueHandler(DragHandlerSchema.SetHandlerStage), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(62, "ResetDragOrigin", null, 240, new InvokeHandler(DragHandlerSchema.CallResetDragOrigin), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(62, "CancelDrag", null, 240, new InvokeHandler(DragHandlerSchema.CallCancelDrag), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(62, "GetEventContexts", null, 138, new InvokeHandler(DragHandlerSchema.CallGetEventContexts), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(62, "GetAddedEventContexts", null, 138, new InvokeHandler(DragHandlerSchema.CallGetAddedEventContexts), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(62, "GetRemovedEventContexts", null, 138, new InvokeHandler(DragHandlerSchema.CallGetRemovedEventContexts), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(62, "BeginDragPolicy", 12, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginDragPolicy), new SetValueHandler(SetBeginDragPolicy), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(62, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragging), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(62, "BeginPosition", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginPosition), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(62, "EndPosition", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndPosition), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(62, "ScreenDragSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScreenDragSize), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(62, "LocalDragSize", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLocalDragSize), null, false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(62, "RelativeDragSize", 233, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRelativeDragSize), null, false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(62, "ActiveModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetActiveModifiers), null, false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(62, "DragCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragCursor), new SetValueHandler(SetDragCursor), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(62, "CancelOnEscape", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCancelOnEscape), new SetValueHandler(SetCancelOnEscape), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(62, "RelativeTo", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRelativeTo), new SetValueHandler(SetRelativeTo), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(62, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(62, "ResetDragOrigin", null, 240, new InvokeHandler(CallResetDragOrigin), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(62, "CancelDrag", null, 240, new InvokeHandler(CallCancelDrag), false); + UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(62, "GetEventContexts", null, 138, new InvokeHandler(CallGetEventContexts), false); + UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(62, "GetAddedEventContexts", null, 138, new InvokeHandler(CallGetAddedEventContexts), false); + UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(62, "GetRemovedEventContexts", null, 138, new InvokeHandler(CallGetRemovedEventContexts), false); UIXEventSchema uixEventSchema1 = new UIXEventSchema(62, "Started"); UIXEventSchema uixEventSchema2 = new UIXEventSchema(62, "Canceled"); UIXEventSchema uixEventSchema3 = new UIXEventSchema(62, "Ended"); - DragHandlerSchema.Type.Initialize(new DefaultConstructHandler(DragHandlerSchema.Construct), null, new PropertySchema[12] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[12] { uixPropertySchema8, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs index d613540..9e6678f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DragSourceHandlerSchema.cs @@ -44,23 +44,23 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new DragSourceHandler(); - public static void Pass1Initialize() => DragSourceHandlerSchema.Type = new UIXTypeSchema(63, "DragSourceHandler", null, 110, typeof(DragSourceHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(63, "DragSourceHandler", null, 110, typeof(DragSourceHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(63, "AllowedDropActions", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetAllowedDropActions), new SetValueHandler(DragSourceHandlerSchema.SetAllowedDropActions), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(63, "CurrentDropAction", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetCurrentDropAction), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(63, "Value", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetValue), new SetValueHandler(DragSourceHandlerSchema.SetValue), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(63, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetDragging), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(63, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetHandlerStage), new SetValueHandler(DragSourceHandlerSchema.SetHandlerStage), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(63, "MoveCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetMoveCursor), new SetValueHandler(DragSourceHandlerSchema.SetMoveCursor), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(63, "CopyCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetCopyCursor), new SetValueHandler(DragSourceHandlerSchema.SetCopyCursor), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(63, "CancelCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DragSourceHandlerSchema.GetCancelCursor), new SetValueHandler(DragSourceHandlerSchema.SetCancelCursor), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(63, "AllowedDropActions", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAllowedDropActions), new SetValueHandler(SetAllowedDropActions), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(63, "CurrentDropAction", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCurrentDropAction), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(63, "Value", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(63, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragging), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(63, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(63, "MoveCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMoveCursor), new SetValueHandler(SetMoveCursor), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(63, "CopyCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCopyCursor), new SetValueHandler(SetCopyCursor), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(63, "CancelCursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCancelCursor), new SetValueHandler(SetCancelCursor), false); UIXEventSchema uixEventSchema1 = new UIXEventSchema(63, "Started"); UIXEventSchema uixEventSchema2 = new UIXEventSchema(63, "Moved"); UIXEventSchema uixEventSchema3 = new UIXEventSchema(63, "Copied"); UIXEventSchema uixEventSchema4 = new UIXEventSchema(63, "Canceled"); - DragSourceHandlerSchema.Type.Initialize(new DefaultConstructHandler(DragSourceHandlerSchema.Construct), null, new PropertySchema[8] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema1, uixPropertySchema8, diff --git a/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs index 9465261..5a32280 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/DropTargetHandlerSchema.cs @@ -29,20 +29,20 @@ namespace Microsoft.Iris.Markup.UIX private static object CallGetValue(object instanceObj, object[] parameters) => ((DropTargetHandler)instanceObj).GetValue(); - public static void Pass1Initialize() => DropTargetHandlerSchema.Type = new UIXTypeSchema(65, "DropTargetHandler", null, 110, typeof(DropTargetHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(65, "DropTargetHandler", null, 110, typeof(DropTargetHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(65, "AllowedDropActions", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DropTargetHandlerSchema.GetAllowedDropActions), new SetValueHandler(DropTargetHandlerSchema.SetAllowedDropActions), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(65, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DropTargetHandlerSchema.GetDragging), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(65, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DropTargetHandlerSchema.GetHandlerStage), new SetValueHandler(DropTargetHandlerSchema.SetHandlerStage), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(65, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(DropTargetHandlerSchema.GetEventContext), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(65, "AllowedDropActions", 64, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAllowedDropActions), new SetValueHandler(SetAllowedDropActions), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(65, "Dragging", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDragging), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(65, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(65, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEventContext), null, false); UIXEventSchema uixEventSchema1 = new UIXEventSchema(65, "DragEnter"); UIXEventSchema uixEventSchema2 = new UIXEventSchema(65, "DragOver"); UIXEventSchema uixEventSchema3 = new UIXEventSchema(65, "DragLeave"); UIXEventSchema uixEventSchema4 = new UIXEventSchema(65, "Dropped"); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(65, "GetValue", null, 153, new InvokeHandler(DropTargetHandlerSchema.CallGetValue), false); - DropTargetHandlerSchema.Type.Initialize(new DefaultConstructHandler(DropTargetHandlerSchema.Construct), null, new PropertySchema[4] + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(65, "GetValue", null, 153, new InvokeHandler(CallGetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs index 8021d2a..4e08c84 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionInstanceSchema.cs @@ -34,16 +34,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => EdgeDetectionInstanceSchema.Type = new UIXTypeSchema(67, "EdgeDetectionInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(67, "EdgeDetectionInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(67, "EdgeLimit", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(EdgeDetectionInstanceSchema.SetEdgeLimit), false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(67, "EdgeLimit", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(SetEdgeLimit), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(67, "PlayEdgeLimitAnimation", new short[1] { 75 - }, 240, new InvokeHandler(EdgeDetectionInstanceSchema.CallPlayEdgeLimitAnimationEffectFloatAnimation), false); - EdgeDetectionInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + }, 240, new InvokeHandler(CallPlayEdgeLimitAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs index f197256..f3a2ae7 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EdgeDetectionSchema.cs @@ -29,12 +29,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EdgeDetectionElement(); - public static void Pass1Initialize() => EdgeDetectionSchema.Type = new UIXTypeSchema(66, "EdgeDetection", null, 80, typeof(EdgeDetectionElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(66, "EdgeDetection", null, 80, typeof(EdgeDetectionElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(66, "EdgeLimit", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(EdgeDetectionSchema.GetEdgeLimit), new SetValueHandler(EdgeDetectionSchema.SetEdgeLimit), false); - EdgeDetectionSchema.Type.Initialize(new DefaultConstructHandler(EdgeDetectionSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(66, "EdgeLimit", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetEdgeLimit), new SetValueHandler(SetEdgeLimit), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs index 3e498bc..0fd76c7 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EditableTextDataSchema.cs @@ -43,16 +43,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => EditableTextDataSchema.Type = new UIXTypeSchema(68, "EditableTextData", null, 153, typeof(EditableTextData), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(68, "EditableTextData", null, 153, typeof(EditableTextData), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(68, "Value", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(EditableTextDataSchema.GetValue), new SetValueHandler(EditableTextDataSchema.SetValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(68, "MaxLength", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(EditableTextDataSchema.GetMaxLength), new SetValueHandler(EditableTextDataSchema.SetMaxLength), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(68, "ReadOnly", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(EditableTextDataSchema.GetReadOnly), new SetValueHandler(EditableTextDataSchema.SetReadOnly), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(68, "Value", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(68, "MaxLength", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetMaxLength), new SetValueHandler(SetMaxLength), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(68, "ReadOnly", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetReadOnly), new SetValueHandler(SetReadOnly), false); UIXEventSchema uixEventSchema = new UIXEventSchema(68, "Submitted"); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(68, "Submit", null, 240, new InvokeHandler(EditableTextDataSchema.CallSubmit), false); - EditableTextDataSchema.Type.Initialize(new DefaultConstructHandler(EditableTextDataSchema.Construct), null, new PropertySchema[3] + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(68, "Submit", null, 240, new InvokeHandler(CallSubmit), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs index 2fc78a1..9508233 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectAnimationSchema.cs @@ -16,12 +16,12 @@ namespace Microsoft.Iris.Markup.UIX private static void SetLoop(ref object instanceObj, object valueObj) => ((AnimationTemplate)instanceObj).Loop = (int)valueObj; - public static void Pass1Initialize() => EffectAnimationSchema.Type = new UIXTypeSchema(70, "EffectAnimation", null, 153, typeof(EffectAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(70, "EffectAnimation", null, 153, typeof(EffectAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(70, "Loop", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectAnimationSchema.GetLoop), new SetValueHandler(EffectAnimationSchema.SetLoop), false); - EffectAnimationSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(70, "Loop", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLoop), new SetValueHandler(SetLoop), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs index e59379f..9dbed85 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectColorAnimationSchema.cs @@ -16,12 +16,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectAnimation(); - public static void Pass1Initialize() => EffectColorAnimationSchema.Type = new UIXTypeSchema(71, "EffectColorAnimation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(71, "EffectColorAnimation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(71, "Keyframes", 138, 72, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectColorAnimationSchema.GetKeyframes), null, false); - EffectColorAnimationSchema.Type.Initialize(new DefaultConstructHandler(EffectColorAnimationSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(71, "Keyframes", 138, 72, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs index db6d035..47c83f1 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectColorKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectColorKeyframe(); - public static void Pass1Initialize() => EffectColorKeyframeSchema.Type = new UIXTypeSchema(72, "EffectColorKeyframe", null, 130, typeof(EffectColorKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(72, "EffectColorKeyframe", null, 130, typeof(EffectColorKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(72, "Value", 35, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectColorKeyframeSchema.GetValue), new SetValueHandler(EffectColorKeyframeSchema.SetValue), false); - EffectColorKeyframeSchema.Type.Initialize(new DefaultConstructHandler(EffectColorKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(72, "Value", 35, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs index d97f59c..2bec999 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectElementInstanceSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => EffectElementInstanceSchema.Type = new UIXTypeSchema(74, "EffectElementInstance", null, -1, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(74, "EffectElementInstance", null, -1, typeof(EffectElementWrapper), UIXTypeFlags.None); - public static void Pass2Initialize() => EffectElementInstanceSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs index 496085e..cbef407 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectElementSchema.cs @@ -16,12 +16,12 @@ namespace Microsoft.Iris.Markup.UIX private static void SetName(ref object instanceObj, object valueObj) => ((EffectElement)instanceObj).Name = (string)valueObj; - public static void Pass1Initialize() => EffectElementSchema.Type = new UIXTypeSchema(73, "EffectElement", null, -1, typeof(EffectElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(73, "EffectElement", null, -1, typeof(EffectElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(73, "Name", 208, -1, ExpressionRestriction.ReadOnly, false, null, false, new GetValueHandler(EffectElementSchema.GetName), new SetValueHandler(EffectElementSchema.SetName), false); - EffectElementSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(73, "Name", 208, -1, ExpressionRestriction.ReadOnly, false, null, false, new GetValueHandler(GetName), new SetValueHandler(SetName), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs index aa5d7cb..e3d6895 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectFloatAnimationSchema.cs @@ -16,12 +16,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectAnimation(); - public static void Pass1Initialize() => EffectFloatAnimationSchema.Type = new UIXTypeSchema(75, "EffectFloatAnimation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(75, "EffectFloatAnimation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(75, "Keyframes", 138, 76, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectFloatAnimationSchema.GetKeyframes), null, false); - EffectFloatAnimationSchema.Type.Initialize(new DefaultConstructHandler(EffectFloatAnimationSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(75, "Keyframes", 138, 76, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs index 1ce0b4a..64e4197 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectFloatKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectFloatKeyframe(); - public static void Pass1Initialize() => EffectFloatKeyframeSchema.Type = new UIXTypeSchema(76, "EffectFloatKeyframe", null, 130, typeof(EffectFloatKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(76, "EffectFloatKeyframe", null, 130, typeof(EffectFloatKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(76, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectFloatKeyframeSchema.GetValue), new SetValueHandler(EffectFloatKeyframeSchema.SetValue), false); - EffectFloatKeyframeSchema.Type.Initialize(new DefaultConstructHandler(EffectFloatKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(76, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs index dd10796..7cfe101 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectInputSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => EffectInputSchema.Type = new UIXTypeSchema(77, "EffectInput", null, 73, typeof(EffectInput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(77, "EffectInput", null, 73, typeof(EffectInput), UIXTypeFlags.None); - public static void Pass2Initialize() => EffectInputSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs index 0f9dd66..0941013 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectInstanceSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => EffectInstanceSchema.Type = new UIXTypeSchema(78, "EffectInstance", null, 153, typeof(EffectClass), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(78, "EffectInstance", null, 153, typeof(EffectClass), UIXTypeFlags.Disposable); - public static void Pass2Initialize() => EffectInstanceSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs index 4c33646..3718b04 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectLayerSchema.cs @@ -23,13 +23,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectLayer(); - public static void Pass1Initialize() => EffectLayerSchema.Type = new UIXTypeSchema(79, "EffectLayer", null, 77, typeof(EffectLayer), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(79, "EffectLayer", null, 77, typeof(EffectLayer), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(79, "Input", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectLayerSchema.GetInput), new SetValueHandler(EffectLayerSchema.SetInput), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(79, "Operations", 138, 80, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectLayerSchema.GetOperations), new SetValueHandler(EffectLayerSchema.SetOperations), false); - EffectLayerSchema.Type.Initialize(new DefaultConstructHandler(EffectLayerSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(79, "Input", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput), new SetValueHandler(SetInput), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(79, "Operations", 138, 80, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOperations), new SetValueHandler(SetOperations), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs index f4c4843..5b73b2b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectOperationSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => EffectOperationSchema.Type = new UIXTypeSchema(80, "EffectOperation", null, 73, typeof(EffectOperation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(80, "EffectOperation", null, 73, typeof(EffectOperation), UIXTypeFlags.None); - public static void Pass2Initialize() => EffectOperationSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs index 8c0a9ff..662e033 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectSchema.cs @@ -14,12 +14,12 @@ namespace Microsoft.Iris.Markup.UIX private static object GetTechniques(object instanceObj) => (object)null; - public static void Pass1Initialize() => EffectSchema.Type = new UIXTypeSchema(69, "Effect", null, 29, typeof(EffectClass), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(69, "Effect", null, 29, typeof(EffectClass), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(69, "Techniques", 138, 77, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(EffectSchema.GetTechniques), null, false); - EffectSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(69, "Techniques", 138, 77, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetTechniques), null, false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs index 9734c90..eac3b52 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectVector3AnimationSchema.cs @@ -16,12 +16,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectAnimation(); - public static void Pass1Initialize() => EffectVector3AnimationSchema.Type = new UIXTypeSchema(81, "EffectVector3Animation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(81, "EffectVector3Animation", null, 70, typeof(EffectAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(81, "Keyframes", 138, 82, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectVector3AnimationSchema.GetKeyframes), null, false); - EffectVector3AnimationSchema.Type.Initialize(new DefaultConstructHandler(EffectVector3AnimationSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(81, "Keyframes", 138, 82, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetKeyframes), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs index d68344f..ffa8a0c 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EffectVector3KeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EffectVector3Keyframe(); - public static void Pass1Initialize() => EffectVector3KeyframeSchema.Type = new UIXTypeSchema(82, "EffectVector3Keyframe", null, 130, typeof(EffectVector3Keyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(82, "EffectVector3Keyframe", null, 130, typeof(EffectVector3Keyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(82, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EffectVector3KeyframeSchema.GetValue), new SetValueHandler(EffectVector3KeyframeSchema.SetValue), false); - EffectVector3KeyframeSchema.Type.Initialize(new DefaultConstructHandler(EffectVector3KeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(82, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs index 36eaf12..6c28ee4 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EmbossInstanceSchema.cs @@ -14,12 +14,12 @@ namespace Microsoft.Iris.Markup.UIX private static void SetDirection(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Direction", (int)valueObj); - public static void Pass1Initialize() => EmbossInstanceSchema.Type = new UIXTypeSchema(85, "EmbossInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(85, "EmbossInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(85, "Direction", 84, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(EmbossInstanceSchema.SetDirection), false); - EmbossInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(85, "Direction", 84, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDirection), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs index ab9af92..6777a99 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EmbossSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EmbossElement(); - public static void Pass1Initialize() => EmbossSchema.Type = new UIXTypeSchema(83, "Emboss", null, 80, typeof(EmbossElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(83, "Emboss", null, 80, typeof(EmbossElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(83, "Direction", 84, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EmbossSchema.GetDirection), new SetValueHandler(EmbossSchema.SetDirection), false); - EmbossSchema.Type.Initialize(new DefaultConstructHandler(EmbossSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(83, "Direction", 84, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDirection), new SetValueHandler(SetDirection), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs index b482591..ab64c80 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EnumeratorSchema.cs @@ -22,14 +22,14 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => EnumeratorSchema.Type = new UIXTypeSchema(86, "Enumerator", null, 153, typeof(IEnumerator), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(86, "Enumerator", null, 153, typeof(IEnumerator), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(86, "Current", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(EnumeratorSchema.GetCurrent), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(86, "MoveNext", null, 15, new InvokeHandler(EnumeratorSchema.CallMoveNext), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(86, "Reset", null, 240, new InvokeHandler(EnumeratorSchema.CallReset), false); - EnumeratorSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(86, "Current", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCurrent), null, false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(86, "MoveNext", null, 15, new InvokeHandler(CallMoveNext), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(86, "Reset", null, 240, new InvokeHandler(CallReset), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[2] diff --git a/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs index 7d5a244..75e5fff 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EnvironmentSchema.cs @@ -55,21 +55,21 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => EnvironmentSchema.Type = new UIXTypeSchema(87, "Environment", null, 153, typeof(Environment), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(87, "Environment", null, 153, typeof(Environment), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(87, "IsRightToLeft", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(EnvironmentSchema.GetIsRightToLeft), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(87, "ColorScheme", 39, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(EnvironmentSchema.GetColorScheme), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(87, "AnimationSpeed", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EnvironmentSchema.GetAnimationSpeed), new SetValueHandler(EnvironmentSchema.SetAnimationSpeed), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(87, "AnimationUpdatesPerSecond", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EnvironmentSchema.GetAnimationUpdatesPerSecond), new SetValueHandler(EnvironmentSchema.SetAnimationUpdatesPerSecond), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(87, "DpiScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EnvironmentSchema.GetDpiScale), null, true); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(87, "GraphicsDeviceType", 98, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(EnvironmentSchema.GetGraphicsDeviceType), null, true); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(87, "IsRightToLeft", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetIsRightToLeft), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(87, "ColorScheme", 39, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColorScheme), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(87, "AnimationSpeed", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAnimationSpeed), new SetValueHandler(SetAnimationSpeed), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(87, "AnimationUpdatesPerSecond", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAnimationUpdatesPerSecond), new SetValueHandler(SetAnimationUpdatesPerSecond), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(87, "DpiScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDpiScale), null, true); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(87, "GraphicsDeviceType", 98, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetGraphicsDeviceType), null, true); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(87, "AnimationAdvance", new short[1] { 115 - }, 240, new InvokeHandler(EnvironmentSchema.CallAnimationAdvanceInt32), false); - EnvironmentSchema.Type.Initialize(new DefaultConstructHandler(EnvironmentSchema.Construct), null, new PropertySchema[6] + }, 240, new InvokeHandler(CallAnimationAdvanceInt32), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema3, uixPropertySchema4, diff --git a/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs index 83cdf8a..2f75e9b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/EventContextSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new EventContext(); - public static void Pass1Initialize() => EventContextSchema.Type = new UIXTypeSchema(88, "EventContext", null, 110, typeof(EventContext), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(88, "EventContext", null, 110, typeof(EventContext), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(88, "Value", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(EventContextSchema.GetValue), new SetValueHandler(EventContextSchema.SetValue), false); - EventContextSchema.Type.Initialize(new DefaultConstructHandler(EventContextSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(88, "Value", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs index 3b08ade..12a8dad 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/FlowLayoutSchema.cs @@ -52,20 +52,20 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new FlowLayout(); - public static void Pass1Initialize() => FlowLayoutSchema.Type = new UIXTypeSchema(90, "FlowLayout", null, 132, typeof(FlowLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(90, "FlowLayout", null, 132, typeof(FlowLayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(90, "Orientation", 154, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetOrientation), new SetValueHandler(FlowLayoutSchema.SetOrientation), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(90, "Spacing", 139, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetSpacing), new SetValueHandler(FlowLayoutSchema.SetSpacing), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(90, "AllowWrap", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetAllowWrap), new SetValueHandler(FlowLayoutSchema.SetAllowWrap), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(90, "StripAlignment", 209, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetStripAlignment), new SetValueHandler(FlowLayoutSchema.SetStripAlignment), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(90, "Repeat", 172, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetRepeat), new SetValueHandler(FlowLayoutSchema.SetRepeat), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(90, "RepeatGap", 139, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetRepeatGap), new SetValueHandler(FlowLayoutSchema.SetRepeatGap), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(90, "MissingItemPolicy", 148, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetMissingItemPolicy), new SetValueHandler(FlowLayoutSchema.SetMissingItemPolicy), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(90, "MinimumSampleSize", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetMinimumSampleSize), new SetValueHandler(FlowLayoutSchema.SetMinimumSampleSize), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(90, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FlowLayoutSchema.GetDefaultChildAlignment), new SetValueHandler(FlowLayoutSchema.SetDefaultChildAlignment), false); - FlowLayoutSchema.Type.Initialize(new DefaultConstructHandler(FlowLayoutSchema.Construct), null, new PropertySchema[9] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(90, "Orientation", 154, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOrientation), new SetValueHandler(SetOrientation), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(90, "Spacing", 139, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSpacing), new SetValueHandler(SetSpacing), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(90, "AllowWrap", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAllowWrap), new SetValueHandler(SetAllowWrap), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(90, "StripAlignment", 209, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetStripAlignment), new SetValueHandler(SetStripAlignment), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(90, "Repeat", 172, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(90, "RepeatGap", 139, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeatGap), new SetValueHandler(SetRepeatGap), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(90, "MissingItemPolicy", 148, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMissingItemPolicy), new SetValueHandler(SetMissingItemPolicy), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(90, "MinimumSampleSize", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumSampleSize), new SetValueHandler(SetMinimumSampleSize), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(90, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] { uixPropertySchema3, uixPropertySchema9, diff --git a/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs index 5e46269..2390552 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/FocusHandlerSchema.cs @@ -35,19 +35,19 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new FocusHandler(); - public static void Pass1Initialize() => FocusHandlerSchema.Type = new UIXTypeSchema(92, "FocusHandler", null, 110, typeof(FocusHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(92, "FocusHandler", null, 110, typeof(FocusHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(92, "Reason", 91, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(FocusHandlerSchema.GetReason), new SetValueHandler(FocusHandlerSchema.SetReason), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(92, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(FocusHandlerSchema.GetRequiredModifiers), new SetValueHandler(FocusHandlerSchema.SetRequiredModifiers), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(92, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(FocusHandlerSchema.GetDisallowedModifiers), new SetValueHandler(FocusHandlerSchema.SetDisallowedModifiers), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(92, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(FocusHandlerSchema.GetHandlerStage), new SetValueHandler(FocusHandlerSchema.SetHandlerStage), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(92, "GainedEventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(FocusHandlerSchema.GetGainedEventContext), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(92, "LostEventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(FocusHandlerSchema.GetLostEventContext), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(92, "Reason", 91, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetReason), new SetValueHandler(SetReason), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(92, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRequiredModifiers), new SetValueHandler(SetRequiredModifiers), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(92, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisallowedModifiers), new SetValueHandler(SetDisallowedModifiers), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(92, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(92, "GainedEventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetGainedEventContext), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(92, "LostEventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLostEventContext), null, false); UIXEventSchema uixEventSchema1 = new UIXEventSchema(92, "GainedFocus"); UIXEventSchema uixEventSchema2 = new UIXEventSchema(92, "LostFocus"); - FocusHandlerSchema.Type.Initialize(new DefaultConstructHandler(FocusHandlerSchema.Construct), null, new PropertySchema[6] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema3, uixPropertySchema5, diff --git a/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs index 5ecad17..54180a0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/FontSchema.cs @@ -14,7 +14,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class FontSchema { - public static RangeValidator ValidateFontName = new RangeValidator(FontSchema.RangeValidateFontName); + public static RangeValidator ValidateFontName = new RangeValidator(RangeValidateFontName); public static UIXTypeSchema Type; private static object GetFontName(object instanceObj) => ((Font)instanceObj).FontName; @@ -23,7 +23,7 @@ namespace Microsoft.Iris.Markup.UIX { Font font = (Font)instanceObj; string str = (string)valueObj; - Result result = FontSchema.ValidateFontName(valueObj); + Result result = ValidateFontName(valueObj); if (result.Failed) ErrorManager.ReportError(result.Error); else @@ -64,27 +64,27 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructFontName(object[] parameters) { - object instanceObj = FontSchema.Construct(); - FontSchema.SetFontName(ref instanceObj, parameters[0]); + object instanceObj = Construct(); + SetFontName(ref instanceObj, parameters[0]); return instanceObj; } private static Result ConvertFromStringFontName(string[] splitString, out object instance) { - instance = FontSchema.Construct(); + instance = Construct(); object valueObj; - Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, FontSchema.ValidateFontName, out valueObj); + Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result.Error); - FontSchema.SetFontName(ref instance, valueObj); + SetFontName(ref instance, valueObj); return result; } private static object ConstructFontNameFontSize(object[] parameters) { - object instanceObj = FontSchema.Construct(); - FontSchema.SetFontName(ref instanceObj, parameters[0]); - FontSchema.SetFontSize(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetFontName(ref instanceObj, parameters[0]); + SetFontSize(ref instanceObj, parameters[1]); return instanceObj; } @@ -92,26 +92,26 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = FontSchema.Construct(); + instance = Construct(); object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, FontSchema.ValidateFontName, out valueObj1); + Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - FontSchema.SetFontName(ref instance, valueObj1); + SetFontName(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - FontSchema.SetFontSize(ref instance, valueObj2); + SetFontSize(ref instance, valueObj2); return result2; } private static object ConstructFontNameFontSizeAltFontSize(object[] parameters) { - object instanceObj = FontSchema.Construct(); - FontSchema.SetFontName(ref instanceObj, parameters[0]); - FontSchema.SetFontSize(ref instanceObj, parameters[1]); - FontSchema.SetAltFontSize(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetFontName(ref instanceObj, parameters[0]); + SetFontSize(ref instanceObj, parameters[1]); + SetAltFontSize(ref instanceObj, parameters[2]); return instanceObj; } @@ -119,31 +119,31 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = FontSchema.Construct(); + instance = Construct(); object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, FontSchema.ValidateFontName, out valueObj1); + Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - FontSchema.SetFontName(ref instance, valueObj1); + SetFontName(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - FontSchema.SetFontSize(ref instance, valueObj2); + SetFontSize(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result3.Error); - FontSchema.SetAltFontSize(ref instance, valueObj3); + SetAltFontSize(ref instance, valueObj3); return result3; } private static object ConstructFontNameFontSizeFontStyle(object[] parameters) { - object instanceObj = FontSchema.Construct(); - FontSchema.SetFontName(ref instanceObj, parameters[0]); - FontSchema.SetFontSize(ref instanceObj, parameters[1]); - FontSchema.SetFontStyle(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetFontName(ref instanceObj, parameters[0]); + SetFontSize(ref instanceObj, parameters[1]); + SetFontStyle(ref instanceObj, parameters[2]); return instanceObj; } @@ -151,32 +151,32 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = FontSchema.Construct(); + instance = Construct(); object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, FontSchema.ValidateFontName, out valueObj1); + Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - FontSchema.SetFontName(ref instance, valueObj1); + SetFontName(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - FontSchema.SetFontSize(ref instance, valueObj2); + SetFontSize(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], UIXLoadResultExports.FontStylesType, null, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result3.Error); - FontSchema.SetFontStyle(ref instance, valueObj3); + SetFontStyle(ref instance, valueObj3); return result3; } private static object ConstructFontNameFontSizeAltFontSizeFontStyle(object[] parameters) { - object instanceObj = FontSchema.Construct(); - FontSchema.SetFontName(ref instanceObj, parameters[0]); - FontSchema.SetFontSize(ref instanceObj, parameters[1]); - FontSchema.SetAltFontSize(ref instanceObj, parameters[2]); - FontSchema.SetFontStyle(ref instanceObj, parameters[3]); + object instanceObj = Construct(); + SetFontName(ref instanceObj, parameters[0]); + SetFontSize(ref instanceObj, parameters[1]); + SetAltFontSize(ref instanceObj, parameters[2]); + SetFontStyle(ref instanceObj, parameters[3]); return instanceObj; } @@ -184,27 +184,27 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = FontSchema.Construct(); + instance = Construct(); object valueObj1; - Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, FontSchema.ValidateFontName, out valueObj1); + Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, ValidateFontName, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result1.Error); - FontSchema.SetFontName(ref instance, valueObj1); + SetFontName(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result2.Error); - FontSchema.SetFontSize(ref instance, valueObj2); + SetFontSize(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result3.Error); - FontSchema.SetAltFontSize(ref instance, valueObj3); + SetAltFontSize(ref instance, valueObj3); object valueObj4; Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], UIXLoadResultExports.FontStylesType, null, out valueObj4); if (result4.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Font", result4.Error); - FontSchema.SetFontStyle(ref instance, valueObj4); + SetFontStyle(ref instance, valueObj4); return result4; } @@ -236,25 +236,25 @@ namespace Microsoft.Iris.Markup.UIX switch (splitString.Length) { case 1: - result1 = FontSchema.ConvertFromStringFontName(splitString, out instance); + result1 = ConvertFromStringFontName(splitString, out instance); if (!result1.Failed) return result1; break; case 2: - result1 = FontSchema.ConvertFromStringFontNameFontSize(splitString, out instance); + result1 = ConvertFromStringFontNameFontSize(splitString, out instance); if (!result1.Failed) return result1; break; case 3: - Result result2 = FontSchema.ConvertFromStringFontNameFontSizeAltFontSize(splitString, out instance); + Result result2 = ConvertFromStringFontNameFontSizeAltFontSize(splitString, out instance); if (!result2.Failed) return result2; - result1 = FontSchema.ConvertFromStringFontNameFontSizeFontStyle(splitString, out instance); + result1 = ConvertFromStringFontNameFontSizeFontStyle(splitString, out instance); if (!result1.Failed) return result1; break; case 4: - result1 = FontSchema.ConvertFromStringFontNameFontSizeAltFontSizeFontStyle(splitString, out instance); + result1 = ConvertFromStringFontNameFontSizeAltFontSizeFontStyle(splitString, out instance); if (!result1.Failed) return result1; break; @@ -274,48 +274,48 @@ namespace Microsoft.Iris.Markup.UIX return str.Length > 31 ? Result.Fail("\"{0}\" cannot be longer than {1} characters", str, "31") : Result.Success; } - public static void Pass1Initialize() => FontSchema.Type = new UIXTypeSchema(93, "Font", null, 153, typeof(Font), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(93, "Font", null, 153, typeof(Font), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(93, "FontName", 208, -1, ExpressionRestriction.None, false, FontSchema.ValidateFontName, false, new GetValueHandler(FontSchema.GetFontName), new SetValueHandler(FontSchema.SetFontName), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(93, "FontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(FontSchema.GetFontSize), new SetValueHandler(FontSchema.SetFontSize), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(93, "AltFontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(FontSchema.GetAltFontSize), new SetValueHandler(FontSchema.SetAltFontSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(93, "FontStyle", 94, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(FontSchema.GetFontStyle), new SetValueHandler(FontSchema.SetFontStyle), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(93, "FontName", 208, -1, ExpressionRestriction.None, false, ValidateFontName, false, new GetValueHandler(GetFontName), new SetValueHandler(SetFontName), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(93, "FontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetFontSize), new SetValueHandler(SetFontSize), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(93, "AltFontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetAltFontSize), new SetValueHandler(SetAltFontSize), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(93, "FontStyle", 94, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFontStyle), new SetValueHandler(SetFontStyle), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(93, new short[1] { 208 - }, new ConstructHandler(FontSchema.ConstructFontName)); + }, new ConstructHandler(ConstructFontName)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(93, new short[2] { 208, 194 - }, new ConstructHandler(FontSchema.ConstructFontNameFontSize)); + }, new ConstructHandler(ConstructFontNameFontSize)); UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(93, new short[3] { 208, 194, 194 - }, new ConstructHandler(FontSchema.ConstructFontNameFontSizeAltFontSize)); + }, new ConstructHandler(ConstructFontNameFontSizeAltFontSize)); UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(93, new short[3] { 208, 194, 94 - }, new ConstructHandler(FontSchema.ConstructFontNameFontSizeFontStyle)); + }, new ConstructHandler(ConstructFontNameFontSizeFontStyle)); UIXConstructorSchema constructorSchema5 = new UIXConstructorSchema(93, new short[4] { 208, 194, 194, 94 - }, new ConstructHandler(FontSchema.ConstructFontNameFontSizeAltFontSizeFontStyle)); + }, new ConstructHandler(ConstructFontNameFontSizeAltFontSizeFontStyle)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(93, "LoadFontResource", new short[2] { 208, 208 - }, 240, new InvokeHandler(FontSchema.CallLoadFontResourceStringString), true); - FontSchema.Type.Initialize(new DefaultConstructHandler(FontSchema.Construct), new ConstructorSchema[5] + }, 240, new InvokeHandler(CallLoadFontResourceStringString), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[5] { constructorSchema1, constructorSchema2, @@ -331,7 +331,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(FontSchema.TryConvertFrom), new SupportsTypeConversionHandler(FontSchema.IsConversionSupported), null, null, null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs index df13b34..3eedd35 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/FormLayoutInputSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new FormLayoutInput(); - public static void Pass1Initialize() => FormLayoutInputSchema.Type = new UIXTypeSchema(95, "FormLayoutInput", null, 8, typeof(FormLayoutInput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(95, "FormLayoutInput", null, 8, typeof(FormLayoutInput), UIXTypeFlags.None); - public static void Pass2Initialize() => FormLayoutInputSchema.Type.Initialize(new DefaultConstructHandler(FormLayoutInputSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs index 440ed9f..88f856b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/GraphicSchema.cs @@ -61,22 +61,22 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => GraphicSchema.Type = new UIXTypeSchema(97, "Graphic", null, 239, typeof(Graphic), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(97, "Graphic", null, 239, typeof(Graphic), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(97, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GraphicSchema.GetChildren), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(97, "Content", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetContent), new SetValueHandler(GraphicSchema.SetContent), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(97, "PreloadContent", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetPreloadContent), new SetValueHandler(GraphicSchema.SetPreloadContent), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(97, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetEffect), new SetValueHandler(GraphicSchema.SetEffect), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(97, "AcquiringImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetAcquiringImage), new SetValueHandler(GraphicSchema.SetAcquiringImage), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(97, "ErrorImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetErrorImage), new SetValueHandler(GraphicSchema.SetErrorImage), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(97, "SizingPolicy", 199, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetSizingPolicy), new SetValueHandler(GraphicSchema.SetSizingPolicy), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(97, "StretchingPolicy", 207, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetStretchingPolicy), new SetValueHandler(GraphicSchema.SetStretchingPolicy), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(97, "HorizontalAlignment", 209, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetHorizontalAlignment), new SetValueHandler(GraphicSchema.SetHorizontalAlignment), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(97, "VerticalAlignment", 209, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GraphicSchema.GetVerticalAlignment), new SetValueHandler(GraphicSchema.SetVerticalAlignment), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(97, "CommitPreload", null, 240, new InvokeHandler(GraphicSchema.CallCommitPreload), false); - GraphicSchema.Type.Initialize(new DefaultConstructHandler(GraphicSchema.Construct), null, new PropertySchema[10] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(97, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(97, "Content", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContent), new SetValueHandler(SetContent), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(97, "PreloadContent", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPreloadContent), new SetValueHandler(SetPreloadContent), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(97, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEffect), new SetValueHandler(SetEffect), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(97, "AcquiringImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAcquiringImage), new SetValueHandler(SetAcquiringImage), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(97, "ErrorImage", 105, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetErrorImage), new SetValueHandler(SetErrorImage), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(97, "SizingPolicy", 199, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSizingPolicy), new SetValueHandler(SetSizingPolicy), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(97, "StretchingPolicy", 207, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStretchingPolicy), new SetValueHandler(SetStretchingPolicy), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(97, "HorizontalAlignment", 209, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHorizontalAlignment), new SetValueHandler(SetHorizontalAlignment), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(97, "VerticalAlignment", 209, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVerticalAlignment), new SetValueHandler(SetVerticalAlignment), false); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(97, "CommitPreload", null, 240, new InvokeHandler(CallCommitPreload), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[10] { uixPropertySchema5, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs index 20075b6..c1f1f05 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/GridLayoutSchema.cs @@ -72,20 +72,20 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new GridLayout(); - public static void Pass1Initialize() => GridLayoutSchema.Type = new UIXTypeSchema(99, "GridLayout", null, 132, typeof(GridLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(99, "GridLayout", null, 132, typeof(GridLayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(99, "Orientation", 154, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetOrientation), new SetValueHandler(GridLayoutSchema.SetOrientation), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(99, "AllowWrap", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetAllowWrap), new SetValueHandler(GridLayoutSchema.SetAllowWrap), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(99, "ReferenceSize", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetReferenceSize), new SetValueHandler(GridLayoutSchema.SetReferenceSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(99, "Spacing", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetSpacing), new SetValueHandler(GridLayoutSchema.SetSpacing), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(99, "Rows", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GridLayoutSchema.GetRows), new SetValueHandler(GridLayoutSchema.SetRows), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(99, "Columns", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GridLayoutSchema.GetColumns), new SetValueHandler(GridLayoutSchema.SetColumns), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(99, "Repeat", 172, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetRepeat), new SetValueHandler(GridLayoutSchema.SetRepeat), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(99, "RepeatGap", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetRepeatGap), new SetValueHandler(GridLayoutSchema.SetRepeatGap), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(99, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GridLayoutSchema.GetDefaultChildAlignment), new SetValueHandler(GridLayoutSchema.SetDefaultChildAlignment), false); - GridLayoutSchema.Type.Initialize(new DefaultConstructHandler(GridLayoutSchema.Construct), null, new PropertySchema[9] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(99, "Orientation", 154, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOrientation), new SetValueHandler(SetOrientation), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(99, "AllowWrap", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAllowWrap), new SetValueHandler(SetAllowWrap), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(99, "ReferenceSize", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetReferenceSize), new SetValueHandler(SetReferenceSize), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(99, "Spacing", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSpacing), new SetValueHandler(SetSpacing), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(99, "Rows", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GetRows), new SetValueHandler(SetRows), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(99, "Columns", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GetColumns), new SetValueHandler(SetColumns), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(99, "Repeat", 172, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(99, "RepeatGap", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRepeatGap), new SetValueHandler(SetRepeatGap), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(99, "DefaultChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDefaultChildAlignment), new SetValueHandler(SetDefaultChildAlignment), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] { uixPropertySchema2, uixPropertySchema6, diff --git a/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs index 765e37f..0405411 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/GroupSchema.cs @@ -16,13 +16,13 @@ namespace Microsoft.Iris.Markup.UIX private static object GetEndIndex(object instanceObj) => ((IUIGroup)instanceObj).EndIndex; - public static void Pass1Initialize() => GroupSchema.Type = new UIXTypeSchema(100, "Group", null, 138, typeof(IUIGroup), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(100, "Group", null, 138, typeof(IUIGroup), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(100, "StartIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GroupSchema.GetStartIndex), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(100, "EndIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GroupSchema.GetEndIndex), null, false); - GroupSchema.Type.Initialize(null, null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(100, "StartIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStartIndex), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(100, "EndIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndIndex), null, false); + Type.Initialize(null, null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs index bff9cea..1ce28df 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/HostSchema.cs @@ -66,9 +66,9 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; string parameter2 = (string)parameters[1]; object parameter3 = parameters[2]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.RequestSourceCallBuilder(instance, parameter1, null, 1); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + RequestSourceCallBuilder(instance, parameter1, null, 1); return null; } @@ -82,11 +82,11 @@ namespace Microsoft.Iris.Markup.UIX object parameter3 = parameters[2]; string parameter4 = (string)parameters[3]; object parameter5 = parameters[4]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.RequestSourceCallBuilder(instance, parameter1, null, 2); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + RequestSourceCallBuilder(instance, parameter1, null, 2); return null; } @@ -102,13 +102,13 @@ namespace Microsoft.Iris.Markup.UIX object parameter5 = parameters[4]; string parameter6 = (string)parameters[5]; object parameter7 = parameters[6]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.s_paramsList[4] = parameter6; - HostSchema.s_paramsList[5] = parameter7; - HostSchema.RequestSourceCallBuilder(instance, parameter1, null, 3); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + s_paramsList[4] = parameter6; + s_paramsList[5] = parameter7; + RequestSourceCallBuilder(instance, parameter1, null, 3); return null; } @@ -126,15 +126,15 @@ namespace Microsoft.Iris.Markup.UIX object parameter7 = parameters[6]; string parameter8 = (string)parameters[7]; object parameter9 = parameters[8]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.s_paramsList[4] = parameter6; - HostSchema.s_paramsList[5] = parameter7; - HostSchema.s_paramsList[6] = parameter8; - HostSchema.s_paramsList[7] = parameter9; - HostSchema.RequestSourceCallBuilder(instance, parameter1, null, 4); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + s_paramsList[4] = parameter6; + s_paramsList[5] = parameter7; + s_paramsList[6] = parameter8; + s_paramsList[7] = parameter9; + RequestSourceCallBuilder(instance, parameter1, null, 4); return null; } @@ -154,17 +154,17 @@ namespace Microsoft.Iris.Markup.UIX object parameter9 = parameters[8]; string parameter10 = (string)parameters[9]; object parameter11 = parameters[10]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.s_paramsList[4] = parameter6; - HostSchema.s_paramsList[5] = parameter7; - HostSchema.s_paramsList[6] = parameter8; - HostSchema.s_paramsList[7] = parameter9; - HostSchema.s_paramsList[8] = parameter10; - HostSchema.s_paramsList[9] = parameter11; - HostSchema.RequestSourceCallBuilder(instance, parameter1, null, 5); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + s_paramsList[4] = parameter6; + s_paramsList[5] = parameter7; + s_paramsList[6] = parameter8; + s_paramsList[7] = parameter9; + s_paramsList[8] = parameter10; + s_paramsList[9] = parameter11; + RequestSourceCallBuilder(instance, parameter1, null, 5); return null; } @@ -180,9 +180,9 @@ namespace Microsoft.Iris.Markup.UIX TypeSchema parameter1 = (TypeSchema)parameters[0]; string parameter2 = (string)parameters[1]; object parameter3 = parameters[2]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.RequestSourceCallBuilder(instance, null, parameter1, 1); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + RequestSourceCallBuilder(instance, null, parameter1, 1); return null; } @@ -196,11 +196,11 @@ namespace Microsoft.Iris.Markup.UIX object parameter3 = parameters[2]; string parameter4 = (string)parameters[3]; object parameter5 = parameters[4]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.RequestSourceCallBuilder(instance, null, parameter1, 2); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + RequestSourceCallBuilder(instance, null, parameter1, 2); return null; } @@ -216,13 +216,13 @@ namespace Microsoft.Iris.Markup.UIX object parameter5 = parameters[4]; string parameter6 = (string)parameters[5]; object parameter7 = parameters[6]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.s_paramsList[4] = parameter6; - HostSchema.s_paramsList[5] = parameter7; - HostSchema.RequestSourceCallBuilder(instance, null, parameter1, 3); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + s_paramsList[4] = parameter6; + s_paramsList[5] = parameter7; + RequestSourceCallBuilder(instance, null, parameter1, 3); return null; } @@ -240,15 +240,15 @@ namespace Microsoft.Iris.Markup.UIX object parameter7 = parameters[6]; string parameter8 = (string)parameters[7]; object parameter9 = parameters[8]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.s_paramsList[4] = parameter6; - HostSchema.s_paramsList[5] = parameter7; - HostSchema.s_paramsList[6] = parameter8; - HostSchema.s_paramsList[7] = parameter9; - HostSchema.RequestSourceCallBuilder(instance, null, parameter1, 4); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + s_paramsList[4] = parameter6; + s_paramsList[5] = parameter7; + s_paramsList[6] = parameter8; + s_paramsList[7] = parameter9; + RequestSourceCallBuilder(instance, null, parameter1, 4); return null; } @@ -268,17 +268,17 @@ namespace Microsoft.Iris.Markup.UIX object parameter9 = parameters[8]; string parameter10 = (string)parameters[9]; object parameter11 = parameters[10]; - HostSchema.s_paramsList[0] = parameter2; - HostSchema.s_paramsList[1] = parameter3; - HostSchema.s_paramsList[2] = parameter4; - HostSchema.s_paramsList[3] = parameter5; - HostSchema.s_paramsList[4] = parameter6; - HostSchema.s_paramsList[5] = parameter7; - HostSchema.s_paramsList[6] = parameter8; - HostSchema.s_paramsList[7] = parameter9; - HostSchema.s_paramsList[8] = parameter10; - HostSchema.s_paramsList[9] = parameter11; - HostSchema.RequestSourceCallBuilder(instance, null, parameter1, 5); + s_paramsList[0] = parameter2; + s_paramsList[1] = parameter3; + s_paramsList[2] = parameter4; + s_paramsList[3] = parameter5; + s_paramsList[4] = parameter6; + s_paramsList[5] = parameter7; + s_paramsList[6] = parameter8; + s_paramsList[7] = parameter9; + s_paramsList[8] = parameter10; + s_paramsList[9] = parameter11; + RequestSourceCallBuilder(instance, null, parameter1, 5); return null; } @@ -292,46 +292,46 @@ namespace Microsoft.Iris.Markup.UIX Vector vector = new Vector(numPairs); for (int index = 0; index < numPairs; ++index) { - string name = (string)HostSchema.s_paramsList[index * 2]; - object obj = HostSchema.s_paramsList[index * 2 + 1]; + string name = (string)s_paramsList[index * 2]; + object obj = s_paramsList[index * 2 + 1]; if (name == null) ErrorManager.ReportError("Script runtime failure: Invalid 'null' value for '{0}'", "property" + index.ToString()); else UIPropertyRecord.AddToList(vector, name, obj); } for (int index = 0; index < numPairs * 2; ++index) - HostSchema.s_paramsList[index] = null; + s_paramsList[index] = null; if (watermark.ErrorsDetected) return; instance.RequestSource(source, type, vector); } - public static void Pass1Initialize() => HostSchema.Type = new UIXTypeSchema(101, "Host", null, 239, typeof(Host), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(101, "Host", null, 239, typeof(Host), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(101, "NewContentOnTop", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(HostSchema.GetNewContentOnTop), new SetValueHandler(HostSchema.SetNewContentOnTop), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(101, "Source", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(HostSchema.GetSource), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(101, "SourceType", 225, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(HostSchema.GetSourceType), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(101, "Status", 102, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(HostSchema.GetStatus), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(101, "InputEnabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(HostSchema.GetInputEnabled), new SetValueHandler(HostSchema.SetInputEnabled), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(101, "Unloadable", 15, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(HostSchema.GetUnloadable), new SetValueHandler(HostSchema.SetUnloadable), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(101, "UnloadAll", null, 240, new InvokeHandler(HostSchema.CallUnloadAll), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(101, "ForceRefresh", null, 240, new InvokeHandler(HostSchema.CallForceRefresh), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(101, "NewContentOnTop", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNewContentOnTop), new SetValueHandler(SetNewContentOnTop), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(101, "Source", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(101, "SourceType", 225, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSourceType), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(101, "Status", 102, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStatus), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(101, "InputEnabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetInputEnabled), new SetValueHandler(SetInputEnabled), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(101, "Unloadable", 15, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetUnloadable), new SetValueHandler(SetUnloadable), false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(101, "UnloadAll", null, 240, new InvokeHandler(CallUnloadAll), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(101, "ForceRefresh", null, 240, new InvokeHandler(CallForceRefresh), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(101, "ForceRefresh", new short[1] { 15 - }, 240, new InvokeHandler(HostSchema.CallForceRefreshBoolean), false); + }, 240, new InvokeHandler(CallForceRefreshBoolean), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(101, "RequestSource", new short[1] { 208 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceString), false); + }, 240, new InvokeHandler(CallRequestSourceString), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(101, "RequestSource", new short[3] { 208, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceStringStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceStringStringObject), false); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(101, "RequestSource", new short[5] { 208, @@ -339,7 +339,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceStringStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObject), false); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(101, "RequestSource", new short[7] { 208, @@ -349,7 +349,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceStringStringObjectStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObjectStringObject), false); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(101, "RequestSource", new short[9] { 208, @@ -361,7 +361,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceStringStringObjectStringObjectStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObjectStringObjectStringObject), false); UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(101, "RequestSource", new short[11] { 208, @@ -375,17 +375,17 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceStringStringObjectStringObjectStringObjectStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceStringStringObjectStringObjectStringObjectStringObjectStringObject), false); UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(101, "RequestSource", new short[1] { 225 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceType), false); + }, 240, new InvokeHandler(CallRequestSourceType), false); UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(101, "RequestSource", new short[3] { 225, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceTypeStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceTypeStringObject), false); UIXMethodSchema uixMethodSchema12 = new UIXMethodSchema(101, "RequestSource", new short[5] { 225, @@ -393,7 +393,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceTypeStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObject), false); UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(101, "RequestSource", new short[7] { 225, @@ -403,7 +403,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceTypeStringObjectStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObjectStringObject), false); UIXMethodSchema uixMethodSchema14 = new UIXMethodSchema(101, "RequestSource", new short[9] { 225, @@ -415,7 +415,7 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceTypeStringObjectStringObjectStringObjectStringObject), false); + }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObjectStringObjectStringObject), false); UIXMethodSchema uixMethodSchema15 = new UIXMethodSchema(101, "RequestSource", new short[11] { 225, @@ -429,8 +429,8 @@ namespace Microsoft.Iris.Markup.UIX 153, 208, 153 - }, 240, new InvokeHandler(HostSchema.CallRequestSourceTypeStringObjectStringObjectStringObjectStringObjectStringObject), false); - HostSchema.Type.Initialize(new DefaultConstructHandler(HostSchema.Construct), null, new PropertySchema[6] + }, 240, new InvokeHandler(CallRequestSourceTypeStringObjectStringObjectStringObjectStringObjectStringObject), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema5, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs index 663d5d0..e72355d 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/HwndHostSchema.cs @@ -20,13 +20,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new HwndHost(); - public static void Pass1Initialize() => HwndHostSchema.Type = new UIXTypeSchema(103, "HwndHost", null, 239, typeof(HwndHost), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(103, "HwndHost", null, 239, typeof(HwndHost), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(103, "Handle", 116, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(HwndHostSchema.GetHandle), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(103, "ChildHandle", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(HwndHostSchema.GetChildHandle), new SetValueHandler(HwndHostSchema.SetChildHandle), false); - HwndHostSchema.Type.Initialize(new DefaultConstructHandler(HwndHostSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(103, "Handle", 116, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetHandle), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(103, "ChildHandle", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetChildHandle), new SetValueHandler(SetChildHandle), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs index a385030..191060e 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/IAnimationSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => IAnimationSchema.Type = new UIXTypeSchema(104, "IAnimation", null, 153, typeof(IAnimationProvider), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(104, "IAnimation", null, 153, typeof(IAnimationProvider), UIXTypeFlags.None); - public static void Pass2Initialize() => IAnimationSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs index 67e1566..07d73db 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ImageElementInstanceSchema.cs @@ -18,13 +18,13 @@ namespace Microsoft.Iris.Markup.UIX private static void SetUVOffset(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("UVOffset", (Vector2)valueObj); - public static void Pass1Initialize() => ImageElementInstanceSchema.Type = new UIXTypeSchema(107, "ImageElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(107, "ImageElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(107, "Image", 105, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(ImageElementInstanceSchema.SetImage), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(107, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(ImageElementInstanceSchema.SetUVOffset), false); - ImageElementInstanceSchema.Type.Initialize(null, null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(107, "Image", 105, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetImage), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(107, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetUVOffset), false); + Type.Initialize(null, null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs index e7344a5..42ef64f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ImageElementSchema.cs @@ -21,13 +21,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ImageElement(); - public static void Pass1Initialize() => ImageElementSchema.Type = new UIXTypeSchema(106, "ImageElement", null, 77, typeof(ImageElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(106, "ImageElement", null, 77, typeof(ImageElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(106, "Image", 105, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(ImageElementSchema.SetImage), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(106, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageElementSchema.GetUVOffset), new SetValueHandler(ImageElementSchema.SetUVOffset), false); - ImageElementSchema.Type.Initialize(new DefaultConstructHandler(ImageElementSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(106, "Image", 105, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetImage), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(106, "UVOffset", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetUVOffset), new SetValueHandler(SetUVOffset), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs index 3b783c5..7016da0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ImageSchema.cs @@ -61,27 +61,27 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructSource(object[] parameters) { - object instanceObj = ImageSchema.Construct(); - ImageSchema.SetSource(ref instanceObj, parameters[0]); + object instanceObj = Construct(); + SetSource(ref instanceObj, parameters[0]); return instanceObj; } private static Result ConvertFromStringSource(string[] splitString, out object instance) { - instance = ImageSchema.Construct(); + instance = Construct(); object valueObj; Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result.Error); - ImageSchema.SetSource(ref instance, valueObj); + SetSource(ref instance, valueObj); return result; } private static object ConstructSourceNineGrid(object[] parameters) { - object instanceObj = ImageSchema.Construct(); - ImageSchema.SetSource(ref instanceObj, parameters[0]); - ImageSchema.SetNineGrid(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetSource(ref instanceObj, parameters[0]); + SetNineGrid(ref instanceObj, parameters[1]); return instanceObj; } @@ -89,26 +89,26 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = ImageSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - ImageSchema.SetSource(ref instance, valueObj1); + SetSource(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - ImageSchema.SetNineGrid(ref instance, valueObj2); + SetNineGrid(ref instance, valueObj2); return result2; } private static object ConstructSourceNineGridMaximumSize(object[] parameters) { - object instanceObj = ImageSchema.Construct(); - ImageSchema.SetSource(ref instanceObj, parameters[0]); - ImageSchema.SetNineGrid(ref instanceObj, parameters[1]); - ImageSchema.SetMaximumSize(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetSource(ref instanceObj, parameters[0]); + SetNineGrid(ref instanceObj, parameters[1]); + SetMaximumSize(ref instanceObj, parameters[2]); return instanceObj; } @@ -116,32 +116,32 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = ImageSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - ImageSchema.SetSource(ref instance, valueObj1); + SetSource(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - ImageSchema.SetNineGrid(ref instance, valueObj2); + SetNineGrid(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SizeSchema.Type, SizeSchema.ValidateNotNegative, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result3.Error); - ImageSchema.SetMaximumSize(ref instance, valueObj3); + SetMaximumSize(ref instance, valueObj3); return result3; } private static object ConstructSourceNineGridMaximumSizeFlippable(object[] parameters) { - object instanceObj = ImageSchema.Construct(); - ImageSchema.SetSource(ref instanceObj, parameters[0]); - ImageSchema.SetNineGrid(ref instanceObj, parameters[1]); - ImageSchema.SetMaximumSize(ref instanceObj, parameters[2]); - ImageSchema.SetFlippable(ref instanceObj, parameters[3]); + object instanceObj = Construct(); + SetSource(ref instanceObj, parameters[0]); + SetNineGrid(ref instanceObj, parameters[1]); + SetMaximumSize(ref instanceObj, parameters[2]); + SetFlippable(ref instanceObj, parameters[3]); return instanceObj; } @@ -149,39 +149,39 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = ImageSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - ImageSchema.SetSource(ref instance, valueObj1); + SetSource(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - ImageSchema.SetNineGrid(ref instance, valueObj2); + SetNineGrid(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SizeSchema.Type, SizeSchema.ValidateNotNegative, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result3.Error); - ImageSchema.SetMaximumSize(ref instance, valueObj3); + SetMaximumSize(ref instance, valueObj3); object valueObj4; Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], BooleanSchema.Type, null, out valueObj4); if (result4.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result4.Error); - ImageSchema.SetFlippable(ref instance, valueObj4); + SetFlippable(ref instance, valueObj4); return result4; } private static object ConstructSourceNineGridMaximumSizeFlippableAntialiasEdges( object[] parameters) { - object instanceObj = ImageSchema.Construct(); - ImageSchema.SetSource(ref instanceObj, parameters[0]); - ImageSchema.SetNineGrid(ref instanceObj, parameters[1]); - ImageSchema.SetMaximumSize(ref instanceObj, parameters[2]); - ImageSchema.SetFlippable(ref instanceObj, parameters[3]); - ImageSchema.SetAntialiasEdges(ref instanceObj, parameters[4]); + object instanceObj = Construct(); + SetSource(ref instanceObj, parameters[0]); + SetNineGrid(ref instanceObj, parameters[1]); + SetMaximumSize(ref instanceObj, parameters[2]); + SetFlippable(ref instanceObj, parameters[3]); + SetAntialiasEdges(ref instanceObj, parameters[4]); return instanceObj; } @@ -189,32 +189,32 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = ImageSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result1.Error); - ImageSchema.SetSource(ref instance, valueObj1); + SetSource(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], InsetSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result2.Error); - ImageSchema.SetNineGrid(ref instance, valueObj2); + SetNineGrid(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SizeSchema.Type, SizeSchema.ValidateNotNegative, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result3.Error); - ImageSchema.SetMaximumSize(ref instance, valueObj3); + SetMaximumSize(ref instance, valueObj3); object valueObj4; Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], BooleanSchema.Type, null, out valueObj4); if (result4.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result4.Error); - ImageSchema.SetFlippable(ref instance, valueObj4); + SetFlippable(ref instance, valueObj4); object valueObj5; Result result5 = UIXLoadResult.ValidateStringAsValue(splitString[4], BooleanSchema.Type, null, out valueObj5); if (result5.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Image", result5.Error); - ImageSchema.SetAntialiasEdges(ref instance, valueObj5); + SetAntialiasEdges(ref instance, valueObj5); return result5; } @@ -233,27 +233,27 @@ namespace Microsoft.Iris.Markup.UIX switch (splitString.Length) { case 1: - result = ImageSchema.ConvertFromStringSource(splitString, out instance); + result = ConvertFromStringSource(splitString, out instance); if (!result.Failed) return result; break; case 2: - result = ImageSchema.ConvertFromStringSourceNineGrid(splitString, out instance); + result = ConvertFromStringSourceNineGrid(splitString, out instance); if (!result.Failed) return result; break; case 3: - result = ImageSchema.ConvertFromStringSourceNineGridMaximumSize(splitString, out instance); + result = ConvertFromStringSourceNineGridMaximumSize(splitString, out instance); if (!result.Failed) return result; break; case 4: - result = ImageSchema.ConvertFromStringSourceNineGridMaximumSizeFlippable(splitString, out instance); + result = ConvertFromStringSourceNineGridMaximumSizeFlippable(splitString, out instance); if (!result.Failed) return result; break; case 5: - result = ImageSchema.ConvertFromStringSourceNineGridMaximumSizeFlippableAntialiasEdges(splitString, out instance); + result = ConvertFromStringSourceNineGridMaximumSizeFlippableAntialiasEdges(splitString, out instance); if (!result.Failed) return result; break; @@ -265,41 +265,41 @@ namespace Microsoft.Iris.Markup.UIX return result; } - public static void Pass1Initialize() => ImageSchema.Type = new UIXTypeSchema(105, "Image", null, 153, typeof(UIImage), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(105, "Image", null, 153, typeof(UIImage), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(105, "Source", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageSchema.GetSource), new SetValueHandler(ImageSchema.SetSource), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(105, "NineGrid", 114, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageSchema.GetNineGrid), new SetValueHandler(ImageSchema.SetNineGrid), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(105, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, false, new GetValueHandler(ImageSchema.GetMaximumSize), new SetValueHandler(ImageSchema.SetMaximumSize), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(105, "Flippable", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageSchema.GetFlippable), new SetValueHandler(ImageSchema.SetFlippable), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(105, "AntialiasEdges", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageSchema.GetAntialiasEdges), new SetValueHandler(ImageSchema.SetAntialiasEdges), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(105, "Status", 108, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ImageSchema.GetStatus), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(105, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageSchema.GetWidth), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(105, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ImageSchema.GetHeight), null, false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(105, "Load", null, 240, new InvokeHandler(ImageSchema.CallLoad), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(105, "Source", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(105, "NineGrid", 114, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetNineGrid), new SetValueHandler(SetNineGrid), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(105, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, false, new GetValueHandler(GetMaximumSize), new SetValueHandler(SetMaximumSize), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(105, "Flippable", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFlippable), new SetValueHandler(SetFlippable), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(105, "AntialiasEdges", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAntialiasEdges), new SetValueHandler(SetAntialiasEdges), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(105, "Status", 108, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStatus), null, false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(105, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWidth), null, false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(105, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHeight), null, false); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(105, "Load", null, 240, new InvokeHandler(CallLoad), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(105, new short[1] { 208 - }, new ConstructHandler(ImageSchema.ConstructSource)); + }, new ConstructHandler(ConstructSource)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(105, new short[2] { 208, 114 - }, new ConstructHandler(ImageSchema.ConstructSourceNineGrid)); + }, new ConstructHandler(ConstructSourceNineGrid)); UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(105, new short[3] { 208, 114, 195 - }, new ConstructHandler(ImageSchema.ConstructSourceNineGridMaximumSize)); + }, new ConstructHandler(ConstructSourceNineGridMaximumSize)); UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(105, new short[4] { 208, 114, 195, 15 - }, new ConstructHandler(ImageSchema.ConstructSourceNineGridMaximumSizeFlippable)); + }, new ConstructHandler(ConstructSourceNineGridMaximumSizeFlippable)); UIXConstructorSchema constructorSchema5 = new UIXConstructorSchema(105, new short[5] { 208, @@ -307,8 +307,8 @@ namespace Microsoft.Iris.Markup.UIX 195, 15, 15 - }, new ConstructHandler(ImageSchema.ConstructSourceNineGridMaximumSizeFlippableAntialiasEdges)); - ImageSchema.Type.Initialize(new DefaultConstructHandler(ImageSchema.Construct), new ConstructorSchema[5] + }, new ConstructHandler(ConstructSourceNineGridMaximumSizeFlippableAntialiasEdges)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[5] { constructorSchema1, constructorSchema2, @@ -328,7 +328,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(ImageSchema.TryConvertFrom), new SupportsTypeConversionHandler(ImageSchema.IsConversionSupported), null, null, null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs index 6caa4ea..5285332 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/IndexSchema.cs @@ -18,14 +18,14 @@ namespace Microsoft.Iris.Markup.UIX private static object CallGetContainerIndex(object instanceObj, object[] parameters) => ((Index)instanceObj).GetContainerIndex(); - public static void Pass1Initialize() => IndexSchema.Type = new UIXTypeSchema(109, "Index", null, 153, typeof(Index), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(109, "Index", null, 153, typeof(Index), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(109, "Value", 115, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(IndexSchema.GetValue), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(109, "SourceValue", 115, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(IndexSchema.GetSourceValue), null, false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(109, "GetContainerIndex", null, 109, new InvokeHandler(IndexSchema.CallGetContainerIndex), false); - IndexSchema.Type.Initialize(null, null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(109, "Value", 115, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetValue), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(109, "SourceValue", 115, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetSourceValue), null, false); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(109, "GetContainerIndex", null, 109, new InvokeHandler(CallGetContainerIndex), false); + Type.Initialize(null, null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs index be70f22..971b0d0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InputHandlerSchema.cs @@ -20,13 +20,13 @@ namespace Microsoft.Iris.Markup.UIX private static void SetEnabled(ref object instanceObj, object valueObj) => ((InputHandler)instanceObj).Enabled = (bool)valueObj; - public static void Pass1Initialize() => InputHandlerSchema.Type = new UIXTypeSchema(110, "InputHandler", null, -1, typeof(InputHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(110, "InputHandler", null, -1, typeof(InputHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(110, "Name", 208, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(InputHandlerSchema.GetName), new SetValueHandler(InputHandlerSchema.SetName), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(110, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(InputHandlerSchema.GetEnabled), new SetValueHandler(InputHandlerSchema.SetEnabled), false); - InputHandlerSchema.Type.Initialize(null, null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(110, "Name", 208, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetName), new SetValueHandler(SetName), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(110, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); + Type.Initialize(null, null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs index 05ee1eb..e3c5720 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InsetSchema.cs @@ -57,7 +57,7 @@ namespace Microsoft.Iris.Markup.UIX instanceObj = inset; } - private static object Construct() => InsetSchema.s_Default; + private static object Construct() => s_Default; private static object ConstructInt32(object[] parameters) { @@ -123,11 +123,11 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructLeftTopRightBottom(object[] parameters) { - object instanceObj = InsetSchema.Construct(); - InsetSchema.SetLeft(ref instanceObj, parameters[0]); - InsetSchema.SetTop(ref instanceObj, parameters[1]); - InsetSchema.SetRight(ref instanceObj, parameters[2]); - InsetSchema.SetBottom(ref instanceObj, parameters[3]); + object instanceObj = Construct(); + SetLeft(ref instanceObj, parameters[0]); + SetTop(ref instanceObj, parameters[1]); + SetRight(ref instanceObj, parameters[2]); + SetBottom(ref instanceObj, parameters[3]); return instanceObj; } @@ -135,27 +135,27 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = InsetSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Inset", result1.Error); - InsetSchema.SetLeft(ref instance, valueObj1); + SetLeft(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Inset", result2.Error); - InsetSchema.SetTop(ref instance, valueObj2); + SetTop(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], Int32Schema.Type, null, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Inset", result3.Error); - InsetSchema.SetRight(ref instance, valueObj3); + SetRight(ref instance, valueObj3); object valueObj4; Result result4 = UIXLoadResult.ValidateStringAsValue(splitString[3], Int32Schema.Type, null, out valueObj4); if (result4.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Inset", result4.Error); - InsetSchema.SetBottom(ref instance, valueObj4); + SetBottom(ref instance, valueObj4); return result4; } @@ -170,19 +170,19 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = InsetSchema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = InsetSchema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = InsetSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -191,7 +191,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 4) { - result = InsetSchema.ConvertFromStringLeftTopRightBottom(splitString, out instance); + result = ConvertFromStringLeftTopRightBottom(splitString, out instance); if (!result.Failed) return result; } @@ -242,34 +242,34 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; Inset parameter2 = (Inset)parameters[1]; object instanceObj1; - return InsetSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => InsetSchema.Type = new UIXTypeSchema(114, "Inset", null, 153, typeof(Inset), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(114, "Inset", null, 153, typeof(Inset), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(114, "Left", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InsetSchema.GetLeft), new SetValueHandler(InsetSchema.SetLeft), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(114, "Top", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InsetSchema.GetTop), new SetValueHandler(InsetSchema.SetTop), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(114, "Right", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InsetSchema.GetRight), new SetValueHandler(InsetSchema.SetRight), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(114, "Bottom", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InsetSchema.GetBottom), new SetValueHandler(InsetSchema.SetBottom), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(114, "Left", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLeft), new SetValueHandler(SetLeft), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(114, "Top", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTop), new SetValueHandler(SetTop), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(114, "Right", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRight), new SetValueHandler(SetRight), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(114, "Bottom", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBottom), new SetValueHandler(SetBottom), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(114, new short[1] { 115 - }, new ConstructHandler(InsetSchema.ConstructInt32)); + }, new ConstructHandler(ConstructInt32)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(114, new short[4] { 115, 115, 115, 115 - }, new ConstructHandler(InsetSchema.ConstructLeftTopRightBottom)); + }, new ConstructHandler(ConstructLeftTopRightBottom)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(114, "TryParse", new short[2] { 208, 114 - }, 114, new InvokeHandler(InsetSchema.CallTryParseStringInset), true); - InsetSchema.Type.Initialize(new DefaultConstructHandler(InsetSchema.Construct), new ConstructorSchema[2] + }, 114, new InvokeHandler(CallTryParseStringInset), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[2] { constructorSchema1, constructorSchema2 @@ -282,7 +282,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(InsetSchema.TryConvertFrom), new SupportsTypeConversionHandler(InsetSchema.IsConversionSupported), new EncodeBinaryHandler(InsetSchema.EncodeBinary), new DecodeBinaryHandler(InsetSchema.DecodeBinary), new PerformOperationHandler(InsetSchema.ExecuteOperation), new SupportsOperationHandler(InsetSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs index 412d2ba..8a95768 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/Int32Schema.cs @@ -13,7 +13,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class Int32Schema { - public static RangeValidator ValidateNotNegative = new RangeValidator(Int32Schema.RangeValidateNotNegative); + public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); public static UIXTypeSchema Type; private static object GetMinValue(object instanceObj) => Int32Boxes.MinValueBox; @@ -99,37 +99,37 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (BooleanSchema.Type.IsAssignableFrom(fromType)) { - result = Int32Schema.ConvertFromBoolean(from, out instance); + result = ConvertFromBoolean(from, out instance); if (!result.Failed) return result; } if (ByteSchema.Type.IsAssignableFrom(fromType)) { - result = Int32Schema.ConvertFromByte(from, out instance); + result = ConvertFromByte(from, out instance); if (!result.Failed) return result; } if (DoubleSchema.Type.IsAssignableFrom(fromType)) { - result = Int32Schema.ConvertFromDouble(from, out instance); + result = ConvertFromDouble(from, out instance); if (!result.Failed) return result; } if (Int64Schema.Type.IsAssignableFrom(fromType)) { - result = Int32Schema.ConvertFromInt64(from, out instance); + result = ConvertFromInt64(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = Int32Schema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = Int32Schema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -201,7 +201,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; int parameter2 = (int)parameters[1]; object instanceObj1; - return Int32Schema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static Result RangeValidateNotNegative(object value) @@ -210,22 +210,22 @@ namespace Microsoft.Iris.Markup.UIX return num < 0 ? Result.Fail("Expecting a non-negative value, but got {0}", num.ToString()) : Result.Success; } - public static void Pass1Initialize() => Int32Schema.Type = new UIXTypeSchema(115, "Int32", "int", 153, typeof(int), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(115, "Int32", "int", 153, typeof(int), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(115, "MinValue", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Int32Schema.GetMinValue), null, true); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(115, "MaxValue", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Int32Schema.GetMaxValue), null, true); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(115, "MinValue", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinValue), null, true); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(115, "MaxValue", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxValue), null, true); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(115, "ToString", new short[1] { 208 - }, 208, new InvokeHandler(Int32Schema.CallToStringString), false); + }, 208, new InvokeHandler(CallToStringString), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(115, "TryParse", new short[2] { 208, 115 - }, 115, new InvokeHandler(Int32Schema.CallTryParseStringInt32), true); - Int32Schema.Type.Initialize(new DefaultConstructHandler(Int32Schema.Construct), null, new PropertySchema[2] + }, 115, new InvokeHandler(CallTryParseStringInt32), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 @@ -233,7 +233,7 @@ namespace Microsoft.Iris.Markup.UIX { uixMethodSchema1, uixMethodSchema2 - }, null, null, new TypeConverterHandler(Int32Schema.TryConvertFrom), new SupportsTypeConversionHandler(Int32Schema.IsConversionSupported), new EncodeBinaryHandler(Int32Schema.EncodeBinary), new DecodeBinaryHandler(Int32Schema.DecodeBinary), new PerformOperationHandler(Int32Schema.ExecuteOperation), new SupportsOperationHandler(Int32Schema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs index adbf907..a176a63 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/Int64Schema.cs @@ -97,37 +97,37 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (BooleanSchema.Type.IsAssignableFrom(fromType)) { - result = Int64Schema.ConvertFromBoolean(from, out instance); + result = ConvertFromBoolean(from, out instance); if (!result.Failed) return result; } if (ByteSchema.Type.IsAssignableFrom(fromType)) { - result = Int64Schema.ConvertFromByte(from, out instance); + result = ConvertFromByte(from, out instance); if (!result.Failed) return result; } if (DoubleSchema.Type.IsAssignableFrom(fromType)) { - result = Int64Schema.ConvertFromDouble(from, out instance); + result = ConvertFromDouble(from, out instance); if (!result.Failed) return result; } if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = Int64Schema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = Int64Schema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = Int64Schema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -196,25 +196,25 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; long parameter2 = (long)parameters[1]; object instanceObj1; - return Int64Schema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => Int64Schema.Type = new UIXTypeSchema(116, "Int64", "long", 153, typeof(long), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(116, "Int64", "long", 153, typeof(long), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(116, "MinValue", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Int64Schema.GetMinValue), null, true); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(116, "MaxValue", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Int64Schema.GetMaxValue), null, true); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(116, "MinValue", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinValue), null, true); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(116, "MaxValue", 116, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxValue), null, true); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(116, "ToString", new short[1] { 208 - }, 208, new InvokeHandler(Int64Schema.CallToStringString), false); + }, 208, new InvokeHandler(CallToStringString), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(116, "TryParse", new short[2] { 208, 116 - }, 116, new InvokeHandler(Int64Schema.CallTryParseStringInt64), true); - Int64Schema.Type.Initialize(new DefaultConstructHandler(Int64Schema.Construct), null, new PropertySchema[2] + }, 116, new InvokeHandler(CallTryParseStringInt64), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 @@ -222,7 +222,7 @@ namespace Microsoft.Iris.Markup.UIX { uixMethodSchema1, uixMethodSchema2 - }, null, null, new TypeConverterHandler(Int64Schema.TryConvertFrom), new SupportsTypeConversionHandler(Int64Schema.IsConversionSupported), new EncodeBinaryHandler(Int64Schema.EncodeBinary), new DecodeBinaryHandler(Int64Schema.DecodeBinary), new PerformOperationHandler(Int64Schema.ExecuteOperation), new SupportsOperationHandler(Int64Schema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs index 1ea18d8..7acd633 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/IntRangedValueSchema.cs @@ -47,15 +47,15 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Microsoft.Iris.ModelItems.IntRangedValue(); - public static void Pass1Initialize() => IntRangedValueSchema.Type = new UIXTypeSchema(117, "IntRangedValue", null, 168, typeof(IUIIntRangedValue), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(117, "IntRangedValue", null, 168, typeof(IUIIntRangedValue), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(117, "MinValue", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(IntRangedValueSchema.GetMinValue), new SetValueHandler(IntRangedValueSchema.SetMinValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(117, "MaxValue", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(IntRangedValueSchema.GetMaxValue), new SetValueHandler(IntRangedValueSchema.SetMaxValue), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(117, "Step", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(IntRangedValueSchema.GetStep), new SetValueHandler(IntRangedValueSchema.SetStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(117, "Value", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(IntRangedValueSchema.GetValue), new SetValueHandler(IntRangedValueSchema.SetValue), false); - IntRangedValueSchema.Type.Initialize(new DefaultConstructHandler(IntRangedValueSchema.Construct), null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(117, "MinValue", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMinValue), new SetValueHandler(SetMinValue), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(117, "MaxValue", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaxValue), new SetValueHandler(SetMaxValue), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(117, "Step", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStep), new SetValueHandler(SetStep), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(117, "Value", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema2, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs index c13d8a5..e7045f6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementInstanceSchema.cs @@ -34,16 +34,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => InterpolateElementInstanceSchema.Type = new UIXTypeSchema(120, "InterpolateElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(120, "InterpolateElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(120, "Value", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(InterpolateElementInstanceSchema.SetValue), false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(120, "Value", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, null, new SetValueHandler(SetValue), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(120, "PlayValueAnimation", new short[1] { 75 - }, 240, new InvokeHandler(InterpolateElementInstanceSchema.CallPlayValueAnimationEffectFloatAnimation), false); - InterpolateElementInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + }, 240, new InvokeHandler(CallPlayValueAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[1] diff --git a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs index 8e778b2..a580a4d 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InterpolateElementSchema.cs @@ -37,14 +37,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new InterpolateElement(); - public static void Pass1Initialize() => InterpolateElementSchema.Type = new UIXTypeSchema(119, "InterpolateElement", null, 77, typeof(InterpolateElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(119, "InterpolateElement", null, 77, typeof(InterpolateElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(119, "Input1", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InterpolateElementSchema.GetInput1), new SetValueHandler(InterpolateElementSchema.SetInput1), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(119, "Input2", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InterpolateElementSchema.GetInput2), new SetValueHandler(InterpolateElementSchema.SetInput2), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(119, "Value", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(InterpolateElementSchema.GetValue), new SetValueHandler(InterpolateElementSchema.SetValue), false); - InterpolateElementSchema.Type.Initialize(new DefaultConstructHandler(InterpolateElementSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(119, "Input1", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput1), new SetValueHandler(SetInput1), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(119, "Input2", 77, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInput2), new SetValueHandler(SetInput2), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(119, "Value", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs index 4858a1c..9bfef86 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InterpolationSchema.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class InterpolationSchema { - public static RangeValidator ValidateEasePercent = new RangeValidator(InterpolationSchema.RangeValidateEasePercent); + public static RangeValidator ValidateEasePercent = new RangeValidator(RangeValidateEasePercent); public static UIXTypeSchema Type; private static object GetType(object instanceObj) => ((Interpolation)instanceObj).Type; @@ -46,7 +46,7 @@ namespace Microsoft.Iris.Markup.UIX { Interpolation interpolation = (Interpolation)instanceObj; float num = (float)valueObj; - Result result = InterpolationSchema.ValidateEasePercent(valueObj); + Result result = ValidateEasePercent(valueObj); if (result.Failed) ErrorManager.ReportError(result.Error); else @@ -87,14 +87,14 @@ namespace Microsoft.Iris.Markup.UIX Result result = UIXLoadResult.ValidateStringAsValue(strArray[0], UIXLoadResultExports.InterpolationTypeType, null, out valueObj1); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - InterpolationSchema.SetType(ref instanceObj, valueObj1); + SetType(ref instanceObj, valueObj1); if (strArray.Length == 2) { object valueObj2; result = UIXLoadResult.ValidateStringAsValue(strArray[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - InterpolationSchema.SetWeight(ref instanceObj, valueObj2); + SetWeight(ref instanceObj, valueObj2); } else if (strArray.Length == 3) { @@ -104,12 +104,12 @@ namespace Microsoft.Iris.Markup.UIX result = UIXLoadResult.ValidateStringAsValue(strArray[1], SingleSchema.Type, null, out valueObj2); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - InterpolationSchema.SetBezierHandle1(ref instanceObj, valueObj2); + SetBezierHandle1(ref instanceObj, valueObj2); object valueObj3; result = UIXLoadResult.ValidateStringAsValue(strArray[2], SingleSchema.Type, null, out valueObj3); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - InterpolationSchema.SetBezierHandle2(ref instanceObj, valueObj3); + SetBezierHandle2(ref instanceObj, valueObj3); } else { @@ -117,12 +117,12 @@ namespace Microsoft.Iris.Markup.UIX result = UIXLoadResult.ValidateStringAsValue(strArray[1], SingleSchema.Type, SingleSchema.ValidateNotNegative, out valueObj2); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - InterpolationSchema.SetWeight(ref instanceObj, valueObj2); + SetWeight(ref instanceObj, valueObj2); object valueObj3; - result = UIXLoadResult.ValidateStringAsValue(strArray[2], SingleSchema.Type, InterpolationSchema.ValidateEasePercent, out valueObj3); + result = UIXLoadResult.ValidateStringAsValue(strArray[2], SingleSchema.Type, ValidateEasePercent, out valueObj3); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Interpolation", result.Error); - InterpolationSchema.SetEasePercent(ref instanceObj, valueObj3); + SetEasePercent(ref instanceObj, valueObj3); } } else if (strArray.Length >= 4) @@ -142,7 +142,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = InterpolationSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -154,7 +154,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; Interpolation parameter2 = (Interpolation)parameters[1]; object instanceObj1; - return InterpolationSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static Result RangeValidateEasePercent(object value) @@ -163,21 +163,21 @@ namespace Microsoft.Iris.Markup.UIX return num <= 0.0 || num >= 1.0 ? Result.Fail("Expecting a value between {0} and {1} (exclusive), but got {2}", "0.0", "1.0", num.ToString()) : Result.Success; } - public static void Pass1Initialize() => InterpolationSchema.Type = new UIXTypeSchema(121, "Interpolation", null, 153, typeof(Interpolation), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(121, "Interpolation", null, 153, typeof(Interpolation), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(121, "Type", 122, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InterpolationSchema.GetType), new SetValueHandler(InterpolationSchema.SetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(121, "Weight", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(InterpolationSchema.GetWeight), new SetValueHandler(InterpolationSchema.SetWeight), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(121, "BezierHandle1", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InterpolationSchema.GetBezierHandle1), new SetValueHandler(InterpolationSchema.SetBezierHandle1), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(121, "BezierHandle2", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(InterpolationSchema.GetBezierHandle2), new SetValueHandler(InterpolationSchema.SetBezierHandle2), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(121, "EasePercent", 194, -1, ExpressionRestriction.None, false, InterpolationSchema.ValidateEasePercent, false, new GetValueHandler(InterpolationSchema.GetEasePercent), new SetValueHandler(InterpolationSchema.SetEasePercent), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(121, "Type", 122, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(121, "Weight", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetWeight), new SetValueHandler(SetWeight), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(121, "BezierHandle1", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBezierHandle1), new SetValueHandler(SetBezierHandle1), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(121, "BezierHandle2", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBezierHandle2), new SetValueHandler(SetBezierHandle2), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(121, "EasePercent", 194, -1, ExpressionRestriction.None, false, ValidateEasePercent, false, new GetValueHandler(GetEasePercent), new SetValueHandler(SetEasePercent), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(121, "TryParse", new short[2] { 208, 121 - }, 121, new InvokeHandler(InterpolationSchema.CallTryParseStringInterpolation), true); - InterpolationSchema.Type.Initialize(new DefaultConstructHandler(InterpolationSchema.Construct), null, new PropertySchema[5] + }, 121, new InvokeHandler(CallTryParseStringInterpolation), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] { uixPropertySchema3, uixPropertySchema4, @@ -187,7 +187,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(InterpolationSchema.TryConvertFrom), new SupportsTypeConversionHandler(InterpolationSchema.IsConversionSupported), new EncodeBinaryHandler(InterpolationSchema.EncodeBinary), new DecodeBinaryHandler(InterpolationSchema.DecodeBinary), null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs index cf55912..b0c7399 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InvAlphaSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new InvAlphaElement(); - public static void Pass1Initialize() => InvAlphaSchema.Type = new UIXTypeSchema(123, "InvAlpha", null, 80, typeof(InvAlphaElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(123, "InvAlpha", null, 80, typeof(InvAlphaElement), UIXTypeFlags.None); - public static void Pass2Initialize() => InvAlphaSchema.Type.Initialize(new DefaultConstructHandler(InvAlphaSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs index 4b49d63..e1df76a 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InvColorSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new InvColorElement(); - public static void Pass1Initialize() => InvColorSchema.Type = new UIXTypeSchema(124, "InvColor", null, 80, typeof(InvColorElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(124, "InvColor", null, 80, typeof(InvColorElement), UIXTypeFlags.None); - public static void Pass2Initialize() => InvColorSchema.Type.Initialize(new DefaultConstructHandler(InvColorSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs index 67ef829..38a6589 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/InvertSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new InvertElement(); - public static void Pass1Initialize() => InvertSchema.Type = new UIXTypeSchema(125, "Invert", null, 80, typeof(InvertElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(125, "Invert", null, 80, typeof(InvertElement), UIXTypeFlags.None); - public static void Pass2Initialize() => InvertSchema.Type.Initialize(new DefaultConstructHandler(InvertSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs index 6482ef9..3e6d720 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ItemAlignmentSchema.cs @@ -63,16 +63,16 @@ namespace Microsoft.Iris.Markup.UIX string[] strArray = str.Split(','); if (strArray.Length != 2) return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "ItemAlignment"); - Result alignment3 = ItemAlignmentSchema.ParseAlignment(strArray[0], out alignment1); + Result alignment3 = ParseAlignment(strArray[0], out alignment1); if (alignment3.Failed) return alignment3; - alignment3 = ItemAlignmentSchema.ParseAlignment(strArray[1], out alignment2); + alignment3 = ParseAlignment(strArray[1], out alignment2); if (alignment3.Failed) return alignment3; } else { - Result alignment3 = ItemAlignmentSchema.ParseAlignment(str, out alignment1); + Result alignment3 = ParseAlignment(str, out alignment1); if (alignment3.Failed) return alignment3; alignment2 = alignment1; @@ -93,7 +93,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = ItemAlignmentSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -105,7 +105,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; ItemAlignment parameter2 = (ItemAlignment)parameters[1]; object instanceObj1; - return ItemAlignmentSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static Result ParseAlignment(string value, out Alignment alignment) @@ -123,27 +123,27 @@ namespace Microsoft.Iris.Markup.UIX return Result.Success; } - public static void Pass1Initialize() => ItemAlignmentSchema.Type = new UIXTypeSchema(sbyte.MaxValue, "ItemAlignment", null, 153, typeof(ItemAlignment), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(sbyte.MaxValue, "ItemAlignment", null, 153, typeof(ItemAlignment), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(sbyte.MaxValue, "Horizontal", 3, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ItemAlignmentSchema.GetHorizontal), new SetValueHandler(ItemAlignmentSchema.SetHorizontal), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(sbyte.MaxValue, "Vertical", 3, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ItemAlignmentSchema.GetVertical), new SetValueHandler(ItemAlignmentSchema.SetVertical), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(sbyte.MaxValue, "Horizontal", 3, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHorizontal), new SetValueHandler(SetHorizontal), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(sbyte.MaxValue, "Vertical", 3, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetVertical), new SetValueHandler(SetVertical), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(sbyte.MaxValue, new short[1] { 3 - }, new ConstructHandler(ItemAlignmentSchema.ConstructAlignment)); + }, new ConstructHandler(ConstructAlignment)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(sbyte.MaxValue, new short[2] { 3, 3 - }, new ConstructHandler(ItemAlignmentSchema.ConstructAlignmentAlignment)); + }, new ConstructHandler(ConstructAlignmentAlignment)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(sbyte.MaxValue, "TryParse", new short[2] { 208, sbyte.MaxValue - }, sbyte.MaxValue, new InvokeHandler(ItemAlignmentSchema.CallTryParseStringItemAlignment), true); - ItemAlignmentSchema.Type.Initialize(new DefaultConstructHandler(ItemAlignmentSchema.Construct), new ConstructorSchema[2] + }, sbyte.MaxValue, new InvokeHandler(CallTryParseStringItemAlignment), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[2] { constructorSchema1, constructorSchema2 @@ -154,7 +154,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(ItemAlignmentSchema.TryConvertFrom), new SupportsTypeConversionHandler(ItemAlignmentSchema.IsConversionSupported), new EncodeBinaryHandler(ItemAlignmentSchema.EncodeBinary), new DecodeBinaryHandler(ItemAlignmentSchema.DecodeBinary), null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs index 3723823..377f8cd 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/KeyHandlerSchema.cs @@ -81,29 +81,29 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => KeyHandlerSchema.Type = new UIXTypeSchema(128, "KeyHandler", null, 110, typeof(KeyHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(128, "KeyHandler", null, 110, typeof(KeyHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(128, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetCommand), new SetValueHandler(KeyHandlerSchema.SetCommand), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(128, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetHandle), new SetValueHandler(KeyHandlerSchema.SetHandle), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(128, "StopRoute", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetStopRoute), new SetValueHandler(KeyHandlerSchema.SetStopRoute), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(128, "Key", 129, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetKey), new SetValueHandler(KeyHandlerSchema.SetKey), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(128, "HandlerTransition", 113, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetHandlerTransition), new SetValueHandler(KeyHandlerSchema.SetHandlerTransition), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(128, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetRequiredModifiers), new SetValueHandler(KeyHandlerSchema.SetRequiredModifiers), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(128, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetDisallowedModifiers), new SetValueHandler(KeyHandlerSchema.SetDisallowedModifiers), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(128, "Pressing", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetPressing), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(128, "Repeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetRepeat), new SetValueHandler(KeyHandlerSchema.SetRepeat), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(128, "TrackInvokedKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetTrackInvokedKeys), new SetValueHandler(KeyHandlerSchema.SetTrackInvokedKeys), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(128, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetHandlerStage), new SetValueHandler(KeyHandlerSchema.SetHandlerStage), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(128, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(KeyHandlerSchema.GetEventContext), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(128, "GetInvokedKeys", null, 138, new InvokeHandler(KeyHandlerSchema.CallGetInvokedKeys), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(128, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCommand), new SetValueHandler(SetCommand), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(128, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(128, "StopRoute", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStopRoute), new SetValueHandler(SetStopRoute), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(128, "Key", 129, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKey), new SetValueHandler(SetKey), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(128, "HandlerTransition", 113, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerTransition), new SetValueHandler(SetHandlerTransition), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(128, "RequiredModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRequiredModifiers), new SetValueHandler(SetRequiredModifiers), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(128, "DisallowedModifiers", 111, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisallowedModifiers), new SetValueHandler(SetDisallowedModifiers), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(128, "Pressing", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPressing), null, false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(128, "Repeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRepeat), new SetValueHandler(SetRepeat), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(128, "TrackInvokedKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTrackInvokedKeys), new SetValueHandler(SetTrackInvokedKeys), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(128, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(128, "EventContext", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEventContext), null, false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(128, "GetInvokedKeys", null, 138, new InvokeHandler(CallGetInvokedKeys), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(128, "GetInvokedKeys", new short[1] { 138 - }, 240, new InvokeHandler(KeyHandlerSchema.CallGetInvokedKeysList), false); + }, 240, new InvokeHandler(CallGetInvokedKeysList), false); UIXEventSchema uixEventSchema = new UIXEventSchema(128, "Invoked"); - KeyHandlerSchema.Type.Initialize(new DefaultConstructHandler(KeyHandlerSchema.Construct), null, new PropertySchema[12] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[12] { uixPropertySchema1, uixPropertySchema7, diff --git a/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs index b085569..777121a 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/KeyframeSchema.cs @@ -24,14 +24,14 @@ namespace Microsoft.Iris.Markup.UIX private static void SetInterpolation(ref object instanceObj, object valueObj) => ((BaseKeyframe)instanceObj).Interpolation = (Interpolation)valueObj; - public static void Pass1Initialize() => KeyframeSchema.Type = new UIXTypeSchema(130, "Keyframe", null, 153, typeof(BaseKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(130, "Keyframe", null, 153, typeof(BaseKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(130, "Time", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(KeyframeSchema.GetTime), new SetValueHandler(KeyframeSchema.SetTime), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(130, "RelativeTo", 171, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(KeyframeSchema.GetRelativeTo), new SetValueHandler(KeyframeSchema.SetRelativeTo), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(130, "Interpolation", 121, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(KeyframeSchema.GetInterpolation), new SetValueHandler(KeyframeSchema.SetInterpolation), false); - KeyframeSchema.Type.Initialize(null, null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(130, "Time", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTime), new SetValueHandler(SetTime), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(130, "RelativeTo", 171, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRelativeTo), new SetValueHandler(SetRelativeTo), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(130, "Interpolation", 121, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetInterpolation), new SetValueHandler(SetInterpolation), false); + Type.Initialize(null, null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs index 7449ffa..7dd7e60 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/LayoutInputSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => LayoutInputSchema.Type = new UIXTypeSchema(133, "LayoutInput", null, 153, typeof(ILayoutInput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(133, "LayoutInput", null, 153, typeof(ILayoutInput), UIXTypeFlags.None); - public static void Pass2Initialize() => LayoutInputSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs index a829eaf..4d19022 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/LayoutOutputSchema.cs @@ -14,12 +14,12 @@ namespace Microsoft.Iris.Markup.UIX private static object GetSize(object instanceObj) => ((LayoutOutput)instanceObj).Size; - public static void Pass1Initialize() => LayoutOutputSchema.Type = new UIXTypeSchema(134, "LayoutOutput", null, 153, typeof(LayoutOutput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(134, "LayoutOutput", null, 153, typeof(LayoutOutput), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(134, "Size", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(LayoutOutputSchema.GetSize), null, false); - LayoutOutputSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(134, "Size", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSize), null, false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs index 866738d..cc559e6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/LayoutSchema.cs @@ -22,7 +22,7 @@ namespace Microsoft.Iris.Markup.UIX string str = (string)valueObj; instanceObj = null; object obj; - if (!LayoutSchema.s_NameToLayoutMap.TryGetValue(str.ToLowerInvariant(), out obj)) + if (!s_NameToLayoutMap.TryGetValue(str.ToLowerInvariant(), out obj)) return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "Layout"); ILayout layout = (ILayout)obj; instanceObj = layout; @@ -40,7 +40,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = LayoutSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -52,34 +52,34 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; ILayout parameter2 = (ILayout)parameters[1]; object instanceObj1; - return LayoutSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } static LayoutSchema() { - LayoutSchema.s_NameToLayoutMap.Add("anchor", new AnchorLayout()); - LayoutSchema.s_NameToLayoutMap.Add("default", DefaultLayout.Instance); - LayoutSchema.s_NameToLayoutMap.Add("dock", new DockLayout()); - LayoutSchema.s_NameToLayoutMap.Add("grid", new GridLayout()); - LayoutSchema.s_NameToLayoutMap.Add("scale", new ScaleLayout()); - LayoutSchema.s_NameToLayoutMap.Add("popup", new PopupLayout()); - LayoutSchema.s_NameToLayoutMap.Add("stack", new StackLayout()); - LayoutSchema.s_NameToLayoutMap.Add("form", new AnchorLayout() + s_NameToLayoutMap.Add("anchor", new AnchorLayout()); + s_NameToLayoutMap.Add("default", DefaultLayout.Instance); + s_NameToLayoutMap.Add("dock", new DockLayout()); + s_NameToLayoutMap.Add("grid", new GridLayout()); + s_NameToLayoutMap.Add("scale", new ScaleLayout()); + s_NameToLayoutMap.Add("popup", new PopupLayout()); + s_NameToLayoutMap.Add("stack", new StackLayout()); + s_NameToLayoutMap.Add("form", new AnchorLayout() { SizeToHorizontalChildren = false, SizeToVerticalChildren = false }); - LayoutSchema.s_NameToLayoutMap.Add("horizontalflow", new FlowLayout() + s_NameToLayoutMap.Add("horizontalflow", new FlowLayout() { Orientation = Orientation.Horizontal }); - LayoutSchema.s_NameToLayoutMap.Add("verticalflow", new FlowLayout() + s_NameToLayoutMap.Add("verticalflow", new FlowLayout() { Orientation = Orientation.Vertical }); } - public static void Pass1Initialize() => LayoutSchema.Type = new UIXTypeSchema(132, "Layout", null, 153, typeof(ILayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(132, "Layout", null, 153, typeof(ILayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { @@ -87,11 +87,11 @@ namespace Microsoft.Iris.Markup.UIX { 208, 132 - }, 132, new InvokeHandler(LayoutSchema.CallTryParseStringLayout), true); - LayoutSchema.Type.Initialize(null, null, null, new MethodSchema[1] + }, 132, new InvokeHandler(CallTryParseStringLayout), true); + Type.Initialize(null, null, null, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(LayoutSchema.TryConvertFrom), new SupportsTypeConversionHandler(LayoutSchema.IsConversionSupported), null, null, null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs index 932273c..f19c62f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/LightShaftInstanceSchema.cs @@ -74,41 +74,41 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => LightShaftInstanceSchema.Type = new UIXTypeSchema(136, "LightShaftInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(136, "LightShaftInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(136, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(LightShaftInstanceSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(136, "Decay", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(LightShaftInstanceSchema.SetDecay), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(136, "Density", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(LightShaftInstanceSchema.SetDensity), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(136, "FallOff", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(LightShaftInstanceSchema.SetFallOff), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(136, "Intensity", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(LightShaftInstanceSchema.SetIntensity), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(136, "Weight", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(LightShaftInstanceSchema.SetWeight), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(136, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(136, "Decay", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDecay), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(136, "Density", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDensity), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(136, "FallOff", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetFallOff), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(136, "Intensity", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetIntensity), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(136, "Weight", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetWeight), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(136, "PlayPositionAnimation", new short[1] { 81 - }, 240, new InvokeHandler(LightShaftInstanceSchema.CallPlayPositionAnimationEffectVector3Animation), false); + }, 240, new InvokeHandler(CallPlayPositionAnimationEffectVector3Animation), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(136, "PlayDecayAnimation", new short[1] { 75 - }, 240, new InvokeHandler(LightShaftInstanceSchema.CallPlayDecayAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayDecayAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(136, "PlayDensityAnimation", new short[1] { 75 - }, 240, new InvokeHandler(LightShaftInstanceSchema.CallPlayDensityAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayDensityAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(136, "PlayIntensityAnimation", new short[1] { 75 - }, 240, new InvokeHandler(LightShaftInstanceSchema.CallPlayIntensityAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayIntensityAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(136, "PlayFallOffAnimation", new short[1] { 75 - }, 240, new InvokeHandler(LightShaftInstanceSchema.CallPlayFallOffAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayFallOffAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(136, "PlayWeightAnimation", new short[1] { 75 - }, 240, new InvokeHandler(LightShaftInstanceSchema.CallPlayWeightAnimationEffectFloatAnimation), false); - LightShaftInstanceSchema.Type.Initialize(null, null, new PropertySchema[6] + }, 240, new InvokeHandler(CallPlayWeightAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[6] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs index 43217da..e6fd674 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/LightShaftSchema.cs @@ -85,17 +85,17 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new LightShaftElement(); - public static void Pass1Initialize() => LightShaftSchema.Type = new UIXTypeSchema(135, "LightShaft", null, 80, typeof(LightShaftElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(135, "LightShaft", null, 80, typeof(LightShaftElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(135, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(LightShaftSchema.GetPosition), new SetValueHandler(LightShaftSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(135, "Decay", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(LightShaftSchema.GetDecay), new SetValueHandler(LightShaftSchema.SetDecay), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(135, "Density", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(LightShaftSchema.GetDensity), new SetValueHandler(LightShaftSchema.SetDensity), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(135, "Intensity", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(LightShaftSchema.GetIntensity), new SetValueHandler(LightShaftSchema.SetIntensity), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(135, "FallOff", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(LightShaftSchema.GetFallOff), new SetValueHandler(LightShaftSchema.SetFallOff), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(135, "Weight", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(LightShaftSchema.GetWeight), new SetValueHandler(LightShaftSchema.SetWeight), false); - LightShaftSchema.Type.Initialize(new DefaultConstructHandler(LightShaftSchema.Construct), null, new PropertySchema[6] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(135, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(135, "Decay", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDecay), new SetValueHandler(SetDecay), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(135, "Density", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetDensity), new SetValueHandler(SetDensity), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(135, "Intensity", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetIntensity), new SetValueHandler(SetIntensity), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(135, "FallOff", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, false, new GetValueHandler(GetFallOff), new SetValueHandler(SetFallOff), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(135, "Weight", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetWeight), new SetValueHandler(SetWeight), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs index f3817c3..162276e 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ListSchema.cs @@ -143,63 +143,63 @@ namespace Microsoft.Iris.Markup.UIX private static object CallGetEnumerator(object instanceObj, object[] parameters) => ((IEnumerable)instanceObj).GetEnumerator(); - public static void Pass1Initialize() => ListSchema.Type = new UIXTypeSchema(138, "List", null, 153, typeof(IList), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(138, "List", null, 153, typeof(IList), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(138, "Count", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ListSchema.GetCount), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(138, "Source", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ListSchema.GetSource), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(138, "CanSearch", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ListSchema.GetCanSearch), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(138, "Count", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCount), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(138, "Source", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(138, "CanSearch", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCanSearch), null, false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(138, "IsNullOrEmpty", new short[1] { 138 - }, 15, new InvokeHandler(ListSchema.CallIsNullOrEmptyList), true); + }, 15, new InvokeHandler(CallIsNullOrEmptyList), true); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(138, "get_Item", new short[1] { 115 - }, 153, new InvokeHandler(ListSchema.Callget_ItemInt32), false); + }, 153, new InvokeHandler(Callget_ItemInt32), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(138, "set_Item", new short[2] { 115, 153 - }, 240, new InvokeHandler(ListSchema.Callset_ItemInt32Object), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(138, "Clear", null, 240, new InvokeHandler(ListSchema.CallClear), false); + }, 240, new InvokeHandler(Callset_ItemInt32Object), false); + UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(138, "Clear", null, 240, new InvokeHandler(CallClear), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(138, "Add", new short[1] { 153 - }, 240, new InvokeHandler(ListSchema.CallAddObject), false); + }, 240, new InvokeHandler(CallAddObject), false); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(138, "Remove", new short[1] { 153 - }, 240, new InvokeHandler(ListSchema.CallRemoveObject), false); + }, 240, new InvokeHandler(CallRemoveObject), false); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(138, "Contains", new short[1] { 153 - }, 15, new InvokeHandler(ListSchema.CallContainsObject), false); + }, 15, new InvokeHandler(CallContainsObject), false); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(138, "IndexOf", new short[1] { 153 - }, 115, new InvokeHandler(ListSchema.CallIndexOfObject), false); + }, 115, new InvokeHandler(CallIndexOfObject), false); UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(138, "Insert", new short[2] { 115, 153 - }, 240, new InvokeHandler(ListSchema.CallInsertInt32Object), false); + }, 240, new InvokeHandler(CallInsertInt32Object), false); UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(138, "RemoveAt", new short[1] { 115 - }, 240, new InvokeHandler(ListSchema.CallRemoveAtInt32), false); + }, 240, new InvokeHandler(CallRemoveAtInt32), false); UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(138, "SearchForString", new short[1] { 208 - }, 115, new InvokeHandler(ListSchema.CallSearchForStringString), false); + }, 115, new InvokeHandler(CallSearchForStringString), false); UIXMethodSchema uixMethodSchema12 = new UIXMethodSchema(138, "Move", new short[2] { 115, 115 - }, 240, new InvokeHandler(ListSchema.CallMoveInt32Int32), false); - UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(138, "GetEnumerator", null, 86, new InvokeHandler(ListSchema.CallGetEnumerator), false); - ListSchema.Type.Initialize(new DefaultConstructHandler(ListSchema.Construct), null, new PropertySchema[3] + }, 240, new InvokeHandler(CallMoveInt32Int32), false); + UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(138, "GetEnumerator", null, 86, new InvokeHandler(CallGetEnumerator), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs index 59ff67f..902f090 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MajorMinorSchema.cs @@ -38,9 +38,9 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructMajorMinor(object[] parameters) { - object instanceObj = MajorMinorSchema.Construct(); - MajorMinorSchema.SetMajor(ref instanceObj, parameters[0]); - MajorMinorSchema.SetMinor(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetMajor(ref instanceObj, parameters[0]); + SetMinor(ref instanceObj, parameters[1]); return instanceObj; } @@ -48,17 +48,17 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = MajorMinorSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "MajorMinor", result1.Error); - MajorMinorSchema.SetMajor(ref instance, valueObj1); + SetMajor(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "MajorMinor", result2.Error); - MajorMinorSchema.SetMinor(ref instance, valueObj2); + SetMinor(ref instance, valueObj2); return result2; } @@ -85,7 +85,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = MajorMinorSchema.ConvertFromStringMajorMinor(splitString, out instance); + result = ConvertFromStringMajorMinor(splitString, out instance); if (!result.Failed) return result; } @@ -95,25 +95,25 @@ namespace Microsoft.Iris.Markup.UIX return result; } - public static void Pass1Initialize() => MajorMinorSchema.Type = new UIXTypeSchema(139, "MajorMinor", null, 153, typeof(MajorMinor), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(139, "MajorMinor", null, 153, typeof(MajorMinor), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(139, "Major", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MajorMinorSchema.GetMajor), new SetValueHandler(MajorMinorSchema.SetMajor), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(139, "Minor", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MajorMinorSchema.GetMinor), new SetValueHandler(MajorMinorSchema.SetMinor), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(139, "Major", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMajor), new SetValueHandler(SetMajor), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(139, "Minor", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinor), new SetValueHandler(SetMinor), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(139, new short[2] { 115, 115 - }, new ConstructHandler(MajorMinorSchema.ConstructMajorMinor)); - MajorMinorSchema.Type.Initialize(new DefaultConstructHandler(MajorMinorSchema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructMajorMinor)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(MajorMinorSchema.TryConvertFrom), new SupportsTypeConversionHandler(MajorMinorSchema.IsConversionSupported), new EncodeBinaryHandler(MajorMinorSchema.EncodeBinary), new DecodeBinaryHandler(MajorMinorSchema.DecodeBinary), null, null); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs index 8c4c287..374c291 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MappingSchema.cs @@ -28,15 +28,15 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new object(); - public static void Pass1Initialize() => MappingSchema.Type = new UIXTypeSchema(140, "Mapping", null, -1, typeof(object), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(140, "Mapping", null, -1, typeof(object), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(140, "Property", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(MappingSchema.SetProperty), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(140, "Source", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(MappingSchema.SetSource), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(140, "Target", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(MappingSchema.SetTarget), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(140, "DefaultValue", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(MappingSchema.SetDefaultValue), false); - MappingSchema.Type.Initialize(new DefaultConstructHandler(MappingSchema.Construct), null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(140, "Property", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetProperty), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(140, "Source", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetSource), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(140, "Target", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetTarget), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(140, "DefaultValue", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetDefaultValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema4, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs index 44e5930..b2f441b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MarkupDataQueryInstanceSchema.cs @@ -24,15 +24,15 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => MarkupDataQueryInstanceSchema.Type = new UIXTypeSchema(142, "MarkupDataQueryInstance", null, 153, typeof(MarkupDataQuery), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(142, "MarkupDataQueryInstance", null, 153, typeof(MarkupDataQuery), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(142, "Status", 47, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(MarkupDataQueryInstanceSchema.GetStatus), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(142, "Result", 143, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(MarkupDataQueryInstanceSchema.GetResult), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(142, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(MarkupDataQueryInstanceSchema.GetEnabled), new SetValueHandler(MarkupDataQueryInstanceSchema.SetEnabled), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(142, "Refresh", null, 240, new InvokeHandler(MarkupDataQueryInstanceSchema.CallRefresh), false); - MarkupDataQueryInstanceSchema.Type.Initialize(null, null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(142, "Status", 47, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStatus), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(142, "Result", 143, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetResult), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(142, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(142, "Refresh", null, 240, new InvokeHandler(CallRefresh), false); + Type.Initialize(null, null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs index b0564ce..445cc02 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MarkupDataTypeInstanceSchema.cs @@ -10,8 +10,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => MarkupDataTypeInstanceSchema.Type = new UIXTypeSchema(143, "MarkupDataTypeInstance", null, 153, typeof(MarkupDataType), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(143, "MarkupDataTypeInstance", null, 153, typeof(MarkupDataType), UIXTypeFlags.Disposable); - public static void Pass2Initialize() => MarkupDataTypeInstanceSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs index 041ced5..a319111 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MarkupErrorSchema.cs @@ -22,17 +22,17 @@ namespace Microsoft.Iris.Markup.UIX private static object GetIsError(object instanceObj) => BooleanBoxes.Box(((MarkupError)instanceObj).IsError); - public static void Pass1Initialize() => MarkupErrorSchema.Type = new UIXTypeSchema(144, "MarkupError", null, 153, typeof(MarkupError), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(144, "MarkupError", null, 153, typeof(MarkupError), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(144, "Context", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupErrorSchema.GetContext), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(144, "Message", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupErrorSchema.GetMessage), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(144, "Uri", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupErrorSchema.GetUri), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(144, "Line", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupErrorSchema.GetLine), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(144, "Column", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupErrorSchema.GetColumn), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(144, "IsError", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupErrorSchema.GetIsError), null, false); - MarkupErrorSchema.Type.Initialize(null, null, new PropertySchema[6] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(144, "Context", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContext), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(144, "Message", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMessage), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(144, "Uri", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetUri), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(144, "Line", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLine), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(144, "Column", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetColumn), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(144, "IsError", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetIsError), null, false); + Type.Initialize(null, null, new PropertySchema[6] { uixPropertySchema5, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs index 6d3b7e8..13b8f7b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MarkupSchema.cs @@ -30,19 +30,19 @@ namespace Microsoft.Iris.Markup.UIX return parameter == null ? true : BooleanBoxes.Box(parameter is IDisposableObject disposableObject && disposableObject.IsDisposed); } - public static void Pass1Initialize() => MarkupSchema.Type = new UIXTypeSchema(141, "Markup", null, 153, typeof(MarkupServices), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(141, "Markup", null, 153, typeof(MarkupServices), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(141, "Errors", 138, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupSchema.GetErrors), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(141, "WarningsOnly", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MarkupSchema.GetWarningsOnly), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(141, "ClearErrors", null, 240, new InvokeHandler(MarkupSchema.CallClearErrors), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(141, "Errors", 138, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetErrors), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(141, "WarningsOnly", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWarningsOnly), null, false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(141, "ClearErrors", null, 240, new InvokeHandler(CallClearErrors), false); UIXEventSchema uixEventSchema = new UIXEventSchema(141, "ErrorsDetected"); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(141, "IsDisposed", new short[1] { 153 - }, 15, new InvokeHandler(MarkupSchema.CallIsDisposedObject), true); - MarkupSchema.Type.Initialize(new DefaultConstructHandler(MarkupSchema.Construct), null, new PropertySchema[2] + }, 15, new InvokeHandler(CallIsDisposedObject), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs index d88e6f6..0d4a5fd 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MathSchema.cs @@ -117,7 +117,7 @@ namespace Microsoft.Iris.Markup.UIX private static object CallLog10Double(object instanceObj, object[] parameters) => Math.Log10((double)parameters[0]); - public static void Pass1Initialize() => MathSchema.Type = new UIXTypeSchema(145, "Math", null, 153, typeof(object), UIXTypeFlags.Static); + public static void Pass1Initialize() => Type = new UIXTypeSchema(145, "Math", null, 153, typeof(object), UIXTypeFlags.Static); public static void Pass2Initialize() { @@ -125,132 +125,132 @@ namespace Microsoft.Iris.Markup.UIX { 115, 115 - }, 115, new InvokeHandler(MathSchema.CallMinInt32Int32), true); + }, 115, new InvokeHandler(CallMinInt32Int32), true); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(145, "Min", new short[2] { 194, 194 - }, 194, new InvokeHandler(MathSchema.CallMinSingleSingle), true); + }, 194, new InvokeHandler(CallMinSingleSingle), true); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(145, "Min", new short[2] { 61, 61 - }, 61, new InvokeHandler(MathSchema.CallMinDoubleDouble), true); + }, 61, new InvokeHandler(CallMinDoubleDouble), true); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(145, "Max", new short[2] { 115, 115 - }, 115, new InvokeHandler(MathSchema.CallMaxInt32Int32), true); + }, 115, new InvokeHandler(CallMaxInt32Int32), true); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(145, "Max", new short[2] { 194, 194 - }, 194, new InvokeHandler(MathSchema.CallMaxSingleSingle), true); + }, 194, new InvokeHandler(CallMaxSingleSingle), true); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(145, "Max", new short[2] { 61, 61 - }, 61, new InvokeHandler(MathSchema.CallMaxDoubleDouble), true); + }, 61, new InvokeHandler(CallMaxDoubleDouble), true); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(145, "Abs", new short[1] { 115 - }, 115, new InvokeHandler(MathSchema.CallAbsInt32), true); + }, 115, new InvokeHandler(CallAbsInt32), true); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(145, "Abs", new short[1] { 194 - }, 194, new InvokeHandler(MathSchema.CallAbsSingle), true); + }, 194, new InvokeHandler(CallAbsSingle), true); UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(145, "Abs", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallAbsDouble), true); + }, 61, new InvokeHandler(CallAbsDouble), true); UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(145, "Round", new short[1] { 194 - }, 194, new InvokeHandler(MathSchema.CallRoundSingle), true); + }, 194, new InvokeHandler(CallRoundSingle), true); UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(145, "Round", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallRoundDouble), true); + }, 61, new InvokeHandler(CallRoundDouble), true); UIXMethodSchema uixMethodSchema12 = new UIXMethodSchema(145, "Floor", new short[1] { 194 - }, 194, new InvokeHandler(MathSchema.CallFloorSingle), true); + }, 194, new InvokeHandler(CallFloorSingle), true); UIXMethodSchema uixMethodSchema13 = new UIXMethodSchema(145, "Floor", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallFloorDouble), true); + }, 61, new InvokeHandler(CallFloorDouble), true); UIXMethodSchema uixMethodSchema14 = new UIXMethodSchema(145, "Ceiling", new short[1] { 194 - }, 194, new InvokeHandler(MathSchema.CallCeilingSingle), true); + }, 194, new InvokeHandler(CallCeilingSingle), true); UIXMethodSchema uixMethodSchema15 = new UIXMethodSchema(145, "Ceiling", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallCeilingDouble), true); + }, 61, new InvokeHandler(CallCeilingDouble), true); UIXMethodSchema uixMethodSchema16 = new UIXMethodSchema(145, "Acos", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallAcosDouble), true); + }, 61, new InvokeHandler(CallAcosDouble), true); UIXMethodSchema uixMethodSchema17 = new UIXMethodSchema(145, "Asin", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallAsinDouble), true); + }, 61, new InvokeHandler(CallAsinDouble), true); UIXMethodSchema uixMethodSchema18 = new UIXMethodSchema(145, "Atan", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallAtanDouble), true); + }, 61, new InvokeHandler(CallAtanDouble), true); UIXMethodSchema uixMethodSchema19 = new UIXMethodSchema(145, "Atan2", new short[2] { 61, 61 - }, 61, new InvokeHandler(MathSchema.CallAtan2DoubleDouble), true); + }, 61, new InvokeHandler(CallAtan2DoubleDouble), true); UIXMethodSchema uixMethodSchema20 = new UIXMethodSchema(145, "Cos", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallCosDouble), true); + }, 61, new InvokeHandler(CallCosDouble), true); UIXMethodSchema uixMethodSchema21 = new UIXMethodSchema(145, "Cosh", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallCoshDouble), true); + }, 61, new InvokeHandler(CallCoshDouble), true); UIXMethodSchema uixMethodSchema22 = new UIXMethodSchema(145, "Sin", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallSinDouble), true); + }, 61, new InvokeHandler(CallSinDouble), true); UIXMethodSchema uixMethodSchema23 = new UIXMethodSchema(145, "Sinh", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallSinhDouble), true); + }, 61, new InvokeHandler(CallSinhDouble), true); UIXMethodSchema uixMethodSchema24 = new UIXMethodSchema(145, "Tan", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallTanDouble), true); + }, 61, new InvokeHandler(CallTanDouble), true); UIXMethodSchema uixMethodSchema25 = new UIXMethodSchema(145, "Tanh", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallTanhDouble), true); + }, 61, new InvokeHandler(CallTanhDouble), true); UIXMethodSchema uixMethodSchema26 = new UIXMethodSchema(145, "Sqrt", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallSqrtDouble), true); + }, 61, new InvokeHandler(CallSqrtDouble), true); UIXMethodSchema uixMethodSchema27 = new UIXMethodSchema(145, "Pow", new short[2] { 61, 61 - }, 61, new InvokeHandler(MathSchema.CallPowDoubleDouble), true); + }, 61, new InvokeHandler(CallPowDoubleDouble), true); UIXMethodSchema uixMethodSchema28 = new UIXMethodSchema(145, "Log", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallLogDouble), true); + }, 61, new InvokeHandler(CallLogDouble), true); UIXMethodSchema uixMethodSchema29 = new UIXMethodSchema(145, "Log", new short[2] { 61, 61 - }, 61, new InvokeHandler(MathSchema.CallLogDoubleDouble), true); + }, 61, new InvokeHandler(CallLogDoubleDouble), true); UIXMethodSchema uixMethodSchema30 = new UIXMethodSchema(145, "Log10", new short[1] { 61 - }, 61, new InvokeHandler(MathSchema.CallLog10Double), true); - MathSchema.Type.Initialize(null, null, null, new MethodSchema[30] + }, 61, new InvokeHandler(CallLog10Double), true); + Type.Initialize(null, null, null, new MethodSchema[30] { uixMethodSchema1, uixMethodSchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs index f702882..55c96d6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MergeAnimationSchema.cs @@ -20,13 +20,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new MergeAnimation(); - public static void Pass1Initialize() => MergeAnimationSchema.Type = new UIXTypeSchema(147, "MergeAnimation", null, 104, typeof(MergeAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(147, "MergeAnimation", null, 104, typeof(MergeAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(147, "Sources", 138, 104, ExpressionRestriction.NoAccess, false, null, false, new GetValueHandler(MergeAnimationSchema.GetSources), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(147, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(MergeAnimationSchema.GetType), new SetValueHandler(MergeAnimationSchema.SetType), false); - MergeAnimationSchema.Type.Initialize(new DefaultConstructHandler(MergeAnimationSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(147, "Sources", 138, 104, ExpressionRestriction.NoAccess, false, null, false, new GetValueHandler(GetSources), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(147, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs index f5e766a..92e087c 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/MouseWheelHandlerSchema.cs @@ -23,15 +23,15 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new MouseWheelHandler(); - public static void Pass1Initialize() => MouseWheelHandlerSchema.Type = new UIXTypeSchema(150, "MouseWheelHandler", null, 110, typeof(MouseWheelHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(150, "MouseWheelHandler", null, 110, typeof(MouseWheelHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(150, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(MouseWheelHandlerSchema.GetHandle), new SetValueHandler(MouseWheelHandlerSchema.SetHandle), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(150, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(MouseWheelHandlerSchema.GetHandlerStage), new SetValueHandler(MouseWheelHandlerSchema.SetHandlerStage), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(150, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(150, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); UIXEventSchema uixEventSchema1 = new UIXEventSchema(150, "UpInvoked"); UIXEventSchema uixEventSchema2 = new UIXEventSchema(150, "DownInvoked"); - MouseWheelHandlerSchema.Type.Initialize(new DefaultConstructHandler(MouseWheelHandlerSchema.Construct), null, new PropertySchema[2] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 diff --git a/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs index 9c1fc29..6d953ae 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/NullSchema.cs @@ -37,8 +37,8 @@ namespace Microsoft.Iris.Markup.UIX } } - public static void Pass1Initialize() => NullSchema.Type = new UIXTypeSchema(152, "Null", null, -1, typeof(object), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(152, "Null", null, -1, typeof(object), UIXTypeFlags.None); - public static void Pass2Initialize() => NullSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, new PerformOperationHandler(NullSchema.ExecuteOperation), new SupportsOperationHandler(NullSchema.IsOperationSupported)); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs index 76ecdfe..d0fba29 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ObjectSchema.cs @@ -31,23 +31,23 @@ namespace Microsoft.Iris.Markup.UIX switch (op) { case OperationType.RelationalEquals: - return BooleanBoxes.Box(object.Equals(objA, objB)); + return BooleanBoxes.Box(Equals(objA, objB)); case OperationType.RelationalNotEquals: - return BooleanBoxes.Box(!object.Equals(objA, objB)); + return BooleanBoxes.Box(!Equals(objA, objB)); default: return null; } } - public static void Pass1Initialize() => ObjectSchema.Type = new UIXTypeSchema(153, "Object", "object", -1, typeof(object), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(153, "Object", "object", -1, typeof(object), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(153, "ToString", null, 208, new InvokeHandler(ObjectSchema.CallToString), false); - ObjectSchema.Type.Initialize(null, null, null, new MethodSchema[1] + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(153, "ToString", null, 208, new InvokeHandler(CallToString), false); + Type.Initialize(null, null, null, new MethodSchema[1] { uixMethodSchema - }, null, null, null, null, null, null, new PerformOperationHandler(ObjectSchema.ExecuteOperation), new SupportsOperationHandler(ObjectSchema.IsOperationSupported)); + }, null, null, null, null, null, null, new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs index 2f08e0b..ad7ff37 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/OrientationKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new OrientationKeyframe(); - public static void Pass1Initialize() => OrientationKeyframeSchema.Type = new UIXTypeSchema(155, "OrientationKeyframe", null, 130, typeof(OrientationKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(155, "OrientationKeyframe", null, 130, typeof(OrientationKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(155, "Value", 176, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(OrientationKeyframeSchema.GetValue), new SetValueHandler(OrientationKeyframeSchema.SetValue), false); - OrientationKeyframeSchema.Type.Initialize(new DefaultConstructHandler(OrientationKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(155, "Value", 176, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs index 2274ca1..feea457 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PanelSchema.cs @@ -17,12 +17,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Panel(); - public static void Pass1Initialize() => PanelSchema.Type = new UIXTypeSchema(156, "Panel", null, 239, typeof(Panel), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(156, "Panel", null, 239, typeof(Panel), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(156, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(PanelSchema.GetChildren), null, false); - PanelSchema.Type.Initialize(new DefaultConstructHandler(PanelSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(156, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs index 6f962b2..cf3d0d9 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PlacementModeSchema.cs @@ -36,14 +36,14 @@ namespace Microsoft.Iris.Markup.UIX { string str = (string)valueObj; instanceObj = null; - PlacementMode instance = PlacementModeSchema.StringToInstance(str); + PlacementMode instance = StringToInstance(str); if (instance == null) return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "PlacementMode"); instanceObj = instance; return Result.Success; } - private static object FindCanonicalInstance(string name) => PlacementModeSchema.StringToInstance(name); + private static object FindCanonicalInstance(string name) => StringToInstance(name); private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); @@ -56,7 +56,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = PlacementModeSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -68,7 +68,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; PlacementMode parameter2 = (PlacementMode)parameters[1]; object instanceObj1; - return PlacementModeSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static PlacementMode StringToInstance(string value) @@ -94,25 +94,25 @@ namespace Microsoft.Iris.Markup.UIX return value == "FollowMouseBottom" ? PlacementMode.FollowMouseBottom : null; } - public static void Pass1Initialize() => PlacementModeSchema.Type = new UIXTypeSchema(157, "PlacementMode", null, 153, typeof(PlacementMode), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(157, "PlacementMode", null, 153, typeof(PlacementMode), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(157, "PopupPositions", 138, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PlacementModeSchema.GetPopupPositions), new SetValueHandler(PlacementModeSchema.SetPopupPositions), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(157, "MouseTarget", 149, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PlacementModeSchema.GetMouseTarget), new SetValueHandler(PlacementModeSchema.SetMouseTarget), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(157, "PopupPositions", 138, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPopupPositions), new SetValueHandler(SetPopupPositions), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(157, "MouseTarget", 149, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMouseTarget), new SetValueHandler(SetMouseTarget), false); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(157, "TryParse", new short[2] { 208, 157 - }, 157, new InvokeHandler(PlacementModeSchema.CallTryParseStringPlacementMode), true); - PlacementModeSchema.Type.Initialize(new DefaultConstructHandler(PlacementModeSchema.Construct), null, new PropertySchema[2] + }, 157, new InvokeHandler(CallTryParseStringPlacementMode), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 }, new MethodSchema[1] { uixMethodSchema - }, null, new FindCanonicalInstanceHandler(PlacementModeSchema.FindCanonicalInstance), new TypeConverterHandler(PlacementModeSchema.TryConvertFrom), new SupportsTypeConversionHandler(PlacementModeSchema.IsConversionSupported), null, null, null, null); + }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs index c59dccb..7d629c6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PointLight2DInstanceSchema.cs @@ -65,36 +65,36 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => PointLight2DInstanceSchema.Type = new UIXTypeSchema(160, "PointLight2DInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(160, "PointLight2DInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(160, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DInstanceSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(160, "Radius", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DInstanceSchema.SetRadius), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(160, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DInstanceSchema.SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(160, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DInstanceSchema.SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(160, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DInstanceSchema.SetAttenuation), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(160, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(160, "Radius", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetRadius), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(160, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(160, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(160, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAttenuation), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(160, "PlayPositionAnimation", new short[1] { 81 - }, 240, new InvokeHandler(PointLight2DInstanceSchema.CallPlayPositionAnimationEffectVector3Animation), false); + }, 240, new InvokeHandler(CallPlayPositionAnimationEffectVector3Animation), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(160, "PlayRadiusAnimation", new short[1] { 75 - }, 240, new InvokeHandler(PointLight2DInstanceSchema.CallPlayRadiusAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayRadiusAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(160, "PlayLightColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(PointLight2DInstanceSchema.CallPlayLightColorAnimationEffectColorAnimation), false); + }, 240, new InvokeHandler(CallPlayLightColorAnimationEffectColorAnimation), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(160, "PlayAmbientColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(PointLight2DInstanceSchema.CallPlayAmbientColorAnimationEffectColorAnimation), false); + }, 240, new InvokeHandler(CallPlayAmbientColorAnimationEffectColorAnimation), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(160, "PlayAttenuationAnimation", new short[1] { 81 - }, 240, new InvokeHandler(PointLight2DInstanceSchema.CallPlayAttenuationAnimationEffectVector3Animation), false); - PointLight2DInstanceSchema.Type.Initialize(null, null, new PropertySchema[5] + }, 240, new InvokeHandler(CallPlayAttenuationAnimationEffectVector3Animation), false); + Type.Initialize(null, null, new PropertySchema[5] { uixPropertySchema4, uixPropertySchema5, diff --git a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs index 1d1340b..2839180 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PointLight2DSchema.cs @@ -42,16 +42,16 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PointLight2DElement(); - public static void Pass1Initialize() => PointLight2DSchema.Type = new UIXTypeSchema(159, "PointLight2D", null, 77, typeof(PointLight2DElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(159, "PointLight2D", null, 77, typeof(PointLight2DElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(159, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PointLight2DSchema.GetPosition), new SetValueHandler(PointLight2DSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(159, "Radius", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(PointLight2DSchema.GetRadius), new SetValueHandler(PointLight2DSchema.SetRadius), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(159, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DSchema.SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(159, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(PointLight2DSchema.SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(159, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PointLight2DSchema.GetAttenuation), new SetValueHandler(PointLight2DSchema.SetAttenuation), false); - PointLight2DSchema.Type.Initialize(new DefaultConstructHandler(PointLight2DSchema.Construct), null, new PropertySchema[5] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(159, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(159, "Radius", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetRadius), new SetValueHandler(SetRadius), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(159, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(159, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(159, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttenuation), new SetValueHandler(SetAttenuation), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] { uixPropertySchema4, uixPropertySchema5, diff --git a/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs index 57ba873..ffc8220 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PointSchema.cs @@ -38,25 +38,25 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructXY(object[] parameters) { - object instanceObj = PointSchema.Construct(); - PointSchema.SetX(ref instanceObj, parameters[0]); - PointSchema.SetY(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetX(ref instanceObj, parameters[0]); + SetY(ref instanceObj, parameters[1]); return instanceObj; } private static Result ConvertFromStringXY(string[] splitString, out object instance) { - instance = PointSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Point", result1.Error); - PointSchema.SetX(ref instance, valueObj1); + SetX(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Point", result2.Error); - PointSchema.SetY(ref instance, valueObj2); + SetY(ref instance, valueObj2); return result2; } @@ -83,7 +83,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = PointSchema.ConvertFromStringXY(splitString, out instance); + result = ConvertFromStringXY(splitString, out instance); if (!result.Failed) return result; } @@ -129,25 +129,25 @@ namespace Microsoft.Iris.Markup.UIX } } - public static void Pass1Initialize() => PointSchema.Type = new UIXTypeSchema(158, "Point", null, 153, typeof(Point), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(158, "Point", null, 153, typeof(Point), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(158, "X", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PointSchema.GetX), new SetValueHandler(PointSchema.SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(158, "Y", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PointSchema.GetY), new SetValueHandler(PointSchema.SetY), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(158, "X", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(158, "Y", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(158, new short[2] { 115, 115 - }, new ConstructHandler(PointSchema.ConstructXY)); - PointSchema.Type.Initialize(new DefaultConstructHandler(PointSchema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructXY)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[2] { uixPropertySchema1, uixPropertySchema2 - }, null, null, null, new TypeConverterHandler(PointSchema.TryConvertFrom), new SupportsTypeConversionHandler(PointSchema.IsConversionSupported), new EncodeBinaryHandler(PointSchema.EncodeBinary), new DecodeBinaryHandler(PointSchema.DecodeBinary), new PerformOperationHandler(PointSchema.ExecuteOperation), new SupportsOperationHandler(PointSchema.IsOperationSupported)); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs index 6c2fbdb..6ecbd9f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutInputSchema.cs @@ -44,19 +44,19 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PopupLayoutInput(); - public static void Pass1Initialize() => PopupLayoutInputSchema.Type = new UIXTypeSchema(162, "PopupLayoutInput", null, 133, typeof(PopupLayoutInput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(162, "PopupLayoutInput", null, 133, typeof(PopupLayoutInput), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(162, "PlacementTarget", 239, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupLayoutInputSchema.GetPlacementTarget), new SetValueHandler(PopupLayoutInputSchema.SetPlacementTarget), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(162, "Placement", 157, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupLayoutInputSchema.GetPlacement), new SetValueHandler(PopupLayoutInputSchema.SetPlacement), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(162, "Offset", 158, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupLayoutInputSchema.GetOffset), new SetValueHandler(PopupLayoutInputSchema.SetOffset), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(162, "StayInBounds", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupLayoutInputSchema.GetStayInBounds), new SetValueHandler(PopupLayoutInputSchema.SetStayInBounds), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(162, "RespectMenuDropAlignment", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupLayoutInputSchema.GetRespectMenuDropAlignment), new SetValueHandler(PopupLayoutInputSchema.SetRespectMenuDropAlignment), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(162, "ConstrainToTarget", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupLayoutInputSchema.GetConstrainToTarget), new SetValueHandler(PopupLayoutInputSchema.SetConstrainToTarget), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(162, "FlippedHorizontally", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(PopupLayoutInputSchema.GetFlippedHorizontally), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(162, "FlippedVertically", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(PopupLayoutInputSchema.GetFlippedVertically), null, false); - PopupLayoutInputSchema.Type.Initialize(new DefaultConstructHandler(PopupLayoutInputSchema.Construct), null, new PropertySchema[8] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(162, "PlacementTarget", 239, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPlacementTarget), new SetValueHandler(SetPlacementTarget), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(162, "Placement", 157, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPlacement), new SetValueHandler(SetPlacement), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(162, "Offset", 158, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOffset), new SetValueHandler(SetOffset), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(162, "StayInBounds", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetStayInBounds), new SetValueHandler(SetStayInBounds), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(162, "RespectMenuDropAlignment", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRespectMenuDropAlignment), new SetValueHandler(SetRespectMenuDropAlignment), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(162, "ConstrainToTarget", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetConstrainToTarget), new SetValueHandler(SetConstrainToTarget), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(162, "FlippedHorizontally", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFlippedHorizontally), null, false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(162, "FlippedVertically", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFlippedVertically), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema6, uixPropertySchema7, diff --git a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs index 1056764..b5fb5ef 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PopupLayoutSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PopupLayout(); - public static void Pass1Initialize() => PopupLayoutSchema.Type = new UIXTypeSchema(161, "PopupLayout", null, 132, typeof(PopupLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(161, "PopupLayout", null, 132, typeof(PopupLayout), UIXTypeFlags.Immutable); - public static void Pass2Initialize() => PopupLayoutSchema.Type.Initialize(new DefaultConstructHandler(PopupLayoutSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs index 6ff62d0..76c6c63 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PopupPositionSchema.cs @@ -44,14 +44,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PopupPosition(); - public static void Pass1Initialize() => PopupPositionSchema.Type = new UIXTypeSchema(163, "PopupPosition", null, 153, typeof(PopupPosition), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(163, "PopupPosition", null, 153, typeof(PopupPosition), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(163, "Target", 118, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupPositionSchema.GetTarget), new SetValueHandler(PopupPositionSchema.SetTarget), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(163, "Popup", 118, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupPositionSchema.GetPopup), new SetValueHandler(PopupPositionSchema.SetPopup), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(163, "Flipped", 89, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PopupPositionSchema.GetFlipped), new SetValueHandler(PopupPositionSchema.SetFlipped), false); - PopupPositionSchema.Type.Initialize(new DefaultConstructHandler(PopupPositionSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(163, "Target", 118, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTarget), new SetValueHandler(SetTarget), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(163, "Popup", 118, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPopup), new SetValueHandler(SetPopup), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(163, "Flipped", 89, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFlipped), new SetValueHandler(SetFlipped), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs index 7e6a894..56fe7b5 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PositionKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PositionKeyframe(); - public static void Pass1Initialize() => PositionKeyframeSchema.Type = new UIXTypeSchema(164, "PositionKeyframe", null, 130, typeof(PositionKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(164, "PositionKeyframe", null, 130, typeof(PositionKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(164, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PositionKeyframeSchema.GetValue), new SetValueHandler(PositionKeyframeSchema.SetValue), false); - PositionKeyframeSchema.Type.Initialize(new DefaultConstructHandler(PositionKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(164, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs index 016cb56..db67d70 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PositionXKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PositionXKeyframe(); - public static void Pass1Initialize() => PositionXKeyframeSchema.Type = new UIXTypeSchema(165, "PositionXKeyframe", null, 130, typeof(PositionXKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(165, "PositionXKeyframe", null, 130, typeof(PositionXKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(165, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PositionXKeyframeSchema.GetValue), new SetValueHandler(PositionXKeyframeSchema.SetValue), false); - PositionXKeyframeSchema.Type.Initialize(new DefaultConstructHandler(PositionXKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(165, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs index 7cd81e4..e11cd59 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/PositionYKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new PositionYKeyframe(); - public static void Pass1Initialize() => PositionYKeyframeSchema.Type = new UIXTypeSchema(166, "PositionYKeyframe", null, 130, typeof(PositionYKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(166, "PositionYKeyframe", null, 130, typeof(PositionYKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(166, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(PositionYKeyframeSchema.GetValue), new SetValueHandler(PositionYKeyframeSchema.SetValue), false); - PositionYKeyframeSchema.Type.Initialize(new DefaultConstructHandler(PositionYKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(166, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs index 310f729..535d743 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RandomSchema.cs @@ -60,37 +60,37 @@ namespace Microsoft.Iris.Markup.UIX return (float)(random.NextDouble() * (parameter2 - (double)parameter1)) + parameter1; } - public static void Pass1Initialize() => RandomSchema.Type = new UIXTypeSchema(167, "Random", null, 153, typeof(Random), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(167, "Random", null, 153, typeof(Random), UIXTypeFlags.None); public static void Pass2Initialize() { UIXConstructorSchema constructorSchema = new UIXConstructorSchema(167, new short[1] { 115 - }, new ConstructHandler(RandomSchema.ConstructInt32)); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(167, "Next", null, 115, new InvokeHandler(RandomSchema.CallNext), false); + }, new ConstructHandler(ConstructInt32)); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(167, "Next", null, 115, new InvokeHandler(CallNext), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(167, "Next", new short[1] { 115 - }, 115, new InvokeHandler(RandomSchema.CallNextInt32), false); + }, 115, new InvokeHandler(CallNextInt32), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(167, "Next", new short[2] { 115, 115 - }, 115, new InvokeHandler(RandomSchema.CallNextInt32Int32), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(167, "NextDouble", null, 61, new InvokeHandler(RandomSchema.CallNextDouble), false); + }, 115, new InvokeHandler(CallNextInt32Int32), false); + UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(167, "NextDouble", null, 61, new InvokeHandler(CallNextDouble), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(167, "NextDouble", new short[2] { 61, 61 - }, 61, new InvokeHandler(RandomSchema.CallNextDoubleDoubleDouble), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(167, "NextSingle", null, 194, new InvokeHandler(RandomSchema.CallNextSingle), false); + }, 61, new InvokeHandler(CallNextDoubleDoubleDouble), false); + UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(167, "NextSingle", null, 194, new InvokeHandler(CallNextSingle), false); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(167, "NextSingle", new short[2] { 194, 194 - }, 194, new InvokeHandler(RandomSchema.CallNextSingleSingleSingle), false); - RandomSchema.Type.Initialize(new DefaultConstructHandler(RandomSchema.Construct), new ConstructorSchema[1] + }, 194, new InvokeHandler(CallNextSingleSingleSingle), false); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, null, new MethodSchema[7] diff --git a/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs index 087d87a..61e86b1 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RangedValueSchema.cs @@ -49,16 +49,16 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Microsoft.Iris.ModelItems.RangedValue(); - public static void Pass1Initialize() => RangedValueSchema.Type = new UIXTypeSchema(168, "RangedValue", null, 231, typeof(IUIRangedValue), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(168, "RangedValue", null, 231, typeof(IUIRangedValue), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(168, "MinValue", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RangedValueSchema.GetMinValue), new SetValueHandler(RangedValueSchema.SetMinValue), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(168, "MaxValue", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RangedValueSchema.GetMaxValue), new SetValueHandler(RangedValueSchema.SetMaxValue), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(168, "Step", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RangedValueSchema.GetStep), new SetValueHandler(RangedValueSchema.SetStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(168, "Range", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RangedValueSchema.GetRange), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(168, "Value", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RangedValueSchema.GetValue), new SetValueHandler(RangedValueSchema.SetValue), false); - RangedValueSchema.Type.Initialize(new DefaultConstructHandler(RangedValueSchema.Construct), null, new PropertySchema[5] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(168, "MinValue", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMinValue), new SetValueHandler(SetMinValue), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(168, "MaxValue", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaxValue), new SetValueHandler(SetMaxValue), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(168, "Step", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStep), new SetValueHandler(SetStep), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(168, "Range", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRange), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(168, "Value", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[5] { uixPropertySchema2, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs index c46a3c7..314e2ea 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RectangleSchema.cs @@ -122,19 +122,19 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = RectangleSchema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = RectangleSchema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = RectangleSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -173,31 +173,31 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; Rectangle parameter2 = (Rectangle)parameters[1]; object instanceObj1; - return RectangleSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => RectangleSchema.Type = new UIXTypeSchema(169, "Rectangle", null, 153, typeof(Rectangle), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(169, "Rectangle", null, 153, typeof(Rectangle), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(169, "X", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetX), new SetValueHandler(RectangleSchema.SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(169, "Y", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetY), new SetValueHandler(RectangleSchema.SetY), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(169, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetWidth), new SetValueHandler(RectangleSchema.SetWidth), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(169, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetHeight), new SetValueHandler(RectangleSchema.SetHeight), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(169, "Left", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetLeft), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(169, "Top", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetTop), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(169, "Right", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetRight), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(169, "Bottom", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RectangleSchema.GetBottom), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(169, "X", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(169, "Y", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(169, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWidth), new SetValueHandler(SetWidth), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(169, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHeight), new SetValueHandler(SetHeight), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(169, "Left", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLeft), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(169, "Top", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTop), null, false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(169, "Right", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetRight), null, false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(169, "Bottom", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBottom), null, false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(169, "Contains", new short[1] { 158 - }, 15, new InvokeHandler(RectangleSchema.CallContainsPoint), false); + }, 15, new InvokeHandler(CallContainsPoint), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(169, "TryParse", new short[2] { 208, 169 - }, 169, new InvokeHandler(RectangleSchema.CallTryParseStringRectangle), true); - RectangleSchema.Type.Initialize(new DefaultConstructHandler(RectangleSchema.Construct), null, new PropertySchema[8] + }, 169, new InvokeHandler(CallTryParseStringRectangle), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema8, uixPropertySchema4, @@ -211,7 +211,7 @@ namespace Microsoft.Iris.Markup.UIX { uixMethodSchema1, uixMethodSchema2 - }, null, null, new TypeConverterHandler(RectangleSchema.TryConvertFrom), new SupportsTypeConversionHandler(RectangleSchema.IsConversionSupported), new EncodeBinaryHandler(RectangleSchema.EncodeBinary), new DecodeBinaryHandler(RectangleSchema.DecodeBinary), new PerformOperationHandler(RectangleSchema.ExecuteOperation), new SupportsOperationHandler(RectangleSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs index cd18cbc..a53ca61 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RelativeToSchema.cs @@ -42,9 +42,9 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructSourceIdProperty(object[] parameters) { - object instanceObj = RelativeToSchema.Construct(); - RelativeToSchema.SetSourceId(ref instanceObj, parameters[0]); - RelativeToSchema.SetProperty(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetSourceId(ref instanceObj, parameters[0]); + SetProperty(ref instanceObj, parameters[1]); return instanceObj; } @@ -52,17 +52,17 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = RelativeToSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "RelativeTo", result1.Error); - RelativeToSchema.SetSourceId(ref instance, valueObj1); + SetSourceId(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], StringSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "RelativeTo", result2.Error); - RelativeToSchema.SetProperty(ref instance, valueObj2); + SetProperty(ref instance, valueObj2); return result2; } @@ -70,14 +70,14 @@ namespace Microsoft.Iris.Markup.UIX { string str = (string)valueObj; instanceObj = null; - RelativeTo instance = RelativeToSchema.StringToInstance(str); + RelativeTo instance = StringToInstance(str); if (instance == null) return Result.Fail("Unable to convert \"{0}\" to type '{1}'", str, "RelativeTo"); instanceObj = instance; return Result.Success; } - private static object FindCanonicalInstance(string name) => RelativeToSchema.StringToInstance(name); + private static object FindCanonicalInstance(string name) => StringToInstance(name); private static bool IsConversionSupported(TypeSchema fromType) => StringSchema.Type.IsAssignableFrom(fromType); @@ -90,7 +90,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = RelativeToSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -99,7 +99,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = RelativeToSchema.ConvertFromStringSourceIdProperty(splitString, out instance); + result = ConvertFromStringSourceIdProperty(splitString, out instance); if (!result.Failed) return result; } @@ -114,7 +114,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; RelativeTo parameter2 = (RelativeTo)parameters[1]; object instanceObj1; - return RelativeToSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static RelativeTo StringToInstance(string value) @@ -128,27 +128,27 @@ namespace Microsoft.Iris.Markup.UIX return value == "Final" ? RelativeTo.Final : null; } - public static void Pass1Initialize() => RelativeToSchema.Type = new UIXTypeSchema(171, "RelativeTo", null, 153, typeof(RelativeTo), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(171, "RelativeTo", null, 153, typeof(RelativeTo), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(171, "SourceId", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RelativeToSchema.GetSourceId), new SetValueHandler(RelativeToSchema.SetSourceId), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(171, "Property", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RelativeToSchema.GetProperty), new SetValueHandler(RelativeToSchema.SetProperty), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(171, "Snapshot", 200, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RelativeToSchema.GetSnapshot), new SetValueHandler(RelativeToSchema.SetSnapshot), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(171, "Power", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RelativeToSchema.GetPower), new SetValueHandler(RelativeToSchema.SetPower), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(171, "Multiply", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RelativeToSchema.GetMultiply), new SetValueHandler(RelativeToSchema.SetMultiply), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(171, "Add", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RelativeToSchema.GetAdd), new SetValueHandler(RelativeToSchema.SetAdd), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(171, "SourceId", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSourceId), new SetValueHandler(SetSourceId), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(171, "Property", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetProperty), new SetValueHandler(SetProperty), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(171, "Snapshot", 200, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSnapshot), new SetValueHandler(SetSnapshot), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(171, "Power", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPower), new SetValueHandler(SetPower), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(171, "Multiply", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMultiply), new SetValueHandler(SetMultiply), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(171, "Add", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAdd), new SetValueHandler(SetAdd), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(171, new short[2] { 115, 208 - }, new ConstructHandler(RelativeToSchema.ConstructSourceIdProperty)); + }, new ConstructHandler(ConstructSourceIdProperty)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(171, "TryParse", new short[2] { 208, 171 - }, 171, new InvokeHandler(RelativeToSchema.CallTryParseStringRelativeTo), true); - RelativeToSchema.Type.Initialize(new DefaultConstructHandler(RelativeToSchema.Construct), new ConstructorSchema[1] + }, 171, new InvokeHandler(CallTryParseStringRelativeTo), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[6] @@ -162,7 +162,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, new FindCanonicalInstanceHandler(RelativeToSchema.FindCanonicalInstance), new TypeConverterHandler(RelativeToSchema.TryConvertFrom), new SupportsTypeConversionHandler(RelativeToSchema.IsConversionSupported), null, null, null, null); + }, null, new FindCanonicalInstanceHandler(FindCanonicalInstance), new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs index 7055fe1..29c5e80 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RepeaterSchema.cs @@ -69,29 +69,29 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => RepeaterSchema.Type = new UIXTypeSchema(173, "Repeater", null, 239, typeof(Repeater), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(173, "Repeater", null, 239, typeof(Repeater), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(173, "ContentName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetContentName), new SetValueHandler(RepeaterSchema.SetContentName), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(173, "DividerName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetDividerName), new SetValueHandler(RepeaterSchema.SetDividerName), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(173, "Source", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetSource), new SetValueHandler(RepeaterSchema.SetSource), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(173, "DefaultFocusIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetDefaultFocusIndex), new SetValueHandler(RepeaterSchema.SetDefaultFocusIndex), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(173, "Content", 239, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(RepeaterSchema.SetContent), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(173, "Divider", 239, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(RepeaterSchema.SetDivider), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(173, "DiscardOffscreenVisuals", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetDiscardOffscreenVisuals), new SetValueHandler(RepeaterSchema.SetDiscardOffscreenVisuals), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(173, "ContentSelectors", 138, 227, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetContentSelectors), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(173, "MaintainFocusedItemOnSourceChanges", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(RepeaterSchema.GetMaintainFocusedItemOnSourceChanges), new SetValueHandler(RepeaterSchema.SetMaintainFocusedItemOnSourceChanges), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(173, "ContentName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentName), new SetValueHandler(SetContentName), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(173, "DividerName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDividerName), new SetValueHandler(SetDividerName), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(173, "Source", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(173, "DefaultFocusIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDefaultFocusIndex), new SetValueHandler(SetDefaultFocusIndex), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(173, "Content", 239, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetContent), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(173, "Divider", 239, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetDivider), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(173, "DiscardOffscreenVisuals", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDiscardOffscreenVisuals), new SetValueHandler(SetDiscardOffscreenVisuals), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(173, "ContentSelectors", 138, 227, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentSelectors), null, false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(173, "MaintainFocusedItemOnSourceChanges", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaintainFocusedItemOnSourceChanges), new SetValueHandler(SetMaintainFocusedItemOnSourceChanges), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(173, "NavigateIntoIndex", new short[1] { 115 - }, 240, new InvokeHandler(RepeaterSchema.CallNavigateIntoIndexInt32), false); + }, 240, new InvokeHandler(CallNavigateIntoIndexInt32), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(173, "ScrollIndexIntoView", new short[1] { 115 - }, 240, new InvokeHandler(RepeaterSchema.CallScrollIndexIntoViewInt32), false); + }, 240, new InvokeHandler(CallScrollIndexIntoViewInt32), false); UIXEventSchema uixEventSchema = new UIXEventSchema(173, "FocusedItemDiscarded"); - RepeaterSchema.Type.Initialize(new DefaultConstructHandler(RepeaterSchema.Construct), null, new PropertySchema[9] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[9] { uixPropertySchema5, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs index 17f9118..d3f093b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RotateKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new RotateKeyframe(); - public static void Pass1Initialize() => RotateKeyframeSchema.Type = new UIXTypeSchema(174, "RotateKeyframe", null, 130, typeof(RotateKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(174, "RotateKeyframe", null, 130, typeof(RotateKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(174, "Value", 176, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RotateKeyframeSchema.GetValue), new SetValueHandler(RotateKeyframeSchema.SetValue), false); - RotateKeyframeSchema.Type.Initialize(new DefaultConstructHandler(RotateKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(174, "Value", 176, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs index 087a8b5..d14b0f2 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RotateLayoutSchema.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class RotateLayoutSchema { - public static RangeValidator ValidateRightAngle = new RangeValidator(RotateLayoutSchema.RangeValidateRightAngle); + public static RangeValidator ValidateRightAngle = new RangeValidator(RangeValidateRightAngle); public static UIXTypeSchema Type; private static object GetAngleDegrees(object instanceObj) => ((RotateLayout)instanceObj).AngleDegrees; @@ -21,7 +21,7 @@ namespace Microsoft.Iris.Markup.UIX { RotateLayout rotateLayout = (RotateLayout)instanceObj; int num = (int)valueObj; - Result result = RotateLayoutSchema.ValidateRightAngle(valueObj); + Result result = ValidateRightAngle(valueObj); if (result.Failed) ErrorManager.ReportError(result.Error); else @@ -45,12 +45,12 @@ namespace Microsoft.Iris.Markup.UIX } } - public static void Pass1Initialize() => RotateLayoutSchema.Type = new UIXTypeSchema(175, "RotateLayout", null, 132, typeof(RotateLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(175, "RotateLayout", null, 132, typeof(RotateLayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(175, "AngleDegrees", 115, -1, ExpressionRestriction.None, false, RotateLayoutSchema.ValidateRightAngle, false, new GetValueHandler(RotateLayoutSchema.GetAngleDegrees), new SetValueHandler(RotateLayoutSchema.SetAngleDegrees), false); - RotateLayoutSchema.Type.Initialize(new DefaultConstructHandler(RotateLayoutSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(175, "AngleDegrees", 115, -1, ExpressionRestriction.None, false, ValidateRightAngle, false, new GetValueHandler(GetAngleDegrees), new SetValueHandler(SetAngleDegrees), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs index 5c0a0b7..680d5f6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/RotationSchema.cs @@ -49,38 +49,38 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructAngleDegrees(object[] parameters) { - object instanceObj = RotationSchema.Construct(); - RotationSchema.SetAngleDegrees(ref instanceObj, parameters[0]); + object instanceObj = Construct(); + SetAngleDegrees(ref instanceObj, parameters[0]); return instanceObj; } private static object ConstructAngleRadians(object[] parameters) { - object instanceObj = RotationSchema.Construct(); - RotationSchema.SetAngleRadians(ref instanceObj, parameters[0]); + object instanceObj = Construct(); + SetAngleRadians(ref instanceObj, parameters[0]); return instanceObj; } private static object ConstructAngleDegreesAxis(object[] parameters) { - object instanceObj = RotationSchema.Construct(); - RotationSchema.SetAngleDegrees(ref instanceObj, parameters[0]); - RotationSchema.SetAxis(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetAngleDegrees(ref instanceObj, parameters[0]); + SetAxis(ref instanceObj, parameters[1]); return instanceObj; } private static object ConstructAngleRadiansAxis(object[] parameters) { - object instanceObj = RotationSchema.Construct(); - RotationSchema.SetAngleRadians(ref instanceObj, parameters[0]); - RotationSchema.SetAxis(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetAngleRadians(ref instanceObj, parameters[0]); + SetAxis(ref instanceObj, parameters[1]); return instanceObj; } private static object ConstructAxis(object[] parameters) { - object instanceObj = RotationSchema.Construct(); - RotationSchema.SetAxis(ref instanceObj, parameters[0]); + object instanceObj = Construct(); + SetAxis(ref instanceObj, parameters[0]); return instanceObj; } @@ -145,7 +145,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = RotationSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -157,44 +157,44 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; Rotation parameter2 = (Rotation)parameters[1]; object instanceObj1; - return RotationSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } - public static void Pass1Initialize() => RotationSchema.Type = new UIXTypeSchema(176, "Rotation", null, 153, typeof(Rotation), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(176, "Rotation", null, 153, typeof(Rotation), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(176, "Axis", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RotationSchema.GetAxis), new SetValueHandler(RotationSchema.SetAxis), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(176, "AngleRadians", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RotationSchema.GetAngleRadians), new SetValueHandler(RotationSchema.SetAngleRadians), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(176, "AngleDegrees", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(RotationSchema.GetAngleDegrees), new SetValueHandler(RotationSchema.SetAngleDegrees), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(176, "Axis", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAxis), new SetValueHandler(SetAxis), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(176, "AngleRadians", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAngleRadians), new SetValueHandler(SetAngleRadians), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(176, "AngleDegrees", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAngleDegrees), new SetValueHandler(SetAngleDegrees), false); UIXConstructorSchema constructorSchema1 = new UIXConstructorSchema(176, new short[1] { 115 - }, new ConstructHandler(RotationSchema.ConstructAngleDegrees)); + }, new ConstructHandler(ConstructAngleDegrees)); UIXConstructorSchema constructorSchema2 = new UIXConstructorSchema(176, new short[1] { 194 - }, new ConstructHandler(RotationSchema.ConstructAngleRadians)); + }, new ConstructHandler(ConstructAngleRadians)); UIXConstructorSchema constructorSchema3 = new UIXConstructorSchema(176, new short[2] { 115, 234 - }, new ConstructHandler(RotationSchema.ConstructAngleDegreesAxis)); + }, new ConstructHandler(ConstructAngleDegreesAxis)); UIXConstructorSchema constructorSchema4 = new UIXConstructorSchema(176, new short[2] { 194, 234 - }, new ConstructHandler(RotationSchema.ConstructAngleRadiansAxis)); + }, new ConstructHandler(ConstructAngleRadiansAxis)); UIXConstructorSchema constructorSchema5 = new UIXConstructorSchema(176, new short[1] { 234 - }, new ConstructHandler(RotationSchema.ConstructAxis)); + }, new ConstructHandler(ConstructAxis)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(176, "TryParse", new short[2] { 208, 176 - }, 176, new InvokeHandler(RotationSchema.CallTryParseStringRotation), true); - RotationSchema.Type.Initialize(new DefaultConstructHandler(RotationSchema.Construct), new ConstructorSchema[5] + }, 176, new InvokeHandler(CallTryParseStringRotation), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[5] { constructorSchema1, constructorSchema2, @@ -209,7 +209,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(RotationSchema.TryConvertFrom), new SupportsTypeConversionHandler(RotationSchema.IsConversionSupported), new EncodeBinaryHandler(RotationSchema.EncodeBinary), new DecodeBinaryHandler(RotationSchema.DecodeBinary), null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs index 7749d1b..04e4c07 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SavedKeyFocusSchema.cs @@ -12,8 +12,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => SavedKeyFocusSchema.Type = new UIXTypeSchema(177, "SavedKeyFocus", null, 153, typeof(SavedKeyFocus), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(177, "SavedKeyFocus", null, 153, typeof(SavedKeyFocus), UIXTypeFlags.None); - public static void Pass2Initialize() => SavedKeyFocusSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs index c0144a0..128b32a 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScaleKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ScaleKeyframe(); - public static void Pass1Initialize() => ScaleKeyframeSchema.Type = new UIXTypeSchema(178, "ScaleKeyframe", null, 130, typeof(ScaleKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(178, "ScaleKeyframe", null, 130, typeof(ScaleKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(178, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ScaleKeyframeSchema.GetValue), new SetValueHandler(ScaleKeyframeSchema.SetValue), false); - ScaleKeyframeSchema.Type.Initialize(new DefaultConstructHandler(ScaleKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(178, "Value", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs index 2933c44..0090b26 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScaleLayoutSchema.cs @@ -47,14 +47,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ScaleLayout(); - public static void Pass1Initialize() => ScaleLayoutSchema.Type = new UIXTypeSchema(179, "ScaleLayout", null, 132, typeof(ScaleLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(179, "ScaleLayout", null, 132, typeof(ScaleLayout), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(179, "MinimumScale", 233, -1, ExpressionRestriction.None, false, Vector2Schema.ValidateNotNegative, false, new GetValueHandler(ScaleLayoutSchema.GetMinimumScale), new SetValueHandler(ScaleLayoutSchema.SetMinimumScale), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(179, "MaximumScale", 233, -1, ExpressionRestriction.None, false, Vector2Schema.ValidateNotNegative, false, new GetValueHandler(ScaleLayoutSchema.GetMaximumScale), new SetValueHandler(ScaleLayoutSchema.SetMaximumScale), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(179, "MaintainAspectRatio", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ScaleLayoutSchema.GetMaintainAspectRatio), new SetValueHandler(ScaleLayoutSchema.SetMaintainAspectRatio), false); - ScaleLayoutSchema.Type.Initialize(new DefaultConstructHandler(ScaleLayoutSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(179, "MinimumScale", 233, -1, ExpressionRestriction.None, false, Vector2Schema.ValidateNotNegative, false, new GetValueHandler(GetMinimumScale), new SetValueHandler(SetMinimumScale), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(179, "MaximumScale", 233, -1, ExpressionRestriction.None, false, Vector2Schema.ValidateNotNegative, false, new GetValueHandler(GetMaximumScale), new SetValueHandler(SetMaximumScale), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(179, "MaintainAspectRatio", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaintainAspectRatio), new SetValueHandler(SetMaintainAspectRatio), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs index ff948d6..d79b931 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScaleXKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ScaleXKeyframe(); - public static void Pass1Initialize() => ScaleXKeyframeSchema.Type = new UIXTypeSchema(180, "ScaleXKeyframe", null, 130, typeof(ScaleXKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(180, "ScaleXKeyframe", null, 130, typeof(ScaleXKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(180, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ScaleXKeyframeSchema.GetValue), new SetValueHandler(ScaleXKeyframeSchema.SetValue), false); - ScaleXKeyframeSchema.Type.Initialize(new DefaultConstructHandler(ScaleXKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(180, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs index ba963f7..562eb7e 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScaleYKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ScaleYKeyframe(); - public static void Pass1Initialize() => ScaleYKeyframeSchema.Type = new UIXTypeSchema(181, "ScaleYKeyframe", null, 130, typeof(ScaleYKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(181, "ScaleYKeyframe", null, 130, typeof(ScaleYKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(181, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ScaleYKeyframeSchema.GetValue), new SetValueHandler(ScaleYKeyframeSchema.SetValue), false); - ScaleYKeyframeSchema.Type.Initialize(new DefaultConstructHandler(ScaleYKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(181, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs index 1aff71a..ed5c466 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScrollModelBaseSchema.cs @@ -87,32 +87,32 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ScrollModelBaseSchema.Type = new UIXTypeSchema(183, "ScrollModelBase", null, 153, typeof(ScrollModelBase), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(183, "ScrollModelBase", null, 153, typeof(ScrollModelBase), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(183, "ScrollStep", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(ScrollModelBaseSchema.GetScrollStep), new SetValueHandler(ScrollModelBaseSchema.SetScrollStep), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(183, "CanScrollUp", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelBaseSchema.GetCanScrollUp), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(183, "CanScrollDown", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelBaseSchema.GetCanScrollDown), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(183, "CurrentPage", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelBaseSchema.GetCurrentPage), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(183, "TotalPages", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelBaseSchema.GetTotalPages), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(183, "ViewNear", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelBaseSchema.GetViewNear), null, false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(183, "ViewFar", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelBaseSchema.GetViewFar), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(183, "ScrollStep", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetScrollStep), new SetValueHandler(SetScrollStep), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(183, "CanScrollUp", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCanScrollUp), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(183, "CanScrollDown", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCanScrollDown), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(183, "CurrentPage", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCurrentPage), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(183, "TotalPages", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTotalPages), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(183, "ViewNear", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetViewNear), null, false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(183, "ViewFar", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetViewFar), null, false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(183, "Scroll", new short[1] { 115 - }, 240, new InvokeHandler(ScrollModelBaseSchema.CallScrollInt32), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(183, "ScrollUp", null, 240, new InvokeHandler(ScrollModelBaseSchema.CallScrollUp), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(183, "ScrollDown", null, 240, new InvokeHandler(ScrollModelBaseSchema.CallScrollDown), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(183, "PageUp", null, 240, new InvokeHandler(ScrollModelBaseSchema.CallPageUp), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(183, "PageDown", null, 240, new InvokeHandler(ScrollModelBaseSchema.CallPageDown), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(183, "Home", null, 240, new InvokeHandler(ScrollModelBaseSchema.CallHome), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(183, "End", null, 240, new InvokeHandler(ScrollModelBaseSchema.CallEnd), false); + }, 240, new InvokeHandler(CallScrollInt32), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(183, "ScrollUp", null, 240, new InvokeHandler(CallScrollUp), false); + UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(183, "ScrollDown", null, 240, new InvokeHandler(CallScrollDown), false); + UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(183, "PageUp", null, 240, new InvokeHandler(CallPageUp), false); + UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(183, "PageDown", null, 240, new InvokeHandler(CallPageDown), false); + UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(183, "Home", null, 240, new InvokeHandler(CallHome), false); + UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(183, "End", null, 240, new InvokeHandler(CallEnd), false); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(183, "ScrollToPosition", new short[1] { 194 - }, 240, new InvokeHandler(ScrollModelBaseSchema.CallScrollToPositionSingle), false); - ScrollModelBaseSchema.Type.Initialize(null, null, new PropertySchema[7] + }, 240, new InvokeHandler(CallScrollToPositionSingle), false); + Type.Initialize(null, null, new PropertySchema[7] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs index 624c0b5..5ac9b5b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScrollModelSchema.cs @@ -76,23 +76,23 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ScrollModelSchema.Type = new UIXTypeSchema(182, "ScrollModel", null, 183, typeof(ScrollModel), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(182, "ScrollModel", null, 183, typeof(ScrollModel), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(182, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetEnabled), new SetValueHandler(ScrollModelSchema.SetEnabled), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(182, "PageStep", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(ScrollModelSchema.GetPageStep), new SetValueHandler(ScrollModelSchema.SetPageStep), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(182, "PageSizedScrollStep", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetPageSizedScrollStep), new SetValueHandler(ScrollModelSchema.SetPageSizedScrollStep), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(182, "BeginPadding", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetBeginPadding), new SetValueHandler(ScrollModelSchema.SetBeginPadding), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(182, "EndPadding", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetEndPadding), new SetValueHandler(ScrollModelSchema.SetEndPadding), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(182, "BeginPaddingRelativeTo", 170, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetBeginPaddingRelativeTo), new SetValueHandler(ScrollModelSchema.SetBeginPaddingRelativeTo), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(182, "EndPaddingRelativeTo", 170, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetEndPaddingRelativeTo), new SetValueHandler(ScrollModelSchema.SetEndPaddingRelativeTo), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(182, "Locked", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetLocked), new SetValueHandler(ScrollModelSchema.SetLocked), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(182, "LockedPosition", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetLockedPosition), new SetValueHandler(ScrollModelSchema.SetLockedPosition), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(182, "LockedAlignment", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetLockedAlignment), new SetValueHandler(ScrollModelSchema.SetLockedAlignment), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(182, "ContentPositioningBehavior", 41, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollModelSchema.GetContentPositioningBehavior), new SetValueHandler(ScrollModelSchema.SetContentPositioningBehavior), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(182, "ScrollFocusIntoView", null, 240, new InvokeHandler(ScrollModelSchema.CallScrollFocusIntoView), false); - ScrollModelSchema.Type.Initialize(new DefaultConstructHandler(ScrollModelSchema.Construct), null, new PropertySchema[11] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(182, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(182, "PageStep", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(GetPageStep), new SetValueHandler(SetPageStep), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(182, "PageSizedScrollStep", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPageSizedScrollStep), new SetValueHandler(SetPageSizedScrollStep), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(182, "BeginPadding", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginPadding), new SetValueHandler(SetBeginPadding), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(182, "EndPadding", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndPadding), new SetValueHandler(SetEndPadding), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(182, "BeginPaddingRelativeTo", 170, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBeginPaddingRelativeTo), new SetValueHandler(SetBeginPaddingRelativeTo), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(182, "EndPaddingRelativeTo", 170, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEndPaddingRelativeTo), new SetValueHandler(SetEndPaddingRelativeTo), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(182, "Locked", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLocked), new SetValueHandler(SetLocked), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(182, "LockedPosition", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLockedPosition), new SetValueHandler(SetLockedPosition), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(182, "LockedAlignment", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLockedAlignment), new SetValueHandler(SetLockedAlignment), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(182, "ContentPositioningBehavior", 41, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentPositioningBehavior), new SetValueHandler(SetContentPositioningBehavior), false); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(182, "ScrollFocusIntoView", null, 240, new InvokeHandler(CallScrollFocusIntoView), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[11] { uixPropertySchema4, uixPropertySchema6, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs index 229fedc..d03cfb0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScrollerSchema.cs @@ -34,13 +34,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Scroller(); - public static void Pass1Initialize() => ScrollerSchema.Type = new UIXTypeSchema(184, "Scroller", null, 34, typeof(Scroller), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(184, "Scroller", null, 34, typeof(Scroller), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(184, "ScrollModel", 182, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollerSchema.GetScrollModel), new SetValueHandler(ScrollerSchema.SetScrollModel), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(184, "Prefetch", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(ScrollerSchema.GetPrefetch), new SetValueHandler(ScrollerSchema.SetPrefetch), false); - ScrollerSchema.Type.Initialize(new DefaultConstructHandler(ScrollerSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(184, "ScrollModel", 182, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScrollModel), new SetValueHandler(SetScrollModel), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(184, "Prefetch", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetPrefetch), new SetValueHandler(SetPrefetch), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs index 33c55e8..44b833f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ScrollingHandlerSchema.cs @@ -48,19 +48,19 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ScrollingHandler(); - public static void Pass1Initialize() => ScrollingHandlerSchema.Type = new UIXTypeSchema(185, "ScrollingHandler", null, 110, typeof(ScrollingHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(185, "ScrollingHandler", null, 110, typeof(ScrollingHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(185, "HandleDirectionalKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetHandleDirectionalKeys), new SetValueHandler(ScrollingHandlerSchema.SetHandleDirectionalKeys), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(185, "HandlePageKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetHandlePageKeys), new SetValueHandler(ScrollingHandlerSchema.SetHandlePageKeys), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(185, "HandleHomeEndKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetHandleHomeEndKeys), new SetValueHandler(ScrollingHandlerSchema.SetHandleHomeEndKeys), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(185, "HandlePageCommands", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetHandlePageCommands), new SetValueHandler(ScrollingHandlerSchema.SetHandlePageCommands), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(185, "HandleMouseWheel", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetHandleMouseWheel), new SetValueHandler(ScrollingHandlerSchema.SetHandleMouseWheel), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(185, "ScrollModel", 182, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetScrollModel), new SetValueHandler(ScrollingHandlerSchema.SetScrollModel), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(185, "UseFocusBehavior", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetUseFocusBehavior), new SetValueHandler(ScrollingHandlerSchema.SetUseFocusBehavior), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(185, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ScrollingHandlerSchema.GetHandlerStage), new SetValueHandler(ScrollingHandlerSchema.SetHandlerStage), false); - ScrollingHandlerSchema.Type.Initialize(new DefaultConstructHandler(ScrollingHandlerSchema.Construct), null, new PropertySchema[8] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(185, "HandleDirectionalKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandleDirectionalKeys), new SetValueHandler(SetHandleDirectionalKeys), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(185, "HandlePageKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlePageKeys), new SetValueHandler(SetHandlePageKeys), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(185, "HandleHomeEndKeys", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandleHomeEndKeys), new SetValueHandler(SetHandleHomeEndKeys), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(185, "HandlePageCommands", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlePageCommands), new SetValueHandler(SetHandlePageCommands), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(185, "HandleMouseWheel", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandleMouseWheel), new SetValueHandler(SetHandleMouseWheel), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(185, "ScrollModel", 182, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScrollModel), new SetValueHandler(SetScrollModel), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(185, "UseFocusBehavior", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUseFocusBehavior), new SetValueHandler(SetUseFocusBehavior), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(185, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema1, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs index 024ec95..d6b2515 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SelectionManagerSchema.cs @@ -108,66 +108,66 @@ namespace Microsoft.Iris.Markup.UIX private static object CallToggleSelectRangeInt32Int32(object instanceObj, object[] parameters) => ((SelectionManager)instanceObj).ToggleSelectRange((int)parameters[0], (int)parameters[1]); - public static void Pass1Initialize() => SelectionManagerSchema.Type = new UIXTypeSchema(186, "SelectionManager", null, 153, typeof(SelectionManager), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(186, "SelectionManager", null, 153, typeof(SelectionManager), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(186, "Count", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetCount), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(186, "SourceList", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetSourceList), new SetValueHandler(SelectionManagerSchema.SetSourceList), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(186, "Anchor", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetAnchor), new SetValueHandler(SelectionManagerSchema.SetAnchor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(186, "SelectedIndices", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetSelectedIndices), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(186, "SelectedItems", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetSelectedItems), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(186, "SingleSelect", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetSingleSelect), new SetValueHandler(SelectionManagerSchema.SetSingleSelect), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(186, "SelectedIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetSelectedIndex), new SetValueHandler(SelectionManagerSchema.SetSelectedIndex), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(186, "SelectedItem", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(SelectionManagerSchema.GetSelectedItem), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(186, "Count", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCount), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(186, "SourceList", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSourceList), new SetValueHandler(SetSourceList), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(186, "Anchor", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAnchor), new SetValueHandler(SetAnchor), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(186, "SelectedIndices", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedIndices), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(186, "SelectedItems", 138, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedItems), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(186, "SingleSelect", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSingleSelect), new SetValueHandler(SetSingleSelect), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(186, "SelectedIndex", 115, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedIndex), new SetValueHandler(SetSelectedIndex), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(186, "SelectedItem", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectedItem), null, false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(186, "IsSelected", new short[1] { 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallIsSelectedInt32), false); + }, 15, new InvokeHandler(CallIsSelectedInt32), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(186, "IsRangeSelected", new short[2] { 115, 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallIsRangeSelectedInt32Int32), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(186, "Clear", null, 240, new InvokeHandler(SelectionManagerSchema.CallClear), false); + }, 15, new InvokeHandler(CallIsRangeSelectedInt32Int32), false); + UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(186, "Clear", null, 240, new InvokeHandler(CallClear), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(186, "Select", new short[2] { 115, 15 - }, 15, new InvokeHandler(SelectionManagerSchema.CallSelectInt32Boolean), false); + }, 15, new InvokeHandler(CallSelectInt32Boolean), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(186, "Select", new short[2] { 138, 15 - }, 15, new InvokeHandler(SelectionManagerSchema.CallSelectListBoolean), false); + }, 15, new InvokeHandler(CallSelectListBoolean), false); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(186, "ToggleSelect", new short[1] { 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallToggleSelectInt32), false); + }, 15, new InvokeHandler(CallToggleSelectInt32), false); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(186, "ToggleSelect", new short[1] { 138 - }, 15, new InvokeHandler(SelectionManagerSchema.CallToggleSelectList), false); + }, 15, new InvokeHandler(CallToggleSelectList), false); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(186, "SelectRange", new short[2] { 115, 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallSelectRangeInt32Int32), false); + }, 15, new InvokeHandler(CallSelectRangeInt32Int32), false); UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(186, "SelectRangeFromAnchor", new short[1] { 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallSelectRangeFromAnchorInt32), false); + }, 15, new InvokeHandler(CallSelectRangeFromAnchorInt32), false); UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(186, "SelectRangeFromAnchor", new short[2] { 115, 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallSelectRangeFromAnchorInt32Int32), false); + }, 15, new InvokeHandler(CallSelectRangeFromAnchorInt32Int32), false); UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(186, "ToggleSelectRange", new short[2] { 115, 115 - }, 15, new InvokeHandler(SelectionManagerSchema.CallToggleSelectRangeInt32Int32), false); - SelectionManagerSchema.Type.Initialize(new DefaultConstructHandler(SelectionManagerSchema.Construct), null, new PropertySchema[8] + }, 15, new InvokeHandler(CallToggleSelectRangeInt32Int32), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema3, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs index 401b019..6ed0ac9 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SelectionRangeSchema.cs @@ -40,25 +40,25 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructBeginEnd(object[] parameters) { - object instanceObj = SelectionRangeSchema.Construct(); - SelectionRangeSchema.SetBegin(ref instanceObj, parameters[0]); - SelectionRangeSchema.SetEnd(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetBegin(ref instanceObj, parameters[0]); + SetEnd(ref instanceObj, parameters[1]); return instanceObj; } private static Result ConvertFromStringBeginEnd(string[] splitString, out object instance) { - instance = SelectionRangeSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "SelectionRange", result1.Error); - SelectionRangeSchema.SetBegin(ref instance, valueObj1); + SetBegin(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "SelectionRange", result2.Error); - SelectionRangeSchema.SetEnd(ref instance, valueObj2); + SetEnd(ref instance, valueObj2); return result2; } @@ -76,7 +76,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = SelectionRangeSchema.ConvertFromStringBeginEnd(splitString, out instance); + result = ConvertFromStringBeginEnd(splitString, out instance); if (!result.Failed) return result; } @@ -86,19 +86,19 @@ namespace Microsoft.Iris.Markup.UIX return result; } - public static void Pass1Initialize() => SelectionRangeSchema.Type = new UIXTypeSchema(187, "SelectionRange", null, 153, typeof(Range), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(187, "SelectionRange", null, 153, typeof(Range), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(187, "Begin", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SelectionRangeSchema.GetBegin), new SetValueHandler(SelectionRangeSchema.SetBegin), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(187, "End", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SelectionRangeSchema.GetEnd), new SetValueHandler(SelectionRangeSchema.SetEnd), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(187, "IsEmpty", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SelectionRangeSchema.GetIsEmpty), null, false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(187, "Begin", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetBegin), new SetValueHandler(SetBegin), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(187, "End", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetEnd), new SetValueHandler(SetEnd), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(187, "IsEmpty", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetIsEmpty), null, false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(187, new short[2] { 115, 115 - }, new ConstructHandler(SelectionRangeSchema.ConstructBeginEnd)); - SelectionRangeSchema.Type.Initialize(new DefaultConstructHandler(SelectionRangeSchema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructBeginEnd)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[3] @@ -106,7 +106,7 @@ namespace Microsoft.Iris.Markup.UIX uixPropertySchema1, uixPropertySchema2, uixPropertySchema3 - }, null, null, null, new TypeConverterHandler(SelectionRangeSchema.TryConvertFrom), new SupportsTypeConversionHandler(SelectionRangeSchema.IsConversionSupported), null, null, null, null); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs index f9f2e80..a4f5149 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SepiaInstanceSchema.cs @@ -74,31 +74,31 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => SepiaInstanceSchema.Type = new UIXTypeSchema(189, "SepiaInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(189, "SepiaInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(189, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SepiaInstanceSchema.SetLightColor), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(189, "DarkColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SepiaInstanceSchema.SetDarkColor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(189, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SepiaInstanceSchema.SetDesaturate), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(189, "Tone", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SepiaInstanceSchema.SetTone), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(189, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(189, "DarkColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDarkColor), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(189, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SetDesaturate), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(189, "Tone", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, null, new SetValueHandler(SetTone), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(189, "PlayLightColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(SepiaInstanceSchema.CallPlayLightColorAnimationEffectColorAnimation), false); + }, 240, new InvokeHandler(CallPlayLightColorAnimationEffectColorAnimation), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(189, "PlayDarkColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(SepiaInstanceSchema.CallPlayDarkColorAnimationEffectColorAnimation), false); + }, 240, new InvokeHandler(CallPlayDarkColorAnimationEffectColorAnimation), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(189, "PlayDesaturateAnimation", new short[1] { 75 - }, 240, new InvokeHandler(SepiaInstanceSchema.CallPlayDesaturateAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayDesaturateAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(189, "PlayToneAnimation", new short[1] { 75 - }, 240, new InvokeHandler(SepiaInstanceSchema.CallPlayToneAnimationEffectFloatAnimation), false); - SepiaInstanceSchema.Type.Initialize(null, null, new PropertySchema[4] + }, 240, new InvokeHandler(CallPlayToneAnimationEffectFloatAnimation), false); + Type.Initialize(null, null, new PropertySchema[4] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs index a928d2b..c9a8811 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SepiaSchema.cs @@ -47,15 +47,15 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new SepiaElement(); - public static void Pass1Initialize() => SepiaSchema.Type = new UIXTypeSchema(188, "Sepia", null, 80, typeof(SepiaElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(188, "Sepia", null, 80, typeof(SepiaElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(188, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SepiaSchema.SetLightColor), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(188, "DarkColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SepiaSchema.SetDarkColor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(188, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(SepiaSchema.GetDesaturate), new SetValueHandler(SepiaSchema.SetDesaturate), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(188, "Tone", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(SepiaSchema.GetTone), new SetValueHandler(SepiaSchema.SetTone), false); - SepiaSchema.Type.Initialize(new DefaultConstructHandler(SepiaSchema.Construct), null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(188, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(188, "DarkColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDarkColor), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(188, "Desaturate", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetDesaturate), new SetValueHandler(SetDesaturate), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(188, "Tone", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetTone), new SetValueHandler(SetTone), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs index a919215..04b2c0b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SharedSizeSchema.cs @@ -62,15 +62,15 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => SharedSizeSchema.Type = new UIXTypeSchema(190, "SharedSize", null, 153, typeof(SharedSize), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(190, "SharedSize", null, 153, typeof(SharedSize), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(190, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(SharedSizeSchema.GetMaximumSize), new SetValueHandler(SharedSizeSchema.SetMaximumSize), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(190, "MinimumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(SharedSizeSchema.GetMinimumSize), new SetValueHandler(SharedSizeSchema.SetMinimumSize), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(190, "Size", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(SharedSizeSchema.GetSize), new SetValueHandler(SharedSizeSchema.SetSize), false); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(190, "AutoSize", null, 240, new InvokeHandler(SharedSizeSchema.CallAutoSize), false); - SharedSizeSchema.Type.Initialize(new DefaultConstructHandler(SharedSizeSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(190, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMaximumSize), new SetValueHandler(SetMaximumSize), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(190, "MinimumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMinimumSize), new SetValueHandler(SetMinimumSize), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(190, "Size", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetSize), new SetValueHandler(SetSize), false); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(190, "AutoSize", null, 240, new InvokeHandler(CallAutoSize), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs index 38abef9..05ba472 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ShortcutHandlerSchema.cs @@ -32,16 +32,16 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ShortcutHandler(); - public static void Pass1Initialize() => ShortcutHandlerSchema.Type = new UIXTypeSchema(192, "ShortcutHandler", null, 110, typeof(ShortcutHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(192, "ShortcutHandler", null, 110, typeof(ShortcutHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(192, "Shortcut", 193, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ShortcutHandlerSchema.GetShortcut), new SetValueHandler(ShortcutHandlerSchema.SetShortcut), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(192, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ShortcutHandlerSchema.GetCommand), new SetValueHandler(ShortcutHandlerSchema.SetCommand), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(192, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ShortcutHandlerSchema.GetHandle), new SetValueHandler(ShortcutHandlerSchema.SetHandle), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(192, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ShortcutHandlerSchema.GetHandlerStage), new SetValueHandler(ShortcutHandlerSchema.SetHandlerStage), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(192, "Shortcut", 193, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShortcut), new SetValueHandler(SetShortcut), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(192, "Command", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCommand), new SetValueHandler(SetCommand), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(192, "Handle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandle), new SetValueHandler(SetHandle), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(192, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); UIXEventSchema uixEventSchema = new UIXEventSchema(192, "Invoked"); - ShortcutHandlerSchema.Type.Initialize(new DefaultConstructHandler(ShortcutHandlerSchema.Construct), null, new PropertySchema[4] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema2, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs index 7689aab..7ad87cd 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SingleSchema.cs @@ -12,9 +12,9 @@ namespace Microsoft.Iris.Markup.UIX { internal static class SingleSchema { - public static RangeValidator Validate0to1 = new RangeValidator(SingleSchema.RangeValidate0to1); - public static RangeValidator ValidateNotNegative = new RangeValidator(SingleSchema.RangeValidateNotNegative); - public static RangeValidator ValidateNotZero = new RangeValidator(SingleSchema.RangeValidateNotZero); + public static RangeValidator Validate0to1 = new RangeValidator(RangeValidate0to1); + public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); + public static RangeValidator ValidateNotZero = new RangeValidator(RangeValidateNotZero); public static UIXTypeSchema Type; private static object Construct() => 0.0f; @@ -96,37 +96,37 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (BooleanSchema.Type.IsAssignableFrom(fromType)) { - result = SingleSchema.ConvertFromBoolean(from, out instance); + result = ConvertFromBoolean(from, out instance); if (!result.Failed) return result; } if (ByteSchema.Type.IsAssignableFrom(fromType)) { - result = SingleSchema.ConvertFromByte(from, out instance); + result = ConvertFromByte(from, out instance); if (!result.Failed) return result; } if (DoubleSchema.Type.IsAssignableFrom(fromType)) { - result = SingleSchema.ConvertFromDouble(from, out instance); + result = ConvertFromDouble(from, out instance); if (!result.Failed) return result; } if (Int32Schema.Type.IsAssignableFrom(fromType)) { - result = SingleSchema.ConvertFromInt32(from, out instance); + result = ConvertFromInt32(from, out instance); if (!result.Failed) return result; } if (Int64Schema.Type.IsAssignableFrom(fromType)) { - result = SingleSchema.ConvertFromInt64(from, out instance); + result = ConvertFromInt64(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = SingleSchema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -195,7 +195,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; float parameter2 = (float)parameters[1]; object instanceObj1; - return SingleSchema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static Result RangeValidate0to1(object value) @@ -216,24 +216,24 @@ namespace Microsoft.Iris.Markup.UIX return num == 0.0 ? Result.Fail("Specified value '{0}' is not valid", num.ToString()) : Result.Success; } - public static void Pass1Initialize() => SingleSchema.Type = new UIXTypeSchema(194, "Single", "float", 153, typeof(float), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(194, "Single", "float", 153, typeof(float), UIXTypeFlags.Immutable); public static void Pass2Initialize() { UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(194, "ToString", new short[1] { 208 - }, 208, new InvokeHandler(SingleSchema.CallToStringString), false); + }, 208, new InvokeHandler(CallToStringString), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(194, "TryParse", new short[2] { 208, 194 - }, 194, new InvokeHandler(SingleSchema.CallTryParseStringSingle), true); - SingleSchema.Type.Initialize(new DefaultConstructHandler(SingleSchema.Construct), null, null, new MethodSchema[2] + }, 194, new InvokeHandler(CallTryParseStringSingle), true); + Type.Initialize(new DefaultConstructHandler(Construct), null, null, new MethodSchema[2] { uixMethodSchema1, uixMethodSchema2 - }, null, null, new TypeConverterHandler(SingleSchema.TryConvertFrom), new SupportsTypeConversionHandler(SingleSchema.IsConversionSupported), new EncodeBinaryHandler(SingleSchema.EncodeBinary), new DecodeBinaryHandler(SingleSchema.DecodeBinary), new PerformOperationHandler(SingleSchema.ExecuteOperation), new SupportsOperationHandler(SingleSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs index 6af4459..cddadc7 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SizeKeyframeSchema.cs @@ -19,12 +19,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new SizeKeyframe(); - public static void Pass1Initialize() => SizeKeyframeSchema.Type = new UIXTypeSchema(196, "SizeKeyframe", null, 130, typeof(SizeKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(196, "SizeKeyframe", null, 130, typeof(SizeKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(196, "Value", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SizeKeyframeSchema.GetValue), new SetValueHandler(SizeKeyframeSchema.SetValue), false); - SizeKeyframeSchema.Type.Initialize(new DefaultConstructHandler(SizeKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(196, "Value", 233, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs index 886d65d..c2d6c47 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SizeSchema.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class SizeSchema { - public static RangeValidator ValidateNotNegative = new RangeValidator(SizeSchema.RangeValidateNotNegative); + public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); public static UIXTypeSchema Type; private static object GetWidth(object instanceObj) => ((Size)instanceObj).Width; @@ -39,9 +39,9 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructWidthHeight(object[] parameters) { - object instanceObj = SizeSchema.Construct(); - SizeSchema.SetWidth(ref instanceObj, parameters[0]); - SizeSchema.SetHeight(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetWidth(ref instanceObj, parameters[0]); + SetHeight(ref instanceObj, parameters[1]); return instanceObj; } @@ -49,17 +49,17 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString, out object instance) { - instance = SizeSchema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], Int32Schema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Size", result1.Error); - SizeSchema.SetWidth(ref instance, valueObj1); + SetWidth(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], Int32Schema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Size", result2.Error); - SizeSchema.SetHeight(ref instance, valueObj2); + SetHeight(ref instance, valueObj2); return result2; } @@ -86,7 +86,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = SizeSchema.ConvertFromStringWidthHeight(splitString, out instance); + result = ConvertFromStringWidthHeight(splitString, out instance); if (!result.Failed) return result; } @@ -102,25 +102,25 @@ namespace Microsoft.Iris.Markup.UIX return size.Width < 0 || size.Height < 0 ? Result.Fail("Expecting a non-negative value, but got {0}", size.ToString()) : Result.Success; } - public static void Pass1Initialize() => SizeSchema.Type = new UIXTypeSchema(195, "Size", null, 153, typeof(Size), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(195, "Size", null, 153, typeof(Size), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(195, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SizeSchema.GetWidth), new SetValueHandler(SizeSchema.SetWidth), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(195, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SizeSchema.GetHeight), new SetValueHandler(SizeSchema.SetHeight), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(195, "Width", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetWidth), new SetValueHandler(SetWidth), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(195, "Height", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetHeight), new SetValueHandler(SetHeight), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(195, new short[2] { 115, 115 - }, new ConstructHandler(SizeSchema.ConstructWidthHeight)); - SizeSchema.Type.Initialize(new DefaultConstructHandler(SizeSchema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructWidthHeight)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 - }, null, null, null, new TypeConverterHandler(SizeSchema.TryConvertFrom), new SupportsTypeConversionHandler(SizeSchema.IsConversionSupported), new EncodeBinaryHandler(SizeSchema.EncodeBinary), new DecodeBinaryHandler(SizeSchema.DecodeBinary), null, null); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs index c50a27e..48b12b2 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SizeXKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new SizeXKeyframe(); - public static void Pass1Initialize() => SizeXKeyframeSchema.Type = new UIXTypeSchema(197, "SizeXKeyframe", null, 130, typeof(SizeXKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(197, "SizeXKeyframe", null, 130, typeof(SizeXKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(197, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SizeXKeyframeSchema.GetValue), new SetValueHandler(SizeXKeyframeSchema.SetValue), false); - SizeXKeyframeSchema.Type.Initialize(new DefaultConstructHandler(SizeXKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(197, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs index eac24fe..a5e3293 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SizeYKeyframeSchema.cs @@ -18,12 +18,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new SizeYKeyframe(); - public static void Pass1Initialize() => SizeYKeyframeSchema.Type = new UIXTypeSchema(198, "SizeYKeyframe", null, 130, typeof(SizeYKeyframe), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(198, "SizeYKeyframe", null, 130, typeof(SizeYKeyframe), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(198, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SizeYKeyframeSchema.GetValue), new SetValueHandler(SizeYKeyframeSchema.SetValue), false); - SizeYKeyframeSchema.Type.Initialize(new DefaultConstructHandler(SizeYKeyframeSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(198, "Value", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValue), new SetValueHandler(SetValue), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs index b8ad24a..1e036c2 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SoundSchema.cs @@ -27,19 +27,19 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructSource(object[] parameters) { - object instanceObj = SoundSchema.Construct(); - SoundSchema.SetSource(ref instanceObj, parameters[0]); + object instanceObj = Construct(); + SetSource(ref instanceObj, parameters[0]); return instanceObj; } private static Result ConvertFromStringSource(string[] splitString, out object instance) { - instance = SoundSchema.Construct(); + instance = Construct(); object valueObj; Result result = UIXLoadResult.ValidateStringAsValue(splitString[0], StringSchema.Type, null, out valueObj); if (result.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Sound", result.Error); - SoundSchema.SetSource(ref instance, valueObj); + SetSource(ref instance, valueObj); return result; } @@ -63,7 +63,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 1) { - result = SoundSchema.ConvertFromStringSource(splitString, out instance); + result = ConvertFromStringSource(splitString, out instance); if (!result.Failed) return result; } @@ -73,18 +73,18 @@ namespace Microsoft.Iris.Markup.UIX return result; } - public static void Pass1Initialize() => SoundSchema.Type = new UIXTypeSchema(201, "Sound", null, 153, typeof(Sound), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(201, "Sound", null, 153, typeof(Sound), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(201, "Source", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SoundSchema.GetSource), new SetValueHandler(SoundSchema.SetSource), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(201, "SystemSoundEvent", 211, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SoundSchema.GetSystemSoundEvent), new SetValueHandler(SoundSchema.SetSystemSoundEvent), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(201, "Source", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(201, "SystemSoundEvent", 211, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSystemSoundEvent), new SetValueHandler(SetSystemSoundEvent), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(201, new short[1] { 208 - }, new ConstructHandler(SoundSchema.ConstructSource)); - UIXMethodSchema uixMethodSchema = new UIXMethodSchema(201, "Play", null, 240, new InvokeHandler(SoundSchema.CallPlay), false); - SoundSchema.Type.Initialize(new DefaultConstructHandler(SoundSchema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructSource)); + UIXMethodSchema uixMethodSchema = new UIXMethodSchema(201, "Play", null, 240, new InvokeHandler(CallPlay), false); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[2] @@ -94,7 +94,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(SoundSchema.TryConvertFrom), new SupportsTypeConversionHandler(SoundSchema.IsConversionSupported), null, null, null, null); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), null, null, null, null); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs index 7e6b9de..f31dbae 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DInstanceSchema.cs @@ -95,51 +95,51 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => SpotLight2DInstanceSchema.Type = new UIXTypeSchema(203, "SpotLight2DInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(203, "SpotLight2DInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(203, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(203, "DirectionAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetDirectionAngle), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(203, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(203, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(203, "InnerConeAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetInnerConeAngle), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(203, "OuterConeAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetOuterConeAngle), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(203, "Intensity", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetIntensity), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(203, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DInstanceSchema.SetAttenuation), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(203, "Position", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(203, "DirectionAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetDirectionAngle), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(203, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(203, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(203, "InnerConeAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetInnerConeAngle), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(203, "OuterConeAngle", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetOuterConeAngle), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(203, "Intensity", 194, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetIntensity), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(203, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAttenuation), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(203, "PlayPositionAnimation", new short[1] { 81 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayPositionAnimationEffectVector3Animation), false); + }, 240, new InvokeHandler(CallPlayPositionAnimationEffectVector3Animation), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(203, "PlayDirectionAngleAnimation", new short[1] { 75 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayDirectionAngleAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayDirectionAngleAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(203, "PlayLightColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayLightColorAnimationEffectColorAnimation), false); + }, 240, new InvokeHandler(CallPlayLightColorAnimationEffectColorAnimation), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(203, "PlayAmbientColorAnimation", new short[1] { 71 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayAmbientColorAnimationEffectColorAnimation), false); + }, 240, new InvokeHandler(CallPlayAmbientColorAnimationEffectColorAnimation), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(203, "PlayInnerConeAngleAnimation", new short[1] { 75 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayInnerConeAngleAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayInnerConeAngleAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(203, "PlayOuterConeAngleAnimation", new short[1] { 75 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayOuterConeAngleAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayOuterConeAngleAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(203, "PlayIntensityAnimation", new short[1] { 75 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayIntensityAnimationEffectFloatAnimation), false); + }, 240, new InvokeHandler(CallPlayIntensityAnimationEffectFloatAnimation), false); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(203, "PlayAttenuationAnimation", new short[1] { 81 - }, 240, new InvokeHandler(SpotLight2DInstanceSchema.CallPlayAttenuationAnimationEffectVector3Animation), false); - SpotLight2DInstanceSchema.Type.Initialize(null, null, new PropertySchema[8] + }, 240, new InvokeHandler(CallPlayAttenuationAnimationEffectVector3Animation), false); + Type.Initialize(null, null, new PropertySchema[8] { uixPropertySchema4, uixPropertySchema8, diff --git a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs index e464f73..0834f2c 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SpotLight2DSchema.cs @@ -72,19 +72,19 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new SpotLight2DElement(); - public static void Pass1Initialize() => SpotLight2DSchema.Type = new UIXTypeSchema(202, "SpotLight2D", null, 77, typeof(SpotLight2DElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(202, "SpotLight2D", null, 77, typeof(SpotLight2DElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(202, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SpotLight2DSchema.GetPosition), new SetValueHandler(SpotLight2DSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(202, "DirectionAngle", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SpotLight2DSchema.GetDirectionAngle), new SetValueHandler(SpotLight2DSchema.SetDirectionAngle), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(202, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DSchema.SetLightColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(202, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SpotLight2DSchema.SetAmbientColor), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(202, "InnerConeAngle", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(SpotLight2DSchema.GetInnerConeAngle), new SetValueHandler(SpotLight2DSchema.SetInnerConeAngle), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(202, "OuterConeAngle", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(SpotLight2DSchema.GetOuterConeAngle), new SetValueHandler(SpotLight2DSchema.SetOuterConeAngle), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(202, "Intensity", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(SpotLight2DSchema.GetIntensity), new SetValueHandler(SpotLight2DSchema.SetIntensity), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(202, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SpotLight2DSchema.GetAttenuation), new SetValueHandler(SpotLight2DSchema.SetAttenuation), false); - SpotLight2DSchema.Type.Initialize(new DefaultConstructHandler(SpotLight2DSchema.Construct), null, new PropertySchema[8] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(202, "Position", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(202, "DirectionAngle", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDirectionAngle), new SetValueHandler(SetDirectionAngle), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(202, "LightColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetLightColor), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(202, "AmbientColor", 35, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetAmbientColor), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(202, "InnerConeAngle", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetInnerConeAngle), new SetValueHandler(SetInnerConeAngle), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(202, "OuterConeAngle", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetOuterConeAngle), new SetValueHandler(SetOuterConeAngle), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(202, "Intensity", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, false, new GetValueHandler(GetIntensity), new SetValueHandler(SetIntensity), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(202, "Attenuation", 234, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttenuation), new SetValueHandler(SetAttenuation), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[8] { uixPropertySchema4, uixPropertySchema8, diff --git a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs index e2056e4..b61c24d 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/StackLayoutInputSchema.cs @@ -23,13 +23,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new StackLayoutInput(); - public static void Pass1Initialize() => StackLayoutInputSchema.Type = new UIXTypeSchema(205, "StackLayoutInput", null, 133, typeof(StackLayoutInput), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(205, "StackLayoutInput", null, 133, typeof(StackLayoutInput), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(205, "Priority", 206, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(StackLayoutInputSchema.GetPriority), new SetValueHandler(StackLayoutInputSchema.SetPriority), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(205, "MinimumSize", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(StackLayoutInputSchema.GetMinimumSize), new SetValueHandler(StackLayoutInputSchema.SetMinimumSize), false); - StackLayoutInputSchema.Type.Initialize(new DefaultConstructHandler(StackLayoutInputSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(205, "Priority", 206, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPriority), new SetValueHandler(SetPriority), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(205, "MinimumSize", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMinimumSize), new SetValueHandler(SetMinimumSize), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs index eed65b3..98b1a90 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/StackLayoutSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new StackLayout(); - public static void Pass1Initialize() => StackLayoutSchema.Type = new UIXTypeSchema(204, "StackLayout", null, 132, typeof(StackLayout), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(204, "StackLayout", null, 132, typeof(StackLayout), UIXTypeFlags.Immutable); - public static void Pass2Initialize() => StackLayoutSchema.Type.Initialize(new DefaultConstructHandler(StackLayoutSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs index 0e3a4df..7ef6416 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/StringSchema.cs @@ -128,7 +128,7 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (ObjectSchema.Type.IsAssignableFrom(fromType)) { - result = StringSchema.ConvertFromObject(from, out instance); + result = ConvertFromObject(from, out instance); if (!result.Failed) return result; } @@ -165,49 +165,49 @@ namespace Microsoft.Iris.Markup.UIX } } - public static void Pass1Initialize() => StringSchema.Type = new UIXTypeSchema(208, "String", "string", 153, typeof(string), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(208, "String", "string", 153, typeof(string), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(208, "Length", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(StringSchema.GetLength), null, false); + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(208, "Length", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLength), null, false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(208, "IsNullOrEmpty", new short[1] { 208 - }, 15, new InvokeHandler(StringSchema.CallIsNullOrEmptyString), true); + }, 15, new InvokeHandler(CallIsNullOrEmptyString), true); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(208, "Substring", new short[1] { 115 - }, 208, new InvokeHandler(StringSchema.CallSubstringInt32), false); + }, 208, new InvokeHandler(CallSubstringInt32), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(208, "Substring", new short[2] { 115, 115 - }, 208, new InvokeHandler(StringSchema.CallSubstringInt32Int32), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(208, "Trim", null, 208, new InvokeHandler(StringSchema.CallTrim), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(208, "ToLower", null, 208, new InvokeHandler(StringSchema.CallToLower), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(208, "ToUpper", null, 208, new InvokeHandler(StringSchema.CallToUpper), false); + }, 208, new InvokeHandler(CallSubstringInt32Int32), false); + UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(208, "Trim", null, 208, new InvokeHandler(CallTrim), false); + UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(208, "ToLower", null, 208, new InvokeHandler(CallToLower), false); + UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(208, "ToUpper", null, 208, new InvokeHandler(CallToUpper), false); UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(208, "Format", new short[1] { 153 - }, 208, new InvokeHandler(StringSchema.CallFormatObject), false); + }, 208, new InvokeHandler(CallFormatObject), false); UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(208, "Format", new short[2] { 153, 153 - }, 208, new InvokeHandler(StringSchema.CallFormatObjectObject), false); + }, 208, new InvokeHandler(CallFormatObjectObject), false); UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(208, "Format", new short[3] { 153, 153, 153 - }, 208, new InvokeHandler(StringSchema.CallFormatObjectObjectObject), false); + }, 208, new InvokeHandler(CallFormatObjectObjectObject), false); UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(208, "Format", new short[4] { 153, 153, 153, 153 - }, 208, new InvokeHandler(StringSchema.CallFormatObjectObjectObjectObject), false); + }, 208, new InvokeHandler(CallFormatObjectObjectObjectObject), false); UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(208, "Format", new short[5] { 153, @@ -215,8 +215,8 @@ namespace Microsoft.Iris.Markup.UIX 153, 153, 153 - }, 208, new InvokeHandler(StringSchema.CallFormatObjectObjectObjectObjectObject), false); - StringSchema.Type.Initialize(new DefaultConstructHandler(StringSchema.Construct), null, new PropertySchema[1] + }, 208, new InvokeHandler(CallFormatObjectObjectObjectObjectObject), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, new MethodSchema[11] @@ -232,7 +232,7 @@ namespace Microsoft.Iris.Markup.UIX uixMethodSchema9, uixMethodSchema10, uixMethodSchema11 - }, null, null, new TypeConverterHandler(StringSchema.TryConvertFrom), new SupportsTypeConversionHandler(StringSchema.IsConversionSupported), new EncodeBinaryHandler(StringSchema.EncodeBinary), new DecodeBinaryHandler(StringSchema.DecodeBinary), new PerformOperationHandler(StringSchema.ExecuteOperation), new SupportsOperationHandler(StringSchema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs index c5bb277..f6f575c 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/SwitchAnimationSchema.cs @@ -25,14 +25,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new SwitchAnimation(); - public static void Pass1Initialize() => SwitchAnimationSchema.Type = new UIXTypeSchema(210, "SwitchAnimation", null, 104, typeof(SwitchAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(210, "SwitchAnimation", null, 104, typeof(SwitchAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(210, "Expression", 231, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SwitchAnimationSchema.GetExpression), new SetValueHandler(SwitchAnimationSchema.SetExpression), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(210, "Options", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(SwitchAnimationSchema.GetOptions), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(210, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(SwitchAnimationSchema.GetType), new SetValueHandler(SwitchAnimationSchema.SetType), false); - SwitchAnimationSchema.Type.Initialize(new DefaultConstructHandler(SwitchAnimationSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(210, "Expression", 231, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetExpression), new SetValueHandler(SetExpression), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(210, "Options", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetOptions), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(210, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs index 322b9c9..4d9aab3 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextEditingHandlerSchema.cs @@ -131,39 +131,39 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => TextEditingHandlerSchema.Type = new UIXTypeSchema(214, "TextEditingHandler", null, 110, typeof(TextEditingHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(214, "TextEditingHandler", null, 110, typeof(TextEditingHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(214, "AcceptsEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetAcceptsEnter), new SetValueHandler(TextEditingHandlerSchema.SetAcceptsEnter), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(214, "AcceptsTab", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetAcceptsTab), new SetValueHandler(TextEditingHandlerSchema.SetAcceptsTab), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(214, "CaretInfo", 26, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetCaretInfo), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(214, "EditableTextData", 68, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetEditableTextData), new SetValueHandler(TextEditingHandlerSchema.SetEditableTextData), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(214, "Overtype", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetOvertype), new SetValueHandler(TextEditingHandlerSchema.SetOvertype), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(214, "TextDisplay", 212, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetTextDisplay), new SetValueHandler(TextEditingHandlerSchema.SetTextDisplay), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(214, "SelectionRange", 187, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetSelectionRange), new SetValueHandler(TextEditingHandlerSchema.SetSelectionRange), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(214, "CopyCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetCopyCommand), null, false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(214, "CutCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetCutCommand), null, false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(214, "DeleteCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetDeleteCommand), null, false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(214, "PasteCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetPasteCommand), null, false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(214, "SelectAllCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetSelectAllCommand), null, false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(214, "UndoCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetUndoCommand), null, false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(214, "HorizontalScrollModel", 218, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetHorizontalScrollModel), new SetValueHandler(TextEditingHandlerSchema.SetHorizontalScrollModel), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(214, "VerticalScrollModel", 218, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetVerticalScrollModel), new SetValueHandler(TextEditingHandlerSchema.SetVerticalScrollModel), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(214, "DetectUrls", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetDetectUrls), new SetValueHandler(TextEditingHandlerSchema.SetDetectUrls), false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(214, "LinkColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetLinkColor), new SetValueHandler(TextEditingHandlerSchema.SetLinkColor), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(214, "LinkClickedParameter", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetLinkClickedParameter), null, false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(214, "InImeCompositionMode", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetInImeCompositionMode), new SetValueHandler(TextEditingHandlerSchema.SetInImeCompositionMode), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(214, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextEditingHandlerSchema.GetHandlerStage), new SetValueHandler(TextEditingHandlerSchema.SetHandlerStage), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(214, "AcceptsEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAcceptsEnter), new SetValueHandler(SetAcceptsEnter), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(214, "AcceptsTab", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAcceptsTab), new SetValueHandler(SetAcceptsTab), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(214, "CaretInfo", 26, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCaretInfo), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(214, "EditableTextData", 68, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEditableTextData), new SetValueHandler(SetEditableTextData), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(214, "Overtype", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetOvertype), new SetValueHandler(SetOvertype), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(214, "TextDisplay", 212, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextDisplay), new SetValueHandler(SetTextDisplay), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(214, "SelectionRange", 187, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectionRange), new SetValueHandler(SetSelectionRange), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(214, "CopyCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCopyCommand), null, false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(214, "CutCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCutCommand), null, false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(214, "DeleteCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDeleteCommand), null, false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(214, "PasteCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPasteCommand), null, false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(214, "SelectAllCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSelectAllCommand), null, false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(214, "UndoCommand", 40, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUndoCommand), null, false); + UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(214, "HorizontalScrollModel", 218, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHorizontalScrollModel), new SetValueHandler(SetHorizontalScrollModel), false); + UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(214, "VerticalScrollModel", 218, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVerticalScrollModel), new SetValueHandler(SetVerticalScrollModel), false); + UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(214, "DetectUrls", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDetectUrls), new SetValueHandler(SetDetectUrls), false); + UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(214, "LinkColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLinkColor), new SetValueHandler(SetLinkColor), false); + UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(214, "LinkClickedParameter", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLinkClickedParameter), null, false); + UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(214, "InImeCompositionMode", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetInImeCompositionMode), new SetValueHandler(SetInImeCompositionMode), false); + UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(214, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); UIXEventSchema uixEventSchema1 = new UIXEventSchema(214, "TypingInputRejected"); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(214, "Copy", null, 240, new InvokeHandler(TextEditingHandlerSchema.CallCopy), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(214, "Cut", null, 240, new InvokeHandler(TextEditingHandlerSchema.CallCut), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(214, "Delete", null, 240, new InvokeHandler(TextEditingHandlerSchema.CallDelete), false); - UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(214, "Paste", null, 240, new InvokeHandler(TextEditingHandlerSchema.CallPaste), false); - UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(214, "SelectAll", null, 240, new InvokeHandler(TextEditingHandlerSchema.CallSelectAll), false); - UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(214, "Undo", null, 240, new InvokeHandler(TextEditingHandlerSchema.CallUndo), false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(214, "Copy", null, 240, new InvokeHandler(CallCopy), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(214, "Cut", null, 240, new InvokeHandler(CallCut), false); + UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(214, "Delete", null, 240, new InvokeHandler(CallDelete), false); + UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(214, "Paste", null, 240, new InvokeHandler(CallPaste), false); + UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(214, "SelectAll", null, 240, new InvokeHandler(CallSelectAll), false); + UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(214, "Undo", null, 240, new InvokeHandler(CallUndo), false); UIXEventSchema uixEventSchema2 = new UIXEventSchema(214, "LinkClicked"); - TextEditingHandlerSchema.Type.Initialize(new DefaultConstructHandler(TextEditingHandlerSchema.Construct), null, new PropertySchema[20] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[20] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs index c524f0f..a076d22 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextFragmentSchema.cs @@ -20,15 +20,15 @@ namespace Microsoft.Iris.Markup.UIX private static object GetAttributes(object instanceObj) => ((TextFragment)instanceObj).Attributes; - public static void Pass1Initialize() => TextFragmentSchema.Type = new UIXTypeSchema(215, "TextFragment", null, 153, typeof(TextFragment), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(215, "TextFragment", null, 153, typeof(TextFragment), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(215, "Runs", 138, 216, ExpressionRestriction.ReadOnly, false, null, false, new GetValueHandler(TextFragmentSchema.GetRuns), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(215, "TagName", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextFragmentSchema.GetTagName), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(215, "Content", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextFragmentSchema.GetContent), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(215, "Attributes", 58, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextFragmentSchema.GetAttributes), null, false); - TextFragmentSchema.Type.Initialize(null, null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(215, "Runs", 138, 216, ExpressionRestriction.ReadOnly, false, null, false, new GetValueHandler(GetRuns), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(215, "TagName", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTagName), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(215, "Content", 208, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetContent), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(215, "Attributes", 58, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttributes), null, false); + Type.Initialize(null, null, new PropertySchema[4] { uixPropertySchema4, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs index 1456cf2..6da6560 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextRunDataSchema.cs @@ -20,15 +20,15 @@ namespace Microsoft.Iris.Markup.UIX private static object GetLineNumber(object instanceObj) => ((TextRunData)instanceObj).LineNumber; - public static void Pass1Initialize() => TextRunDataSchema.Type = new UIXTypeSchema(216, "TextRunData", null, 153, typeof(TextRunData), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(216, "TextRunData", null, 153, typeof(TextRunData), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(216, "Position", 158, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextRunDataSchema.GetPosition), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(216, "Size", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextRunDataSchema.GetSize), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(216, "Color", 35, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextRunDataSchema.GetColor), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(216, "LineNumber", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TextRunDataSchema.GetLineNumber), null, false); - TextRunDataSchema.Type.Initialize(null, null, new PropertySchema[4] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(216, "Position", 158, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetPosition), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(216, "Size", 195, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSize), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(216, "Color", 35, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetColor), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(216, "LineNumber", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLineNumber), null, false); + Type.Initialize(null, null, new PropertySchema[4] { uixPropertySchema3, uixPropertySchema4, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs index 75b7669..d237237 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextRunRendererSchema.cs @@ -28,14 +28,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TextRunRenderer(); - public static void Pass1Initialize() => TextRunRendererSchema.Type = new UIXTypeSchema(217, "TextRunRenderer", null, 239, typeof(TextRunRenderer), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(217, "TextRunRenderer", null, 239, typeof(TextRunRenderer), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(217, "Data", 216, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextRunRendererSchema.GetData), new SetValueHandler(TextRunRendererSchema.SetData), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(217, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextRunRendererSchema.GetColor), new SetValueHandler(TextRunRendererSchema.SetColor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(217, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextRunRendererSchema.GetEffect), new SetValueHandler(TextRunRendererSchema.SetEffect), false); - TextRunRendererSchema.Type.Initialize(new DefaultConstructHandler(TextRunRendererSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(217, "Data", 216, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetData), new SetValueHandler(SetData), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(217, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColor), new SetValueHandler(SetColor), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(217, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEffect), new SetValueHandler(SetEffect), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema2, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs index 43f375a..3aa9ee4 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextSchema.cs @@ -118,35 +118,35 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Text(); - public static void Pass1Initialize() => TextSchema.Type = new UIXTypeSchema(212, "Text", null, 239, typeof(Text), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(212, "Text", null, 239, typeof(Text), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(212, "Content", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetContent), new SetValueHandler(TextSchema.SetContent), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(212, "Font", 93, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetFont), new SetValueHandler(TextSchema.SetFont), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(212, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetColor), new SetValueHandler(TextSchema.SetColor), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(212, "WordWrap", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetWordWrap), new SetValueHandler(TextSchema.SetWordWrap), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(212, "MaximumLines", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(TextSchema.GetMaximumLines), new SetValueHandler(TextSchema.SetMaximumLines), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(212, "LineAlignment", 137, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetLineAlignment), new SetValueHandler(TextSchema.SetLineAlignment), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(212, "LineSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetLineSpacing), new SetValueHandler(TextSchema.SetLineSpacing), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(212, "CharacterSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetCharacterSpacing), new SetValueHandler(TextSchema.SetCharacterSpacing), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(212, "EnableKerning", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetEnableKerning), new SetValueHandler(TextSchema.SetEnableKerning), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(212, "LastLineBounds", 169, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(TextSchema.GetLastLineBounds), null, false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(212, "FadeSize", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetFadeSize), new SetValueHandler(TextSchema.SetFadeSize), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(212, "Style", 220, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetStyle), new SetValueHandler(TextSchema.SetStyle), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(212, "NamedStyles", 58, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetNamedStyles), new SetValueHandler(TextSchema.SetNamedStyles), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(212, "Fragments", 138, 215, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(TextSchema.GetFragments), null, false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(212, "TextSharpness", 219, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetTextSharpness), new SetValueHandler(TextSchema.SetTextSharpness), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(212, "Clipped", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetClipped), null, false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(212, "ContributesToWidth", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetContributesToWidth), new SetValueHandler(TextSchema.SetContributesToWidth), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(212, "BoundsType", 213, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetBoundsType), new SetValueHandler(TextSchema.SetBoundsType), false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(212, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetEffect), new SetValueHandler(TextSchema.SetEffect), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(212, "DisableIme", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetDisableIme), new SetValueHandler(TextSchema.SetDisableIme), false); - UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(212, "HighlightColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetHighlightColor), new SetValueHandler(TextSchema.SetHighlightColor), false); - UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(212, "TextHighlightColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetTextHighlightColor), new SetValueHandler(TextSchema.SetTextHighlightColor), false); - UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(212, "UsePasswordMask", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetUsePasswordMask), new SetValueHandler(TextSchema.SetUsePasswordMask), false); - UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(212, "PasswordMask", 27, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextSchema.GetPasswordMask), new SetValueHandler(TextSchema.SetPasswordMask), false); - TextSchema.Type.Initialize(new DefaultConstructHandler(TextSchema.Construct), null, new PropertySchema[24] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(212, "Content", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContent), new SetValueHandler(SetContent), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(212, "Font", 93, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFont), new SetValueHandler(SetFont), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(212, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColor), new SetValueHandler(SetColor), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(212, "WordWrap", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetWordWrap), new SetValueHandler(SetWordWrap), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(212, "MaximumLines", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetMaximumLines), new SetValueHandler(SetMaximumLines), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(212, "LineAlignment", 137, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLineAlignment), new SetValueHandler(SetLineAlignment), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(212, "LineSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLineSpacing), new SetValueHandler(SetLineSpacing), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(212, "CharacterSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCharacterSpacing), new SetValueHandler(SetCharacterSpacing), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(212, "EnableKerning", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnableKerning), new SetValueHandler(SetEnableKerning), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(212, "LastLineBounds", 169, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetLastLineBounds), null, false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(212, "FadeSize", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFadeSize), new SetValueHandler(SetFadeSize), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(212, "Style", 220, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetStyle), new SetValueHandler(SetStyle), false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(212, "NamedStyles", 58, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNamedStyles), new SetValueHandler(SetNamedStyles), false); + UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(212, "Fragments", 138, 215, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetFragments), null, false); + UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(212, "TextSharpness", 219, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextSharpness), new SetValueHandler(SetTextSharpness), false); + UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(212, "Clipped", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClipped), null, false); + UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(212, "ContributesToWidth", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContributesToWidth), new SetValueHandler(SetContributesToWidth), false); + UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(212, "BoundsType", 213, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBoundsType), new SetValueHandler(SetBoundsType), false); + UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(212, "Effect", 78, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEffect), new SetValueHandler(SetEffect), false); + UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(212, "DisableIme", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDisableIme), new SetValueHandler(SetDisableIme), false); + UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(212, "HighlightColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHighlightColor), new SetValueHandler(SetHighlightColor), false); + UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(212, "TextHighlightColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTextHighlightColor), new SetValueHandler(SetTextHighlightColor), false); + UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(212, "UsePasswordMask", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUsePasswordMask), new SetValueHandler(SetUsePasswordMask), false); + UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(212, "PasswordMask", 27, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPasswordMask), new SetValueHandler(SetPasswordMask), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[24] { uixPropertySchema18, uixPropertySchema8, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs index 0445d30..ada5efd 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextScrollModelSchema.cs @@ -14,8 +14,8 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TextScrollModel(); - public static void Pass1Initialize() => TextScrollModelSchema.Type = new UIXTypeSchema(218, "TextScrollModel", null, 183, typeof(TextScrollModel), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(218, "TextScrollModel", null, 183, typeof(TextScrollModel), UIXTypeFlags.None); - public static void Pass2Initialize() => TextScrollModelSchema.Type.Initialize(new DefaultConstructHandler(TextScrollModelSchema.Construct), null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(new DefaultConstructHandler(Construct), null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs index fd152a1..3b94915 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TextStyleSchema.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class TextStyleSchema { - public static RangeValidator ValidateFontFace = new RangeValidator(TextStyleSchema.RangeValidateFontFace); + public static RangeValidator ValidateFontFace = new RangeValidator(RangeValidateFontFace); public static UIXTypeSchema Type; private static object GetFontFace(object instanceObj) => ((TextStyle)instanceObj).FontFace; @@ -21,7 +21,7 @@ namespace Microsoft.Iris.Markup.UIX { TextStyle textStyle = (TextStyle)instanceObj; string str = (string)valueObj; - Result result = TextStyleSchema.ValidateFontFace(valueObj); + Result result = ValidateFontFace(valueObj); if (result.Failed) ErrorManager.ReportError(result.Error); else @@ -90,21 +90,21 @@ namespace Microsoft.Iris.Markup.UIX return str.Length > 31 ? Result.Fail("\"{0}\" cannot be longer than {1} characters", str, "31") : Result.Success; } - public static void Pass1Initialize() => TextStyleSchema.Type = new UIXTypeSchema(220, "TextStyle", null, 153, typeof(TextStyle), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(220, "TextStyle", null, 153, typeof(TextStyle), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(220, "FontFace", 208, -1, ExpressionRestriction.None, false, TextStyleSchema.ValidateFontFace, true, new GetValueHandler(TextStyleSchema.GetFontFace), new SetValueHandler(TextStyleSchema.SetFontFace), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(220, "FontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(TextStyleSchema.GetFontSize), new SetValueHandler(TextStyleSchema.SetFontSize), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(220, "Bold", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetBold), new SetValueHandler(TextStyleSchema.SetBold), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(220, "Italic", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetItalic), new SetValueHandler(TextStyleSchema.SetItalic), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(220, "Underline", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetUnderline), new SetValueHandler(TextStyleSchema.SetUnderline), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(220, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetColor), new SetValueHandler(TextStyleSchema.SetColor), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(220, "LineSpacing", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(TextStyleSchema.GetLineSpacing), new SetValueHandler(TextStyleSchema.SetLineSpacing), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(220, "EnableKerning", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetEnableKerning), new SetValueHandler(TextStyleSchema.SetEnableKerning), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(220, "CharacterSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetCharacterSpacing), new SetValueHandler(TextStyleSchema.SetCharacterSpacing), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(220, "Fragment", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TextStyleSchema.GetFragment), new SetValueHandler(TextStyleSchema.SetFragment), false); - TextStyleSchema.Type.Initialize(new DefaultConstructHandler(TextStyleSchema.Construct), null, new PropertySchema[10] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(220, "FontFace", 208, -1, ExpressionRestriction.None, false, ValidateFontFace, true, new GetValueHandler(GetFontFace), new SetValueHandler(SetFontFace), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(220, "FontSize", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(GetFontSize), new SetValueHandler(SetFontSize), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(220, "Bold", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBold), new SetValueHandler(SetBold), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(220, "Italic", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetItalic), new SetValueHandler(SetItalic), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(220, "Underline", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetUnderline), new SetValueHandler(SetUnderline), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(220, "Color", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetColor), new SetValueHandler(SetColor), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(220, "LineSpacing", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotNegative, true, new GetValueHandler(GetLineSpacing), new SetValueHandler(SetLineSpacing), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(220, "EnableKerning", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnableKerning), new SetValueHandler(SetEnableKerning), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(220, "CharacterSpacing", 194, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCharacterSpacing), new SetValueHandler(SetCharacterSpacing), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(220, "Fragment", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFragment), new SetValueHandler(SetFragment), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[10] { uixPropertySchema3, uixPropertySchema9, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs index 4fcd3ed..ff96383 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TimerSchema.cs @@ -49,17 +49,17 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => TimerSchema.Type = new UIXTypeSchema(221, "Timer", null, 153, typeof(UITimer), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(221, "Timer", null, 153, typeof(UITimer), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(221, "Interval", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(TimerSchema.GetInterval), new SetValueHandler(TimerSchema.SetInterval), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(221, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TimerSchema.GetEnabled), new SetValueHandler(TimerSchema.SetEnabled), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(221, "AutoRepeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TimerSchema.GetAutoRepeat), new SetValueHandler(TimerSchema.SetAutoRepeat), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(221, "Interval", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetInterval), new SetValueHandler(SetInterval), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(221, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(221, "AutoRepeat", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAutoRepeat), new SetValueHandler(SetAutoRepeat), false); UIXEventSchema uixEventSchema = new UIXEventSchema(221, "Tick"); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(221, "Start", null, 240, new InvokeHandler(TimerSchema.CallStart), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(221, "Stop", null, 240, new InvokeHandler(TimerSchema.CallStop), false); - TimerSchema.Type.Initialize(new DefaultConstructHandler(TimerSchema.Construct), null, new PropertySchema[3] + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(221, "Start", null, 240, new InvokeHandler(CallStart), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(221, "Stop", null, 240, new InvokeHandler(CallStop), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs index 6ae1966..b10ca09 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TransformAnimationSchema.cs @@ -36,17 +36,17 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TransformAnimation(); - public static void Pass1Initialize() => TransformAnimationSchema.Type = new UIXTypeSchema(222, "TransformAnimation", null, 104, typeof(TransformAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(222, "TransformAnimation", null, 104, typeof(TransformAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(222, "Delay", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformAnimationSchema.GetDelay), new SetValueHandler(TransformAnimationSchema.SetDelay), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(222, "Filter", 131, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformAnimationSchema.GetFilter), new SetValueHandler(TransformAnimationSchema.SetFilter), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(222, "Magnitude", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformAnimationSchema.GetMagnitude), new SetValueHandler(TransformAnimationSchema.SetMagnitude), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(222, "TimeScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformAnimationSchema.GetTimeScale), new SetValueHandler(TransformAnimationSchema.SetTimeScale), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(222, "Source", 104, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformAnimationSchema.GetSource), new SetValueHandler(TransformAnimationSchema.SetSource), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(222, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformAnimationSchema.GetType), null, false); - TransformAnimationSchema.Type.Initialize(new DefaultConstructHandler(TransformAnimationSchema.Construct), null, new PropertySchema[6] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(222, "Delay", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetDelay), new SetValueHandler(SetDelay), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(222, "Filter", 131, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetFilter), new SetValueHandler(SetFilter), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(222, "Magnitude", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMagnitude), new SetValueHandler(SetMagnitude), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(222, "TimeScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetTimeScale), new SetValueHandler(SetTimeScale), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(222, "Source", 104, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSource), new SetValueHandler(SetSource), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(222, "Type", 10, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs index eab6299..f57cd28 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TransformByAttributeAnimationSchema.cs @@ -38,17 +38,17 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TransformByAttributeAnimation(); - public static void Pass1Initialize() => TransformByAttributeAnimationSchema.Type = new UIXTypeSchema(224, "TransformByAttributeAnimation", null, 222, typeof(TransformByAttributeAnimation), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(224, "TransformByAttributeAnimation", null, 222, typeof(TransformByAttributeAnimation), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(224, "Attribute", 223, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformByAttributeAnimationSchema.GetAttribute), new SetValueHandler(TransformByAttributeAnimationSchema.SetAttribute), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(224, "MaxTimeScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformByAttributeAnimationSchema.GetMaxTimeScale), new SetValueHandler(TransformByAttributeAnimationSchema.SetMaxTimeScale), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(224, "MaxDelay", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformByAttributeAnimationSchema.GetMaxDelay), new SetValueHandler(TransformByAttributeAnimationSchema.SetMaxDelay), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(224, "MaxMagnitude", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformByAttributeAnimationSchema.GetMaxMagnitude), new SetValueHandler(TransformByAttributeAnimationSchema.SetMaxMagnitude), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(224, "Override", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformByAttributeAnimationSchema.GetOverride), new SetValueHandler(TransformByAttributeAnimationSchema.SetOverride), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(224, "ValueTransformer", 232, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TransformByAttributeAnimationSchema.GetValueTransformer), new SetValueHandler(TransformByAttributeAnimationSchema.SetValueTransformer), false); - TransformByAttributeAnimationSchema.Type.Initialize(new DefaultConstructHandler(TransformByAttributeAnimationSchema.Construct), null, new PropertySchema[6] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(224, "Attribute", 223, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAttribute), new SetValueHandler(SetAttribute), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(224, "MaxTimeScale", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxTimeScale), new SetValueHandler(SetMaxTimeScale), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(224, "MaxDelay", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxDelay), new SetValueHandler(SetMaxDelay), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(224, "MaxMagnitude", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMaxMagnitude), new SetValueHandler(SetMaxMagnitude), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(224, "Override", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetOverride), new SetValueHandler(SetOverride), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(224, "ValueTransformer", 232, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetValueTransformer), new SetValueHandler(SetValueTransformer), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema1, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs index e17583d..2baa59e 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TypeConstraintSchema.cs @@ -20,13 +20,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TypeConstraint(); - public static void Pass1Initialize() => TypeConstraintSchema.Type = new UIXTypeSchema(226, "TypeConstraint", null, 153, typeof(TypeConstraint), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(226, "TypeConstraint", null, 153, typeof(TypeConstraint), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(226, "Type", 225, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TypeConstraintSchema.GetType), new SetValueHandler(TypeConstraintSchema.SetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(226, "Constraint", 225, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(TypeConstraintSchema.GetConstraint), new SetValueHandler(TypeConstraintSchema.SetConstraint), false); - TypeConstraintSchema.Type.Initialize(new DefaultConstructHandler(TypeConstraintSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(226, "Type", 225, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetType), new SetValueHandler(SetType), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(226, "Constraint", 225, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetConstraint), new SetValueHandler(SetConstraint), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs b/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs index 09800ac..c60e370 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TypeSchemaDefinition.cs @@ -10,8 +10,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => TypeSchemaDefinition.Type = new UIXTypeSchema(225, "Type", null, 153, typeof(TypeSchema), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(225, "Type", null, 153, typeof(TypeSchema), UIXTypeFlags.Immutable); - public static void Pass2Initialize() => TypeSchemaDefinition.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs index 0e2ef7b..b9a773b 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TypeSelectorSchema.cs @@ -22,13 +22,13 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TypeSelector(); - public static void Pass1Initialize() => TypeSelectorSchema.Type = new UIXTypeSchema(227, "TypeSelector", null, 153, typeof(TypeSelector), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(227, "TypeSelector", null, 153, typeof(TypeSelector), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(227, "Type", 225, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TypeSelectorSchema.GetType), new SetValueHandler(TypeSelectorSchema.SetType), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(227, "ContentName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TypeSelectorSchema.GetContentName), new SetValueHandler(TypeSelectorSchema.SetContentName), false); - TypeSelectorSchema.Type.Initialize(new DefaultConstructHandler(TypeSelectorSchema.Construct), null, new PropertySchema[2] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(227, "Type", 225, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetType), new SetValueHandler(SetType), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(227, "ContentName", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetContentName), new SetValueHandler(SetContentName), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[2] { uixPropertySchema2, uixPropertySchema1 diff --git a/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs index fc95d56..ae749db 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/TypingHandlerSchema.cs @@ -32,16 +32,16 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new TypingHandler(); - public static void Pass1Initialize() => TypingHandlerSchema.Type = new UIXTypeSchema(228, "TypingHandler", null, 110, typeof(TypingHandler), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(228, "TypingHandler", null, 110, typeof(TypingHandler), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(228, "EditableTextData", 68, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TypingHandlerSchema.GetEditableTextData), new SetValueHandler(TypingHandlerSchema.SetEditableTextData), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(228, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TypingHandlerSchema.GetHandlerStage), new SetValueHandler(TypingHandlerSchema.SetHandlerStage), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(228, "SubmitOnEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TypingHandlerSchema.GetSubmitOnEnter), new SetValueHandler(TypingHandlerSchema.SetSubmitOnEnter), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(228, "TreatEscapeAsBackspace", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(TypingHandlerSchema.GetTreatEscapeAsBackspace), new SetValueHandler(TypingHandlerSchema.SetTreatEscapeAsBackspace), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(228, "EditableTextData", 68, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEditableTextData), new SetValueHandler(SetEditableTextData), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(228, "HandlerStage", 112, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHandlerStage), new SetValueHandler(SetHandlerStage), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(228, "SubmitOnEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSubmitOnEnter), new SetValueHandler(SetSubmitOnEnter), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(228, "TreatEscapeAsBackspace", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetTreatEscapeAsBackspace), new SetValueHandler(SetTreatEscapeAsBackspace), false); UIXEventSchema uixEventSchema = new UIXEventSchema(228, "TypingInputRejected"); - TypingHandlerSchema.Type.Initialize(new DefaultConstructHandler(TypingHandlerSchema.Construct), null, new PropertySchema[4] + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[4] { uixPropertySchema1, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs b/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs index ee4e5d0..cb78843 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/UISchema.cs @@ -33,18 +33,18 @@ namespace Microsoft.Iris.Markup.UIX private static object GetScripts(object instanceObj) => (object)null; - public static void Pass1Initialize() => UISchema.Type = new UIXTypeSchema(229, "UI", null, -1, typeof(UIClass), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(229, "UI", null, -1, typeof(UIClass), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(229, "Properties", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(UISchema.GetProperties), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(229, "Locals", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(UISchema.GetLocals), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(229, "Input", 138, 110, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(UISchema.GetInput), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(229, "Content", 239, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(UISchema.GetContent), new SetValueHandler(UISchema.SetContent), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(229, "Flippable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UISchema.GetFlippable), new SetValueHandler(UISchema.SetFlippable), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(229, "Base", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(UISchema.SetBase), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(229, "Scripts", 138, 240, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(UISchema.GetScripts), null, false); - UISchema.Type.Initialize(null, null, new PropertySchema[7] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(229, "Properties", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetProperties), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(229, "Locals", 58, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetLocals), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(229, "Input", 138, 110, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetInput), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(229, "Content", 239, -1, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetContent), new SetValueHandler(SetContent), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(229, "Flippable", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFlippable), new SetValueHandler(SetFlippable), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(229, "Base", 208, -1, ExpressionRestriction.NoAccess, false, null, true, null, new SetValueHandler(SetBase), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(229, "Scripts", 138, 240, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetScripts), null, false); + Type.Initialize(null, null, new PropertySchema[7] { uixPropertySchema6, uixPropertySchema4, diff --git a/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs index 0e0565a..9f46e9f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/UIStateSchema.cs @@ -111,36 +111,36 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => UIStateSchema.Type = new UIXTypeSchema(230, "UIState", null, -1, typeof(UIClass), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(230, "UIState", null, -1, typeof(UIClass), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(230, "CreateInterestOnFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetCreateInterestOnFocus), new SetValueHandler(UIStateSchema.SetCreateInterestOnFocus), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(230, "Cursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetCursor), new SetValueHandler(UIStateSchema.SetCursor), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(230, "DirectKeyFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetDirectKeyFocus), null, false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(230, "DirectMouseFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetDirectMouseFocus), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(230, "FocusInterestTarget", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetFocusInterestTarget), new SetValueHandler(UIStateSchema.SetFocusInterestTarget), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(230, "FocusInterestTargetMargins", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetFocusInterestTargetMargins), new SetValueHandler(UIStateSchema.SetFocusInterestTargetMargins), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(230, "KeyFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetKeyFocus), null, false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(230, "KeyFocusOnMouseDown", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetKeyFocusOnMouseDown), new SetValueHandler(UIStateSchema.SetKeyFocusOnMouseDown), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(230, "KeyFocusOnMouseEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetKeyFocusOnMouseEnter), new SetValueHandler(UIStateSchema.SetKeyFocusOnMouseEnter), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(230, "KeyInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetKeyInteractive), new SetValueHandler(UIStateSchema.SetKeyInteractive), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(230, "MouseFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetMouseFocus), null, false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(230, "MouseInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetMouseInteractive), new SetValueHandler(UIStateSchema.SetMouseInteractive), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(230, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetEnabled), new SetValueHandler(UIStateSchema.SetEnabled), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(230, "FullyEnabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetFullyEnabled), null, false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(230, "AllowDoubleClicks", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(UIStateSchema.GetAllowDoubleClicks), new SetValueHandler(UIStateSchema.SetAllowDoubleClicks), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(230, "PaintOrder", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(UIStateSchema.GetPaintOrder), new SetValueHandler(UIStateSchema.SetPaintOrder), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(230, "CreateInterestOnFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCreateInterestOnFocus), new SetValueHandler(SetCreateInterestOnFocus), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(230, "Cursor", 44, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCursor), new SetValueHandler(SetCursor), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(230, "DirectKeyFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDirectKeyFocus), null, false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(230, "DirectMouseFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDirectMouseFocus), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(230, "FocusInterestTarget", 239, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFocusInterestTarget), new SetValueHandler(SetFocusInterestTarget), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(230, "FocusInterestTargetMargins", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFocusInterestTargetMargins), new SetValueHandler(SetFocusInterestTargetMargins), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(230, "KeyFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocus), null, false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(230, "KeyFocusOnMouseDown", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocusOnMouseDown), new SetValueHandler(SetKeyFocusOnMouseDown), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(230, "KeyFocusOnMouseEnter", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyFocusOnMouseEnter), new SetValueHandler(SetKeyFocusOnMouseEnter), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(230, "KeyInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetKeyInteractive), new SetValueHandler(SetKeyInteractive), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(230, "MouseFocus", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseFocus), null, false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(230, "MouseInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseInteractive), new SetValueHandler(SetMouseInteractive), false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(230, "Enabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetEnabled), new SetValueHandler(SetEnabled), false); + UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(230, "FullyEnabled", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetFullyEnabled), null, false); + UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(230, "AllowDoubleClicks", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAllowDoubleClicks), new SetValueHandler(SetAllowDoubleClicks), false); + UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(230, "PaintOrder", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, false, new GetValueHandler(GetPaintOrder), new SetValueHandler(SetPaintOrder), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(230, "DisposeOwnedObject", new short[1] { 153 - }, 240, new InvokeHandler(UIStateSchema.CallDisposeOwnedObjectObject), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(230, "NavigateInto", null, 240, new InvokeHandler(UIStateSchema.CallNavigateInto), false); + }, 240, new InvokeHandler(CallDisposeOwnedObjectObject), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(230, "NavigateInto", null, 240, new InvokeHandler(CallNavigateInto), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(230, "NavigateInto", new short[1] { 15 - }, 240, new InvokeHandler(UIStateSchema.CallNavigateIntoBoolean), false); - UIStateSchema.Type.Initialize(null, null, new PropertySchema[16] + }, 240, new InvokeHandler(CallNavigateIntoBoolean), false); + Type.Initialize(null, null, new PropertySchema[16] { uixPropertySchema15, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs index 9c561c3..e46ee56 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ValueRangeSchema.cs @@ -30,16 +30,16 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ValueRangeSchema.Type = new UIXTypeSchema(231, "ValueRange", null, 153, typeof(IUIValueRange), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(231, "ValueRange", null, 153, typeof(IUIValueRange), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(231, "ObjectValue", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ValueRangeSchema.GetObjectValue), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(231, "HasPreviousValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ValueRangeSchema.GetHasPreviousValue), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(231, "HasNextValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ValueRangeSchema.GetHasNextValue), null, false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(231, "PreviousValue", null, 240, new InvokeHandler(ValueRangeSchema.CallPreviousValue), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(231, "NextValue", null, 240, new InvokeHandler(ValueRangeSchema.CallNextValue), false); - ValueRangeSchema.Type.Initialize(null, null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(231, "ObjectValue", 153, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetObjectValue), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(231, "HasPreviousValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasPreviousValue), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(231, "HasNextValue", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHasNextValue), null, false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(231, "PreviousValue", null, 240, new InvokeHandler(CallPreviousValue), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(231, "NextValue", null, 240, new InvokeHandler(CallNextValue), false); + Type.Initialize(null, null, new PropertySchema[3] { uixPropertySchema3, uixPropertySchema2, diff --git a/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs index c971957..d797078 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ValueTransformerSchema.cs @@ -58,17 +58,17 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new ValueTransformer(); - public static void Pass1Initialize() => ValueTransformerSchema.Type = new UIXTypeSchema(232, "ValueTransformer", null, 153, typeof(ValueTransformer), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(232, "ValueTransformer", null, 153, typeof(ValueTransformer), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(232, "Add", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ValueTransformerSchema.GetAdd), new SetValueHandler(ValueTransformerSchema.SetAdd), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(232, "Subtract", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ValueTransformerSchema.GetSubtract), new SetValueHandler(ValueTransformerSchema.SetSubtract), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(232, "Multiply", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ValueTransformerSchema.GetMultiply), new SetValueHandler(ValueTransformerSchema.SetMultiply), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(232, "Divide", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotZero, false, new GetValueHandler(ValueTransformerSchema.GetDivide), new SetValueHandler(ValueTransformerSchema.SetDivide), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(232, "Mod", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotZero, false, new GetValueHandler(ValueTransformerSchema.GetMod), new SetValueHandler(ValueTransformerSchema.SetMod), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(232, "Absolute", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ValueTransformerSchema.GetAbsolute), new SetValueHandler(ValueTransformerSchema.SetAbsolute), false); - ValueTransformerSchema.Type.Initialize(new DefaultConstructHandler(ValueTransformerSchema.Construct), null, new PropertySchema[6] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(232, "Add", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAdd), new SetValueHandler(SetAdd), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(232, "Subtract", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetSubtract), new SetValueHandler(SetSubtract), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(232, "Multiply", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMultiply), new SetValueHandler(SetMultiply), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(232, "Divide", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotZero, false, new GetValueHandler(GetDivide), new SetValueHandler(SetDivide), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(232, "Mod", 194, -1, ExpressionRestriction.None, false, SingleSchema.ValidateNotZero, false, new GetValueHandler(GetMod), new SetValueHandler(SetMod), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(232, "Absolute", 15, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetAbsolute), new SetValueHandler(SetAbsolute), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[6] { uixPropertySchema6, uixPropertySchema1, diff --git a/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs index 293995c..5dfbeb6 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/Vector2Schema.cs @@ -14,7 +14,7 @@ namespace Microsoft.Iris.Markup.UIX { internal static class Vector2Schema { - public static RangeValidator ValidateNotNegative = new RangeValidator(Vector2Schema.RangeValidateNotNegative); + public static RangeValidator ValidateNotNegative = new RangeValidator(RangeValidateNotNegative); public static UIXTypeSchema Type; private static object GetX(object instanceObj) => ((Vector2)instanceObj).X; @@ -41,25 +41,25 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructXY(object[] parameters) { - object instanceObj = Vector2Schema.Construct(); - Vector2Schema.SetX(ref instanceObj, parameters[0]); - Vector2Schema.SetY(ref instanceObj, parameters[1]); + object instanceObj = Construct(); + SetX(ref instanceObj, parameters[0]); + SetY(ref instanceObj, parameters[1]); return instanceObj; } private static Result ConvertFromStringXY(string[] splitString, out object instance) { - instance = Vector2Schema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Vector2", result1.Error); - Vector2Schema.SetX(ref instance, valueObj1); + SetX(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Vector2", result2.Error); - Vector2Schema.SetY(ref instance, valueObj2); + SetY(ref instance, valueObj2); return result2; } @@ -119,19 +119,19 @@ namespace Microsoft.Iris.Markup.UIX instance = null; if (SingleSchema.Type.IsAssignableFrom(fromType)) { - result = Vector2Schema.ConvertFromSingle(from, out instance); + result = ConvertFromSingle(from, out instance); if (!result.Failed) return result; } if (SizeSchema.Type.IsAssignableFrom(fromType)) { - result = Vector2Schema.ConvertFromSize(from, out instance); + result = ConvertFromSize(from, out instance); if (!result.Failed) return result; } if (StringSchema.Type.IsAssignableFrom(fromType)) { - result = Vector2Schema.ConvertFromString(from, out instance); + result = ConvertFromString(from, out instance); if (!result.Failed) return result; } @@ -140,7 +140,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 2) { - result = Vector2Schema.ConvertFromStringXY(splitString, out instance); + result = ConvertFromStringXY(splitString, out instance); if (!result.Failed) return result; } @@ -197,7 +197,7 @@ namespace Microsoft.Iris.Markup.UIX string parameter1 = (string)parameters[0]; Vector2 parameter2 = (Vector2)parameters[1]; object instanceObj1; - return Vector2Schema.ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; + return ConvertFromString(parameter1, out instanceObj1).Failed ? parameter2 : instanceObj1; } private static Result RangeValidateNotNegative(object value) @@ -206,23 +206,23 @@ namespace Microsoft.Iris.Markup.UIX return vector2.X < 0.0 || vector2.Y < 0.0 ? Result.Fail("Expecting a non-negative value, but got {0}", vector2.ToString()) : Result.Success; } - public static void Pass1Initialize() => Vector2Schema.Type = new UIXTypeSchema(233, "Vector2", null, 153, typeof(Vector2), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(233, "Vector2", null, 153, typeof(Vector2), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(233, "X", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Vector2Schema.GetX), new SetValueHandler(Vector2Schema.SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(233, "Y", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Vector2Schema.GetY), new SetValueHandler(Vector2Schema.SetY), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(233, "X", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(233, "Y", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(233, new short[2] { 194, 194 - }, new ConstructHandler(Vector2Schema.ConstructXY)); + }, new ConstructHandler(ConstructXY)); UIXMethodSchema uixMethodSchema = new UIXMethodSchema(233, "TryParse", new short[2] { 208, 233 - }, 233, new InvokeHandler(Vector2Schema.CallTryParseStringVector2), true); - Vector2Schema.Type.Initialize(new DefaultConstructHandler(Vector2Schema.Construct), new ConstructorSchema[1] + }, 233, new InvokeHandler(CallTryParseStringVector2), true); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[2] @@ -232,7 +232,7 @@ namespace Microsoft.Iris.Markup.UIX }, new MethodSchema[1] { uixMethodSchema - }, null, null, new TypeConverterHandler(Vector2Schema.TryConvertFrom), new SupportsTypeConversionHandler(Vector2Schema.IsConversionSupported), new EncodeBinaryHandler(Vector2Schema.EncodeBinary), new DecodeBinaryHandler(Vector2Schema.DecodeBinary), new PerformOperationHandler(Vector2Schema.ExecuteOperation), new SupportsOperationHandler(Vector2Schema.IsOperationSupported)); + }, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs b/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs index 47f4146..dd594f5 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/Vector3Schema.cs @@ -48,31 +48,31 @@ namespace Microsoft.Iris.Markup.UIX private static object ConstructXYZ(object[] parameters) { - object instanceObj = Vector3Schema.Construct(); - Vector3Schema.SetX(ref instanceObj, parameters[0]); - Vector3Schema.SetY(ref instanceObj, parameters[1]); - Vector3Schema.SetZ(ref instanceObj, parameters[2]); + object instanceObj = Construct(); + SetX(ref instanceObj, parameters[0]); + SetY(ref instanceObj, parameters[1]); + SetZ(ref instanceObj, parameters[2]); return instanceObj; } private static Result ConvertFromStringXYZ(string[] splitString, out object instance) { - instance = Vector3Schema.Construct(); + instance = Construct(); object valueObj1; Result result1 = UIXLoadResult.ValidateStringAsValue(splitString[0], SingleSchema.Type, null, out valueObj1); if (result1.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Vector3", result1.Error); - Vector3Schema.SetX(ref instance, valueObj1); + SetX(ref instance, valueObj1); object valueObj2; Result result2 = UIXLoadResult.ValidateStringAsValue(splitString[1], SingleSchema.Type, null, out valueObj2); if (result2.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Vector3", result2.Error); - Vector3Schema.SetY(ref instance, valueObj2); + SetY(ref instance, valueObj2); object valueObj3; Result result3 = UIXLoadResult.ValidateStringAsValue(splitString[2], SingleSchema.Type, null, out valueObj3); if (result3.Failed) return Result.Fail("Problem converting '{0}' ({1})", "Vector3", result3.Error); - Vector3Schema.SetZ(ref instance, valueObj3); + SetZ(ref instance, valueObj3); return result3; } @@ -100,7 +100,7 @@ namespace Microsoft.Iris.Markup.UIX string[] splitString = StringUtility.SplitAndTrim(',', (string)from); if (splitString.Length == 3) { - result = Vector3Schema.ConvertFromStringXYZ(splitString, out instance); + result = ConvertFromStringXYZ(splitString, out instance); if (!result.Failed) return result; } @@ -152,20 +152,20 @@ namespace Microsoft.Iris.Markup.UIX } } - public static void Pass1Initialize() => Vector3Schema.Type = new UIXTypeSchema(234, "Vector3", null, 153, typeof(Vector3), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(234, "Vector3", null, 153, typeof(Vector3), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(234, "X", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Vector3Schema.GetX), new SetValueHandler(Vector3Schema.SetX), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(234, "Y", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Vector3Schema.GetY), new SetValueHandler(Vector3Schema.SetY), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(234, "Z", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(Vector3Schema.GetZ), new SetValueHandler(Vector3Schema.SetZ), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(234, "X", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetX), new SetValueHandler(SetX), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(234, "Y", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetY), new SetValueHandler(SetY), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(234, "Z", 194, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetZ), new SetValueHandler(SetZ), false); UIXConstructorSchema constructorSchema = new UIXConstructorSchema(234, new short[3] { 194, 194, 194 - }, new ConstructHandler(Vector3Schema.ConstructXYZ)); - Vector3Schema.Type.Initialize(new DefaultConstructHandler(Vector3Schema.Construct), new ConstructorSchema[1] + }, new ConstructHandler(ConstructXYZ)); + Type.Initialize(new DefaultConstructHandler(Construct), new ConstructorSchema[1] { constructorSchema }, new PropertySchema[3] @@ -173,7 +173,7 @@ namespace Microsoft.Iris.Markup.UIX uixPropertySchema1, uixPropertySchema2, uixPropertySchema3 - }, null, null, null, new TypeConverterHandler(Vector3Schema.TryConvertFrom), new SupportsTypeConversionHandler(Vector3Schema.IsConversionSupported), new EncodeBinaryHandler(Vector3Schema.EncodeBinary), new DecodeBinaryHandler(Vector3Schema.DecodeBinary), new PerformOperationHandler(Vector3Schema.ExecuteOperation), new SupportsOperationHandler(Vector3Schema.IsOperationSupported)); + }, null, null, null, new TypeConverterHandler(TryConvertFrom), new SupportsTypeConversionHandler(IsConversionSupported), new EncodeBinaryHandler(EncodeBinary), new DecodeBinaryHandler(DecodeBinary), new PerformOperationHandler(ExecuteOperation), new SupportsOperationHandler(IsOperationSupported)); } } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs index 85372df..647bbcc 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/VideoElementInstanceSchema.cs @@ -15,12 +15,12 @@ namespace Microsoft.Iris.Markup.UIX private static void SetVideoStream(ref object instanceObj, object valueObj) => ((EffectElementWrapper)instanceObj).SetProperty("Video", (IUIVideoStream)valueObj); - public static void Pass1Initialize() => VideoElementInstanceSchema.Type = new UIXTypeSchema(237, "VideoElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(237, "VideoElementInstance", null, 74, typeof(EffectElementWrapper), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(237, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(VideoElementInstanceSchema.SetVideoStream), false); - VideoElementInstanceSchema.Type.Initialize(null, null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(237, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetVideoStream), false); + Type.Initialize(null, null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs index c5612d8..c87d3f0 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/VideoElementSchema.cs @@ -23,12 +23,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new VideoElement(); - public static void Pass1Initialize() => VideoElementSchema.Type = new UIXTypeSchema(236, "VideoElement", null, 77, typeof(VideoElement), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(236, "VideoElement", null, 77, typeof(VideoElement), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(236, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(VideoElementSchema.SetVideoStream), false); - VideoElementSchema.Type.Initialize(new DefaultConstructHandler(VideoElementSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(236, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, false, null, new SetValueHandler(SetVideoStream), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs index 69a469d..ebce367 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/VideoSchema.cs @@ -27,14 +27,14 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new Video(); - public static void Pass1Initialize() => VideoSchema.Type = new UIXTypeSchema(235, "Video", null, 239, typeof(Video), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(235, "Video", null, 239, typeof(Video), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(235, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(VideoSchema.GetChildren), null, false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(235, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(VideoSchema.GetVideoStream), new SetValueHandler(VideoSchema.SetVideoStream), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(235, "LetterboxColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(VideoSchema.GetLetterboxColor), new SetValueHandler(VideoSchema.SetLetterboxColor), false); - VideoSchema.Type.Initialize(new DefaultConstructHandler(VideoSchema.Construct), null, new PropertySchema[3] + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(235, "Children", 138, 239, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetChildren), null, false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(235, "VideoStream", 238, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVideoStream), new SetValueHandler(SetVideoStream), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(235, "LetterboxColor", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLetterboxColor), new SetValueHandler(SetLetterboxColor), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[3] { uixPropertySchema1, uixPropertySchema3, diff --git a/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs index 9718dd2..eebab07 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/VideoStreamSchema.cs @@ -14,12 +14,12 @@ namespace Microsoft.Iris.Markup.UIX private static object Construct() => new VideoStream(); - public static void Pass1Initialize() => VideoStreamSchema.Type = new UIXTypeSchema(238, "VideoStream", null, 153, typeof(VideoStream), UIXTypeFlags.Immutable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(238, "VideoStream", null, 153, typeof(VideoStream), UIXTypeFlags.Immutable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema = new UIXPropertySchema(238, "StreamID", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(VideoStreamSchema.GetStreamID), null, false); - VideoStreamSchema.Type.Initialize(new DefaultConstructHandler(VideoStreamSchema.Construct), null, new PropertySchema[1] + UIXPropertySchema uixPropertySchema = new UIXPropertySchema(238, "StreamID", 115, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetStreamID), null, false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[1] { uixPropertySchema }, null, null, null, null, null, null, null, null, null); diff --git a/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs index 4f85de6..3af2771 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/ViewItemSchema.cs @@ -34,7 +34,7 @@ namespace Microsoft.Iris.Markup.UIX viewItem.Alpha = num; } - private static object GetAnimations(object instanceObj) => ViewItemSchema.ListProxy.GetAnimation((ViewItem)instanceObj); + private static object GetAnimations(object instanceObj) => ListProxy.GetAnimation((ViewItem)instanceObj); private static object GetCenterPointPercent(object instanceObj) => ((ViewItem)instanceObj).CenterPointPercent; @@ -263,69 +263,69 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => ViewItemSchema.Type = new UIXTypeSchema(239, "ViewItem", null, -1, typeof(ViewItem), UIXTypeFlags.Disposable); + public static void Pass1Initialize() => Type = new UIXTypeSchema(239, "ViewItem", null, -1, typeof(ViewItem), UIXTypeFlags.Disposable); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(239, "Alpha", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, true, new GetValueHandler(ViewItemSchema.GetAlpha), new SetValueHandler(ViewItemSchema.SetAlpha), false); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(239, "Animations", 138, 104, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(ViewItemSchema.GetAnimations), null, false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(239, "CenterPointPercent", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetCenterPointPercent), new SetValueHandler(ViewItemSchema.SetCenterPointPercent), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(239, "DebugOutline", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetDebugOutline), new SetValueHandler(ViewItemSchema.SetDebugOutline), false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(239, "FocusOrder", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(ViewItemSchema.GetFocusOrder), new SetValueHandler(ViewItemSchema.SetFocusOrder), false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(239, "Alignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetAlignment), new SetValueHandler(ViewItemSchema.SetAlignment), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(239, "ChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetChildAlignment), new SetValueHandler(ViewItemSchema.SetChildAlignment), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(239, "Layout", 132, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetLayout), new SetValueHandler(ViewItemSchema.SetLayout), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(239, "LayoutInput", 133, -1, ExpressionRestriction.None, false, null, true, null, new SetValueHandler(ViewItemSchema.SetLayoutInput), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(239, "LayoutOutput", 134, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(ViewItemSchema.GetLayoutOutput), null, false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(239, "Margins", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetMargins), new SetValueHandler(ViewItemSchema.SetMargins), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(239, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(ViewItemSchema.GetMaximumSize), new SetValueHandler(ViewItemSchema.SetMaximumSize), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(239, "MinimumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(ViewItemSchema.GetMinimumSize), new SetValueHandler(ViewItemSchema.SetMinimumSize), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(239, "MouseInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetMouseInteractive), new SetValueHandler(ViewItemSchema.SetMouseInteractive), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(239, "Name", 208, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(ViewItemSchema.GetName), new SetValueHandler(ViewItemSchema.SetName), false); - UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(239, "Navigation", 151, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetNavigation), new SetValueHandler(ViewItemSchema.SetNavigation), false); - UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(239, "Padding", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetPadding), new SetValueHandler(ViewItemSchema.SetPadding), false); - UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(239, "Rotation", 176, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetRotation), new SetValueHandler(ViewItemSchema.SetRotation), false); - UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(239, "Scale", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetScale), new SetValueHandler(ViewItemSchema.SetScale), false); - UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(239, "SharedSize", 190, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetSharedSize), new SetValueHandler(ViewItemSchema.SetSharedSize), false); - UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(239, "SharedSizePolicy", 191, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetSharedSizePolicy), new SetValueHandler(ViewItemSchema.SetSharedSizePolicy), false); - UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(239, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetVisible), new SetValueHandler(ViewItemSchema.SetVisible), false); - UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(239, "Background", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetBackground), new SetValueHandler(ViewItemSchema.SetBackground), false); - UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(239, "Camera", 21, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(ViewItemSchema.GetCamera), new SetValueHandler(ViewItemSchema.SetCamera), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(239, "Alpha", 194, -1, ExpressionRestriction.None, false, SingleSchema.Validate0to1, true, new GetValueHandler(GetAlpha), new SetValueHandler(SetAlpha), false); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(239, "Animations", 138, 104, ExpressionRestriction.NoAccess, false, null, true, new GetValueHandler(GetAnimations), null, false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(239, "CenterPointPercent", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCenterPointPercent), new SetValueHandler(SetCenterPointPercent), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(239, "DebugOutline", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetDebugOutline), new SetValueHandler(SetDebugOutline), false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(239, "FocusOrder", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetFocusOrder), new SetValueHandler(SetFocusOrder), false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(239, "Alignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAlignment), new SetValueHandler(SetAlignment), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(239, "ChildAlignment", sbyte.MaxValue, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetChildAlignment), new SetValueHandler(SetChildAlignment), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(239, "Layout", 132, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetLayout), new SetValueHandler(SetLayout), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(239, "LayoutInput", 133, -1, ExpressionRestriction.None, false, null, true, null, new SetValueHandler(SetLayoutInput), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(239, "LayoutOutput", 134, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetLayoutOutput), null, false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(239, "Margins", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMargins), new SetValueHandler(SetMargins), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(239, "MaximumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMaximumSize), new SetValueHandler(SetMaximumSize), false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(239, "MinimumSize", 195, -1, ExpressionRestriction.None, false, SizeSchema.ValidateNotNegative, true, new GetValueHandler(GetMinimumSize), new SetValueHandler(SetMinimumSize), false); + UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(239, "MouseInteractive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseInteractive), new SetValueHandler(SetMouseInteractive), false); + UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(239, "Name", 208, -1, ExpressionRestriction.ReadOnly, false, null, true, new GetValueHandler(GetName), new SetValueHandler(SetName), false); + UIXPropertySchema uixPropertySchema16 = new UIXPropertySchema(239, "Navigation", 151, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetNavigation), new SetValueHandler(SetNavigation), false); + UIXPropertySchema uixPropertySchema17 = new UIXPropertySchema(239, "Padding", 114, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPadding), new SetValueHandler(SetPadding), false); + UIXPropertySchema uixPropertySchema18 = new UIXPropertySchema(239, "Rotation", 176, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetRotation), new SetValueHandler(SetRotation), false); + UIXPropertySchema uixPropertySchema19 = new UIXPropertySchema(239, "Scale", 234, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetScale), new SetValueHandler(SetScale), false); + UIXPropertySchema uixPropertySchema20 = new UIXPropertySchema(239, "SharedSize", 190, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSharedSize), new SetValueHandler(SetSharedSize), false); + UIXPropertySchema uixPropertySchema21 = new UIXPropertySchema(239, "SharedSizePolicy", 191, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetSharedSizePolicy), new SetValueHandler(SetSharedSizePolicy), false); + UIXPropertySchema uixPropertySchema22 = new UIXPropertySchema(239, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVisible), new SetValueHandler(SetVisible), false); + UIXPropertySchema uixPropertySchema23 = new UIXPropertySchema(239, "Background", 35, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetBackground), new SetValueHandler(SetBackground), false); + UIXPropertySchema uixPropertySchema24 = new UIXPropertySchema(239, "Camera", 21, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCamera), new SetValueHandler(SetCamera), false); UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(239, "AttachAnimation", new short[1] { 104 - }, 240, new InvokeHandler(ViewItemSchema.CallAttachAnimationIAnimation), false); + }, 240, new InvokeHandler(CallAttachAnimationIAnimation), false); UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(239, "AttachAnimation", new short[2] { 104, 11 - }, 240, new InvokeHandler(ViewItemSchema.CallAttachAnimationIAnimationAnimationHandle), false); + }, 240, new InvokeHandler(CallAttachAnimationIAnimationAnimationHandle), false); UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(239, "DetachAnimation", new short[1] { 10 - }, 240, new InvokeHandler(ViewItemSchema.CallDetachAnimationAnimationEventType), false); + }, 240, new InvokeHandler(CallDetachAnimationAnimationEventType), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(239, "PlayAnimation", new short[1] { 104 - }, 240, new InvokeHandler(ViewItemSchema.CallPlayAnimationIAnimation), false); + }, 240, new InvokeHandler(CallPlayAnimationIAnimation), false); UIXMethodSchema uixMethodSchema5 = new UIXMethodSchema(239, "PlayAnimation", new short[2] { 104, 11 - }, 240, new InvokeHandler(ViewItemSchema.CallPlayAnimationIAnimationAnimationHandle), false); + }, 240, new InvokeHandler(CallPlayAnimationIAnimationAnimationHandle), false); UIXMethodSchema uixMethodSchema6 = new UIXMethodSchema(239, "PlayAnimation", new short[1] { 10 - }, 240, new InvokeHandler(ViewItemSchema.CallPlayAnimationAnimationEventType), false); - UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(239, "ForceContentChange", null, 240, new InvokeHandler(ViewItemSchema.CallForceContentChange), false); - UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(239, "SnapshotPosition", null, 171, new InvokeHandler(ViewItemSchema.CallSnapshotPosition), false); - UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(239, "NavigateInto", null, 240, new InvokeHandler(ViewItemSchema.CallNavigateInto), false); + }, 240, new InvokeHandler(CallPlayAnimationAnimationEventType), false); + UIXMethodSchema uixMethodSchema7 = new UIXMethodSchema(239, "ForceContentChange", null, 240, new InvokeHandler(CallForceContentChange), false); + UIXMethodSchema uixMethodSchema8 = new UIXMethodSchema(239, "SnapshotPosition", null, 171, new InvokeHandler(CallSnapshotPosition), false); + UIXMethodSchema uixMethodSchema9 = new UIXMethodSchema(239, "NavigateInto", null, 240, new InvokeHandler(CallNavigateInto), false); UIXMethodSchema uixMethodSchema10 = new UIXMethodSchema(239, "NavigateInto", new short[1] { 15 - }, 240, new InvokeHandler(ViewItemSchema.CallNavigateIntoBoolean), false); - UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(239, "ScrollIntoView", null, 240, new InvokeHandler(ViewItemSchema.CallScrollIntoView), false); - ViewItemSchema.Type.Initialize(null, null, new PropertySchema[24] + }, 240, new InvokeHandler(CallNavigateIntoBoolean), false); + UIXMethodSchema uixMethodSchema11 = new UIXMethodSchema(239, "ScrollIntoView", null, 240, new InvokeHandler(CallScrollIntoView), false); + Type.Initialize(null, null, new PropertySchema[24] { uixPropertySchema6, uixPropertySchema1, @@ -375,13 +375,13 @@ namespace Microsoft.Iris.Markup.UIX public static IList GetChildren(ViewItem subject) { - ViewItemSchema.ListProxy.s_shared.SetSubject(subject, ViewItemSchema.ListProxyMode.Children); + s_shared.SetSubject(subject, ListProxyMode.Children); return s_shared; } public static IList GetAnimation(ViewItem subject) { - ViewItemSchema.ListProxy.s_shared.SetSubject(subject, ViewItemSchema.ListProxyMode.Animation); + s_shared.SetSubject(subject, ListProxyMode.Animation); return s_shared; } @@ -389,10 +389,10 @@ namespace Microsoft.Iris.Markup.UIX { switch (this._mode) { - case ViewItemSchema.ListProxyMode.Children: + case ListProxyMode.Children: this._subject.Children.Add((Microsoft.Iris.Library.TreeNode)value); break; - case ViewItemSchema.ListProxyMode.Animation: + case ListProxyMode.Animation: if (value != null) { this._subject.AttachAnimation((IAnimationProvider)value); diff --git a/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs index 57e57b0..d93b874 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/VoidSchema.cs @@ -10,8 +10,8 @@ namespace Microsoft.Iris.Markup.UIX { public static UIXTypeSchema Type; - public static void Pass1Initialize() => VoidSchema.Type = new UIXTypeSchema(240, "Void", "void", -1, typeof(void), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(240, "Void", "void", -1, typeof(void), UIXTypeFlags.None); - public static void Pass2Initialize() => VoidSchema.Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); + public static void Pass2Initialize() => Type.Initialize(null, null, null, null, null, null, null, null, null, null, null, null); } } diff --git a/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs b/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs index a026fff..8745c7f 100644 --- a/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs +++ b/UIX/Microsoft/Iris/Markup/UIX/WindowSchema.cs @@ -100,33 +100,33 @@ namespace Microsoft.Iris.Markup.UIX return null; } - public static void Pass1Initialize() => WindowSchema.Type = new UIXTypeSchema(241, "Window", null, 153, typeof(UIForm), UIXTypeFlags.None); + public static void Pass1Initialize() => Type = new UIXTypeSchema(241, "Window", null, 153, typeof(UIForm), UIXTypeFlags.None); public static void Pass2Initialize() { - UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(241, "MainWindow", 241, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(WindowSchema.GetMainWindow), null, true); - UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(241, "Caption", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetCaption), new SetValueHandler(WindowSchema.SetCaption), false); - UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(241, "WindowState", 242, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetWindowState), new SetValueHandler(WindowSchema.SetWindowState), false); - UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(241, "Active", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetActive), null, false); - UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(241, "MouseActive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetMouseActive), null, false); - UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(241, "ShowWindowFrame", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetShowWindowFrame), new SetValueHandler(WindowSchema.SetShowWindowFrame), false); - UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(241, "HideMouseOnIdle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetHideMouseOnIdle), new SetValueHandler(WindowSchema.SetHideMouseOnIdle), false); - UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(241, "MouseIdleTimeout", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(WindowSchema.GetMouseIdleTimeout), new SetValueHandler(WindowSchema.SetMouseIdleTimeout), false); - UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(241, "AlwaysOnTop", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetAlwaysOnTop), new SetValueHandler(WindowSchema.SetAlwaysOnTop), false); - UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(241, "ShowInTaskbar", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetShowInTaskbar), new SetValueHandler(WindowSchema.SetShowInTaskbar), false); - UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(241, "PreventInterruption", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetPreventInterruption), new SetValueHandler(WindowSchema.SetPreventInterruption), false); - UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(241, "MaximizeMode", 146, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetMaximizeMode), new SetValueHandler(WindowSchema.SetMaximizeMode), false); - UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(241, "ClientSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetClientSize), new SetValueHandler(WindowSchema.SetClientSize), false); - UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(241, "Position", 158, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetPosition), new SetValueHandler(WindowSchema.SetPosition), false); - UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(241, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(WindowSchema.GetVisible), new SetValueHandler(WindowSchema.SetVisible), false); - UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(241, "Close", null, 240, new InvokeHandler(WindowSchema.CallClose), false); - UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(241, "ForceClose", null, 240, new InvokeHandler(WindowSchema.CallForceClose), false); - UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(241, "SaveKeyFocus", null, 177, new InvokeHandler(WindowSchema.CallSaveKeyFocus), false); + UIXPropertySchema uixPropertySchema1 = new UIXPropertySchema(241, "MainWindow", 241, -1, ExpressionRestriction.None, false, null, false, new GetValueHandler(GetMainWindow), null, true); + UIXPropertySchema uixPropertySchema2 = new UIXPropertySchema(241, "Caption", 208, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetCaption), new SetValueHandler(SetCaption), false); + UIXPropertySchema uixPropertySchema3 = new UIXPropertySchema(241, "WindowState", 242, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetWindowState), new SetValueHandler(SetWindowState), false); + UIXPropertySchema uixPropertySchema4 = new UIXPropertySchema(241, "Active", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetActive), null, false); + UIXPropertySchema uixPropertySchema5 = new UIXPropertySchema(241, "MouseActive", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMouseActive), null, false); + UIXPropertySchema uixPropertySchema6 = new UIXPropertySchema(241, "ShowWindowFrame", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowWindowFrame), new SetValueHandler(SetShowWindowFrame), false); + UIXPropertySchema uixPropertySchema7 = new UIXPropertySchema(241, "HideMouseOnIdle", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetHideMouseOnIdle), new SetValueHandler(SetHideMouseOnIdle), false); + UIXPropertySchema uixPropertySchema8 = new UIXPropertySchema(241, "MouseIdleTimeout", 115, -1, ExpressionRestriction.None, false, Int32Schema.ValidateNotNegative, true, new GetValueHandler(GetMouseIdleTimeout), new SetValueHandler(SetMouseIdleTimeout), false); + UIXPropertySchema uixPropertySchema9 = new UIXPropertySchema(241, "AlwaysOnTop", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetAlwaysOnTop), new SetValueHandler(SetAlwaysOnTop), false); + UIXPropertySchema uixPropertySchema10 = new UIXPropertySchema(241, "ShowInTaskbar", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetShowInTaskbar), new SetValueHandler(SetShowInTaskbar), false); + UIXPropertySchema uixPropertySchema11 = new UIXPropertySchema(241, "PreventInterruption", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPreventInterruption), new SetValueHandler(SetPreventInterruption), false); + UIXPropertySchema uixPropertySchema12 = new UIXPropertySchema(241, "MaximizeMode", 146, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetMaximizeMode), new SetValueHandler(SetMaximizeMode), false); + UIXPropertySchema uixPropertySchema13 = new UIXPropertySchema(241, "ClientSize", 195, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetClientSize), new SetValueHandler(SetClientSize), false); + UIXPropertySchema uixPropertySchema14 = new UIXPropertySchema(241, "Position", 158, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetPosition), new SetValueHandler(SetPosition), false); + UIXPropertySchema uixPropertySchema15 = new UIXPropertySchema(241, "Visible", 15, -1, ExpressionRestriction.None, false, null, true, new GetValueHandler(GetVisible), new SetValueHandler(SetVisible), false); + UIXMethodSchema uixMethodSchema1 = new UIXMethodSchema(241, "Close", null, 240, new InvokeHandler(CallClose), false); + UIXMethodSchema uixMethodSchema2 = new UIXMethodSchema(241, "ForceClose", null, 240, new InvokeHandler(CallForceClose), false); + UIXMethodSchema uixMethodSchema3 = new UIXMethodSchema(241, "SaveKeyFocus", null, 177, new InvokeHandler(CallSaveKeyFocus), false); UIXMethodSchema uixMethodSchema4 = new UIXMethodSchema(241, "RestoreKeyFocus", new short[1] { 177 - }, 240, new InvokeHandler(WindowSchema.CallRestoreKeyFocusSavedKeyFocus), false); - WindowSchema.Type.Initialize(new DefaultConstructHandler(WindowSchema.Construct), null, new PropertySchema[15] + }, 240, new InvokeHandler(CallRestoreKeyFocusSavedKeyFocus), false); + Type.Initialize(new DefaultConstructHandler(Construct), null, new PropertySchema[15] { uixPropertySchema4, uixPropertySchema9, diff --git a/UIX/Microsoft/Iris/Markup/UIXEnumData.cs b/UIX/Microsoft/Iris/Markup/UIXEnumData.cs index d727c94..1043288 100644 --- a/UIX/Microsoft/Iris/Markup/UIXEnumData.cs +++ b/UIX/Microsoft/Iris/Markup/UIXEnumData.cs @@ -710,107 +710,107 @@ namespace Microsoft.Iris.Markup switch (typeID) { case 1: - return UIXEnumData.GetAccessibleRoleEnumData(); + return GetAccessibleRoleEnumData(); case 3: - return UIXEnumData.GetAlignmentEnumData(); + return GetAlignmentEnumData(); case 5: - return UIXEnumData.GetAlphaOperationEnumData(); + return GetAlphaOperationEnumData(); case 10: - return UIXEnumData.GetAnimationEventTypeEnumData(); + return GetAnimationEventTypeEnumData(); case 12: - return UIXEnumData.GetBeginDragPolicyEnumData(); + return GetBeginDragPolicyEnumData(); case 31: - return UIXEnumData.GetClickCountEnumData(); + return GetClickCountEnumData(); case 33: - return UIXEnumData.GetClickTypeEnumData(); + return GetClickTypeEnumData(); case 38: - return UIXEnumData.GetColorOperationEnumData(); + return GetColorOperationEnumData(); case 39: - return UIXEnumData.GetColorSchemeEnumData(); + return GetColorSchemeEnumData(); case 41: - return UIXEnumData.GetContentPositioningPolicyEnumData(); + return GetContentPositioningPolicyEnumData(); case 44: - return UIXEnumData.GetCursorEnumData(); + return GetCursorEnumData(); case 47: - return UIXEnumData.GetDataQueryStatusEnumData(); + return GetDataQueryStatusEnumData(); case 50: - return UIXEnumData.GetDebugLabelFormatEnumData(); + return GetDebugLabelFormatEnumData(); case 51: - return UIXEnumData.GetDebugOutlineScopeEnumData(); + return GetDebugOutlineScopeEnumData(); case 64: - return UIXEnumData.GetDropActionEnumData(); + return GetDropActionEnumData(); case 84: - return UIXEnumData.GetEmbossDirectionEnumData(); + return GetEmbossDirectionEnumData(); case 89: - return UIXEnumData.GetFlipDirectionEnumData(); + return GetFlipDirectionEnumData(); case 91: - return UIXEnumData.GetFocusChangeReasonEnumData(); + return GetFocusChangeReasonEnumData(); case 94: - return UIXEnumData.GetFontStylesEnumData(); + return GetFontStylesEnumData(); case 96: - return UIXEnumData.GetGaussianBlurModeEnumData(); + return GetGaussianBlurModeEnumData(); case 98: - return UIXEnumData.GetGraphicsDeviceTypeEnumData(); + return GetGraphicsDeviceTypeEnumData(); case 102: - return UIXEnumData.GetHostStatusEnumData(); + return GetHostStatusEnumData(); case 108: - return UIXEnumData.GetImageStatusEnumData(); + return GetImageStatusEnumData(); case 111: - return UIXEnumData.GetInputHandlerModifiersEnumData(); + return GetInputHandlerModifiersEnumData(); case 112: - return UIXEnumData.GetInputHandlerStageEnumData(); + return GetInputHandlerStageEnumData(); case 113: - return UIXEnumData.GetInputHandlerTransitionEnumData(); + return GetInputHandlerTransitionEnumData(); case 118: - return UIXEnumData.GetInterestPointEnumData(); + return GetInterestPointEnumData(); case 122: - return UIXEnumData.GetInterpolationTypeEnumData(); + return GetInterpolationTypeEnumData(); case 126: - return UIXEnumData.GetInvokePriorityEnumData(); + return GetInvokePriorityEnumData(); case 129: - return UIXEnumData.GetKeyHandlerKeyEnumData(); + return GetKeyHandlerKeyEnumData(); case 131: - return UIXEnumData.GetKeyframeFilterEnumData(); + return GetKeyframeFilterEnumData(); case 137: - return UIXEnumData.GetLineAlignmentEnumData(); + return GetLineAlignmentEnumData(); case 146: - return UIXEnumData.GetMaximizeModeEnumData(); + return GetMaximizeModeEnumData(); case 148: - return UIXEnumData.GetMissingItemPolicyEnumData(); + return GetMissingItemPolicyEnumData(); case 149: - return UIXEnumData.GetMouseTargetEnumData(); + return GetMouseTargetEnumData(); case 151: - return UIXEnumData.GetNavigationPoliciesEnumData(); + return GetNavigationPoliciesEnumData(); case 154: - return UIXEnumData.GetOrientationEnumData(); + return GetOrientationEnumData(); case 170: - return UIXEnumData.GetRelativeEdgeEnumData(); + return GetRelativeEdgeEnumData(); case 172: - return UIXEnumData.GetRepeatPolicyEnumData(); + return GetRepeatPolicyEnumData(); case 191: - return UIXEnumData.GetSharedSizePolicyEnumData(); + return GetSharedSizePolicyEnumData(); case 193: - return UIXEnumData.GetShortcutHandlerCommandEnumData(); + return GetShortcutHandlerCommandEnumData(); case 199: - return UIXEnumData.GetSizingPolicyEnumData(); + return GetSizingPolicyEnumData(); case 200: - return UIXEnumData.GetSnapshotPolicyEnumData(); + return GetSnapshotPolicyEnumData(); case 206: - return UIXEnumData.GetStackPriorityEnumData(); + return GetStackPriorityEnumData(); case 207: - return UIXEnumData.GetStretchingPolicyEnumData(); + return GetStretchingPolicyEnumData(); case 209: - return UIXEnumData.GetStripAlignmentEnumData(); + return GetStripAlignmentEnumData(); case 211: - return UIXEnumData.GetSystemSoundEventEnumData(); + return GetSystemSoundEventEnumData(); case 213: - return UIXEnumData.GetTextBoundsEnumData(); + return GetTextBoundsEnumData(); case 219: - return UIXEnumData.GetTextSharpnessEnumData(); + return GetTextSharpnessEnumData(); case 223: - return UIXEnumData.GetTransformAttributeEnumData(); + return GetTransformAttributeEnumData(); case 242: - return UIXEnumData.GetWindowStateEnumData(); + return GetWindowStateEnumData(); default: return null; } diff --git a/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs b/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs index 99bb5bc..6a9ccd5 100644 --- a/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs +++ b/UIX/Microsoft/Iris/Markup/UIXLoadResultExports.cs @@ -79,58 +79,58 @@ namespace Microsoft.Iris.Markup public static void InitializeStatics() { - UIXLoadResultExports.ExportTable = new TypeSchema[243]; - UIXLoadResultExports.AccessibleRoleType = new UIXEnumSchema(1, "AccessibleRole", typeof(AccRole), false); - UIXLoadResultExports.AlignmentType = new UIXEnumSchema(3, "Alignment", typeof(Alignment), false); - UIXLoadResultExports.AlphaOperationType = new UIXEnumSchema(5, "AlphaOperation", typeof(AlphaOperation), false); - UIXLoadResultExports.AnimationEventTypeType = new UIXEnumSchema(10, "AnimationEventType", typeof(AnimationEventType), false); - UIXLoadResultExports.BeginDragPolicyType = new UIXEnumSchema(12, "BeginDragPolicy", typeof(BeginDragPolicy), false); - UIXLoadResultExports.ClickCountType = new UIXEnumSchema(31, "ClickCount", typeof(ClickCount), false); - UIXLoadResultExports.ClickTypeType = new UIXEnumSchema(33, "ClickType", typeof(ClickType), true); - UIXLoadResultExports.ColorOperationType = new UIXEnumSchema(38, "ColorOperation", typeof(ColorOperation), false); - UIXLoadResultExports.ColorSchemeType = new UIXEnumSchema(39, "ColorScheme", typeof(ColorScheme), false); - UIXLoadResultExports.ContentPositioningPolicyType = new UIXEnumSchema(41, "ContentPositioningPolicy", typeof(ContentPositioningPolicy), false); - UIXLoadResultExports.CursorType = new UIXEnumSchema(44, "Cursor", typeof(CursorID), false); - UIXLoadResultExports.DataQueryStatusType = new UIXEnumSchema(47, "DataQueryStatus", typeof(DataProviderQueryStatus), false); - UIXLoadResultExports.DebugLabelFormatType = new UIXEnumSchema(50, "DebugLabelFormat", typeof(DebugLabelFormat), false); - UIXLoadResultExports.DebugOutlineScopeType = new UIXEnumSchema(51, "DebugOutlineScope", typeof(DebugOutlineScope), false); - UIXLoadResultExports.DropActionType = new UIXEnumSchema(64, "DropAction", typeof(DropAction), true); - UIXLoadResultExports.EmbossDirectionType = new UIXEnumSchema(84, "EmbossDirection", typeof(EmbossDirection), false); - UIXLoadResultExports.FlipDirectionType = new UIXEnumSchema(89, "FlipDirection", typeof(FlipDirection), true); - UIXLoadResultExports.FocusChangeReasonType = new UIXEnumSchema(91, "FocusChangeReason", typeof(FocusChangeReason), true); - UIXLoadResultExports.FontStylesType = new UIXEnumSchema(94, "FontStyles", typeof(FontStyles), true); - UIXLoadResultExports.GaussianBlurModeType = new UIXEnumSchema(96, "GaussianBlurMode", typeof(GaussianBlurMode), false); - UIXLoadResultExports.GraphicsDeviceTypeType = new UIXEnumSchema(98, "GraphicsDeviceType", typeof(RenderingType), false); - UIXLoadResultExports.HostStatusType = new UIXEnumSchema(102, "HostStatus", typeof(HostStatus), false); - UIXLoadResultExports.ImageStatusType = new UIXEnumSchema(108, "ImageStatus", typeof(ImageStatus), false); - UIXLoadResultExports.InputHandlerModifiersType = new UIXEnumSchema(111, "InputHandlerModifiers", typeof(InputHandlerModifiers), true); - UIXLoadResultExports.InputHandlerStageType = new UIXEnumSchema(112, "InputHandlerStage", typeof(InputHandlerStage), true); - UIXLoadResultExports.InputHandlerTransitionType = new UIXEnumSchema(113, "InputHandlerTransition", typeof(InputHandlerTransition), false); - UIXLoadResultExports.InterestPointType = new UIXEnumSchema(118, "InterestPoint", typeof(InterestPoint), false); - UIXLoadResultExports.InterpolationTypeType = new UIXEnumSchema(122, "InterpolationType", typeof(InterpolationType), false); - UIXLoadResultExports.InvokePriorityType = new UIXEnumSchema(126, "InvokePriority", typeof(InvokePriority), false); - UIXLoadResultExports.KeyHandlerKeyType = new UIXEnumSchema(129, "KeyHandlerKey", typeof(KeyHandlerKey), false); - UIXLoadResultExports.KeyframeFilterType = new UIXEnumSchema(131, "KeyframeFilter", typeof(KeyframeFilter), false); - UIXLoadResultExports.LineAlignmentType = new UIXEnumSchema(137, "LineAlignment", typeof(LineAlignment), false); - UIXLoadResultExports.MaximizeModeType = new UIXEnumSchema(146, "MaximizeMode", typeof(MaximizeMode), false); - UIXLoadResultExports.MissingItemPolicyType = new UIXEnumSchema(148, "MissingItemPolicy", typeof(MissingItemPolicy), false); - UIXLoadResultExports.MouseTargetType = new UIXEnumSchema(149, "MouseTarget", typeof(MouseTarget), false); - UIXLoadResultExports.NavigationPoliciesType = new UIXEnumSchema(151, "NavigationPolicies", typeof(NavigationPolicies), true); - UIXLoadResultExports.OrientationType = new UIXEnumSchema(154, "Orientation", typeof(Orientation), false); - UIXLoadResultExports.RelativeEdgeType = new UIXEnumSchema(170, "RelativeEdge", typeof(RelativeEdge), false); - UIXLoadResultExports.RepeatPolicyType = new UIXEnumSchema(172, "RepeatPolicy", typeof(RepeatPolicy), false); - UIXLoadResultExports.SharedSizePolicyType = new UIXEnumSchema(191, "SharedSizePolicy", typeof(SharedSizePolicy), true); - UIXLoadResultExports.ShortcutHandlerCommandType = new UIXEnumSchema(193, "ShortcutHandlerCommand", typeof(ShortcutHandlerCommand), false); - UIXLoadResultExports.SizingPolicyType = new UIXEnumSchema(199, "SizingPolicy", typeof(SizingPolicy), false); - UIXLoadResultExports.SnapshotPolicyType = new UIXEnumSchema(200, "SnapshotPolicy", typeof(SnapshotPolicy), false); - UIXLoadResultExports.StackPriorityType = new UIXEnumSchema(206, "StackPriority", typeof(StackPriority), false); - UIXLoadResultExports.StretchingPolicyType = new UIXEnumSchema(207, "StretchingPolicy", typeof(StretchingPolicy), false); - UIXLoadResultExports.StripAlignmentType = new UIXEnumSchema(209, "StripAlignment", typeof(StripAlignment), false); - UIXLoadResultExports.SystemSoundEventType = new UIXEnumSchema(211, "SystemSoundEvent", typeof(SystemSoundEvent), false); - UIXLoadResultExports.TextBoundsType = new UIXEnumSchema(213, "TextBounds", typeof(TextBounds), true); - UIXLoadResultExports.TextSharpnessType = new UIXEnumSchema(219, "TextSharpness", typeof(TextSharpness), false); - UIXLoadResultExports.TransformAttributeType = new UIXEnumSchema(223, "TransformAttribute", typeof(TransformAttribute), false); - UIXLoadResultExports.WindowStateType = new UIXEnumSchema(242, "WindowState", typeof(Microsoft.Iris.WindowState), false); + ExportTable = new TypeSchema[243]; + AccessibleRoleType = new UIXEnumSchema(1, "AccessibleRole", typeof(AccRole), false); + AlignmentType = new UIXEnumSchema(3, "Alignment", typeof(Alignment), false); + AlphaOperationType = new UIXEnumSchema(5, "AlphaOperation", typeof(AlphaOperation), false); + AnimationEventTypeType = new UIXEnumSchema(10, "AnimationEventType", typeof(AnimationEventType), false); + BeginDragPolicyType = new UIXEnumSchema(12, "BeginDragPolicy", typeof(BeginDragPolicy), false); + ClickCountType = new UIXEnumSchema(31, "ClickCount", typeof(ClickCount), false); + ClickTypeType = new UIXEnumSchema(33, "ClickType", typeof(ClickType), true); + ColorOperationType = new UIXEnumSchema(38, "ColorOperation", typeof(ColorOperation), false); + ColorSchemeType = new UIXEnumSchema(39, "ColorScheme", typeof(ColorScheme), false); + ContentPositioningPolicyType = new UIXEnumSchema(41, "ContentPositioningPolicy", typeof(ContentPositioningPolicy), false); + CursorType = new UIXEnumSchema(44, "Cursor", typeof(CursorID), false); + DataQueryStatusType = new UIXEnumSchema(47, "DataQueryStatus", typeof(DataProviderQueryStatus), false); + DebugLabelFormatType = new UIXEnumSchema(50, "DebugLabelFormat", typeof(DebugLabelFormat), false); + DebugOutlineScopeType = new UIXEnumSchema(51, "DebugOutlineScope", typeof(DebugOutlineScope), false); + DropActionType = new UIXEnumSchema(64, "DropAction", typeof(DropAction), true); + EmbossDirectionType = new UIXEnumSchema(84, "EmbossDirection", typeof(EmbossDirection), false); + FlipDirectionType = new UIXEnumSchema(89, "FlipDirection", typeof(FlipDirection), true); + FocusChangeReasonType = new UIXEnumSchema(91, "FocusChangeReason", typeof(FocusChangeReason), true); + FontStylesType = new UIXEnumSchema(94, "FontStyles", typeof(FontStyles), true); + GaussianBlurModeType = new UIXEnumSchema(96, "GaussianBlurMode", typeof(GaussianBlurMode), false); + GraphicsDeviceTypeType = new UIXEnumSchema(98, "GraphicsDeviceType", typeof(RenderingType), false); + HostStatusType = new UIXEnumSchema(102, "HostStatus", typeof(HostStatus), false); + ImageStatusType = new UIXEnumSchema(108, "ImageStatus", typeof(ImageStatus), false); + InputHandlerModifiersType = new UIXEnumSchema(111, "InputHandlerModifiers", typeof(InputHandlerModifiers), true); + InputHandlerStageType = new UIXEnumSchema(112, "InputHandlerStage", typeof(InputHandlerStage), true); + InputHandlerTransitionType = new UIXEnumSchema(113, "InputHandlerTransition", typeof(InputHandlerTransition), false); + InterestPointType = new UIXEnumSchema(118, "InterestPoint", typeof(InterestPoint), false); + InterpolationTypeType = new UIXEnumSchema(122, "InterpolationType", typeof(InterpolationType), false); + InvokePriorityType = new UIXEnumSchema(126, "InvokePriority", typeof(InvokePriority), false); + KeyHandlerKeyType = new UIXEnumSchema(129, "KeyHandlerKey", typeof(KeyHandlerKey), false); + KeyframeFilterType = new UIXEnumSchema(131, "KeyframeFilter", typeof(KeyframeFilter), false); + LineAlignmentType = new UIXEnumSchema(137, "LineAlignment", typeof(LineAlignment), false); + MaximizeModeType = new UIXEnumSchema(146, "MaximizeMode", typeof(MaximizeMode), false); + MissingItemPolicyType = new UIXEnumSchema(148, "MissingItemPolicy", typeof(MissingItemPolicy), false); + MouseTargetType = new UIXEnumSchema(149, "MouseTarget", typeof(MouseTarget), false); + NavigationPoliciesType = new UIXEnumSchema(151, "NavigationPolicies", typeof(NavigationPolicies), true); + OrientationType = new UIXEnumSchema(154, "Orientation", typeof(Orientation), false); + RelativeEdgeType = new UIXEnumSchema(170, "RelativeEdge", typeof(RelativeEdge), false); + RepeatPolicyType = new UIXEnumSchema(172, "RepeatPolicy", typeof(RepeatPolicy), false); + SharedSizePolicyType = new UIXEnumSchema(191, "SharedSizePolicy", typeof(SharedSizePolicy), true); + ShortcutHandlerCommandType = new UIXEnumSchema(193, "ShortcutHandlerCommand", typeof(ShortcutHandlerCommand), false); + SizingPolicyType = new UIXEnumSchema(199, "SizingPolicy", typeof(SizingPolicy), false); + SnapshotPolicyType = new UIXEnumSchema(200, "SnapshotPolicy", typeof(SnapshotPolicy), false); + StackPriorityType = new UIXEnumSchema(206, "StackPriority", typeof(StackPriority), false); + StretchingPolicyType = new UIXEnumSchema(207, "StretchingPolicy", typeof(StretchingPolicy), false); + StripAlignmentType = new UIXEnumSchema(209, "StripAlignment", typeof(StripAlignment), false); + SystemSoundEventType = new UIXEnumSchema(211, "SystemSoundEvent", typeof(SystemSoundEvent), false); + TextBoundsType = new UIXEnumSchema(213, "TextBounds", typeof(TextBounds), true); + TextSharpnessType = new UIXEnumSchema(219, "TextSharpness", typeof(TextSharpness), false); + TransformAttributeType = new UIXEnumSchema(223, "TransformAttribute", typeof(TransformAttribute), false); + WindowStateType = new UIXEnumSchema(242, "WindowState", typeof(Microsoft.Iris.WindowState), false); AccessibleSchema.Pass1Initialize(); AliasSchema.Pass1Initialize(); AlphaKeyframeSchema.Pass1Initialize(); diff --git a/UIX/Microsoft/Iris/Markup/Validation/TypeRestriction.cs b/UIX/Microsoft/Iris/Markup/Validation/TypeRestriction.cs index d05b6cc..a868d9d 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/TypeRestriction.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/TypeRestriction.cs @@ -35,8 +35,8 @@ namespace Microsoft.Iris.Markup.Validation public static void InitializeStatics() { - TypeRestriction.None = new TypeRestriction(null, null, true); - TypeRestriction.NotVoid = new TypeRestriction(VoidSchema.Type, null, false); + None = new TypeRestriction(null, null, true); + NotVoid = new TypeRestriction(VoidSchema.Type, null, false); } public TypeSchema Primary => this._primary; diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateClass.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateClass.cs index 5e51a7c..74924f3 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateClass.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateClass.cs @@ -29,7 +29,7 @@ namespace Microsoft.Iris.Markup.Validation private string _previewName; private static Map s_classReservedSymbols = new Map(1); - public static void InitializeStatics() => ValidateClass.s_classReservedSymbols["Class"] = ClassStateSchema.Type; + public static void InitializeStatics() => s_classReservedSymbols["Class"] = ClassStateSchema.Type; public ValidateClass( SourceMarkupLoader owner, @@ -334,7 +334,7 @@ namespace Microsoft.Iris.Markup.Validation public override void Validate(TypeRestriction typeRestriction, ValidateContext context) { if (context.CurrentPass == LoadPass.Full) - context.DeclareReservedSymbols(ValidateClass.s_classReservedSymbols); + context.DeclareReservedSymbols(s_classReservedSymbols); base.Validate(typeRestriction, context); } diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateContext.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateContext.cs index 9299032..96904d6 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateContext.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateContext.cs @@ -56,13 +56,13 @@ namespace Microsoft.Iris.Markup.Validation public static void InitializeStatics() { - ValidateContext.ClassPropertiesProperty = ClassSchema.Type.FindProperty("Properties"); - ValidateContext.UIPropertiesProperty = UISchema.Type.FindProperty("Properties"); - ValidateContext.ClassLocalsProperty = ClassSchema.Type.FindProperty("Locals"); - ValidateContext.UILocalsProperty = UISchema.Type.FindProperty("Locals"); - ValidateContext.UIInputProperty = UISchema.Type.FindProperty("Input"); - ValidateContext.UIContentProperty = UISchema.Type.FindProperty("Content"); - ValidateContext.EffectTechniquesProperty = EffectSchema.Type.FindProperty("Techniques"); + ClassPropertiesProperty = ClassSchema.Type.FindProperty("Properties"); + UIPropertiesProperty = UISchema.Type.FindProperty("Properties"); + ClassLocalsProperty = ClassSchema.Type.FindProperty("Locals"); + UILocalsProperty = UISchema.Type.FindProperty("Locals"); + UIInputProperty = UISchema.Type.FindProperty("Input"); + UIContentProperty = UISchema.Type.FindProperty("Content"); + EffectTechniquesProperty = EffectSchema.Type.FindProperty("Techniques"); } public TypeSchema ResolveSymbol( @@ -252,7 +252,7 @@ namespace Microsoft.Iris.Markup.Validation { if (this.IsNameReserved(name1)) result = Result.Fail("Name \"{0}\" is reserved and cannot be used.", name1); - else if (!ValidateContext.IsValidSymbolName(name1)) + else if (!IsValidSymbolName(name1)) result = Result.Fail("Invalid name \"{0}\". Valid names must begin with either an alphabetic character or an underscore and can otherwise contain only alphabetic, numeric, or underscore characters", name1); } if (!result.Failed && typeSchema1 != null) @@ -270,23 +270,23 @@ namespace Microsoft.Iris.Markup.Validation { PropertySchema foundProperty = property.FoundProperty; NameUsage nameUsage; - if (foundProperty == ValidateContext.ClassPropertiesProperty || foundProperty == ValidateContext.UIPropertiesProperty) + if (foundProperty == ClassPropertiesProperty || foundProperty == UIPropertiesProperty) { this._currentScope = SymbolOrigin.Properties; nameUsage = NameUsage.Symbols; this._resolutionDirective = SymbolResolutionDirective.PropertyResolution; } - else if (foundProperty == ValidateContext.ClassLocalsProperty || foundProperty == ValidateContext.UILocalsProperty) + else if (foundProperty == ClassLocalsProperty || foundProperty == UILocalsProperty) { this._currentScope = SymbolOrigin.Locals; nameUsage = NameUsage.Symbols; } - else if (foundProperty == ValidateContext.UIInputProperty) + else if (foundProperty == UIInputProperty) { this._currentScope = SymbolOrigin.Input; nameUsage = NameUsage.Symbols; } - else if (foundProperty == ValidateContext.UIContentProperty) + else if (foundProperty == UIContentProperty) { if (property.PropertyAttributeList == null) { @@ -296,7 +296,7 @@ namespace Microsoft.Iris.Markup.Validation else nameUsage = NameUsage.NamedContent; } - else if (foundProperty == ValidateContext.EffectTechniquesProperty) + else if (foundProperty == EffectTechniquesProperty) { this._currentScope = SymbolOrigin.Techniques; nameUsage = NameUsage.Symbols; @@ -313,18 +313,18 @@ namespace Microsoft.Iris.Markup.Validation public void NotifyPropertyScopeExit(ValidateProperty property) { PropertySchema foundProperty = property.FoundProperty; - if (foundProperty == ValidateContext.ClassPropertiesProperty || foundProperty == ValidateContext.UIPropertiesProperty) + if (foundProperty == ClassPropertiesProperty || foundProperty == UIPropertiesProperty) { this._resolutionDirective = SymbolResolutionDirective.None; this._currentScope = SymbolOrigin.None; } - else if (foundProperty == ValidateContext.ClassLocalsProperty || foundProperty == ValidateContext.UILocalsProperty) + else if (foundProperty == ClassLocalsProperty || foundProperty == UILocalsProperty) this._currentScope = SymbolOrigin.None; - else if (foundProperty == ValidateContext.UIInputProperty) + else if (foundProperty == UIInputProperty) this._currentScope = SymbolOrigin.None; - else if (foundProperty == ValidateContext.UIContentProperty && property.PropertyAttributeList == null) + else if (foundProperty == UIContentProperty && property.PropertyAttributeList == null) this._currentScope = SymbolOrigin.None; - else if (foundProperty == ValidateContext.EffectTechniquesProperty) + else if (foundProperty == EffectTechniquesProperty) this._currentScope = SymbolOrigin.None; this._propertyScopeStack.Pop(); } @@ -379,7 +379,7 @@ namespace Microsoft.Iris.Markup.Validation public bool IsNameReserved(string name) { - foreach (string reservedName in ValidateContext.ReservedNameList) + foreach (string reservedName in ReservedNameList) { if (name == reservedName) return true; @@ -414,7 +414,7 @@ namespace Microsoft.Iris.Markup.Validation { if (this.IsNameReserved(name)) return Result.Fail("Name \"{0}\" is reserved and cannot be used.", name); - if (!ValidateContext.IsValidSymbolName(name)) + if (!IsValidSymbolName(name)) return Result.Fail("Invalid name \"{0}\". Valid names must begin with either an alphabetic character or an underscore and can otherwise contain only alphabetic, numeric, or underscore characters", name); } return Result.Success; diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateDataMapping.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateDataMapping.cs index 9d83131..cbf71b3 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateDataMapping.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateDataMapping.cs @@ -63,7 +63,7 @@ namespace Microsoft.Iris.Markup.Validation dataMappingEntry.Property = propertyDeep; dataMappingEntry.Source = stringProperty3; dataMappingEntry.Target = stringProperty4; - dataMappingEntry.DefaultValue = ValidateDataMapping.ConvertDefaultValue(this, propertyDeep.PropertyType, stringProperty5); + dataMappingEntry.DefaultValue = ConvertDefaultValue(this, propertyDeep.PropertyType, stringProperty5); if (!entries.ContainsKey(stringProperty2)) entries[stringProperty2] = dataMappingEntry; else @@ -79,7 +79,7 @@ namespace Microsoft.Iris.Markup.Validation } if (stringProperty1 == null || markupDataTypeSchema == null) break; - ValidateDataMapping.AddDataMappingProviderList(ref this._foundDataMappingSet, Owner.LoadResultTarget, this.Name, markupDataTypeSchema, stringProperty1, mappingEntries); + AddDataMappingProviderList(ref this._foundDataMappingSet, Owner.LoadResultTarget, this.Name, markupDataTypeSchema, stringProperty1, mappingEntries); break; default: this.ReportError("TargetType for DataMapping must be a markup-defined DataType, {0} is not valid", typeSchemaProperty.Name); @@ -97,12 +97,12 @@ namespace Microsoft.Iris.Markup.Validation { if (provider.IndexOf(',') == -1) { - ValidateDataMapping.AddDataMappingOneProvider(ref foundDataMappingSet, owner, name, targetDataType, provider, mappingEntries); + AddDataMappingOneProvider(ref foundDataMappingSet, owner, name, targetDataType, provider, mappingEntries); } else { foreach (string providerName in StringUtility.SplitAndTrim(',', provider)) - ValidateDataMapping.AddDataMappingOneProvider(ref foundDataMappingSet, owner, name, targetDataType, providerName, mappingEntries); + AddDataMappingOneProvider(ref foundDataMappingSet, owner, name, targetDataType, providerName, mappingEntries); } } diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateEffect.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateEffect.cs index aa5c8fa..78f2d33 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateEffect.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateEffect.cs @@ -78,37 +78,37 @@ namespace Microsoft.Iris.Markup.Validation string effectElementName = this.GetEffectElementName(call); if (effectElementName == null) return; - if (ValidateEffect.s_methodNameMapping == null) + if (s_methodNameMapping == null) { - ValidateEffect.s_methodNameMapping = new Map(); - ValidateEffect.s_methodNameMapping["PlayAttenuationAnimation"] = 2; - ValidateEffect.s_methodNameMapping["PlayBrightnessAnimation"] = 3; - ValidateEffect.s_methodNameMapping["PlayColorAnimation"] = 4; - ValidateEffect.s_methodNameMapping["PlayInnerConeAngleAnimation"] = 14; - ValidateEffect.s_methodNameMapping["PlayOuterConeAngleAnimation"] = 18; - ValidateEffect.s_methodNameMapping["PlayContrastAnimation"] = 5; - ValidateEffect.s_methodNameMapping["PlayDarkColorAnimation"] = 6; - ValidateEffect.s_methodNameMapping["PlayDecayAnimation"] = 7; - ValidateEffect.s_methodNameMapping["PlayDensityAnimation"] = 8; - ValidateEffect.s_methodNameMapping["PlayDesaturateAnimation"] = 9; - ValidateEffect.s_methodNameMapping["PlayDirectionAngleAnimation"] = 10; - ValidateEffect.s_methodNameMapping["PlayDownsampleAnimation"] = 25; - ValidateEffect.s_methodNameMapping["PlayEdgeLimitAnimation"] = 11; - ValidateEffect.s_methodNameMapping["PlayFallOffAnimation"] = 12; - ValidateEffect.s_methodNameMapping["PlayHueAnimation"] = 13; - ValidateEffect.s_methodNameMapping["PlayIntensityAnimation"] = 15; - ValidateEffect.s_methodNameMapping["PlayLightColorAnimation"] = 16; - ValidateEffect.s_methodNameMapping["PlayAmbientColorAnimation"] = 1; - ValidateEffect.s_methodNameMapping["PlayLightnessAnimation"] = 17; - ValidateEffect.s_methodNameMapping["PlayPositionAnimation"] = 19; - ValidateEffect.s_methodNameMapping["PlayRadiusAnimation"] = 20; - ValidateEffect.s_methodNameMapping["PlaySaturationAnimation"] = 21; - ValidateEffect.s_methodNameMapping["PlayToneAnimation"] = 22; - ValidateEffect.s_methodNameMapping["PlayWeightAnimation"] = 23; - ValidateEffect.s_methodNameMapping["PlayValueAnimation"] = 24; + s_methodNameMapping = new Map(); + s_methodNameMapping["PlayAttenuationAnimation"] = 2; + s_methodNameMapping["PlayBrightnessAnimation"] = 3; + s_methodNameMapping["PlayColorAnimation"] = 4; + s_methodNameMapping["PlayInnerConeAngleAnimation"] = 14; + s_methodNameMapping["PlayOuterConeAngleAnimation"] = 18; + s_methodNameMapping["PlayContrastAnimation"] = 5; + s_methodNameMapping["PlayDarkColorAnimation"] = 6; + s_methodNameMapping["PlayDecayAnimation"] = 7; + s_methodNameMapping["PlayDensityAnimation"] = 8; + s_methodNameMapping["PlayDesaturateAnimation"] = 9; + s_methodNameMapping["PlayDirectionAngleAnimation"] = 10; + s_methodNameMapping["PlayDownsampleAnimation"] = 25; + s_methodNameMapping["PlayEdgeLimitAnimation"] = 11; + s_methodNameMapping["PlayFallOffAnimation"] = 12; + s_methodNameMapping["PlayHueAnimation"] = 13; + s_methodNameMapping["PlayIntensityAnimation"] = 15; + s_methodNameMapping["PlayLightColorAnimation"] = 16; + s_methodNameMapping["PlayAmbientColorAnimation"] = 1; + s_methodNameMapping["PlayLightnessAnimation"] = 17; + s_methodNameMapping["PlayPositionAnimation"] = 19; + s_methodNameMapping["PlayRadiusAnimation"] = 20; + s_methodNameMapping["PlaySaturationAnimation"] = 21; + s_methodNameMapping["PlayToneAnimation"] = 22; + s_methodNameMapping["PlayWeightAnimation"] = 23; + s_methodNameMapping["PlayValueAnimation"] = 24; } int num; - if (!ValidateEffect.s_methodNameMapping.TryGetValue(call.MemberName, out num)) + if (!s_methodNameMapping.TryGetValue(call.MemberName, out num)) return; this.TrackDynamicElementAssignment(effectElementName, (EffectProperty)num); } diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionDeclareTrigger.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionDeclareTrigger.cs index 694599a..7db4195 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionDeclareTrigger.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionDeclareTrigger.cs @@ -32,14 +32,14 @@ namespace Microsoft.Iris.Markup.Validation } else { - ValidateExpressionDeclareTrigger.StartNotifierTracking(context, this._expression); + StartNotifierTracking(context, this._expression); try { this._expression.Validate(TypeRestriction.None, context); } finally { - ValidateExpressionDeclareTrigger.StopNotifierTracking(this, context, this._expression); + StopNotifierTracking(this, context, this._expression); } if (this._expression.HasErrors) this.MarkHasErrors(); diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionOperation.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionOperation.cs index 7f7c6ff..dbdb0da 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionOperation.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateExpressionOperation.cs @@ -115,7 +115,7 @@ namespace Microsoft.Iris.Markup.Validation } else { - this.ReportError("Operator '{0}' cannot be applied to operands of dissimilar types '{1}' and '{2}'", ValidateExpressionOperation.GetOperationToken(this._op), this._leftSide.ObjectType.Name, this._rightSide.ObjectType.Name); + this.ReportError("Operator '{0}' cannot be applied to operands of dissimilar types '{1}' and '{2}'", GetOperationToken(this._op), this._leftSide.ObjectType.Name, this._rightSide.ObjectType.Name); return; } } @@ -123,7 +123,7 @@ namespace Microsoft.Iris.Markup.Validation this._foundOperationTargetType = this._leftSide.ObjectType; if (!this._foundOperationTargetType.SupportsOperationDeep(this._op)) { - this.ReportError("Operator '{0}' cannot be applied to operand of type '{1}'", ValidateExpressionOperation.GetOperationToken(this._op), this._foundOperationTargetType.Name); + this.ReportError("Operator '{0}' cannot be applied to operand of type '{1}'", GetOperationToken(this._op), this._foundOperationTargetType.Name); } else { diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateMethod.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateMethod.cs index 5a492c3..21518f8 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateMethod.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateMethod.cs @@ -141,7 +141,7 @@ namespace Microsoft.Iris.Markup.Validation { foreach (MarkupMethodSchema method in markupTypeSchema.Methods) { - if (ValidateMethod.IsExactMatch(method, methodCheck)) + if (IsExactMatch(method, methodCheck)) return method; } markupTypeSchema = markupTypeSchema.Base as MarkupTypeSchema; diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateParameter.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateParameter.cs index bff8b83..982a8d8 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateParameter.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateParameter.cs @@ -15,7 +15,7 @@ namespace Microsoft.Iris.Markup.Validation private ValidateParameter _next; public static ValidateParameter EmptyList; - public static void InitializeStatics() => ValidateParameter.EmptyList = new ValidateParameter(); + public static void InitializeStatics() => EmptyList = new ValidateParameter(); public ValidateParameter( SourceMarkupLoader owner, diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateStatementForEach.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateStatementForEach.cs index 17df523..f3ed429 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateStatementForEach.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateStatementForEach.cs @@ -36,8 +36,8 @@ namespace Microsoft.Iris.Markup.Validation public static void InitializeStatics() { - ValidateStatementForEach.s_currentProperty = EnumeratorSchema.Type.FindProperty("Current"); - ValidateStatementForEach.s_moveNextMethod = EnumeratorSchema.Type.FindMethod("MoveNext", TypeSchema.EmptyList); + s_currentProperty = EnumeratorSchema.Type.FindProperty("Current"); + s_moveNextMethod = EnumeratorSchema.Type.FindMethod("MoveNext", TypeSchema.EmptyList); } public ValidateStatementScopedLocal ScopedLocal => this._scopedLocal; @@ -71,8 +71,8 @@ namespace Microsoft.Iris.Markup.Validation this._statementCompound.Validate(container, context); if (this._statementCompound.HasErrors) this.MarkHasErrors(); - this._foundCurrentIndex = this.Owner.TrackImportedProperty(ValidateStatementForEach.s_currentProperty); - this._foundMoveNextIndex = this.Owner.TrackImportedMethod(ValidateStatementForEach.s_moveNextMethod); + this._foundCurrentIndex = this.Owner.TrackImportedProperty(s_currentProperty); + this._foundMoveNextIndex = this.Owner.TrackImportedMethod(s_moveNextMethod); } } finally diff --git a/UIX/Microsoft/Iris/Markup/Validation/ValidateUI.cs b/UIX/Microsoft/Iris/Markup/Validation/ValidateUI.cs index c5b03d1..f3bd4fe 100644 --- a/UIX/Microsoft/Iris/Markup/Validation/ValidateUI.cs +++ b/UIX/Microsoft/Iris/Markup/Validation/ValidateUI.cs @@ -17,7 +17,7 @@ namespace Microsoft.Iris.Markup.Validation private NamedContentRecord[] _namedContentTable; private static Map s_uiReservedSymbols = new Map(1); - public new static void InitializeStatics() => ValidateUI.s_uiReservedSymbols["UI"] = UIStateSchema.Type; + public new static void InitializeStatics() => s_uiReservedSymbols["UI"] = UIStateSchema.Type; public ValidateUI( SourceMarkupLoader owner, @@ -38,7 +38,7 @@ namespace Microsoft.Iris.Markup.Validation public override void Validate(TypeRestriction typeRestriction, ValidateContext context) { if (context.CurrentPass == LoadPass.Full) - context.DeclareReservedSymbols(ValidateUI.s_uiReservedSymbols); + context.DeclareReservedSymbols(s_uiReservedSymbols); if (context.CurrentPass == LoadPass.DeclareTypes) this.RemoveNamedContentProperties(); base.Validate(typeRestriction, context); diff --git a/UIX/Microsoft/Iris/ModelItem.cs b/UIX/Microsoft/Iris/ModelItem.cs index f597467..5a967e9 100644 --- a/UIX/Microsoft/Iris/ModelItem.cs +++ b/UIX/Microsoft/Iris/ModelItem.cs @@ -38,7 +38,7 @@ namespace Microsoft.Iris ThreadSafety.InitializeObject(this); this._dataMap = new DynamicData(); this._dataMap.Create(); - this.SetData(ModelItem.s_descriptionProperty, description); + this.SetData(s_descriptionProperty, description); this.Owner = owner; } @@ -55,7 +55,7 @@ namespace Microsoft.Iris ~ModelItem() { string name = this.GetType().Name; - string data = (string)this.GetData(ModelItem.s_descriptionProperty); + string data = (string)this.GetData(s_descriptionProperty); this.OnDispose(false); } @@ -141,7 +141,7 @@ namespace Microsoft.Iris get { using (this.ThreadValidator) - return (string)this.GetData(ModelItem.s_descriptionProperty); + return (string)this.GetData(s_descriptionProperty); } set { @@ -149,7 +149,7 @@ namespace Microsoft.Iris { if (!(this.Description != value)) return; - this.SetData(ModelItem.s_descriptionProperty, value); + this.SetData(s_descriptionProperty, value); this.FirePropertyChanged(nameof(Description)); } } @@ -161,7 +161,7 @@ namespace Microsoft.Iris { using (this.ThreadValidator) { - object data = this.GetData(ModelItem.s_uniqueIdProperty); + object data = this.GetData(s_uniqueIdProperty); return data == null ? Guid.Empty : (Guid)data; } } @@ -171,7 +171,7 @@ namespace Microsoft.Iris { if (!(this.UniqueId != value)) return; - this.SetData(ModelItem.s_uniqueIdProperty, value); + this.SetData(s_uniqueIdProperty, value); this.FirePropertyChanged(nameof(UniqueId)); } } @@ -183,11 +183,11 @@ namespace Microsoft.Iris { using (this.ThreadValidator) { - IDictionary dictionary = (IDictionary)this.GetData(ModelItem.s_extraDataProperty); + IDictionary dictionary = (IDictionary)this.GetData(s_extraDataProperty); if (dictionary == null) { dictionary = new HybridDictionary(); - this.SetData(ModelItem.s_extraDataProperty, dictionary); + this.SetData(s_extraDataProperty, dictionary); } return dictionary; } @@ -199,12 +199,12 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(ModelItem.s_propertyChangedEvent, value); + this.AddEventHandler(s_propertyChangedEvent, value); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(ModelItem.s_propertyChangedEvent, value); + this.RemoveEventHandler(s_propertyChangedEvent, value); } } @@ -215,7 +215,7 @@ namespace Microsoft.Iris if (property == null) throw new ArgumentNullException(nameof(property)); this.OnPropertyChanged(property); - if (!(this.GetEventHandler(ModelItem.s_propertyChangedEvent) is PropertyChangedEventHandler eventHandler)) + if (!(this.GetEventHandler(s_propertyChangedEvent) is PropertyChangedEventHandler eventHandler)) return; eventHandler(this, new PropertyChangedEventArgs(property)); } @@ -261,16 +261,16 @@ namespace Microsoft.Iris return; foreach (ModelItem modelItem in ownedObjects) modelItem.Dispose(ModelItemDisposeMode.KeepOwnerReference); - this.SetData(ModelItem.s_ownedObjectsProperty, null); + this.SetData(s_ownedObjectsProperty, null); } private Vector GetOwnedObjects(bool createIfNoneFlag) { - Vector vector = (Vector)this.GetData(ModelItem.s_ownedObjectsProperty); + Vector vector = (Vector)this.GetData(s_ownedObjectsProperty); if (vector == null && createIfNoneFlag) { vector = new Vector(); - this.SetData(ModelItem.s_ownedObjectsProperty, vector); + this.SetData(s_ownedObjectsProperty, vector); } return vector; } @@ -281,7 +281,7 @@ namespace Microsoft.Iris { using (this.ThreadValidator) { - object data = this.GetData(ModelItem.s_selectedProperty); + object data = this.GetData(s_selectedProperty); return data != null && (bool)data; } } @@ -291,7 +291,7 @@ namespace Microsoft.Iris { if (this.Selected == value) return; - this.SetData(ModelItem.s_selectedProperty, value); + this.SetData(s_selectedProperty, value); this.FirePropertyChanged(nameof(Selected)); } } diff --git a/UIX/Microsoft/Iris/ModelItems/BooleanChoice.cs b/UIX/Microsoft/Iris/ModelItems/BooleanChoice.cs index 8f614ff..be4ae8e 100644 --- a/UIX/Microsoft/Iris/ModelItems/BooleanChoice.cs +++ b/UIX/Microsoft/Iris/ModelItems/BooleanChoice.cs @@ -22,8 +22,8 @@ namespace Microsoft.Iris.ModelItems static BooleanChoice() { - BooleanChoice.s_defaultOptions[0] = BooleanBoxes.FalseBox; - BooleanChoice.s_defaultOptions[1] = BooleanBoxes.TrueBox; + s_defaultOptions[0] = BooleanBoxes.FalseBox; + s_defaultOptions[1] = BooleanBoxes.TrueBox; } public BooleanChoice() diff --git a/UIX/Microsoft/Iris/ModelItems/Choice.cs b/UIX/Microsoft/Iris/ModelItems/Choice.cs index 5500e90..8f5ec72 100644 --- a/UIX/Microsoft/Iris/ModelItems/Choice.cs +++ b/UIX/Microsoft/Iris/ModelItems/Choice.cs @@ -26,7 +26,7 @@ namespace Microsoft.Iris.ModelItems public Choice() { - this._chosen = Choice.s_noSelectionSentinal; + this._chosen = s_noSelectionSentinal; this._default = 0; } @@ -133,7 +133,7 @@ namespace Microsoft.Iris.ModelItems this.FirePrevNextNotifications(hasPreviousValue, hasNextValue); } - public bool HasSelection => this._chosen != Choice.s_noSelectionSentinal && this._options != null; + public bool HasSelection => this._chosen != s_noSelectionSentinal && this._options != null; public bool HasPreviousValue => this.HasPreviousValueWorker(this._wrap); @@ -228,7 +228,7 @@ namespace Microsoft.Iris.ModelItems object IUIValueRange.ObjectValue => this.ChosenValue; - public void Clear() => this.SetChosenIndex(Choice.s_noSelectionSentinal); + public void Clear() => this.SetChosenIndex(s_noSelectionSentinal); private void OnListContentsChanged(IList senderList, UIListContentsChangedArgs args) { diff --git a/UIX/Microsoft/Iris/ModelItems/ScrollModel.cs b/UIX/Microsoft/Iris/ModelItems/ScrollModel.cs index 7444258..01a9597 100644 --- a/UIX/Microsoft/Iris/ModelItems/ScrollModel.cs +++ b/UIX/Microsoft/Iris/ModelItems/ScrollModel.cs @@ -408,10 +408,10 @@ namespace Microsoft.Iris.ModelItems bool flag = true; switch (this.GetLastFocusLocation()) { - case ScrollModel.ItemLocation.OffscreenInNearDirection: + case ItemLocation.OffscreenInNearDirection: flag = nearDirection; break; - case ScrollModel.ItemLocation.Onscreen: + case ItemLocation.Onscreen: flag = !this.PotentialNavigationTargetIsOnscreen(this.NearFarToDirection(nearDirection), out UIClass _); if (!flag && this._useUserDisposition && this.NonDefaultUserDisposition()) { @@ -419,11 +419,11 @@ namespace Microsoft.Iris.ModelItems break; } break; - case ScrollModel.ItemLocation.OffscreenInFarDirection: + case ItemLocation.OffscreenInFarDirection: flag = !nearDirection; break; } - ScrollModel.AssignFocusAction instance = ScrollModel.AssignFocusAction.GetInstance(this, this.GetAssignFocusPoint(nearDirection), nearDirection, false); + ScrollModel.AssignFocusAction instance = AssignFocusAction.GetInstance(this, this.GetAssignFocusPoint(nearDirection), nearDirection, false); if (!flag) { instance.Go(); @@ -480,17 +480,17 @@ namespace Microsoft.Iris.ModelItems return !near ? Direction.East : Direction.West; } - private bool LastFocusIsOnscreen() => this.GetItemLocation(this._lastFocusedItem) == ScrollModel.ItemLocation.Onscreen; + private bool LastFocusIsOnscreen() => this.GetItemLocation(this._lastFocusedItem) == ItemLocation.Onscreen; private ScrollModel.ItemLocation GetLastFocusLocation() => this.GetItemLocation(this._lastFocusedItem); - private bool ItemIsOnscreen(ViewItem item) => this.GetItemLocation(item) == ScrollModel.ItemLocation.Onscreen; + private bool ItemIsOnscreen(ViewItem item) => this.GetItemLocation(item) == ItemLocation.Onscreen; private ScrollModel.ItemLocation GetItemLocation(ViewItem item) { RectangleF scrollerRect = this.GetScrollerRect(false); RectangleF viewItemRect = this.GetViewItemRect(item, false); - return !(RectangleF.Intersect(scrollerRect, viewItemRect) == viewItemRect) ? (this.ScrollOrientation != Orientation.Horizontal ? (viewItemRect.Top >= (double)scrollerRect.Top ? ScrollModel.ItemLocation.OffscreenInFarDirection : ScrollModel.ItemLocation.OffscreenInNearDirection) : (viewItemRect.Left < (double)scrollerRect.Left || this._targetItem.Zone.Session.IsRtl && viewItemRect.Right > (double)scrollerRect.Right ? ScrollModel.ItemLocation.OffscreenInNearDirection : ScrollModel.ItemLocation.OffscreenInFarDirection)) : ScrollModel.ItemLocation.Onscreen; + return !(RectangleF.Intersect(scrollerRect, viewItemRect) == viewItemRect) ? (this.ScrollOrientation != Orientation.Horizontal ? (viewItemRect.Top >= (double)scrollerRect.Top ? ItemLocation.OffscreenInFarDirection : ItemLocation.OffscreenInNearDirection) : (viewItemRect.Left < (double)scrollerRect.Left || this._targetItem.Zone.Session.IsRtl && viewItemRect.Right > (double)scrollerRect.Right ? ItemLocation.OffscreenInNearDirection : ItemLocation.OffscreenInFarDirection)) : ItemLocation.Onscreen; } private bool PotentialNavigationTargetIsOnscreen(Direction dir, out UIClass navigationResult) => this.PotentialNavigationTargetIsOnscreen(this._lastFocusedItem.UI, dir, out navigationResult); @@ -577,7 +577,7 @@ namespace Microsoft.Iris.ModelItems } if (!flag3) return; - ScrollModel.AssignFocusAction instance = ScrollModel.AssignFocusAction.GetInstance(this, PointF.Zero, home, true); + ScrollModel.AssignFocusAction instance = AssignFocusAction.GetInstance(this, PointF.Zero, home, true); if (!flag2) instance.Go(); else @@ -605,7 +605,7 @@ namespace Microsoft.Iris.ModelItems this.ActualScrollIntoViewDisposition.Reset(); this.ActualScrollIntoViewDisposition.Enabled = true; this.SetPendingFocusAreaOfInterest(this._lastFocusedItem.UI); - this.SetPostLayoutAction(ScrollModel.NavigateAction.GetInstance(this, nearDirection, direction)); + this.SetPostLayoutAction(NavigateAction.GetInstance(this, nearDirection, direction)); this.OnLayoutInputChanged(); } else if (nearDirection) diff --git a/UIX/Microsoft/Iris/Navigation/NavigationFlow.cs b/UIX/Microsoft/Iris/Navigation/NavigationFlow.cs index 73b8bdd..6d42f08 100644 --- a/UIX/Microsoft/Iris/Navigation/NavigationFlow.cs +++ b/UIX/Microsoft/Iris/Navigation/NavigationFlow.cs @@ -163,7 +163,7 @@ namespace Microsoft.Iris.Navigation { NavigationItem navigationItem = null; if (partition != null && partition.Count > 0) - navigationItem = NavigationItem.CreateAreaForSite(new TransientNavigationSite(partition[0].ToString(), this.Subject, partition, this._modeForNewSites, Vector3.Zero, Vector3.Zero), this.SearchDirection, false, true); + navigationItem = CreateAreaForSite(new TransientNavigationSite(partition[0].ToString(), this.Subject, partition, this._modeForNewSites, Vector3.Zero, Vector3.Zero), this.SearchDirection, false, true); return navigationItem; } diff --git a/UIX/Microsoft/Iris/Navigation/NavigationItem.cs b/UIX/Microsoft/Iris/Navigation/NavigationItem.cs index 5f95f82..c93a436 100644 --- a/UIX/Microsoft/Iris/Navigation/NavigationItem.cs +++ b/UIX/Microsoft/Iris/Navigation/NavigationItem.cs @@ -60,9 +60,9 @@ namespace Microsoft.Iris.Navigation if (child.Visible) { Direction searchDirection = this.SearchDirection; - if (NavigationItem.IsPreferFocusOrderContainer(child)) + if (IsPreferFocusOrderContainer(child)) searchDirection = Direction.Next; - NavigationItem itemForSite = NavigationItem.CreateItemForSite(child, searchDirection, false); + NavigationItem itemForSite = CreateItemForSite(child, searchDirection, false); if (itemForSite != null) { int num = childrenList.Add(itemForSite); @@ -78,11 +78,11 @@ namespace Microsoft.Iris.Navigation { get { - if (this._parentItem == null && !NavigationItem.IsBoundingSite(this._subjectSite, this._searchDirection)) + if (this._parentItem == null && !IsBoundingSite(this._subjectSite, this._searchDirection)) { INavigationSite parent = this._subjectSite.Parent; if (parent != null) - this._parentItem = NavigationItem.CreateAreaForSite(parent, this._searchDirection, true, false); + this._parentItem = CreateAreaForSite(parent, this._searchDirection, true, false); } return this._parentItem; } @@ -129,7 +129,7 @@ namespace Microsoft.Iris.Navigation { if (niA == null || niB == null) return 0; - int num = NavigationItem.CompareFocusRanks(niA.FocusRank, niB.FocusRank); + int num = CompareFocusRanks(niA.FocusRank, niB.FocusRank); if (num != 0) return num; int rawChildOrder1 = niA.RawChildOrder; @@ -142,7 +142,7 @@ namespace Microsoft.Iris.Navigation [Conditional("DEBUG")] internal void DebugTraceFocusRank() { - if (!Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Focus)) + if (!Debug.Trace.IsCategoryEnabled(TraceCategory.Focus)) return; int num = 0; while (num < this.FocusRank.Length) @@ -186,20 +186,20 @@ namespace Microsoft.Iris.Navigation { if (this.Subject != excludeStickyContainerSite) { - object groupFocusId = NavigationItem.GetGroupFocusId(this.Subject); + object groupFocusId = GetGroupFocusId(this.Subject); if (groupFocusId != null) { INavigationSite site = this.Subject.LookupChildById(groupFocusId); if (site != null && site != exclueStickyDestinationSite) { - NavigationItem itemForSite = NavigationItem.CreateItemForSite(site, this.SearchDirection, false); + NavigationItem itemForSite = CreateItemForSite(site, this.SearchDirection, false); if (itemForSite != null && itemForSite.CheckDestination(startRectangleF)) return itemForSite; - NavigationItem.SetGroupFocusId(this.Subject, null); + SetGroupFocusId(this.Subject, null); } } } - if (!depthFirst || NavigationItem.IsPreferContainerFocus(this.Subject)) + if (!depthFirst || IsPreferContainerFocus(this.Subject)) { depthFirst = false; if (this.CheckDestination(startRectangleF)) @@ -224,13 +224,13 @@ namespace Microsoft.Iris.Navigation { object uniqueId = focusSite.UniqueId; for (INavigationSite groupSite = focusSite; groupSite != null; groupSite = groupSite.Parent) - NavigationItem.SetGroupFocusId(groupSite, uniqueId); + SetGroupFocusId(groupSite, uniqueId); } internal static void ClearFocus(INavigationSite startSite) { for (INavigationSite groupSite = startSite; groupSite != null; groupSite = groupSite.Parent) - NavigationItem.SetGroupFocusId(groupSite, null); + SetGroupFocusId(groupSite, null); } internal static NavigationItem CreateItemForSite( @@ -238,7 +238,7 @@ namespace Microsoft.Iris.Navigation Direction searchDirection, bool mustUseThisSiteFlag) { - return NavigationItem.CreateItemForSiteWorker(site, searchDirection, mustUseThisSiteFlag); + return CreateItemForSiteWorker(site, searchDirection, mustUseThisSiteFlag); } internal static NavigationItem CreateAreaForSite( @@ -247,7 +247,7 @@ namespace Microsoft.Iris.Navigation bool searchAncestorsFlag, bool mustUseThisSiteFlag) { - return NavigationItem.CreateAreaForSiteWorker(targetSite, searchDirection, searchAncestorsFlag, mustUseThisSiteFlag); + return CreateAreaForSiteWorker(targetSite, searchDirection, searchAncestorsFlag, mustUseThisSiteFlag); } private static NavigationItem CreateItemForSiteWorker( @@ -261,7 +261,7 @@ namespace Microsoft.Iris.Navigation return null; if (site.Navigability != NavigationClass.None) mustUseThisSiteFlag = true; - return NavigationItem.CreateAreaForSiteWorker(site, searchDirection, false, mustUseThisSiteFlag); + return CreateAreaForSiteWorker(site, searchDirection, false, mustUseThisSiteFlag); } private static NavigationItem CreateAreaForSiteWorker( @@ -275,7 +275,7 @@ namespace Microsoft.Iris.Navigation if (!targetSite.Visible) return null; INavigationSite governSite; - NavigationOrientation containerOrientation = NavigationItem.ComputeGoverningContainerOrientation(targetSite, searchDirection, searchAncestorsFlag || mustUseThisSiteFlag, out governSite); + NavigationOrientation containerOrientation = ComputeGoverningContainerOrientation(targetSite, searchDirection, searchAncestorsFlag || mustUseThisSiteFlag, out governSite); if (governSite != targetSite && !mustUseThisSiteFlag) { if (!searchAncestorsFlag) @@ -322,8 +322,8 @@ namespace Microsoft.Iris.Navigation bool searchAncestorsFlag, out INavigationSite governSite) { - NavigationOrientation orientation = NavigationItem.GetAreaDisposition(targetSite, searchDirection); - if (!NavigationItem.IsNeutralGoverningOrientation(orientation, searchAncestorsFlag)) + NavigationOrientation orientation = GetAreaDisposition(targetSite, searchDirection); + if (!IsNeutralGoverningOrientation(orientation, searchAncestorsFlag)) { governSite = targetSite; } @@ -332,7 +332,7 @@ namespace Microsoft.Iris.Navigation governSite = targetSite; for (INavigationSite parent = targetSite.Parent; parent != null; parent = parent.Parent) { - NavigationOrientation areaDisposition = NavigationItem.GetAreaDisposition(parent, searchDirection); + NavigationOrientation areaDisposition = GetAreaDisposition(parent, searchDirection); if (areaDisposition != NavigationOrientation.None) { switch (areaDisposition) @@ -360,7 +360,7 @@ namespace Microsoft.Iris.Navigation break; } } - if (!NavigationItem.IsNeutralGoverningOrientation(orientation, searchAncestorsFlag)) + if (!IsNeutralGoverningOrientation(orientation, searchAncestorsFlag)) goto label_16; } orientation = NavigationOrientation.None; @@ -388,13 +388,13 @@ namespace Microsoft.Iris.Navigation INavigationSite targetSite, Direction searchDirection) { - NavigationOrientation explicitOrientation = NavigationItem.GetExplicitOrientation(targetSite); + NavigationOrientation explicitOrientation = GetExplicitOrientation(targetSite); if (explicitOrientation != NavigationOrientation.Inherit) return explicitOrientation; - NavigationOrientation flowOrientation = NavigationItem.GetFlowOrientation(targetSite, searchDirection); + NavigationOrientation flowOrientation = GetFlowOrientation(targetSite, searchDirection); if (flowOrientation != NavigationOrientation.Inherit) return flowOrientation; - if (targetSite.Parent == null || targetSite.Navigability == NavigationClass.Direct || (NavigationItem.IsBoundingSite(targetSite, searchDirection) || NavigationItem.IsPreferFocusOrderContainer(targetSite)) || (NavigationItem.IsTabGroup(targetSite) || NavigationItem.IsRememberFocus(targetSite) || NavigationItem.IsPreferContainerFocus(targetSite))) + if (targetSite.Parent == null || targetSite.Navigability == NavigationClass.Direct || (IsBoundingSite(targetSite, searchDirection) || IsPreferFocusOrderContainer(targetSite)) || (IsTabGroup(targetSite) || IsRememberFocus(targetSite) || IsPreferContainerFocus(targetSite))) return NavigationOrientation.Free; return targetSite.IsLogicalJunction ? NavigationOrientation.Inherit : NavigationOrientation.None; } @@ -509,7 +509,7 @@ namespace Microsoft.Iris.Navigation private static void SetGroupFocusId(INavigationSite groupSite, object uniqueIdObject) { - if (!NavigationItem.IsRememberFocus(groupSite)) + if (!IsRememberFocus(groupSite)) return; groupSite.StateCache = uniqueIdObject; } @@ -517,7 +517,7 @@ namespace Microsoft.Iris.Navigation private static object GetGroupFocusId(INavigationSite groupSite) { object obj = null; - if (NavigationItem.IsRememberFocus(groupSite)) + if (IsRememberFocus(groupSite)) obj = groupSite.StateCache; return obj; } diff --git a/UIX/Microsoft/Iris/Navigation/NavigationOrder.cs b/UIX/Microsoft/Iris/Navigation/NavigationOrder.cs index 9d72810..0979736 100644 --- a/UIX/Microsoft/Iris/Navigation/NavigationOrder.cs +++ b/UIX/Microsoft/Iris/Navigation/NavigationOrder.cs @@ -26,7 +26,7 @@ namespace Microsoft.Iris.Navigation bool enteringFlag) { this._orderModifierValue = 1; - if (this.SearchDirection == Direction.Previous && (!enteringFlag || !NavigationItem.IsTabGroup(this.Subject))) + if (this.SearchDirection == Direction.Previous && (!enteringFlag || !IsTabGroup(this.Subject))) this._orderModifierValue = -1; NavigationItem[] navigationItemArray = new NavigationItem[allChildrenList.Count]; int num = 0; @@ -36,6 +36,6 @@ namespace Microsoft.Iris.Navigation return navigationItemArray; } - int IComparer.Compare(object a, object b) => this._orderModifierValue * NavigationItem.CompareFocusOrder((NavigationItem)a, (NavigationItem)b); + int IComparer.Compare(object a, object b) => this._orderModifierValue * CompareFocusOrder((NavigationItem)a, (NavigationItem)b); } } diff --git a/UIX/Microsoft/Iris/Navigation/NavigationServices.cs b/UIX/Microsoft/Iris/Navigation/NavigationServices.cs index 46f1197..ba93ad6 100644 --- a/UIX/Microsoft/Iris/Navigation/NavigationServices.cs +++ b/UIX/Microsoft/Iris/Navigation/NavigationServices.cs @@ -18,7 +18,7 @@ namespace Microsoft.Iris.Navigation { private static float s_originNear = 0.0f; private static float s_originSize = 0.0f; - private static NavigationServices.SearchOrientation s_originOrientation = NavigationServices.SearchOrientation.None; + private static NavigationServices.SearchOrientation s_originOrientation = SearchOrientation.None; public static bool FindNextPeer( INavigationSite originSite, @@ -27,17 +27,17 @@ namespace Microsoft.Iris.Navigation out INavigationSite resultSite) { INavigationSite navigationSite1 = originSite; - Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Navigation, 2); - if (startRectangleF.IsEmpty && !NavigationServices.GetDefaultOutboundStartRect(originSite, out startRectangleF)) + Debug.Trace.IsCategoryEnabled(TraceCategory.Navigation, 2); + if (startRectangleF.IsEmpty && !GetDefaultOutboundStartRect(originSite, out startRectangleF)) { resultSite = null; return false; } - NavigationServices.ProcessDirectionalMemory(ref startRectangleF, searchDirection); - INavigationSite parentTabGroup = NavigationServices.FindParentTabGroup(navigationSite1, searchDirection); + ProcessDirectionalMemory(ref startRectangleF, searchDirection); + INavigationSite parentTabGroup = FindParentTabGroup(navigationSite1, searchDirection); if (parentTabGroup != null) navigationSite1 = parentTabGroup; - INavigationSite boundingSite = NavigationServices.FindBoundingSite(navigationSite1, searchDirection); + INavigationSite boundingSite = FindBoundingSite(navigationSite1, searchDirection); INavigationSite navigationSite2 = null; NavigationItem itemForSite1 = NavigationItem.CreateItemForSite(navigationSite1, searchDirection, false); if (itemForSite1 != null) @@ -51,7 +51,7 @@ namespace Microsoft.Iris.Navigation Vector3 sizePxlVector; boundingSite.ComputeBounds(out positionPxlVector, out sizePxlVector); RectangleF excludeRectangleF = new RectangleF(positionPxlVector.X, positionPxlVector.Y, sizePxlVector.X, sizePxlVector.Y); - NavigationServices.AdjustStartRectForSimulatedEntry(searchDirection, excludeRectangleF, ref startRectangleF); + AdjustStartRectForSimulatedEntry(searchDirection, excludeRectangleF, ref startRectangleF); NavigationItem itemForSite2 = NavigationItem.CreateItemForSite(boundingSite, searchDirection, true); if (itemForSite2 != null) { @@ -73,7 +73,7 @@ namespace Microsoft.Iris.Navigation PointF pt, out INavigationSite result) { - return NavigationServices.FindFromPoint(originSite, Direction.Next, pt, out result); + return FindFromPoint(originSite, Direction.Next, pt, out result); } public static bool FindFromPoint( @@ -82,7 +82,7 @@ namespace Microsoft.Iris.Navigation PointF pt, out INavigationSite result) { - NavigationServices.ResetDirectionalMemory(); + ResetDirectionalMemory(); return new FindFromPointWorker(originSite, bias).FindFromPoint(pt, out result); } @@ -92,13 +92,13 @@ namespace Microsoft.Iris.Navigation RectangleF startRectangleF, out INavigationSite resultSite) { - Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Navigation, 2); - if (startRectangleF.IsEmpty && !NavigationServices.GetDefaultInboundStartRect(originSite, searchDirection, out startRectangleF)) + Debug.Trace.IsCategoryEnabled(TraceCategory.Navigation, 2); + if (startRectangleF.IsEmpty && !GetDefaultInboundStartRect(originSite, searchDirection, out startRectangleF)) { resultSite = null; return false; } - NavigationServices.ProcessDirectionalMemory(ref startRectangleF, searchDirection); + ProcessDirectionalMemory(ref startRectangleF, searchDirection); INavigationSite navigationSite = null; NavigationItem itemForSite = NavigationItem.CreateItemForSite(originSite, searchDirection, true); if (itemForSite != null) @@ -126,9 +126,9 @@ namespace Microsoft.Iris.Navigation Direction searchDirection, out RectangleF startRectangleF) { - if (!NavigationServices.GetDefaultOutboundStartRect(originSite, out startRectangleF)) + if (!GetDefaultOutboundStartRect(originSite, out startRectangleF)) return false; - NavigationServices.AdjustStartRectForSimulatedEntry(searchDirection, startRectangleF, ref startRectangleF); + AdjustStartRectForSimulatedEntry(searchDirection, startRectangleF, ref startRectangleF); return true; } @@ -148,7 +148,7 @@ namespace Microsoft.Iris.Navigation return true; } - private static void ResetDirectionalMemory() => NavigationServices.UpdateDirectionalMemoryInfo(RectangleF.Zero, Direction.Next); + private static void ResetDirectionalMemory() => UpdateDirectionalMemoryInfo(RectangleF.Zero, Direction.Next); private static bool UpdateDirectionalMemoryInfo( RectangleF startRectangleF, @@ -156,32 +156,32 @@ namespace Microsoft.Iris.Navigation { float num1 = 0.0f; float num2 = 0.0f; - NavigationServices.SearchOrientation searchOrientation = NavigationServices.SearchOrientation.None; + NavigationServices.SearchOrientation searchOrientation = SearchOrientation.None; switch (searchDirection) { case Direction.North: case Direction.South: - searchOrientation = NavigationServices.SearchOrientation.Vertical; + searchOrientation = SearchOrientation.Vertical; num1 = startRectangleF.X; num2 = startRectangleF.Width; break; case Direction.East: case Direction.West: - searchOrientation = NavigationServices.SearchOrientation.Horizontal; + searchOrientation = SearchOrientation.Horizontal; num1 = startRectangleF.Y; num2 = startRectangleF.Height; break; case Direction.Previous: case Direction.Next: - searchOrientation = NavigationServices.SearchOrientation.None; + searchOrientation = SearchOrientation.None; break; } - bool flag = NavigationServices.s_originOrientation != searchOrientation; + bool flag = s_originOrientation != searchOrientation; if (flag) { - NavigationServices.s_originOrientation = searchOrientation; - NavigationServices.s_originNear = num1; - NavigationServices.s_originSize = num2; + s_originOrientation = searchOrientation; + s_originNear = num1; + s_originSize = num2; } return flag; } @@ -190,20 +190,20 @@ namespace Microsoft.Iris.Navigation ref RectangleF startRectangleF, Direction searchDirection) { - if (NavigationServices.UpdateDirectionalMemoryInfo(startRectangleF, searchDirection)) + if (UpdateDirectionalMemoryInfo(startRectangleF, searchDirection)) return; bool flag = true; - switch (NavigationServices.s_originOrientation) + switch (s_originOrientation) { - case NavigationServices.SearchOrientation.Horizontal: - startRectangleF.Y = NavigationServices.s_originNear; - startRectangleF.Height = NavigationServices.s_originSize; + case SearchOrientation.Horizontal: + startRectangleF.Y = s_originNear; + startRectangleF.Height = s_originSize; break; - case NavigationServices.SearchOrientation.Vertical: - startRectangleF.X = NavigationServices.s_originNear; - startRectangleF.Width = NavigationServices.s_originSize; + case SearchOrientation.Vertical: + startRectangleF.X = s_originNear; + startRectangleF.Width = s_originSize; break; - case NavigationServices.SearchOrientation.None: + case SearchOrientation.None: flag = false; break; } diff --git a/UIX/Microsoft/Iris/Navigation/NavigationSpace.cs b/UIX/Microsoft/Iris/Navigation/NavigationSpace.cs index 077ea72..296d09f 100644 --- a/UIX/Microsoft/Iris/Navigation/NavigationSpace.cs +++ b/UIX/Microsoft/Iris/Navigation/NavigationSpace.cs @@ -13,7 +13,7 @@ namespace Microsoft.Iris.Navigation { internal class NavigationSpace : NavigationItem, IComparer { - private const NavigationSpace.Rank c_rankAcceptable = NavigationSpace.Rank.Fair; + private const NavigationSpace.Rank c_rankAcceptable = Rank.Fair; internal NavigationSpace(INavigationSite subjectSite, Direction searchDirection) : base(subjectSite, searchDirection) @@ -100,7 +100,7 @@ namespace Microsoft.Iris.Navigation break; } NavigationSpace.Rank rank = this.ComputeRank(xDeltaValue, yDeltaValue, overlapValue, toleranceValue); - if (rank > NavigationSpace.Rank.Fair) + if (rank > Rank.Fair) return null; switch (this.SearchDirection) { @@ -148,40 +148,40 @@ namespace Microsoft.Iris.Navigation { case Direction.North: if (yDeltaValue > (double)toleranceValue) - return NavigationSpace.Rank.Poor; + return Rank.Poor; break; case Direction.South: if (yDeltaValue < (double)toleranceValue) - return NavigationSpace.Rank.Poor; + return Rank.Poor; break; case Direction.East: if (xDeltaValue < (double)toleranceValue) - return NavigationSpace.Rank.Poor; + return Rank.Poor; break; case Direction.West: if (xDeltaValue > (double)toleranceValue) - return NavigationSpace.Rank.Poor; + return Rank.Poor; break; } if (overlapValue > 0.0) - return NavigationSpace.Rank.Ideal; + return Rank.Ideal; switch (this.SearchDirection) { case Direction.North: if (yDeltaValue > 0.0) - return NavigationSpace.Rank.Fair; + return Rank.Fair; break; case Direction.South: if (yDeltaValue < 0.0) - return NavigationSpace.Rank.Fair; + return Rank.Fair; break; case Direction.East: if (xDeltaValue < 0.0) - return NavigationSpace.Rank.Fair; + return Rank.Fair; break; case Direction.West: if (xDeltaValue > 0.0) - return NavigationSpace.Rank.Fair; + return Rank.Fair; break; } xDeltaValue = Math.Abs(xDeltaValue); @@ -191,15 +191,15 @@ namespace Microsoft.Iris.Navigation case Direction.North: case Direction.South: if (xDeltaValue >= (double)yDeltaValue) - return NavigationSpace.Rank.Fair; + return Rank.Fair; break; case Direction.East: case Direction.West: if (yDeltaValue >= (double)xDeltaValue) - return NavigationSpace.Rank.Fair; + return Rank.Fair; break; } - return NavigationSpace.Rank.Good; + return Rank.Good; } int IComparer.Compare(object a, object b) diff --git a/UIX/Microsoft/Iris/Navigation/NavigationStrip.cs b/UIX/Microsoft/Iris/Navigation/NavigationStrip.cs index dbe88f2..f7af0ab 100644 --- a/UIX/Microsoft/Iris/Navigation/NavigationStrip.cs +++ b/UIX/Microsoft/Iris/Navigation/NavigationStrip.cs @@ -12,10 +12,10 @@ namespace Microsoft.Iris.Navigation { internal class NavigationStrip : NavigationItem { - private static readonly NavigationStrip.CompareFunction s_orderHorizontalMethod = new NavigationStrip.CompareFunction(NavigationStrip.CompareOrderHorizontal); - private static readonly NavigationStrip.CompareFunction s_orderVerticalMethod = new NavigationStrip.CompareFunction(NavigationStrip.CompareOrderVertical); - private static readonly NavigationStrip.CompareFunction s_distanceHorizontalMethod = new NavigationStrip.CompareFunction(NavigationStrip.CompareDistanceHorizontal); - private static readonly NavigationStrip.CompareFunction s_distanceVerticalMethod = new NavigationStrip.CompareFunction(NavigationStrip.CompareDistanceVertical); + private static readonly NavigationStrip.CompareFunction s_orderHorizontalMethod = new NavigationStrip.CompareFunction(CompareOrderHorizontal); + private static readonly NavigationStrip.CompareFunction s_orderVerticalMethod = new NavigationStrip.CompareFunction(CompareOrderVertical); + private static readonly NavigationStrip.CompareFunction s_distanceHorizontalMethod = new NavigationStrip.CompareFunction(CompareDistanceHorizontal); + private static readonly NavigationStrip.CompareFunction s_distanceVerticalMethod = new NavigationStrip.CompareFunction(CompareDistanceVertical); private NavigationOrientation _orientationValue; internal NavigationStrip( @@ -50,10 +50,10 @@ namespace Microsoft.Iris.Navigation switch (searchOrientation) { case NavigationOrientation.Horizontal: - compareMethod = NavigationStrip.s_orderHorizontalMethod; + compareMethod = s_orderHorizontalMethod; break; case NavigationOrientation.Vertical: - compareMethod = NavigationStrip.s_orderVerticalMethod; + compareMethod = s_orderVerticalMethod; break; } switch (this.SearchDirection) @@ -75,11 +75,11 @@ namespace Microsoft.Iris.Navigation switch (searchOrientation) { case NavigationOrientation.Horizontal: - compareMethod = NavigationStrip.s_distanceVerticalMethod; + compareMethod = s_distanceVerticalMethod; paramValue = center.Y; break; case NavigationOrientation.Vertical: - compareMethod = NavigationStrip.s_distanceHorizontalMethod; + compareMethod = s_distanceHorizontalMethod; paramValue = center.X; break; } diff --git a/UIX/Microsoft/Iris/OS/DllResources.cs b/UIX/Microsoft/Iris/OS/DllResources.cs index 8973f24..2407283 100644 --- a/UIX/Microsoft/Iris/OS/DllResources.cs +++ b/UIX/Microsoft/Iris/OS/DllResources.cs @@ -24,12 +24,12 @@ namespace Microsoft.Iris.OS private DllResources() => this._shortNameToFullPath = new Dictionary(InvariantString.OrdinalIgnoreCaseComparer); - public static DllResources Instance => DllResources.s_instance; + public static DllResources Instance => s_instance; public static bool StaticDllResourcesOnly { - get => DllResources.s_staticDllResourcesOnly; - set => DllResources.s_staticDllResourcesOnly = value; + get => s_staticDllResourcesOnly; + set => s_staticDllResourcesOnly = value; } public Resource GetResource(string hierarchicalPart, string uri, bool forceSynchronous) @@ -37,7 +37,7 @@ namespace Microsoft.Iris.OS Resource resource = null; string host; string identifier; - DllResources.ParseResource(hierarchicalPart, out host, out identifier); + ParseResource(hierarchicalPart, out host, out identifier); if (host != null) { string fullPath = this.GetFullPath(host); diff --git a/UIX/Microsoft/Iris/OS/FileResource.cs b/UIX/Microsoft/Iris/OS/FileResource.cs index 14fcf3d..1bf1a4d 100644 --- a/UIX/Microsoft/Iris/OS/FileResource.cs +++ b/UIX/Microsoft/Iris/OS/FileResource.cs @@ -64,11 +64,11 @@ namespace Microsoft.Iris.OS num2 = Win32Api.GetFileSize(file, IntPtr.Zero); if (num2 != uint.MaxValue) { - num1 = Resource.AllocNativeBuffer(num2); + num1 = AllocNativeBuffer(num2); uint lpNumberOfBytesRead; if (!(num1 == IntPtr.Zero) && (!Win32Api.ReadFile(file, num1, num2, out lpNumberOfBytesRead, IntPtr.Zero) || (int)lpNumberOfBytesRead != (int)num2)) { - Resource.FreeNativeBuffer(num1); + FreeNativeBuffer(num1); num1 = IntPtr.Zero; } } diff --git a/UIX/Microsoft/Iris/OS/FileResources.cs b/UIX/Microsoft/Iris/OS/FileResources.cs index b868678..3029a25 100644 --- a/UIX/Microsoft/Iris/OS/FileResources.cs +++ b/UIX/Microsoft/Iris/OS/FileResources.cs @@ -12,7 +12,7 @@ namespace Microsoft.Iris.OS { private static FileResources s_instance = new FileResources(); - public static FileResources Instance => FileResources.s_instance; + public static FileResources Instance => s_instance; public Resource GetResource(string hierarchicalPart, string uri, bool forceSynchronous) => new FileResource(uri, hierarchicalPart, forceSynchronous); } diff --git a/UIX/Microsoft/Iris/OS/HttpResources.cs b/UIX/Microsoft/Iris/OS/HttpResources.cs index 067b490..4b0c72a 100644 --- a/UIX/Microsoft/Iris/OS/HttpResources.cs +++ b/UIX/Microsoft/Iris/OS/HttpResources.cs @@ -23,8 +23,8 @@ namespace Microsoft.Iris.OS public static void Shutdown() { - if (HttpResources.s_activationChangeHandler != null) - UISession.Default.Form.ActivationChange -= HttpResources.s_activationChangeHandler; + if (s_activationChangeHandler != null) + UISession.Default.Form.ActivationChange -= s_activationChangeHandler; NativeApi.SpHttpShutdown(); } @@ -32,10 +32,10 @@ namespace Microsoft.Iris.OS public Resource GetResource(string hierarchicalPart, string url, bool forceSynchronous) { - if (HttpResources.s_activationChangeHandler == null) + if (s_activationChangeHandler == null) { - HttpResources.s_activationChangeHandler = new EventHandler(HttpResources.OnActivationChanged); - UISession.Default.Form.ActivationChange += HttpResources.s_activationChangeHandler; + s_activationChangeHandler = new EventHandler(OnActivationChanged); + UISession.Default.Form.ActivationChange += s_activationChangeHandler; } return new HttpResource(url, forceSynchronous); } diff --git a/UIX/Microsoft/Iris/OS/NativeApi.cs b/UIX/Microsoft/Iris/OS/NativeApi.cs index 5a87fc8..05a3c67 100644 --- a/UIX/Microsoft/Iris/OS/NativeApi.cs +++ b/UIX/Microsoft/Iris/OS/NativeApi.cs @@ -65,7 +65,7 @@ namespace Microsoft.Iris.OS public static IntPtr DownloadGetBuffer(IntPtr handle) { - IntPtr buffer = NativeApi.SpDownloadGetBuffer(handle); + IntPtr buffer = SpDownloadGetBuffer(handle); return !(buffer == IntPtr.Zero) ? buffer : throw new OutOfMemoryException(); } @@ -88,11 +88,11 @@ namespace Microsoft.Iris.OS public static IntPtr MemAlloc(uint cb, bool zeroMemory) { - IntPtr num = NativeApi.SpMemAlloc(cb, zeroMemory); + IntPtr num = SpMemAlloc(cb, zeroMemory); return !(num == IntPtr.Zero) ? num : throw new OutOfMemoryException(); } - public static void MemFree(IntPtr pv) => NativeApi.SpMemFree(pv); + public static void MemFree(IntPtr pv) => SpMemFree(pv); [DllImport("UIXRender.dll")] public static extern void SpFreeDib(IntPtr hdib); diff --git a/UIX/Microsoft/Iris/OS/Win32Api.cs b/UIX/Microsoft/Iris/OS/Win32Api.cs index 38c962e..eb9db95 100644 --- a/UIX/Microsoft/Iris/OS/Win32Api.cs +++ b/UIX/Microsoft/Iris/OS/Win32Api.cs @@ -91,7 +91,7 @@ namespace Microsoft.Iris.OS public static IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); private static readonly string[] s_rgsMessageNames = new string[0]; - static Win32Api() => Win32Api.InitMessageDump(); + static Win32Api() => InitMessageDump(); public static void IFWIN32(bool fResult) { @@ -206,21 +206,21 @@ namespace Microsoft.Iris.OS IntPtr wParam, IntPtr lParam); - public static string DumpMessage(uint uMsg) => Win32Api.DumpMessageWorker(uMsg) ?? "UNKNOWN MESSAGE"; + public static string DumpMessage(uint uMsg) => DumpMessageWorker(uMsg) ?? "UNKNOWN MESSAGE"; private static string DumpMessageWorker(uint uMsg) { - Win32Api.InitMessageDump(); + InitMessageDump(); if (uMsg >= s_rgsMessageNames.Length) return null; - string rgsMessageName = Win32Api.s_rgsMessageNames[uMsg]; + string rgsMessageName = s_rgsMessageNames[uMsg]; if (rgsMessageName != null) return rgsMessageName; uint num = uMsg; while (uMsg > 0U) { --num; - rgsMessageName = Win32Api.s_rgsMessageNames[num]; + rgsMessageName = s_rgsMessageNames[num]; if (rgsMessageName != null) break; } @@ -251,7 +251,7 @@ namespace Microsoft.Iris.OS public static int GetCaretWidth() { int pParam; - if (!Win32Api.SystemParametersInfo(8198U, 0U, out pParam, 0)) + if (!SystemParametersInfo(8198U, 0U, out pParam, 0)) pParam = 1; return pParam; } @@ -265,7 +265,7 @@ namespace Microsoft.Iris.OS public static int GetDefaultKeyDelay() { int pParam; - if (!Win32Api.SystemParametersInfo(22U, 0U, out pParam, 0)) + if (!SystemParametersInfo(22U, 0U, out pParam, 0)) pParam = 1; return (pParam + 1) * 250; } @@ -273,7 +273,7 @@ namespace Microsoft.Iris.OS public static int GetDefaultKeyRepeat() { int pParam; - if (!Win32Api.SystemParametersInfo(10U, 0U, out pParam, 0)) + if (!SystemParametersInfo(10U, 0U, out pParam, 0)) pParam = 1; return 31000 / (62 + 28 * pParam); } @@ -281,7 +281,7 @@ namespace Microsoft.Iris.OS public static bool GetMenuDropAlignment() { bool pParam; - if (!Win32Api.SystemParametersInfo(27U, 0U, out pParam, 0)) + if (!SystemParametersInfo(27U, 0U, out pParam, 0)) pParam = false; return pParam; } @@ -375,7 +375,7 @@ namespace Microsoft.Iris.OS public int pt_x; public int pt_y; - public override string ToString() => InvariantString.Format("{0} -> {1}, wp=0x{2,0:x} lp=0x{3,0:x}", Win32Api.DumpMessage(this.message), hwnd, wParam, lParam); + public override string ToString() => InvariantString.Format("{0} -> {1}, wp=0x{2,0:x} lp=0x{3,0:x}", DumpMessage(this.message), hwnd, wParam, lParam); } public struct KEYBDINPUT diff --git a/UIX/Microsoft/Iris/PropertySet.cs b/UIX/Microsoft/Iris/PropertySet.cs index 34b6360..6e7ff38 100644 --- a/UIX/Microsoft/Iris/PropertySet.cs +++ b/UIX/Microsoft/Iris/PropertySet.cs @@ -53,7 +53,7 @@ namespace Microsoft.Iris using (this.ThreadValidator) { object a; - if (this._valuesTable.TryGetValue(key, out a) && PropertySet.IsEqual(a, value)) + if (this._valuesTable.TryGetValue(key, out a) && IsEqual(a, value)) return; this._valuesTable[key] = value; this.NotifyEntryChange(key); diff --git a/UIX/Microsoft/Iris/Queues/Dispatcher.cs b/UIX/Microsoft/Iris/Queues/Dispatcher.cs index 8b88c24..2af0b87 100644 --- a/UIX/Microsoft/Iris/Queues/Dispatcher.cs +++ b/UIX/Microsoft/Iris/Queues/Dispatcher.cs @@ -39,20 +39,20 @@ namespace Microsoft.Iris.Queues this.LeaveDispatch(); } - public static Dispatcher CurrentDispatcher => Dispatcher.s_threadDispatcher; + public static Dispatcher CurrentDispatcher => s_threadDispatcher; public static void PostItem_AnyThread(Thread thread, QueueItem item, int priority) { if (thread == null || thread == Thread.CurrentThread) { - Dispatcher currentDispatcher = Dispatcher.CurrentDispatcher; + Dispatcher currentDispatcher = CurrentDispatcher; if (currentDispatcher != null) { currentDispatcher.PostItem_SameThread(item, priority); return; } } - Dispatcher.s_interconnect.PostItem(thread, item, priority); + s_interconnect.PostItem(thread, item, priority); } public Thread DispatchThread => this._owningThread; @@ -88,8 +88,8 @@ namespace Microsoft.Iris.Queues bool isRoot = this._enterCount == 0U; ++this._enterCount; if (isRoot) - Dispatcher.s_threadDispatcher = this; - return Dispatcher.s_interconnect.EnterDispatch(this, isRoot); + s_threadDispatcher = this; + return s_interconnect.EnterDispatch(this, isRoot); } private void LeaveDispatch() @@ -97,8 +97,8 @@ namespace Microsoft.Iris.Queues --this._enterCount; bool isRoot = this._enterCount == 0U; if (isRoot) - Dispatcher.s_threadDispatcher = null; - Dispatcher.s_interconnect.LeaveDispatch(this, isRoot); + s_threadDispatcher = null; + s_interconnect.LeaveDispatch(this, isRoot); } public void NotifyFeederItems() diff --git a/UIX/Microsoft/Iris/Queues/PriorityQueue.cs b/UIX/Microsoft/Iris/Queues/PriorityQueue.cs index e427273..e0567e0 100644 --- a/UIX/Microsoft/Iris/Queues/PriorityQueue.cs +++ b/UIX/Microsoft/Iris/Queues/PriorityQueue.cs @@ -135,7 +135,7 @@ namespace Microsoft.Iris.Queues QueueItem queueItem = null; while (mask != 0) { - int lowestBit = PriorityQueue.FindLowestBit(mask); + int lowestBit = FindLowestBit(mask); queueItem = this._queues[lowestBit].GetNextItem(); if (queueItem == null) { @@ -217,7 +217,7 @@ namespace Microsoft.Iris.Queues num += 4; mask >>= 4; } - return num + PriorityQueue.s_lowestBitInNibble[mask & 15]; + return num + s_lowestBitInNibble[mask & 15]; } public delegate void HookProc(out bool didWork, out bool abort); diff --git a/UIX/Microsoft/Iris/Queues/QueueItem.cs b/UIX/Microsoft/Iris/Queues/QueueItem.cs index c59aee3..d0fd644 100644 --- a/UIX/Microsoft/Iris/Queues/QueueItem.cs +++ b/UIX/Microsoft/Iris/Queues/QueueItem.cs @@ -180,7 +180,7 @@ namespace Microsoft.Iris.Queues public bool Append(QueueItem item) { - QueueItem.Chain.ValidateAdd(item); + ValidateAdd(item); bool flag = this._tail == null; this.Link(item, this._tail, false); this._tail = item; @@ -203,7 +203,7 @@ namespace Microsoft.Iris.Queues { this.ValidateRemove(item); if (item == this._tail) - this._tail = QueueItem.Chain.IsOnlyChild(this._tail) ? null : QueueItem.Chain.PrevItem(this._tail); + this._tail = IsOnlyChild(this._tail) ? null : PrevItem(this._tail); this.Unlink(item); } @@ -211,7 +211,7 @@ namespace Microsoft.Iris.Queues { if (this._tail == null) return; - this._tail = QueueItem.Chain.NextItem(this._tail); + this._tail = NextItem(this._tail); } } @@ -228,7 +228,7 @@ namespace Microsoft.Iris.Queues public void Push(QueueItem item) { - QueueItem.Chain.ValidateAdd(item); + ValidateAdd(item); this.Link(item, this._top, true); this._top = item; } diff --git a/UIX/Microsoft/Iris/RenderAPI/Audio/SystemSoundEventTable.cs b/UIX/Microsoft/Iris/RenderAPI/Audio/SystemSoundEventTable.cs index 0ad83c8..fcf88fe 100644 --- a/UIX/Microsoft/Iris/RenderAPI/Audio/SystemSoundEventTable.cs +++ b/UIX/Microsoft/Iris/RenderAPI/Audio/SystemSoundEventTable.cs @@ -50,7 +50,7 @@ namespace Microsoft.Iris.RenderAPI.Audio public void Refresh() { - RegistryKey registryKey1 = RegistryKey.Open(RegistryKey.HKEY_CURRENT_USER, SystemSoundEventTable.s_RegistryParentKey); + RegistryKey registryKey1 = RegistryKey.Open(RegistryKey.HKEY_CURRENT_USER, s_RegistryParentKey); if (registryKey1 == null) return; foreach (SystemSoundEventTable.SystemSound systemSound in this.m_systemSoundDictionary.Values) diff --git a/UIX/Microsoft/Iris/RenderAPI/Drawing/RectangleF.cs b/UIX/Microsoft/Iris/RenderAPI/Drawing/RectangleF.cs index c152238..dd2bd81 100644 --- a/UIX/Microsoft/Iris/RenderAPI/Drawing/RectangleF.cs +++ b/UIX/Microsoft/Iris/RenderAPI/Drawing/RectangleF.cs @@ -136,7 +136,7 @@ namespace Microsoft.Iris.RenderAPI.Drawing public void Intersect(RectangleF rect) { - RectangleF rectangleF = RectangleF.Intersect(rect, this); + RectangleF rectangleF = Intersect(rect, this); this.X = rectangleF.X; this.Y = rectangleF.Y; this.Width = rectangleF.Width; @@ -149,7 +149,7 @@ namespace Microsoft.Iris.RenderAPI.Drawing float num1 = Math.Min(a.X + a.Width, b.X + b.Width); float y = Math.Max(a.Y, b.Y); float num2 = Math.Min(a.Y + a.Height, b.Y + b.Height); - return num1 >= (double)x && num2 >= (double)y ? new RectangleF(x, y, num1 - x, num2 - y) : RectangleF.Zero; + return num1 >= (double)x && num2 >= (double)y ? new RectangleF(x, y, num1 - x, num2 - y) : Zero; } public bool IntersectsWith(RectangleF rect) => Left < (double)rect.Right && Top < (double)rect.Bottom && Right > (double)rect.Left && Bottom > (double)rect.Top; diff --git a/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/LinearVideoStretch.cs b/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/LinearVideoStretch.cs index cad4f17..28a63e7 100644 --- a/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/LinearVideoStretch.cs +++ b/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/LinearVideoStretch.cs @@ -11,9 +11,9 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback { internal static class LinearVideoStretch { - public static readonly VideoZoomHandler ShrinkToFit = new VideoZoomHandler(LinearVideoStretch.ComputeShrinkToFitZoom); - public static readonly VideoZoomHandler GrowToFit = new VideoZoomHandler(LinearVideoStretch.ComputeGrowToFitZoom); - public static readonly VideoZoomHandler StretchToFill = new VideoZoomHandler(LinearVideoStretch.ComputeStretchToFillZoom); + public static readonly VideoZoomHandler ShrinkToFit = new VideoZoomHandler(ComputeShrinkToFitZoom); + public static readonly VideoZoomHandler GrowToFit = new VideoZoomHandler(ComputeGrowToFitZoom); + public static readonly VideoZoomHandler StretchToFill = new VideoZoomHandler(ComputeStretchToFillZoom); private static void ComputeShrinkToFitZoom( RectangleF rcfBoundSrcVideoPxl, @@ -55,7 +55,7 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback out RectangleF[] arrcfOutputSrcVideoPxl, out RectangleF[] arrcfOutputDestViewPxl) { - LinearVideoStretch.ApplyPillarboxAdjustment(ref rcfBoundSrcVideoPxl, rcfBoundDestViewPxl); + ApplyPillarboxAdjustment(ref rcfBoundSrcVideoPxl, rcfBoundDestViewPxl); RectangleF rectangleF1; RectangleF rectangleF2; if (rcfBoundDestViewPxl.Width / rcfBoundSrcVideoPxl.Width < (double)(rcfBoundDestViewPxl.Height / rcfBoundSrcVideoPxl.Height)) @@ -90,7 +90,7 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback out RectangleF[] arrcfOutputSrcVideoPxl, out RectangleF[] arrcfOutputDestViewPxl) { - LinearVideoStretch.ApplyPillarboxAdjustment(ref rcfBoundSrcVideoPxl, rcfBoundDestViewPxl); + ApplyPillarboxAdjustment(ref rcfBoundSrcVideoPxl, rcfBoundDestViewPxl); arrcfOutputSrcVideoPxl = new RectangleF[1] { rcfBoundSrcVideoPxl diff --git a/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoPresentationBuilder.cs b/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoPresentationBuilder.cs index 45da270..97234e5 100644 --- a/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoPresentationBuilder.cs +++ b/UIX/Microsoft/Iris/RenderAPI/VideoPlayback/VideoPresentationBuilder.cs @@ -99,16 +99,16 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback float flSrcWidthMultiplier; float flDstWidthMultiplier; this.ComputeLocations(out rcfBoundSrcVideoPxl, out rcfBoundDestViewPxl, out flSrcWidthMultiplier, out flDstWidthMultiplier); - this.m_handlerZoomMode(VideoPresentationBuilder.ConvertToSquare(rcfBoundSrcVideoPxl, flSrcWidthMultiplier), VideoPresentationBuilder.ConvertToSquare(rcfBoundDestViewPxl, flDstWidthMultiplier), out geometry.arrcfSrcVideo, out geometry.arrcfDestView); + this.m_handlerZoomMode(ConvertToSquare(rcfBoundSrcVideoPxl, flSrcWidthMultiplier), ConvertToSquare(rcfBoundDestViewPxl, flDstWidthMultiplier), out geometry.arrcfSrcVideo, out geometry.arrcfDestView); if (geometry.arrcfDestView != null) { int length = geometry.arrcfDestView.Length; } int num1 = geometry.arrcfDestView != null ? geometry.arrcfDestView.Length : 0; - VideoPresentationBuilder.ConvertFromSquare(geometry.arrcfSrcVideo, flSrcWidthMultiplier); - VideoPresentationBuilder.ConvertFromSquare(geometry.arrcfDestView, flDstWidthMultiplier); - geometry.rcfSrcVideoBounds = VideoPresentationBuilder.ComputeBounds(geometry.arrcfSrcVideo); - geometry.rcfDestViewBounds = VideoPresentationBuilder.ComputeBounds(geometry.arrcfDestView); + ConvertFromSquare(geometry.arrcfSrcVideo, flSrcWidthMultiplier); + ConvertFromSquare(geometry.arrcfDestView, flDstWidthMultiplier); + geometry.rcfSrcVideoBounds = ComputeBounds(geometry.arrcfSrcVideo); + geometry.rcfDestViewBounds = ComputeBounds(geometry.arrcfDestView); float num2 = 0.0001f; RectangleF rcfDestViewBounds = geometry.rcfDestViewBounds; for (int index = 0; index < num1; ++index) @@ -132,8 +132,8 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback { float num3 = this.m_sizefOriginalSource.Width / geometry.rcfSrcVideoBounds.Width; float num4 = this.m_sizefOriginalSource.Height / geometry.rcfSrcVideoBounds.Height; - RectangleF square1 = VideoPresentationBuilder.ConvertToSquare(geometry.rcfSrcVideoBounds, flSrcWidthMultiplier); - RectangleF square2 = VideoPresentationBuilder.ConvertToSquare(geometry.rcfDestViewBounds, flDstWidthMultiplier); + RectangleF square1 = ConvertToSquare(geometry.rcfSrcVideoBounds, flSrcWidthMultiplier); + RectangleF square2 = ConvertToSquare(geometry.rcfDestViewBounds, flDstWidthMultiplier); RectangleF rectangleF = new RectangleF() { X = square2.X - num3 * square1.X, @@ -282,7 +282,7 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback { float num = rcfBoundSrcVideoPxl.Height * this.m_sizefInputContentAspect.Width / this.m_sizefInputContentAspect.Height; flSrcWidthMultiplier = num / rcfBoundSrcVideoPxl.Width; - VideoPresentationBuilder.ApplyOverscanFactor(ref rcfBoundSrcVideoPxl, flOverscanPer1); + ApplyOverscanFactor(ref rcfBoundSrcVideoPxl, flOverscanPer1); } else { @@ -294,7 +294,7 @@ namespace Microsoft.Iris.RenderAPI.VideoPlayback { float num = rcfBoundDestViewPxl.Height * this.m_sizefInputDestAspect.Width / this.m_sizefInputDestAspect.Height; flDstWidthMultiplier = num / rcfBoundDestViewPxl.Width; - VideoPresentationBuilder.ApplyOverscanFactor(ref rcfBoundDestViewPxl, flOverscanPer2); + ApplyOverscanFactor(ref rcfBoundDestViewPxl, flOverscanPer2); } else { diff --git a/UIX/Microsoft/Iris/Session/DeferredCall.cs b/UIX/Microsoft/Iris/Session/DeferredCall.cs index 3a9b3c0..eeb3f3c 100644 --- a/UIX/Microsoft/Iris/Session/DeferredCall.cs +++ b/UIX/Microsoft/Iris/Session/DeferredCall.cs @@ -29,14 +29,14 @@ namespace Microsoft.Iris.Session private static DeferredCall AllocateFromCache() { DeferredCall deferredCall = null; - lock (DeferredCall.s_cacheLock) + lock (s_cacheLock) { - if (DeferredCall.s_cachedList != null) + if (s_cachedList != null) { - deferredCall = DeferredCall.s_cachedList; - DeferredCall.s_cachedList = (DeferredCall)deferredCall._next; + deferredCall = s_cachedList; + s_cachedList = (DeferredCall)deferredCall._next; deferredCall._next = null; - --DeferredCall.s_cachedCount; + --s_cachedCount; } } if (deferredCall == null) @@ -46,16 +46,16 @@ namespace Microsoft.Iris.Session public static DeferredCall Create(SimpleCallback callback) { - DeferredCall deferredCall = DeferredCall.AllocateFromCache(); - deferredCall._callType = DeferredCall.CallType.Simple; + DeferredCall deferredCall = AllocateFromCache(); + deferredCall._callType = CallType.Simple; deferredCall._target = callback; return deferredCall; } public static DeferredCall Create(DeferredHandler handler, object param) { - DeferredCall deferredCall = DeferredCall.AllocateFromCache(); - deferredCall._callType = DeferredCall.CallType.OneParam; + DeferredCall deferredCall = AllocateFromCache(); + deferredCall._callType = CallType.OneParam; deferredCall._target = handler; deferredCall._param = param; return deferredCall; @@ -66,8 +66,8 @@ namespace Microsoft.Iris.Session object sender, EventArgs args) { - DeferredCall deferredCall = DeferredCall.AllocateFromCache(); - deferredCall._callType = DeferredCall.CallType.Event; + DeferredCall deferredCall = AllocateFromCache(); + deferredCall._callType = CallType.Event; deferredCall._target = handler; deferredCall._param = sender; deferredCall._args = args; @@ -76,8 +76,8 @@ namespace Microsoft.Iris.Session public static DeferredCall Create(IDeferredInvokeItem item) { - DeferredCall deferredCall = DeferredCall.AllocateFromCache(); - deferredCall._callType = DeferredCall.CallType.RenderItem; + DeferredCall deferredCall = AllocateFromCache(); + deferredCall._callType = CallType.RenderItem; deferredCall._param = item; return deferredCall; } @@ -86,65 +86,65 @@ namespace Microsoft.Iris.Session { switch (this._callType) { - case DeferredCall.CallType.Simple: + case CallType.Simple: ((SimpleCallback)this._target)(); break; - case DeferredCall.CallType.OneParam: + case CallType.OneParam: ((DeferredHandler)this._target)(this._param); break; - case DeferredCall.CallType.Event: + case CallType.Event: ((EventHandler)this._target)(this._param, this._args); break; - case DeferredCall.CallType.RenderItem: + case CallType.RenderItem: ((IDeferredInvokeItem)this._param).Dispatch(); break; default: throw new InvalidOperationException(); } - this._callType = DeferredCall.CallType.None; + this._callType = CallType.None; this._target = null; this._param = null; this._args = null; this._prev = null; this._next = null; this._owner = null; - lock (DeferredCall.s_cacheLock) + lock (s_cacheLock) { - if (DeferredCall.s_cachedCount >= 100) + if (s_cachedCount >= 100) return; this._next = s_cachedList; - DeferredCall.s_cachedList = this; - ++DeferredCall.s_cachedCount; + s_cachedList = this; + ++s_cachedCount; } } public static void Post(DispatchPriority priority, SimpleCallback callback) { - QueueItem queueItem = DeferredCall.Create(callback); + QueueItem queueItem = Create(callback); UIDispatcher.Post(priority, queueItem); } public static void Post(Thread thread, DispatchPriority priority, SimpleCallback callback) { - QueueItem queueItem = DeferredCall.Create(callback); + QueueItem queueItem = Create(callback); UIDispatcher.Post(thread, priority, queueItem); } public static void Post(DispatchPriority priority, DeferredHandler handler) { - QueueItem queueItem = DeferredCall.Create(handler, null); + QueueItem queueItem = Create(handler, null); UIDispatcher.Post(priority, queueItem); } public static void Post(DispatchPriority priority, DeferredHandler handler, object param) { - QueueItem queueItem = DeferredCall.Create(handler, param); + QueueItem queueItem = Create(handler, param); UIDispatcher.Post(priority, queueItem); } public static void Post(TimeSpan delay, DeferredHandler handler, object param) { - QueueItem queueItem = DeferredCall.Create(handler, param); + QueueItem queueItem = Create(handler, param); UIDispatcher.Post(delay, queueItem); } @@ -154,7 +154,7 @@ namespace Microsoft.Iris.Session DeferredHandler handler, object param) { - QueueItem queueItem = DeferredCall.Create(handler, param); + QueueItem queueItem = Create(handler, param); UIDispatcher.Post(thread, priority, queueItem); } diff --git a/UIX/Microsoft/Iris/Session/DispatcherTimer.cs b/UIX/Microsoft/Iris/Session/DispatcherTimer.cs index 63d316e..8675174 100644 --- a/UIX/Microsoft/Iris/Session/DispatcherTimer.cs +++ b/UIX/Microsoft/Iris/Session/DispatcherTimer.cs @@ -26,7 +26,7 @@ namespace Microsoft.Iris.Session this._owner = owner; this._interval = TimeSpan.FromMilliseconds(100.0); this._autoRepeat = true; - this._timeBase = DispatcherTimer.SystemTickCount.Milliseconds; + this._timeBase = SystemTickCount.Milliseconds; this._timeoutManager = UIDispatcher.CurrentDispatcher.TimeoutManager; } @@ -96,7 +96,7 @@ namespace Microsoft.Iris.Session { bool enabled = this.Enabled; this.StopWorker(); - this._timeBase = DispatcherTimer.SystemTickCount.Milliseconds; + this._timeBase = SystemTickCount.Milliseconds; this._callback = new DispatcherTimer.TimerCallback(this); this.ScheduleCallback(this._timeBase); this.FireEnabledChange(enabled); @@ -156,7 +156,7 @@ namespace Microsoft.Iris.Session return; if (this._autoRepeat) { - this.ScheduleCallback(DispatcherTimer.SystemTickCount.Milliseconds); + this.ScheduleCallback(SystemTickCount.Milliseconds); } else { @@ -203,17 +203,17 @@ namespace Microsoft.Iris.Session { get { - DispatcherTimer.SystemTickCount.Refresh(); - return DispatcherTimer.SystemTickCount.s_tickCount; + Refresh(); + return s_tickCount; } } private static void Refresh() { int tickCount = Environment.TickCount; - long num = tickCount < DispatcherTimer.SystemTickCount.s_lastTickCount ? int.MaxValue - DispatcherTimer.SystemTickCount.s_lastTickCount + tickCount : tickCount - DispatcherTimer.SystemTickCount.s_lastTickCount; - DispatcherTimer.SystemTickCount.s_tickCount += num; - DispatcherTimer.SystemTickCount.s_lastTickCount = tickCount; + long num = tickCount < s_lastTickCount ? int.MaxValue - s_lastTickCount + tickCount : tickCount - s_lastTickCount; + s_tickCount += num; + s_lastTickCount = tickCount; } } } diff --git a/UIX/Microsoft/Iris/Session/ErrorManager.cs b/UIX/Microsoft/Iris/Session/ErrorManager.cs index 07d91f0..88084f2 100644 --- a/UIX/Microsoft/Iris/Session/ErrorManager.cs +++ b/UIX/Microsoft/Iris/Session/ErrorManager.cs @@ -17,21 +17,21 @@ namespace Microsoft.Iris.Session private static uint s_ignoringErrorsDepth; private static bool s_errorBatchPending; private static IList s_errors; - private static readonly SimpleCallback s_drainErrorQueueHandler = new SimpleCallback(ErrorManager.OnDrainErrorQueue); + private static readonly SimpleCallback s_drainErrorQueueHandler = new SimpleCallback(OnDrainErrorQueue); - public static ErrorWatermark Watermark => new ErrorWatermark(ErrorManager.s_totalErrorsReported); + public static ErrorWatermark Watermark => new ErrorWatermark(s_totalErrorsReported); - public static void EnterContext(object contextObject) => ErrorManager.EnterContext(contextObject, false); + public static void EnterContext(object contextObject) => EnterContext(contextObject, false); - public static void EnterContext(object contextObject, bool ignoreErrors) => ErrorManager.EnterContext(new ErrorManager.Context(contextObject, ignoreErrors)); + public static void EnterContext(object contextObject, bool ignoreErrors) => EnterContext(new ErrorManager.Context(contextObject, ignoreErrors)); - public static void EnterContext(IErrorContextSource contextSource) => ErrorManager.EnterContext(new ErrorManager.Context(contextSource)); + public static void EnterContext(IErrorContextSource contextSource) => EnterContext(new ErrorManager.Context(contextSource)); private static void EnterContext(ErrorManager.Context context) { if (context.IgnoreErrors) - ++ErrorManager.s_ignoringErrorsDepth; - ErrorManager.s_contextStack.Push(context); + ++s_ignoringErrorsDepth; + s_contextStack.Push(context); } public static string CurrentContext @@ -39,43 +39,43 @@ namespace Microsoft.Iris.Session get { string str = null; - if (ErrorManager.s_contextStack.Count != 0) - str = ErrorManager.s_contextStack.Peek().ToString(); + if (s_contextStack.Count != 0) + str = s_contextStack.Peek().ToString(); return str; } } - public static bool IgnoringErrors => ErrorManager.s_ignoringErrorsDepth > 0U; + public static bool IgnoringErrors => s_ignoringErrorsDepth > 0U; public static void ExitContext() { - ErrorManager.Context context = ErrorManager.s_contextStack.Peek(); + ErrorManager.Context context = s_contextStack.Peek(); if (context.IgnoreErrors) { - ErrorManager.s_totalErrorsReported = context.TotalErrorsOnEnter; - --ErrorManager.s_ignoringErrorsDepth; + s_totalErrorsReported = context.TotalErrorsOnEnter; + --s_ignoringErrorsDepth; } - ErrorManager.s_contextStack.Pop(); + s_contextStack.Pop(); } - public static uint TotalErrorsReported => ErrorManager.s_totalErrorsReported; + public static uint TotalErrorsReported => s_totalErrorsReported; public static event NotifyErrorBatch OnErrors; public static IList GetErrors() { - IList errors = ErrorManager.s_errors; - ErrorManager.s_errors = null; + IList errors = s_errors; + s_errors = null; return errors; } - public static void ReportError(string message) => ErrorManager.TrackReportWorker(-1, -1, false, message); + public static void ReportError(string message) => TrackReportWorker(-1, -1, false, message); - public static void ReportError(string format, object param) => ErrorManager.TrackReport(-1, -1, false, format, param); + public static void ReportError(string format, object param) => TrackReport(-1, -1, false, format, param); - public static void ReportError(string format, object param1, object param2) => ErrorManager.TrackReport(-1, -1, false, format, param1, param2); + public static void ReportError(string format, object param1, object param2) => TrackReport(-1, -1, false, format, param1, param2); - public static void ReportError(string format, object param1, object param2, object param3) => ErrorManager.TrackReport(-1, -1, false, format, param1, param2, param3); + public static void ReportError(string format, object param1, object param2, object param3) => TrackReport(-1, -1, false, format, param1, param2, param3); public static void ReportError( string format, @@ -84,7 +84,7 @@ namespace Microsoft.Iris.Session object param3, object param4) { - ErrorManager.TrackReport(-1, -1, false, format, param1, param2, param3, param4); + TrackReport(-1, -1, false, format, param1, param2, param3, param4); } public static void ReportError( @@ -95,12 +95,12 @@ namespace Microsoft.Iris.Session object param4, object param5) { - ErrorManager.TrackReport(-1, -1, false, format, param1, param2, param3, param4, param5); + TrackReport(-1, -1, false, format, param1, param2, param3, param4, param5); } - public static void ReportError(int line, int column, string message) => ErrorManager.TrackReportWorker(line, column, false, message); + public static void ReportError(int line, int column, string message) => TrackReportWorker(line, column, false, message); - public static void ReportError(int line, int column, string format, object param) => ErrorManager.TrackReport(line, column, false, format, param); + public static void ReportError(int line, int column, string format, object param) => TrackReport(line, column, false, format, param); public static void ReportError( int line, @@ -109,27 +109,27 @@ namespace Microsoft.Iris.Session object param1, object param2) { - ErrorManager.TrackReport(line, column, false, format, param1, param2); + TrackReport(line, column, false, format, param1, param2); } - public static void ReportWarning(string message) => ErrorManager.TrackReportWorker(-1, -1, true, message); + public static void ReportWarning(string message) => TrackReportWorker(-1, -1, true, message); - public static void ReportWarning(string format, object param) => ErrorManager.TrackReport(-1, -1, true, format, param); + public static void ReportWarning(string format, object param) => TrackReport(-1, -1, true, format, param); - public static void ReportWarning(string format, object param1, object param2) => ErrorManager.TrackReport(-1, -1, true, format, param1, param2); + public static void ReportWarning(string format, object param1, object param2) => TrackReport(-1, -1, true, format, param1, param2); - public static void ReportWarning(int line, int column, string message) => ErrorManager.TrackReportWorker(line, column, true, message); + public static void ReportWarning(int line, int column, string message) => TrackReportWorker(line, column, true, message); - public static void ReportWarning(int line, int column, string format, object param) => ErrorManager.TrackReport(line, column, true, format, param); + public static void ReportWarning(int line, int column, string format, object param) => TrackReport(line, column, true, format, param); private static void TrackReportWorker(int line, int column, bool warning, string message) { - if (!ErrorManager.IgnoringErrors) + if (!IgnoringErrors) { string str = null; - if (ErrorManager.s_contextStack.Count != 0) + if (s_contextStack.Count != 0) { - ErrorManager.Context context = ErrorManager.s_contextStack.Peek(); + ErrorManager.Context context = s_contextStack.Peek(); str = context.Description; if (line == -1 && column == -1) context.GetErrorPosition(ref line, ref column); @@ -140,14 +140,14 @@ namespace Microsoft.Iris.Session errorRecord.Column = column; errorRecord.Warning = warning; errorRecord.Message = message; - if (ErrorManager.s_errors == null) - ErrorManager.s_errors = new ArrayList(); - ErrorManager.s_errors.Add(errorRecord); - ErrorManager.QueueNotify(); + if (s_errors == null) + s_errors = new ArrayList(); + s_errors.Add(errorRecord); + QueueNotify(); } if (warning) return; - ++ErrorManager.s_totalErrorsReported; + ++s_totalErrorsReported; } public static void TrackReport( @@ -158,9 +158,9 @@ namespace Microsoft.Iris.Session object param) { string message = null; - if (!ErrorManager.IgnoringErrors) + if (!IgnoringErrors) message = string.Format(format, param); - ErrorManager.TrackReportWorker(line, column, warning, message); + TrackReportWorker(line, column, warning, message); } public static void TrackReport( @@ -172,9 +172,9 @@ namespace Microsoft.Iris.Session object param2) { string message = null; - if (!ErrorManager.IgnoringErrors) + if (!IgnoringErrors) message = string.Format(format, param1, param2); - ErrorManager.TrackReportWorker(line, column, warning, message); + TrackReportWorker(line, column, warning, message); } public static void TrackReport( @@ -187,9 +187,9 @@ namespace Microsoft.Iris.Session object param3) { string message = null; - if (!ErrorManager.IgnoringErrors) + if (!IgnoringErrors) message = string.Format(format, param1, param2, param3); - ErrorManager.TrackReportWorker(line, column, warning, message); + TrackReportWorker(line, column, warning, message); } public static void TrackReport( @@ -203,9 +203,9 @@ namespace Microsoft.Iris.Session object param4) { string message = null; - if (!ErrorManager.IgnoringErrors) + if (!IgnoringErrors) message = string.Format(format, param1, param2, param3, param4); - ErrorManager.TrackReportWorker(line, column, warning, message); + TrackReportWorker(line, column, warning, message); } public static void TrackReport( @@ -220,32 +220,32 @@ namespace Microsoft.Iris.Session object param5) { string message = null; - if (!ErrorManager.IgnoringErrors) + if (!IgnoringErrors) message = string.Format(format, param1, param2, param3, param4, param5); - ErrorManager.TrackReportWorker(line, column, warning, message); + TrackReportWorker(line, column, warning, message); } private static void QueueNotify() { - if (ErrorManager.s_errorBatchPending) + if (s_errorBatchPending) return; UIDispatcher currentDispatcher = UIDispatcher.CurrentDispatcher; if (currentDispatcher != null && currentDispatcher.UISession != null) { - ErrorManager.s_errorBatchPending = true; - DeferredCall.Post(DispatchPriority.AppEventHigh, ErrorManager.s_drainErrorQueueHandler); + s_errorBatchPending = true; + DeferredCall.Post(DispatchPriority.AppEventHigh, s_drainErrorQueueHandler); } else - ErrorManager.OnDrainErrorQueue(); + OnDrainErrorQueue(); } private static void OnDrainErrorQueue() { - ErrorManager.s_errorBatchPending = false; - IList errors = ErrorManager.GetErrors(); - if (ErrorManager.OnErrors == null) + s_errorBatchPending = false; + IList errors = GetErrors(); + if (OnErrors == null) return; - ErrorManager.OnErrors(errors); + OnErrors(errors); } internal struct Context @@ -260,7 +260,7 @@ namespace Microsoft.Iris.Session this._contextObject = contextObject; this._callback = null; this._ignoreErrors = ignoreErrors; - this._errorCountOnEnter = ErrorManager.s_totalErrorsReported; + this._errorCountOnEnter = s_totalErrorsReported; } public Context(IErrorContextSource contextSource) @@ -268,7 +268,7 @@ namespace Microsoft.Iris.Session this._callback = contextSource; this._contextObject = null; this._ignoreErrors = false; - this._errorCountOnEnter = ErrorManager.s_totalErrorsReported; + this._errorCountOnEnter = s_totalErrorsReported; } public string Description diff --git a/UIX/Microsoft/Iris/Session/Form.cs b/UIX/Microsoft/Iris/Session/Form.cs index 67f05ec..6ad41e2 100644 --- a/UIX/Microsoft/Iris/Session/Form.cs +++ b/UIX/Microsoft/Iris/Session/Form.cs @@ -117,13 +117,13 @@ namespace Microsoft.Iris.Session public CursorID Cursor { get => this.InternalWindow.Cursor.CursorID; - set => this.InternalWindow.Cursor = Microsoft.Iris.Input.Cursor.GetCursor(value); + set => this.InternalWindow.Cursor = Input.Cursor.GetCursor(value); } public CursorID IdleCursor { get => this.InternalWindow.IdleCursor.CursorID; - set => this.InternalWindow.IdleCursor = Microsoft.Iris.Input.Cursor.GetCursor(value); + set => this.InternalWindow.IdleCursor = Input.Cursor.GetCursor(value); } public bool Visible @@ -338,7 +338,7 @@ namespace Microsoft.Iris.Session { if (this.m_session == null) return; - Microsoft.Iris.UI.Environment.Instance.SetIsMouseActive(!fIdle); + UI.Environment.Instance.SetIsMouseActive(!fIdle); } internal virtual void OnShow(bool fShow, bool fFirstShow) @@ -383,7 +383,7 @@ namespace Microsoft.Iris.Session point.Y = point1.Y; } - internal void NotifyWinEvent(int idEvent, int idObject, int idChild) => Form.NotifyWinEvent(idEvent, this.__WindowHandle, idObject, idChild); + internal void NotifyWinEvent(int idEvent, int idObject, int idChild) => NotifyWinEvent(idEvent, this.__WindowHandle, idObject, idChild); [DllImport("user32.dll", CharSet = CharSet.Unicode)] private static extern void NotifyWinEvent(int idEvent, IntPtr hwnd, int idObject, int idChild); @@ -414,7 +414,7 @@ namespace Microsoft.Iris.Session if (!(clientSize != this.m_sizeWindow)) return; this.m_sizeWindow = clientSize; - if (this.m_renderWindow.WindowState == Microsoft.Iris.Render.WindowState.Minimized) + if (this.m_renderWindow.WindowState == Render.WindowState.Minimized) return; if (this.m_zone != null) this.m_zone.ResizeRootContainer(clientSize); diff --git a/UIX/Microsoft/Iris/Session/TimeoutManager.cs b/UIX/Microsoft/Iris/Session/TimeoutManager.cs index dde4fce..0626d60 100644 --- a/UIX/Microsoft/Iris/Session/TimeoutManager.cs +++ b/UIX/Microsoft/Iris/Session/TimeoutManager.cs @@ -15,12 +15,12 @@ namespace Microsoft.Iris.Session private TimeoutManager.PendingList _pending; private DateTime _lastSystemTime; private long _lastSystemMilliseconds; - private static readonly DeferredHandler _cancelTimeoutInterthread = new DeferredHandler(TimeoutManager.CancelTimeoutInterthread); + private static readonly DeferredHandler _cancelTimeoutInterthread = new DeferredHandler(CancelTimeoutInterthread); public TimeoutManager() { this._pending = new TimeoutManager.PendingList(); - this._lastSystemTime = TimeoutManager.TimeNow; + this._lastSystemTime = TimeNow; this._lastSystemMilliseconds = DispatcherTimer.SystemTickCount.Milliseconds; } @@ -36,7 +36,7 @@ namespace Microsoft.Iris.Session uint num1 = uint.MaxValue; if (!this._pending.IsEmpty) { - TimeSpan timeSpan = this._pending.NextExpirationTime - TimeoutManager.TimeNow; + TimeSpan timeSpan = this._pending.NextExpirationTime - TimeNow; if (timeSpan > TimeSpan.Zero) { long ticks = timeSpan.Ticks; @@ -53,30 +53,30 @@ namespace Microsoft.Iris.Session } } - public void SetTimeoutAbsolute(QueueItem item, DateTime when) => this.SetTimeoutWorker(TimeoutManager.TimeNow, null, item, when, false); + public void SetTimeoutAbsolute(QueueItem item, DateTime when) => this.SetTimeoutWorker(TimeNow, null, item, when, false); public static void SetTimeoutAbsolute(Thread thread, QueueItem item, DateTime when) { - DateTime timeNow = TimeoutManager.TimeNow; - TimeoutManager.SetTimeoutOnThread(thread, timeNow, item, when, false); + DateTime timeNow = TimeNow; + SetTimeoutOnThread(thread, timeNow, item, when, false); } public void SetTimeoutRelative(QueueItem item, TimeSpan delay) { - DateTime timeNow = TimeoutManager.TimeNow; + DateTime timeNow = TimeNow; this.SetTimeoutWorker(timeNow, null, item, timeNow + delay, true); } public static void SetTimeoutRelative(Thread thread, QueueItem item, TimeSpan delay) { - DateTime timeNow = TimeoutManager.TimeNow; - TimeoutManager.SetTimeoutOnThread(thread, timeNow, item, timeNow + delay, true); + DateTime timeNow = TimeNow; + SetTimeoutOnThread(thread, timeNow, item, timeNow + delay, true); } public void CancelTimeout(QueueItem item) { if (!UIDispatcher.IsUIThread) - DeferredCall.Post(DispatchPriority.Normal, TimeoutManager._cancelTimeoutInterthread, item); + DeferredCall.Post(DispatchPriority.Normal, _cancelTimeoutInterthread, item); else this._pending.RemoveItem(item); } @@ -85,7 +85,7 @@ namespace Microsoft.Iris.Session { bool flag = false; this.SynchronizeSystemTime(); - DateTime timeNow = TimeoutManager.TimeNow; + DateTime timeNow = TimeNow; while (true) { QueueItem queueItem = this._pending.RemoveNextExpired(timeNow); @@ -109,7 +109,7 @@ namespace Microsoft.Iris.Session { if (!UIDispatcher.IsUIThread) { - UIDispatcher.Post(UIDispatcher.MainUIThread, DispatchPriority.Normal, TimeoutManager.PendingList.GetInterthreadItem(item, when, isRelative)); + UIDispatcher.Post(UIDispatcher.MainUIThread, DispatchPriority.Normal, PendingList.GetInterthreadItem(item, when, isRelative)); } else { @@ -129,9 +129,9 @@ namespace Microsoft.Iris.Session bool isRelative) { if (thread == Thread.CurrentThread) - TimeoutManager.DeliverToCurrentThread(currentTime, null, item, when, isRelative); + DeliverToCurrentThread(currentTime, null, item, when, isRelative); else - UIDispatcher.Post(thread, DispatchPriority.Normal, TimeoutManager.PendingList.GetInterthreadItem(item, when, isRelative)); + UIDispatcher.Post(thread, DispatchPriority.Normal, PendingList.GetInterthreadItem(item, when, isRelative)); } private static void DeliverToCurrentThread( @@ -141,14 +141,14 @@ namespace Microsoft.Iris.Session DateTime when, bool isRelative) { - TimeoutManager.TimeoutManagerForCurrentThread?.SetTimeoutWorker(currentTime, preWrapped, item, when, isRelative); + TimeoutManagerForCurrentThread?.SetTimeoutWorker(currentTime, preWrapped, item, when, isRelative); } - private static void CancelTimeoutInterthread(object param) => TimeoutManager.TimeoutManagerForCurrentThread?.CancelTimeout((QueueItem)param); + private static void CancelTimeoutInterthread(object param) => TimeoutManagerForCurrentThread?.CancelTimeout((QueueItem)param); private void SynchronizeSystemTime() { - DateTime timeNow = TimeoutManager.TimeNow; + DateTime timeNow = TimeNow; long milliseconds = DispatcherTimer.SystemTickCount.Milliseconds; DateTime dateTime = this._lastSystemTime + TimeSpan.FromMilliseconds(milliseconds - this._lastSystemMilliseconds); this._lastSystemTime = timeNow; @@ -249,7 +249,7 @@ namespace Microsoft.Iris.Session { QueueItem tail = _head; if (tail != null) - tail = QueueItem.Chain.PrevItem(tail); + tail = PrevItem(tail); return new QueueItem.Chain.ChainEnumerator(tail); } @@ -259,7 +259,7 @@ namespace Microsoft.Iris.Session DateTime expireTime, bool isRelative) { - QueueItem.Chain.ValidateAdd(innerItem); + ValidateAdd(innerItem); TimeoutManager.PendingList.PendingItem pendingItem1 = null; TimeoutManager.PendingList.PendingItem pendingItem2 = null; if (this._head != null) @@ -286,7 +286,7 @@ namespace Microsoft.Iris.Session private void RemoveWorker(TimeoutManager.PendingList.PendingItem outerItem) { if (this._head == outerItem) - this._head = QueueItem.Chain.IsOnlyChild(_head) ? null : QueueItem.Chain.NextItem(_head) as TimeoutManager.PendingList.PendingItem; + this._head = IsOnlyChild(_head) ? null : NextItem(_head) as TimeoutManager.PendingList.PendingItem; this.Unlink(outerItem); this.Unlink(outerItem.innerItem); } @@ -304,7 +304,7 @@ namespace Microsoft.Iris.Session this.isRelative = isRelative; } - public override void Dispatch() => TimeoutManager.DeliverToCurrentThread(TimeoutManager.TimeNow, this, this.innerItem, this.expireTime, this.isRelative); + public override void Dispatch() => DeliverToCurrentThread(TimeNow, this, this.innerItem, this.expireTime, this.isRelative); } } } diff --git a/UIX/Microsoft/Iris/Session/UIApplication.cs b/UIX/Microsoft/Iris/Session/UIApplication.cs index 3b29022..8b05a8e 100644 --- a/UIX/Microsoft/Iris/Session/UIApplication.cs +++ b/UIX/Microsoft/Iris/Session/UIApplication.cs @@ -16,8 +16,8 @@ namespace Microsoft.Iris.Session public static string ApplicationName { - get => UIApplication.s_applicationName; - set => UIApplication.s_applicationName = value; + get => s_applicationName; + set => s_applicationName = value; } public static void Run() => UIDispatcher.CurrentDispatcher.Run(null); @@ -31,7 +31,7 @@ namespace Microsoft.Iris.Session inputManager.KeyFocusCanBeNull = focusCanBeNullFlag; try { - UIApplication.DoEvents(loop); + DoEvents(loop); } finally { @@ -52,7 +52,7 @@ namespace Microsoft.Iris.Session public static Thread StartThreadWithDispatcher(string threadName) { ManualResetEvent registeredEvent = new ManualResetEvent(false); - Thread thread = new Thread(new ParameterizedThreadStart(UIApplication.StartDispatcher)); + Thread thread = new Thread(new ParameterizedThreadStart(StartDispatcher)); thread.Name = threadName; thread.SetApartmentState(ApartmentState.STA); thread.IsBackground = true; diff --git a/UIX/Microsoft/Iris/Session/UIDispatcher.cs b/UIX/Microsoft/Iris/Session/UIDispatcher.cs index 28e2a46..2c31ad1 100644 --- a/UIX/Microsoft/Iris/Session/UIDispatcher.cs +++ b/UIX/Microsoft/Iris/Session/UIDispatcher.cs @@ -58,7 +58,7 @@ namespace Microsoft.Iris.Session this._doBatchFlush = new PriorityQueue.HookProc(this.DoBatchFlush); if (!isMainUIThread) return; - UIDispatcher.s_mainUIThread = Thread.CurrentThread; + s_mainUIThread = Thread.CurrentThread; } public void ShutDown(bool flushRefs) @@ -79,10 +79,10 @@ namespace Microsoft.Iris.Session public new void Dispose() { this.ShutDown(false); - if (UIDispatcher.s_mainUIThread == Thread.CurrentThread) + if (s_mainUIThread == Thread.CurrentThread) { - UIDispatcher.s_mainUIThread = null; - UIDispatcher.s_exiting = true; + s_mainUIThread = null; + s_exiting = true; } if (this._masterQueue != null) { @@ -96,11 +96,11 @@ namespace Microsoft.Iris.Session public static UIDispatcher CurrentDispatcher => Dispatcher.CurrentDispatcher as UIDispatcher; - public static bool IsUIThread => Thread.CurrentThread == UIDispatcher.s_mainUIThread; + public static bool IsUIThread => Thread.CurrentThread == s_mainUIThread; - public static Thread MainUIThread => UIDispatcher.s_mainUIThread; + public static Thread MainUIThread => s_mainUIThread; - public static bool Exiting => UIDispatcher.s_exiting; + public static bool Exiting => s_exiting; public UISession UISession => this._parentSession; @@ -122,57 +122,57 @@ namespace Microsoft.Iris.Session DispatchPriority priority1 = DispatchPriority.Idle; switch (priority) { - case Microsoft.Iris.Render.DeferredInvokePriority.High: + case Render.DeferredInvokePriority.High: priority1 = DispatchPriority.High; break; - case Microsoft.Iris.Render.DeferredInvokePriority.Normal: + case Render.DeferredInvokePriority.Normal: priority1 = DispatchPriority.Normal; break; - case Microsoft.Iris.Render.DeferredInvokePriority.VisualUpdate: + case Render.DeferredInvokePriority.VisualUpdate: priority1 = DispatchPriority.Render; break; - case Microsoft.Iris.Render.DeferredInvokePriority.Low: + case Render.DeferredInvokePriority.Low: priority1 = DispatchPriority.Idle; break; - case Microsoft.Iris.Render.DeferredInvokePriority.Idle: + case Render.DeferredInvokePriority.Idle: priority1 = DispatchPriority.Idle; break; } - UIDispatcher.Post(priority1, DeferredCall.Create(item)); + Post(priority1, DeferredCall.Create(item)); } else - UIDispatcher.Post(delay, DeferredCall.Create(item)); + Post(delay, DeferredCall.Create(item)); } public static void Post(DateTime when, QueueItem item) { - Thread mainUiThread = UIDispatcher.MainUIThread; + Thread mainUiThread = MainUIThread; if (mainUiThread == null) return; - UIDispatcher.Post(mainUiThread, when, item); + Post(mainUiThread, when, item); } public static void Post(TimeSpan delay, QueueItem item) { - Thread mainUiThread = UIDispatcher.MainUIThread; + Thread mainUiThread = MainUIThread; if (mainUiThread == null) return; - UIDispatcher.Post(mainUiThread, delay, item); + Post(mainUiThread, delay, item); } public static void Post(DispatchPriority priority, QueueItem item) { - Thread mainUiThread = UIDispatcher.MainUIThread; + Thread mainUiThread = MainUIThread; if (mainUiThread == null) return; - UIDispatcher.Post(mainUiThread, priority, item); + Post(mainUiThread, priority, item); } public static void Post(Thread thread, DateTime when, QueueItem item) => TimeoutManager.SetTimeoutAbsolute(thread, item, when); public static void Post(Thread thread, TimeSpan delay, QueueItem item) => TimeoutManager.SetTimeoutRelative(thread, item, delay); - public static void Post(Thread thread, DispatchPriority priority, QueueItem item) => Dispatcher.PostItem_AnyThread(thread, item, (int)priority); + public static void Post(Thread thread, DispatchPriority priority, QueueItem item) => PostItem_AnyThread(thread, item, (int)priority); public void Run(LoopCondition condition) => this.MainLoop(_masterQueue, condition); @@ -181,9 +181,9 @@ namespace Microsoft.Iris.Session public static void StopCurrentMessageLoop(Thread thread) { if (thread != null && thread != Thread.CurrentThread) - DeferredCall.Post(thread, DispatchPriority.Normal, new SimpleCallback(UIDispatcher.StopMessageLoopHandler)); + DeferredCall.Post(thread, DispatchPriority.Normal, new SimpleCallback(StopMessageLoopHandler)); else - UIDispatcher.CurrentDispatcher?.StopCurrentMessageLoop(); + CurrentDispatcher?.StopCurrentMessageLoop(); } public void RPCYield(LoopCondition condition) => this.MainLoop(this._rpcYieldQueue, condition); @@ -212,7 +212,7 @@ namespace Microsoft.Iris.Session this.MainLoop(queue); } - private static void StopMessageLoopHandler() => UIDispatcher.CurrentDispatcher?.StopCurrentMessageLoop(); + private static void StopMessageLoopHandler() => CurrentDispatcher?.StopCurrentMessageLoop(); internal void RequestBatchFlush() { @@ -298,7 +298,7 @@ namespace Microsoft.Iris.Session internal static void VerifyOnApplicationThread() { - if (!UIDispatcher.IsUIThread) + if (!IsUIThread) throw new InvalidOperationException("Operation must be performed on the application thread"); } diff --git a/UIX/Microsoft/Iris/Session/UISession.cs b/UIX/Microsoft/Iris/Session/UISession.cs index 5cec4fd..1320305 100644 --- a/UIX/Microsoft/Iris/Session/UISession.cs +++ b/UIX/Microsoft/Iris/Session/UISession.cs @@ -42,8 +42,8 @@ namespace Microsoft.Iris.Session private AnimationManager _animationManager; private SoundManager _soundManager; private Form _form; - private static readonly DeferredHandler s_deferredPlaySound = new DeferredHandler(UISession.DeferredPlaySound); - private static readonly DeferredHandler s_deferredPlaySystemSound = new DeferredHandler(UISession.DeferredPlaySystemSound); + private static readonly DeferredHandler s_deferredPlaySound = new DeferredHandler(DeferredPlaySound); + private static readonly DeferredHandler s_deferredPlaySystemSound = new DeferredHandler(DeferredPlaySystemSound); public UISession() : this(null, null, 0U) @@ -62,7 +62,7 @@ namespace Microsoft.Iris.Session this._applyLayout = new SimpleCallback(this.ApplyLayout); this._processPaint = new SimpleCallback(this.ProcessPaint); this._inputManager = new InputManager(this); - UISession.s_theOnlySession = this; + s_theOnlySession = this; this._dispatcher = new UIDispatcher(this, handlerTimeout, timeoutSecValue, true); int pdwDefaultLayout; Win32Api.IFWIN32(Win32Api.GetProcessDefaultLayout(out pdwDefaultLayout)); @@ -125,7 +125,7 @@ namespace Microsoft.Iris.Session this._queueSyncLayoutComplete = null; this._form = null; this._dispatcher.ShutDown(true); - UISession.s_theOnlySession = null; + s_theOnlySession = null; this._effectManager.Dispose(); this._effectManager = null; if (this._engine != null) @@ -143,13 +143,13 @@ namespace Microsoft.Iris.Session RenderApi.DebugModule = null; } - internal bool IsValid => UISession.s_theOnlySession == this; + internal bool IsValid => s_theOnlySession == this; public static void Validate(UISession session) { } - public static UISession Default => UISession.s_theOnlySession; + public static UISession Default => s_theOnlySession; public bool IsRtl { @@ -247,7 +247,7 @@ namespace Microsoft.Iris.Session private void ProcessInitialization() { - using (UISession.TaskReentrancyDetection.Enter("Initialization")) + using (TaskReentrancyDetection.Enter("Initialization")) { if (!this.IsValid || !this._initRequestedFlag) return; @@ -258,7 +258,7 @@ namespace Microsoft.Iris.Session private void ProcessLayout() { - using (UISession.TaskReentrancyDetection.Enter("Layout")) + using (TaskReentrancyDetection.Enter("Layout")) { if (!this.IsValid || !this._layoutRequestedFlag) return; @@ -277,7 +277,7 @@ namespace Microsoft.Iris.Session private void ApplyLayout() { - using (UISession.TaskReentrancyDetection.Enter(nameof(ApplyLayout))) + using (TaskReentrancyDetection.Enter(nameof(ApplyLayout))) { if (!this.IsValid || !this._applyLayoutRequestedFlag) return; @@ -288,7 +288,7 @@ namespace Microsoft.Iris.Session private void ProcessPaint() { - using (UISession.TaskReentrancyDetection.Enter("Paint")) + using (TaskReentrancyDetection.Enter("Paint")) { if (!this.IsValid || !this._paintRequestedFlag) return; @@ -318,9 +318,9 @@ namespace Microsoft.Iris.Session { UISession.PlaySoundArgs playSoundArgs = new UISession.PlaySoundArgs(this, stSoundSource); if (!UIDispatcher.IsUIThread) - DeferredCall.Post(DispatchPriority.High, UISession.s_deferredPlaySound, playSoundArgs); + DeferredCall.Post(DispatchPriority.High, s_deferredPlaySound, playSoundArgs); else - UISession.DeferredPlaySound(playSoundArgs); + DeferredPlaySound(playSoundArgs); } private static void DeferredPlaySound(object argsObject) @@ -335,9 +335,9 @@ namespace Microsoft.Iris.Session { UISession.PlaySystemSoundArgs playSystemSoundArgs = new UISession.PlaySystemSoundArgs(this, systemSoundEvent); if (!UIDispatcher.IsUIThread) - DeferredCall.Post(DispatchPriority.High, UISession.s_deferredPlaySystemSound, playSystemSoundArgs); + DeferredCall.Post(DispatchPriority.High, s_deferredPlaySystemSound, playSystemSoundArgs); else - UISession.DeferredPlaySystemSound(playSystemSoundArgs); + DeferredPlaySystemSound(playSystemSoundArgs); } private static void DeferredPlaySystemSound(object argsObject) @@ -373,13 +373,13 @@ namespace Microsoft.Iris.Session public static IDisposable Enter(string task) { - if (UISession.TaskReentrancyDetection.s_currentTask != null) + if (s_currentTask != null) InvariantString.Format("REENTRANCY DETECTED! Attempt to process task '{0}' while already processing '{1}'.", s_currentTask, task); - UISession.TaskReentrancyDetection.s_currentTask = task; + s_currentTask = task; return s_currentTaskClearer; } - void IDisposable.Dispose() => UISession.TaskReentrancyDetection.s_currentTask = null; + void IDisposable.Dispose() => s_currentTask = null; } private class PlaySoundArgs diff --git a/UIX/Microsoft/Iris/Timer.cs b/UIX/Microsoft/Iris/Timer.cs index b0639fd..74c0beb 100644 --- a/UIX/Microsoft/Iris/Timer.cs +++ b/UIX/Microsoft/Iris/Timer.cs @@ -43,7 +43,7 @@ namespace Microsoft.Iris void ITimerOwner.OnTimerPropertyChanged(string id) { - if (object.ReferenceEquals(id, NotificationID.Interval)) + if (ReferenceEquals(id, NotificationID.Interval)) this.FirePropertyChanged("TimeSpanInterval"); this.FirePropertyChanged(id); } diff --git a/UIX/Microsoft/Iris/UI/Class.cs b/UIX/Microsoft/Iris/UI/Class.cs index 73c9833..d1797a9 100644 --- a/UIX/Microsoft/Iris/UI/Class.cs +++ b/UIX/Microsoft/Iris/UI/Class.cs @@ -28,7 +28,7 @@ namespace Microsoft.Iris.UI protected NotifyService _notifier = new NotifyService(); private ScriptRunScheduler _scriptRunScheduler = new ScriptRunScheduler(); private bool _scriptEnabled; - private static DeferredHandler s_executePendingScriptsHandler = new DeferredHandler(Class.ExecutePendingScripts); + private static DeferredHandler s_executePendingScriptsHandler = new DeferredHandler(ExecutePendingScripts); public Class(MarkupTypeSchema type) { @@ -128,7 +128,7 @@ namespace Microsoft.Iris.UI public void ScheduleScriptRun(uint scriptId, bool ignoreErrors) { if (!this._scriptRunScheduler.Pending) - DeferredCall.Post(DispatchPriority.Script, Class.s_executePendingScriptsHandler, this); + DeferredCall.Post(DispatchPriority.Script, s_executePendingScriptsHandler, this); this._scriptRunScheduler.ScheduleRun(scriptId, ignoreErrors); } diff --git a/UIX/Microsoft/Iris/UI/EffectElementWrapper.cs b/UIX/Microsoft/Iris/UI/EffectElementWrapper.cs index baebc44..2468f8f 100644 --- a/UIX/Microsoft/Iris/UI/EffectElementWrapper.cs +++ b/UIX/Microsoft/Iris/UI/EffectElementWrapper.cs @@ -39,48 +39,48 @@ namespace Microsoft.Iris.UI public void PlayAnimation(EffectProperty property, EffectAnimation animation) => this._class.PlayAnimation(this.MakeEffectPropertyName(property), animation); - private string MakeEffectPropertyName(string propertyName) => EffectElementWrapper.MakeEffectPropertyName(this._elementName, propertyName); + private string MakeEffectPropertyName(string propertyName) => MakeEffectPropertyName(this._elementName, propertyName); - private string MakeEffectPropertyName(EffectProperty property) => EffectElementWrapper.MakeEffectPropertyName(this._elementName, property); + private string MakeEffectPropertyName(EffectProperty property) => MakeEffectPropertyName(this._elementName, property); public static string MakeEffectPropertyName(string elementName, EffectProperty property) { - EffectElementWrapper.EnsurePropertyMap(); - return EffectElementWrapper.MakeEffectPropertyName(elementName, EffectElementWrapper.s_propertyMap[(int)property]); + EnsurePropertyMap(); + return MakeEffectPropertyName(elementName, s_propertyMap[(int)property]); } public static string MakeEffectPropertyName(string elementName, string propertyName) => elementName + "." + propertyName; private static void EnsurePropertyMap() { - if (EffectElementWrapper.s_propertyMap != null) + if (s_propertyMap != null) return; - EffectElementWrapper.s_propertyMap = new Map(); - EffectElementWrapper.s_propertyMap[2] = "Attenuation"; - EffectElementWrapper.s_propertyMap[3] = "Brightness"; - EffectElementWrapper.s_propertyMap[4] = "Color"; - EffectElementWrapper.s_propertyMap[14] = "InnerConeAngle"; - EffectElementWrapper.s_propertyMap[18] = "OuterConeAngle"; - EffectElementWrapper.s_propertyMap[5] = "Contrast"; - EffectElementWrapper.s_propertyMap[6] = "DarkColor"; - EffectElementWrapper.s_propertyMap[7] = "Decay"; - EffectElementWrapper.s_propertyMap[8] = "Density"; - EffectElementWrapper.s_propertyMap[9] = "Desaturate"; - EffectElementWrapper.s_propertyMap[10] = "DirectionAngle"; - EffectElementWrapper.s_propertyMap[11] = "EdgeLimit"; - EffectElementWrapper.s_propertyMap[12] = "FallOff"; - EffectElementWrapper.s_propertyMap[13] = "Hue"; - EffectElementWrapper.s_propertyMap[15] = "Intensity"; - EffectElementWrapper.s_propertyMap[16] = "LightColor"; - EffectElementWrapper.s_propertyMap[1] = "AmbientColor"; - EffectElementWrapper.s_propertyMap[17] = "Lightness"; - EffectElementWrapper.s_propertyMap[19] = "Position"; - EffectElementWrapper.s_propertyMap[20] = "Radius"; - EffectElementWrapper.s_propertyMap[21] = "Saturation"; - EffectElementWrapper.s_propertyMap[22] = "Tone"; - EffectElementWrapper.s_propertyMap[23] = "Weight"; - EffectElementWrapper.s_propertyMap[24] = "Value"; - EffectElementWrapper.s_propertyMap[25] = "Downsample"; + s_propertyMap = new Map(); + s_propertyMap[2] = "Attenuation"; + s_propertyMap[3] = "Brightness"; + s_propertyMap[4] = "Color"; + s_propertyMap[14] = "InnerConeAngle"; + s_propertyMap[18] = "OuterConeAngle"; + s_propertyMap[5] = "Contrast"; + s_propertyMap[6] = "DarkColor"; + s_propertyMap[7] = "Decay"; + s_propertyMap[8] = "Density"; + s_propertyMap[9] = "Desaturate"; + s_propertyMap[10] = "DirectionAngle"; + s_propertyMap[11] = "EdgeLimit"; + s_propertyMap[12] = "FallOff"; + s_propertyMap[13] = "Hue"; + s_propertyMap[15] = "Intensity"; + s_propertyMap[16] = "LightColor"; + s_propertyMap[1] = "AmbientColor"; + s_propertyMap[17] = "Lightness"; + s_propertyMap[19] = "Position"; + s_propertyMap[20] = "Radius"; + s_propertyMap[21] = "Saturation"; + s_propertyMap[22] = "Tone"; + s_propertyMap[23] = "Weight"; + s_propertyMap[24] = "Value"; + s_propertyMap[25] = "Downsample"; } } } diff --git a/UIX/Microsoft/Iris/UI/EffectValue.cs b/UIX/Microsoft/Iris/UI/EffectValue.cs index 959e0c8..80199b9 100644 --- a/UIX/Microsoft/Iris/UI/EffectValue.cs +++ b/UIX/Microsoft/Iris/UI/EffectValue.cs @@ -20,7 +20,7 @@ namespace Microsoft.Iris.UI this._type = type; } - public void SetValueOnEffect(IEffect effect, string property) => EffectValue.SetValueOnEffect(effect, property, this._value, this._type); + public void SetValueOnEffect(IEffect effect, string property) => SetValueOnEffect(effect, property, this._value, this._type); public static void SetValueOnEffect( IEffect effect, diff --git a/UIX/Microsoft/Iris/UI/Environment.cs b/UIX/Microsoft/Iris/UI/Environment.cs index d175a52..b3d86a7 100644 --- a/UIX/Microsoft/Iris/UI/Environment.cs +++ b/UIX/Microsoft/Iris/UI/Environment.cs @@ -27,9 +27,9 @@ namespace Microsoft.Iris.UI { get { - if (Environment.s_instance == null) - Environment.s_instance = new Environment(); - return Environment.s_instance; + if (s_instance == null) + s_instance = new Environment(); + return s_instance; } } @@ -63,7 +63,7 @@ namespace Microsoft.Iris.UI this._soundEffectsEnabledFlag = value; } - public static float DpiScale => Environment.s_dpiScale; + public static float DpiScale => s_dpiScale; public float AnimationSpeed { diff --git a/UIX/Microsoft/Iris/UI/UIClass.cs b/UIX/Microsoft/Iris/UI/UIClass.cs index 6996be3..623785e 100644 --- a/UIX/Microsoft/Iris/UI/UIClass.cs +++ b/UIX/Microsoft/Iris/UI/UIClass.cs @@ -46,9 +46,9 @@ namespace Microsoft.Iris.UI private MarkupListeners _listeners; private NotifyService _notifier = new NotifyService(); private ScriptRunScheduler _scriptRunScheduler = new ScriptRunScheduler(); - private static DeferredHandler s_executePendingScriptsHandler = new DeferredHandler(UIClass.ExecutePendingScripts); - private static readonly FocusStateHandler s_updateMouseFocusStates = new FocusStateHandler(UIClass.UpdateMouseFocusStates); - private static readonly FocusStateHandler s_updateKeyFocusStates = new FocusStateHandler(UIClass.UpdateKeyFocusStates); + private static DeferredHandler s_executePendingScriptsHandler = new DeferredHandler(ExecutePendingScripts); + private static readonly FocusStateHandler s_updateMouseFocusStates = new FocusStateHandler(UpdateMouseFocusStates); + private static readonly FocusStateHandler s_updateKeyFocusStates = new FocusStateHandler(UpdateKeyFocusStates); private static readonly DataCookie s_cursorProperty = DataCookie.ReserveSlot(); private static readonly DataCookie s_cursorOverrideProperty = DataCookie.ReserveSlot(); private static readonly DataCookie s_accProxyProperty = DataCookie.ReserveSlot(); @@ -64,15 +64,15 @@ namespace Microsoft.Iris.UI this._typeSchema = type; this._storage = new Dictionary(type.TotalPropertiesAndLocalsCount); this._bits = new BitVector32(); - this.SetBit(UIClass.Bits.Flippable, true); - this.SetBit(UIClass.Bits.CreateInterestOnFocus, true); - this.SetBit(UIClass.Bits.KeyFocusOnMouseDown, true); - this.SetBit(UIClass.Bits.AllowDoubleClicks, true); - this.SetBit(UIClass.Bits.Enabled, true); - this.SetBit(UIClass.Bits.ScriptEnabled, true); + this.SetBit(Bits.Flippable, true); + this.SetBit(Bits.CreateInterestOnFocus, true); + this.SetBit(Bits.KeyFocusOnMouseDown, true); + this.SetBit(Bits.AllowDoubleClicks, true); + this.SetBit(Bits.Enabled, true); + this.SetBit(Bits.ScriptEnabled, true); } - public bool Initialized => this.GetBit(UIClass.Bits.Initialized); + public bool Initialized => this.GetBit(Bits.Initialized); public void RegisterDisposable(IDisposableObject disposable) { @@ -104,7 +104,7 @@ namespace Microsoft.Iris.UI base.OnDispose(); if (this.Initialized) AccessibleProxy.NotifyDestroyed(this); - this.SetBit(UIClass.Bits.ScriptEnabled, false); + this.SetBit(Bits.ScriptEnabled, false); if (this._listeners != null) { this._listeners.Dispose(this); @@ -123,8 +123,8 @@ namespace Microsoft.Iris.UI for (int index = 0; index < this._disposables.Count; ++index) this._disposables[index].Dispose(this); } - this.RemoveEventHandlers(UIClass.s_descendantMouseFocusChangedEvent); - this.RemoveEventHandlers(UIClass.s_descendantKeyFocusChangedEvent); + this.RemoveEventHandlers(s_descendantMouseFocusChangedEvent); + this.RemoveEventHandlers(s_descendantKeyFocusChangedEvent); } private void DisposeInputHandlers() @@ -216,7 +216,7 @@ namespace Microsoft.Iris.UI protected override void OnZoneDetached() { base.OnZoneDetached(); - this.ChangeBit(UIClass.Bits.AppFullyEnabled, false); + this.ChangeBit(Bits.AppFullyEnabled, false); this.RevalidateUsage(true, true); if (this._inputHandlers != null) { @@ -236,7 +236,7 @@ namespace Microsoft.Iris.UI AccessibleProxy.NotifyTreeChanged(this); } - public bool HasAccessibleProxy => this.GetBit(UIClass.Bits.HasAccProxy); + public bool HasAccessibleProxy => this.GetBit(Bits.HasAccProxy); protected virtual AccessibleProxy OnCreateAccessibleProxy( UIClass ui, @@ -253,7 +253,7 @@ namespace Microsoft.Iris.UI AccessibleProxy accessibleProxy; if (this.HasAccessibleProxy) { - accessibleProxy = (AccessibleProxy)this.GetData(UIClass.s_accProxyProperty); + accessibleProxy = (AccessibleProxy)this.GetData(s_accProxyProperty); } else { @@ -269,8 +269,8 @@ namespace Microsoft.Iris.UI if (data == null) data = new Accessible(); accessibleProxy = this.OnCreateAccessibleProxy(this, data); - this.SetData(UIClass.s_accProxyProperty, accessibleProxy); - this.SetBit(UIClass.Bits.HasAccProxy, true); + this.SetData(s_accProxyProperty, accessibleProxy); + this.SetBit(Bits.HasAccProxy, true); } return accessibleProxy; } @@ -385,8 +385,8 @@ namespace Microsoft.Iris.UI private UIClass.DeferredKeyFocusRestoreHelper PendingFocusRestore { - get => this.GetData(UIClass.s_pendingFocusRestoreProperty) as UIClass.DeferredKeyFocusRestoreHelper; - set => this.SetData(UIClass.s_pendingFocusRestoreProperty, value); + get => this.GetData(s_pendingFocusRestoreProperty) as UIClass.DeferredKeyFocusRestoreHelper; + set => this.SetData(s_pendingFocusRestoreProperty, value); } private static bool CheckHandled(InputInfo info, InputHandler inputHandler) => info.Handled; @@ -448,10 +448,10 @@ namespace Microsoft.Iris.UI public bool Enabled { - get => this.GetBit(UIClass.Bits.Enabled); + get => this.GetBit(Bits.Enabled); set { - if (!this.ChangeBit(UIClass.Bits.Enabled, value)) + if (!this.ChangeBit(Bits.Enabled, value)) return; this.UpdateMouseHandling(null); this.RevalidateUsage(true, !value); @@ -464,15 +464,15 @@ namespace Microsoft.Iris.UI private bool HostEnabled => this._ownerHost == null ? this.IsValid : this._ownerHost.InputEnabled; - public bool FullyEnabled => this.GetBit(UIClass.Bits.AppFullyEnabled); + public bool FullyEnabled => this.GetBit(Bits.AppFullyEnabled); - public bool DirectMouseFocus => this.GetBit(UIClass.Bits.DirectMouseFocus); + public bool DirectMouseFocus => this.GetBit(Bits.DirectMouseFocus); - public bool MouseFocus => this.GetBit(UIClass.Bits.MouseFocus); + public bool MouseFocus => this.GetBit(Bits.MouseFocus); - public bool DirectKeyFocus => this.GetBit(UIClass.Bits.DirectKeyFocus); + public bool DirectKeyFocus => this.GetBit(Bits.DirectKeyFocus); - public bool KeyFocus => this.GetBit(UIClass.Bits.KeyFocus); + public bool KeyFocus => this.GetBit(Bits.KeyFocus); public UIClass KeyFocusDescendant { @@ -501,10 +501,10 @@ namespace Microsoft.Iris.UI public bool CreateInterestOnFocus { - get => this.GetBit(UIClass.Bits.CreateInterestOnFocus); + get => this.GetBit(Bits.CreateInterestOnFocus); set { - if (!this.ChangeBit(UIClass.Bits.CreateInterestOnFocus, value)) + if (!this.ChangeBit(Bits.CreateInterestOnFocus, value)) return; this.FireNotification(NotificationID.CreateInterestOnFocus); } @@ -512,12 +512,12 @@ namespace Microsoft.Iris.UI public ViewItem FocusInterestTarget { - get => (ViewItem)this.GetData(UIClass.s_focusInterestTargetProperty); + get => (ViewItem)this.GetData(s_focusInterestTargetProperty); set { if (this.FocusInterestTarget == value) return; - this.SetData(UIClass.s_focusInterestTargetProperty, value); + this.SetData(s_focusInterestTargetProperty, value); this.FireNotification(NotificationID.FocusInterestTarget); } } @@ -526,14 +526,14 @@ namespace Microsoft.Iris.UI { get { - object data = this.GetData(UIClass.s_focusInterestTargetMarginsProperty); + object data = this.GetData(s_focusInterestTargetMarginsProperty); return data != null ? (Inset)data : Inset.Zero; } set { if (!(this.FocusInterestTargetMargins != value)) return; - this.SetData(UIClass.s_focusInterestTargetMarginsProperty, value); + this.SetData(s_focusInterestTargetMarginsProperty, value); this.FireNotification(NotificationID.FocusInterestTargetMargins); } } @@ -543,7 +543,7 @@ namespace Microsoft.Iris.UI get { CursorID cursorId = CursorID.NotSpecified; - object data = this.GetData(UIClass.s_cursorProperty); + object data = this.GetData(s_cursorProperty); if (data != null) cursorId = (CursorID)data; return cursorId; @@ -552,7 +552,7 @@ namespace Microsoft.Iris.UI { if (this.Cursor == value) return; - this.SetData(UIClass.s_cursorProperty, value); + this.SetData(s_cursorProperty, value); this.FireNotification(NotificationID.Cursor); if (!this.IsZoned || this.OverrideCursor != CursorID.NotSpecified) return; @@ -565,7 +565,7 @@ namespace Microsoft.Iris.UI get { CursorID cursorId = CursorID.NotSpecified; - object data = this.GetData(UIClass.s_cursorOverrideProperty); + object data = this.GetData(s_cursorOverrideProperty); if (data != null) cursorId = (CursorID)data; return cursorId; @@ -575,7 +575,7 @@ namespace Microsoft.Iris.UI CursorID overrideCursor = this.OverrideCursor; if (overrideCursor == value) return; - this.SetData(UIClass.s_cursorOverrideProperty, value); + this.SetData(s_cursorOverrideProperty, value); if (!this.IsZoned || overrideCursor == CursorID.NotSpecified && value == this.Cursor) return; this.Zone.UpdateCursor(this); @@ -613,20 +613,20 @@ namespace Microsoft.Iris.UI public bool KeyFocusOnMouseEnter { - get => this.GetBit(UIClass.Bits.KeyFocusOnMouseEnter); - set => this.SetBit(UIClass.Bits.KeyFocusOnMouseEnter, value); + get => this.GetBit(Bits.KeyFocusOnMouseEnter); + set => this.SetBit(Bits.KeyFocusOnMouseEnter, value); } public bool KeyFocusOnMouseDown { - get => this.GetBit(UIClass.Bits.KeyFocusOnMouseDown); - set => this.SetBit(UIClass.Bits.KeyFocusOnMouseDown, value); + get => this.GetBit(Bits.KeyFocusOnMouseDown); + set => this.SetBit(Bits.KeyFocusOnMouseDown, value); } public bool AllowDoubleClicks { - get => this.GetBit(UIClass.Bits.AllowDoubleClicks); - set => this.SetBit(UIClass.Bits.AllowDoubleClicks, value); + get => this.GetBit(Bits.AllowDoubleClicks); + set => this.SetBit(Bits.AllowDoubleClicks, value); } internal void NotifyFullyEnabledChange() => this.Zone.ScheduleFullyEnabledChangeNotifications(); @@ -635,7 +635,7 @@ namespace Microsoft.Iris.UI { if (!this.Enabled || !this.HostEnabled) enabledFlag = false; - if (this.ChangeBit(UIClass.Bits.AppFullyEnabled, enabledFlag)) + if (this.ChangeBit(Bits.AppFullyEnabled, enabledFlag)) this.FireNotification(NotificationID.FullyEnabled); foreach (UIClass child in this.Children) child.DeliverFullyEnabled(enabledFlag); @@ -643,13 +643,13 @@ namespace Microsoft.Iris.UI public void EnableRawInput(bool enableFlag) { - if (!this.ChangeBit(UIClass.Bits.RawInputDisabled, !enableFlag)) + if (!this.ChangeBit(Bits.RawInputDisabled, !enableFlag)) return; this.UpdateMouseHandling(null); this.RevalidateUsage(true, !enableFlag); } - public bool IsInputBranchEnabled() => this.GetBit(UIClass.Bits.Enabled) && !this.GetBit(UIClass.Bits.RawInputDisabled); + public bool IsInputBranchEnabled() => this.GetBit(Bits.Enabled) && !this.GetBit(Bits.RawInputDisabled); public bool IsEligibleForInput() => this.IsEligibleForInput(out UIClass _); @@ -679,15 +679,15 @@ namespace Microsoft.Iris.UI public bool MouseInteractive { - get => this.GetBit(UIClass.Bits.MouseInteractive); + get => this.GetBit(Bits.MouseInteractive); set => this.SetMouseInteractive(value, false); } public void SetMouseInteractive(bool value, bool fromScript) { if (fromScript) - this.SetBit(UIClass.Bits.MouseInteractiveSet, true); - if (!fromScript && this.GetBit(UIClass.Bits.MouseInteractiveSet) || !this.ChangeBit(UIClass.Bits.MouseInteractive, value)) + this.SetBit(Bits.MouseInteractiveSet, true); + if (!fromScript && this.GetBit(Bits.MouseInteractiveSet) || !this.ChangeBit(Bits.MouseInteractive, value)) return; if (value && this._rootItem != null && !this.HasMouseInteractiveContent()) this._rootItem.MouseInteractive = true; @@ -703,10 +703,10 @@ namespace Microsoft.Iris.UI public bool KeyInteractive { - get => this.GetBit(UIClass.Bits.KeyInteractive); + get => this.GetBit(Bits.KeyInteractive); set { - if (!this.ChangeBit(UIClass.Bits.KeyInteractive, value)) + if (!this.ChangeBit(Bits.KeyInteractive, value)) return; this.RevalidateUsage(false, !value); this.FireNotification(NotificationID.KeyInteractive); @@ -762,9 +762,9 @@ namespace Microsoft.Iris.UI switch (focusType) { case InputDeviceType.Keyboard: - return UIClass.s_updateKeyFocusStates; + return s_updateKeyFocusStates; case InputDeviceType.Mouse: - return UIClass.s_updateMouseFocusStates; + return s_updateMouseFocusStates; default: return null; } @@ -862,7 +862,7 @@ namespace Microsoft.Iris.UI foreach (InputHandler inputHandler in this._inputHandlers) { inputHandler.DeliverInput(this, info, stage); - if (UIClass.CheckHandled(info, inputHandler)) + if (CheckHandled(info, inputHandler)) break; } } @@ -893,14 +893,14 @@ namespace Microsoft.Iris.UI private void DeliverGainMouseFocus(InputInfo info, EventRouteStages stage) { - if (stage == EventRouteStages.Direct && this.GetBit(UIClass.Bits.KeyFocusOnMouseEnter)) + if (stage == EventRouteStages.Direct && this.GetBit(Bits.KeyFocusOnMouseEnter)) this.RequestKeyFocus(KeyFocusReason.MouseEnter); this.DeliverFocusChange(info, stage); } private void DeliverMouseButtonDown(InputInfo args, EventRouteStages stage) { - if (stage == EventRouteStages.Direct && this.GetBit(UIClass.Bits.KeyFocusOnMouseDown)) + if (stage == EventRouteStages.Direct && this.GetBit(Bits.KeyFocusOnMouseDown)) this.RequestKeyFocus(KeyFocusReason.MouseDown); this.DeliverInputEvent(args, stage); } @@ -953,7 +953,7 @@ namespace Microsoft.Iris.UI bool deepFocusFlag, bool directFocusFlag) { - if (recipient.ChangeBit(UIClass.Bits.KeyFocus, deepFocusFlag)) + if (recipient.ChangeBit(Bits.KeyFocus, deepFocusFlag)) { recipient.FireNotification(NotificationID.KeyFocus); if (deepFocusFlag) @@ -961,7 +961,7 @@ namespace Microsoft.Iris.UI else recipient.OnLoseDeepKeyFocus(); } - if (!recipient.ChangeBit(UIClass.Bits.DirectKeyFocus, directFocusFlag)) + if (!recipient.ChangeBit(Bits.DirectKeyFocus, directFocusFlag)) return; recipient.FireNotification(NotificationID.DirectKeyFocus); if (DebugOutlines.Enabled) @@ -973,8 +973,8 @@ namespace Microsoft.Iris.UI public event InputEventHandler DescendentKeyFocusChange { - add => this.AddEventHandler(UIClass.s_descendantKeyFocusChangedEvent, value); - remove => this.RemoveEventHandler(UIClass.s_descendantKeyFocusChangedEvent, value); + add => this.AddEventHandler(s_descendantKeyFocusChangedEvent, value); + remove => this.RemoveEventHandler(s_descendantKeyFocusChangedEvent, value); } private static void UpdateMouseFocusStates( @@ -982,9 +982,9 @@ namespace Microsoft.Iris.UI bool deepFocusFlag, bool directFocusFlag) { - if (recipient.ChangeBit(UIClass.Bits.MouseFocus, deepFocusFlag)) + if (recipient.ChangeBit(Bits.MouseFocus, deepFocusFlag)) recipient.FireNotification(NotificationID.MouseFocus); - if (!recipient.ChangeBit(UIClass.Bits.DirectMouseFocus, directFocusFlag)) + if (!recipient.ChangeBit(Bits.DirectMouseFocus, directFocusFlag)) return; recipient.FireNotification(NotificationID.DirectMouseFocus); if (!DebugOutlines.Enabled) @@ -994,8 +994,8 @@ namespace Microsoft.Iris.UI public event InputEventHandler DescendentMouseFocusChange { - add => this.AddEventHandler(UIClass.s_descendantMouseFocusChangedEvent, value); - remove => this.RemoveEventHandler(UIClass.s_descendantMouseFocusChangedEvent, value); + add => this.AddEventHandler(s_descendantMouseFocusChangedEvent, value); + remove => this.RemoveEventHandler(s_descendantMouseFocusChangedEvent, value); } private void DeliverCodeNotifications(InputInfo info) @@ -1005,11 +1005,11 @@ namespace Microsoft.Iris.UI { case InputEventType.GainKeyFocus: case InputEventType.LoseKeyFocus: - focusChangedEvent = UIClass.s_descendantKeyFocusChangedEvent; + focusChangedEvent = s_descendantKeyFocusChangedEvent; break; case InputEventType.GainMouseFocus: case InputEventType.LoseMouseFocus: - focusChangedEvent = UIClass.s_descendantMouseFocusChangedEvent; + focusChangedEvent = s_descendantMouseFocusChangedEvent; break; } if (!(focusChangedEvent != EventCookie.NULL) || !(this.GetEventHandler(focusChangedEvent) is InputEventHandler eventHandler)) @@ -1200,7 +1200,7 @@ namespace Microsoft.Iris.UI else if (this.HasMouseInteractiveContent()) this.MouseInteractive = true; } - this.SetBit(UIClass.Bits.Initialized, true); + this.SetBit(Bits.Initialized, true); AccessibleProxy.NotifyCreated(this); } @@ -1218,7 +1218,7 @@ namespace Microsoft.Iris.UI { foreach (InputHandler inputHandler in this._inputHandlers) { - if (inputHandler.Name != null && object.ReferenceEquals(inputHandler.Name, symbolRef.Symbol)) + if (inputHandler.Name != null && ReferenceEquals(inputHandler.Name, symbolRef.Symbol)) { obj = inputHandler; break; @@ -1243,7 +1243,7 @@ namespace Microsoft.Iris.UI public ViewItem FindViewItemByName(ViewItem item, string name) { - if (object.ReferenceEquals(item.Name, name)) + if (ReferenceEquals(item.Name, name)) return item; if (item.HideNamedChildren) return null; @@ -1292,7 +1292,7 @@ namespace Microsoft.Iris.UI public void ScheduleScriptRun(uint scriptId, bool ignoreErrors) { if (!this._scriptRunScheduler.Pending) - DeferredCall.Post(DispatchPriority.Script, UIClass.s_executePendingScriptsHandler, this); + DeferredCall.Post(DispatchPriority.Script, s_executePendingScriptsHandler, this); this._scriptRunScheduler.ScheduleRun(scriptId, ignoreErrors); } @@ -1306,12 +1306,12 @@ namespace Microsoft.Iris.UI public void NotifyScriptErrors() { - this.SetBit(UIClass.Bits.ScriptEnabled, false); + this.SetBit(Bits.ScriptEnabled, false); this._ownerHost.NotifyChildUIScriptErrors(); ErrorManager.ReportWarning("Script runtime failure: Scripting has been disabled for '{0}' due to runtime scripting errors", _typeSchema.Name); } - public bool ScriptEnabled => this.GetBit(UIClass.Bits.ScriptEnabled); + public bool ScriptEnabled => this.GetBit(Bits.ScriptEnabled); protected void FireNotification(string id) => this.FireNotification(id, false); @@ -1354,8 +1354,8 @@ namespace Microsoft.Iris.UI public bool Flippable { - get => this.GetBit(UIClass.Bits.Flippable); - set => this.SetBit(UIClass.Bits.Flippable, value); + get => this.GetBit(Bits.Flippable); + set => this.SetBit(Bits.Flippable, value); } internal void SetRootItem(ViewItem newRootItem) => this._rootItem = newRootItem; diff --git a/UIX/Microsoft/Iris/UI/UIZone.cs b/UIX/Microsoft/Iris/UI/UIZone.cs index b51692d..89d81e3 100644 --- a/UIX/Microsoft/Iris/UI/UIZone.cs +++ b/UIX/Microsoft/Iris/UI/UIZone.cs @@ -456,13 +456,13 @@ namespace Microsoft.Iris.UI inputDeliveryData.eventRouteCached = true; UIClass[] removedFromRoute = this.FindControlsRemovedFromRoute(uiClassArray1, uiClassArray2); if (removedFromRoute != null) - UIZone.UpdateControlFocusStates(removedFromRoute, false, null, updateProc); + UpdateControlFocusStates(removedFromRoute, false, null, updateProc); this.RecycleUIClassArray(uiClassArray1); if (removedFromRoute != uiClassArray1) this.RecycleUIClassArray(removedFromRoute); if (uiClassArray2 == null) return; - UIZone.UpdateControlFocusStates(uiClassArray2, true, directFocusChild, updateProc); + UpdateControlFocusStates(uiClassArray2, true, directFocusChild, updateProc); } private UIClass[] FindControlsRemovedFromRoute( diff --git a/UIX/Microsoft/Iris/UI/ViewItem.cs b/UIX/Microsoft/Iris/UI/ViewItem.cs index 805da27..e173dc7 100644 --- a/UIX/Microsoft/Iris/UI/ViewItem.cs +++ b/UIX/Microsoft/Iris/UI/ViewItem.cs @@ -102,13 +102,13 @@ namespace Microsoft.Iris.UI private int _requestedCount; private Vector _requestedIndices; private ExtendedLayoutOutput _extendedOutputs; - private static DeferredHandler s_scrollIntoViewCleanup = new DeferredHandler(ViewItem.CleanUpAfterScrollIntoView); + private static DeferredHandler s_scrollIntoViewCleanup = new DeferredHandler(CleanUpAfterScrollIntoView); public ViewItem() { this._bits = new BitVector32(); this._bits2 = new BitVector32(); - this.SetBit(ViewItem.Bits.LayoutInputVisible, true); + this.SetBit(Bits.LayoutInputVisible, true); this._layout = DefaultLayout.Instance; this._backgroundColor = Color.Transparent; } @@ -122,11 +122,11 @@ namespace Microsoft.Iris.UI protected override void OnDispose() { base.OnDispose(); - this.RemoveEventHandlers(ViewItem.s_layoutCompleteEvent); - this.RemoveEventHandlers(ViewItem.s_paintEvent); - this.RemoveEventHandlers(ViewItem.s_paintInvalidEvent); - this.RemoveEventHandlers(ViewItem.s_propertyChangedEvent); - this.RemoveEventHandlers(ViewItem.s_deepLayoutChangeEvent); + this.RemoveEventHandlers(s_layoutCompleteEvent); + this.RemoveEventHandlers(s_paintEvent); + this.RemoveEventHandlers(s_paintInvalidEvent); + this.RemoveEventHandlers(s_propertyChangedEvent); + this.RemoveEventHandlers(s_deepLayoutChangeEvent); this.SharedSize?.Unregister(this); Vector activeAnimations = this.GetActiveAnimations(false); if (activeAnimations != null) @@ -143,12 +143,12 @@ namespace Microsoft.Iris.UI this.Effect?.DoneWithRenderEffects(this); this._ownerUI = null; this._layout = null; - if (!this.GetBit(ViewItem.Bits2.HasCamera)) + if (!this.GetBit(Bits2.HasCamera)) return; - Camera data = (Camera)this.GetData(ViewItem.s_cameraProperty); + Camera data = (Camera)this.GetData(s_cameraProperty); if (data == null) return; - this.SetData(ViewItem.s_cameraProperty, null); + this.SetData(s_cameraProperty, null); data.UnregisterUsage(this); } @@ -191,92 +191,92 @@ namespace Microsoft.Iris.UI public Vector2 VisualSize { - get => this.GetBit(ViewItem.Bits2.HasSizeNoSend) ? (Vector2)this.GetData(ViewItem.s_sizeNoSendProperty) : this._container.Size; + get => this.GetBit(Bits2.HasSizeNoSend) ? (Vector2)this.GetData(s_sizeNoSendProperty) : this._container.Size; set { - bool bit = this.GetBit(ViewItem.Bits2.HasSizeNoSend); + bool bit = this.GetBit(Bits2.HasSizeNoSend); this._container.SetSize(value, bit); if (bit) - this.SetDynamicValue(value, true, ViewItem.Bits2.HasSizeNoSend, ViewItem.s_sizeNoSendProperty, nameof(VisualSize)); + this.SetDynamicValue(value, true, Bits2.HasSizeNoSend, s_sizeNoSendProperty, nameof(VisualSize)); this.MarkPaintInvalid(); } } private Vector2 VisualSizeNoSend { - set => this.SetDynamicValue(value, false, ViewItem.Bits2.HasSizeNoSend, ViewItem.s_sizeNoSendProperty, "VisualSize"); + set => this.SetDynamicValue(value, false, Bits2.HasSizeNoSend, s_sizeNoSendProperty, "VisualSize"); } public Vector3 VisualPosition { - get => this.GetBit(ViewItem.Bits2.HasPositionNoSend) ? (Vector3)this.GetData(ViewItem.s_positionNoSendProperty) : this._container.Position; + get => this.GetBit(Bits2.HasPositionNoSend) ? (Vector3)this.GetData(s_positionNoSendProperty) : this._container.Position; set { - bool bit = this.GetBit(ViewItem.Bits2.HasPositionNoSend); + bool bit = this.GetBit(Bits2.HasPositionNoSend); this._container.SetPosition(value, bit); if (!bit) return; - this.SetDynamicValue(value, true, ViewItem.Bits2.HasPositionNoSend, ViewItem.s_positionNoSendProperty, nameof(VisualPosition)); + this.SetDynamicValue(value, true, Bits2.HasPositionNoSend, s_positionNoSendProperty, nameof(VisualPosition)); } } private Vector3 VisualPositionNoSend { - set => this.SetDynamicValue(value, false, ViewItem.Bits2.HasPositionNoSend, ViewItem.s_positionNoSendProperty, "VisualPosition"); + set => this.SetDynamicValue(value, false, Bits2.HasPositionNoSend, s_positionNoSendProperty, "VisualPosition"); } public Vector3 VisualScale { - get => this.GetBit(ViewItem.Bits2.HasScaleNoSend) ? (Vector3)this.GetData(ViewItem.s_scaleNoSendProperty) : this._container.Scale; + get => this.GetBit(Bits2.HasScaleNoSend) ? (Vector3)this.GetData(s_scaleNoSendProperty) : this._container.Scale; set { - bool bit = this.GetBit(ViewItem.Bits2.HasScaleNoSend); + bool bit = this.GetBit(Bits2.HasScaleNoSend); this._container.SetScale(value, bit); if (!bit) return; - this.SetDynamicValue(value, true, ViewItem.Bits2.HasScaleNoSend, ViewItem.s_scaleNoSendProperty, nameof(VisualScale)); + this.SetDynamicValue(value, true, Bits2.HasScaleNoSend, s_scaleNoSendProperty, nameof(VisualScale)); } } private Vector3 VisualScaleNoSend { - set => this.SetDynamicValue(value, false, ViewItem.Bits2.HasScaleNoSend, ViewItem.s_scaleNoSendProperty, "VisualScale"); + set => this.SetDynamicValue(value, false, Bits2.HasScaleNoSend, s_scaleNoSendProperty, "VisualScale"); } public Rotation VisualRotation { get { - if (this.GetBit(ViewItem.Bits2.HasRotationNoSend)) - return (Rotation)this.GetData(ViewItem.s_rotationNoSendProperty); + if (this.GetBit(Bits2.HasRotationNoSend)) + return (Rotation)this.GetData(s_rotationNoSendProperty); AxisAngle rotation = this._container.Rotation; return new Rotation(rotation.Angle, rotation.Axis); } set { - bool bit = this.GetBit(ViewItem.Bits2.HasRotationNoSend); + bool bit = this.GetBit(Bits2.HasRotationNoSend); this._container.SetRotation(new AxisAngle(value.Axis, value.AngleRadians), bit); if (!bit) return; - this.SetDynamicValue(value, true, ViewItem.Bits2.HasRotationNoSend, ViewItem.s_rotationNoSendProperty, nameof(VisualRotation)); + this.SetDynamicValue(value, true, Bits2.HasRotationNoSend, s_rotationNoSendProperty, nameof(VisualRotation)); } } private Rotation VisualRotationNoSend { - set => this.SetDynamicValue(value, false, ViewItem.Bits2.HasRotationNoSend, ViewItem.s_rotationNoSendProperty, "VisualRotation"); + set => this.SetDynamicValue(value, false, Bits2.HasRotationNoSend, s_rotationNoSendProperty, "VisualRotation"); } public float VisualAlpha { - get => this.GetBit(ViewItem.Bits2.HasAlphaNoSend) ? (float)this.GetData(ViewItem.s_alphaNoSendProperty) : this._container.Alpha; + get => this.GetBit(Bits2.HasAlphaNoSend) ? (float)this.GetData(s_alphaNoSendProperty) : this._container.Alpha; set { bool fullyVisible = this.FullyVisible; - bool bit = this.GetBit(ViewItem.Bits2.HasAlphaNoSend); + bool bit = this.GetBit(Bits2.HasAlphaNoSend); this._container.SetAlpha(value, bit); if (bit) - this.SetDynamicValue(value, true, ViewItem.Bits2.HasAlphaNoSend, ViewItem.s_alphaNoSendProperty, nameof(VisualAlpha)); + this.SetDynamicValue(value, true, Bits2.HasAlphaNoSend, s_alphaNoSendProperty, nameof(VisualAlpha)); if (fullyVisible == this.FullyVisible) return; this.OnVisibilityChange(); @@ -288,7 +288,7 @@ namespace Microsoft.Iris.UI set { bool fullyVisible = this.FullyVisible; - this.SetDynamicValue(value, false, ViewItem.Bits2.HasAlphaNoSend, ViewItem.s_alphaNoSendProperty, "VisualAlpha"); + this.SetDynamicValue(value, false, Bits2.HasAlphaNoSend, s_alphaNoSendProperty, "VisualAlpha"); if (fullyVisible == this.FullyVisible) return; this.OnVisibilityChange(); @@ -333,7 +333,7 @@ namespace Microsoft.Iris.UI { this.UI.UpdateMouseHandling(this); this.MarkLayoutInvalid(); - if (this.GetBit(ViewItem.Bits.OutputSelfDirty)) + if (this.GetBit(Bits.OutputSelfDirty)) this.MarkLayoutOutputDirty(true); this.OnEffectiveScaleChange(); } @@ -346,13 +346,13 @@ namespace Microsoft.Iris.UI public void MarkPaintInvalid() { - if (!this.IsZoned || this.GetBit(ViewItem.Bits.PaintInvalid) || !this.HasVisual) + if (!this.IsZoned || this.GetBit(Bits.PaintInvalid) || !this.HasVisual) return; - this.SetBit(ViewItem.Bits.PaintInvalid, true); + this.SetBit(Bits.PaintInvalid, true); if (!this.IsRoot) this.Parent.MarkPaintChildrenInvalid(); this.Zone.ScheduleUiTask(UiTask.Painting); - if (!(this.GetEventHandler(ViewItem.s_paintInvalidEvent) is EventHandler eventHandler)) + if (!(this.GetEventHandler(s_paintInvalidEvent) is EventHandler eventHandler)) return; eventHandler(this, EventArgs.Empty); } @@ -361,13 +361,13 @@ namespace Microsoft.Iris.UI { if (this.ChildrenPaintInvalid) return; - this.SetBit(ViewItem.Bits2.PaintChildrenInvalid, true); + this.SetBit(Bits2.PaintChildrenInvalid, true); if (this.IsRoot) return; this.Parent.MarkPaintChildrenInvalid(); } - public bool ChildrenPaintInvalid => this.GetBit(ViewItem.Bits2.PaintChildrenInvalid); + public bool ChildrenPaintInvalid => this.GetBit(Bits2.PaintChildrenInvalid); [Conditional("DEBUG")] private static void DEBUG_CountPaintInvalid() @@ -395,7 +395,7 @@ namespace Microsoft.Iris.UI { if (!this.HasVisual || !this.Visible) return false; - return VisualAlpha > 0.0 || this.GetBit(ViewItem.Bits2.IsAlphaAnimationPlaying); + return VisualAlpha > 0.0 || this.GetBit(Bits2.IsAlphaAnimationPlaying); } } @@ -405,16 +405,16 @@ namespace Microsoft.Iris.UI this.PaintSelf(visible); if (!this.ChildrenPaintInvalid) return; - this.SetBit(ViewItem.Bits2.PaintChildrenInvalid, false); + this.SetBit(Bits2.PaintChildrenInvalid, false); foreach (ViewItem child in this.Children) child.PaintTree(visible); } private void PaintSelf(bool visible) { - if (!this.GetBit(ViewItem.Bits.PaintInvalid)) + if (!this.GetBit(Bits.PaintInvalid)) return; - this.SetBit(ViewItem.Bits.PaintInvalid, false); + this.SetBit(Bits.PaintInvalid, false); if (!this.HasVisual) return; this.OnPaint(visible); @@ -422,7 +422,7 @@ namespace Microsoft.Iris.UI protected virtual void OnPaint(bool visible) { - if (this.GetEventHandler(ViewItem.s_paintEvent) is ViewItem.PaintHandler eventHandler) + if (this.GetEventHandler(s_paintEvent) is ViewItem.PaintHandler eventHandler) eventHandler(this); bool flag = visible && this._backgroundColor.A != 0; if (flag && this._backgroundSprite == null) @@ -436,14 +436,14 @@ namespace Microsoft.Iris.UI public event ViewItem.PaintHandler Paint { - add => this.AddEventHandler(ViewItem.s_paintEvent, value); - remove => this.RemoveEventHandler(ViewItem.s_paintEvent, value); + add => this.AddEventHandler(s_paintEvent, value); + remove => this.RemoveEventHandler(s_paintEvent, value); } public event EventHandler PaintInvalid { - add => this.AddEventHandler(ViewItem.s_paintInvalidEvent, value); - remove => this.RemoveEventHandler(ViewItem.s_paintInvalidEvent, value); + add => this.AddEventHandler(s_paintInvalidEvent, value); + remove => this.RemoveEventHandler(s_paintInvalidEvent, value); } protected virtual void DisposeAllContent() => this.DisposeBackgroundContent(true); @@ -474,9 +474,9 @@ namespace Microsoft.Iris.UI get { Vector3 vector3 = Vector3.UnitVector; - if (this.GetBit(ViewItem.Bits.HasScale)) + if (this.GetBit(Bits.HasScale)) { - object data = this.GetData(ViewItem.s_scaleProperty); + object data = this.GetData(s_scaleProperty); if (data != null) vector3 = (Vector3)data; } @@ -488,13 +488,13 @@ namespace Microsoft.Iris.UI return; if (value != Vector3.UnitVector) { - this.SetData(ViewItem.s_scaleProperty, value); - this.SetBit(ViewItem.Bits.HasScale, true); + this.SetData(s_scaleProperty, value); + this.SetBit(Bits.HasScale, true); } - else if (this.GetBit(ViewItem.Bits.HasScale)) + else if (this.GetBit(Bits.HasScale)) { - this.SetData(ViewItem.s_scaleProperty, null); - this.SetBit(ViewItem.Bits.HasScale, false); + this.SetData(s_scaleProperty, null); + this.SetBit(Bits.HasScale, false); } if (this.HasVisual) { @@ -516,8 +516,8 @@ namespace Microsoft.Iris.UI get { float num = 1f; - if (this.GetBit(ViewItem.Bits2.HasAlpha)) - num = (float)this.GetData(ViewItem.s_alphaProperty); + if (this.GetBit(Bits2.HasAlpha)) + num = (float)this.GetData(s_alphaProperty); return num; } set @@ -527,8 +527,8 @@ namespace Microsoft.Iris.UI return; bool flag = Math2.WithinEpsilon(value, 1f); object obj = flag ? null : (object)value; - this.SetData(ViewItem.s_alphaProperty, obj); - this.SetBit(ViewItem.Bits2.HasAlpha, !flag); + this.SetData(s_alphaProperty, obj); + this.SetBit(Bits2.HasAlpha, !flag); if (this.HasVisual) { var args = new AnimationArgs(this) @@ -549,8 +549,8 @@ namespace Microsoft.Iris.UI get { Camera camera = null; - if (this.GetBit(ViewItem.Bits2.HasCamera)) - camera = (Camera)this.GetData(ViewItem.s_cameraProperty); + if (this.GetBit(Bits2.HasCamera)) + camera = (Camera)this.GetData(s_cameraProperty); return camera; } set @@ -559,8 +559,8 @@ namespace Microsoft.Iris.UI return; bool flag = value == null; object obj = flag ? null : (object)value; - this.SetData(ViewItem.s_cameraProperty, obj); - this.SetBit(ViewItem.Bits2.HasCamera, !flag); + this.SetData(s_cameraProperty, obj); + this.SetBit(Bits2.HasCamera, !flag); value?.RegisterUsage(this); if (this._container != null) this._container.Camera = value == null ? null : value.APICamera; @@ -573,8 +573,8 @@ namespace Microsoft.Iris.UI get { Rotation data = Rotation.Default; - if (this.GetBit(ViewItem.Bits2.HasRotation)) - data = (Rotation)this.GetData(ViewItem.s_rotationProperty); + if (this.GetBit(Bits2.HasRotation)) + data = (Rotation)this.GetData(s_rotationProperty); return data; } set @@ -583,8 +583,8 @@ namespace Microsoft.Iris.UI return; bool flag = value == Rotation.Default; object obj = flag ? null : (object)value; - this.SetData(ViewItem.s_rotationProperty, obj); - this.SetBit(ViewItem.Bits2.HasRotation, !flag); + this.SetData(s_rotationProperty, obj); + this.SetBit(Bits2.HasRotation, !flag); this.FireNotification(NotificationID.Rotation); this.MarkLayoutInvalid(); } @@ -595,8 +595,8 @@ namespace Microsoft.Iris.UI get { Vector3 vector3 = new Vector3(); - if (this.GetBit(ViewItem.Bits2.HasCenterPointPercent)) - vector3 = (Vector3)this.GetData(ViewItem.s_centerPointPercentProperty); + if (this.GetBit(Bits2.HasCenterPointPercent)) + vector3 = (Vector3)this.GetData(s_centerPointPercentProperty); return vector3; } set @@ -605,8 +605,8 @@ namespace Microsoft.Iris.UI return; bool flag = value == new Vector3(); object obj = flag ? null : (object)value; - this.SetData(ViewItem.s_centerPointPercentProperty, obj); - this.SetBit(ViewItem.Bits2.HasCenterPointPercent, !flag); + this.SetData(s_centerPointPercentProperty, obj); + this.SetBit(Bits2.HasCenterPointPercent, !flag); if (this.HasVisual) this.VisualCenterPoint = value; this.FireNotification(NotificationID.CenterPointPercent); @@ -618,8 +618,8 @@ namespace Microsoft.Iris.UI get { uint num = 0; - if (this.GetBit(ViewItem.Bits2.HasLayer)) - num = (uint)this.GetData(ViewItem.s_layerProperty); + if (this.GetBit(Bits2.HasLayer)) + num = (uint)this.GetData(s_layerProperty); return num; } set @@ -628,8 +628,8 @@ namespace Microsoft.Iris.UI return; bool flag = value == 0U; object obj = flag ? null : (object)value; - this.SetData(ViewItem.s_layerProperty, obj); - this.SetBit(ViewItem.Bits2.HasLayer, !flag); + this.SetData(s_layerProperty, obj); + this.SetBit(Bits2.HasLayer, !flag); if (!this.HasVisual) return; this.VisualLayer = value; @@ -638,15 +638,15 @@ namespace Microsoft.Iris.UI public EffectClass Effect { - get => this.GetBit(ViewItem.Bits2.HasEffect) ? (EffectClass)this.GetData(ViewItem.s_effectProperty) : null; + get => this.GetBit(Bits2.HasEffect) ? (EffectClass)this.GetData(s_effectProperty) : null; set { EffectClass effect = this.Effect; if (effect == value) return; effect?.DoneWithRenderEffects(this); - this.SetData(ViewItem.s_effectProperty, value); - this.SetBit(ViewItem.Bits2.HasEffect, value != null); + this.SetData(s_effectProperty, value); + this.SetBit(Bits2.HasEffect, value != null); this.OnEffectChanged(); this.MarkPaintInvalid(); this.FireNotification(NotificationID.Effect); @@ -668,7 +668,7 @@ namespace Microsoft.Iris.UI Vector3 visualScale = viewItem.VisualScale; hostDisplayScale *= new Vector3(visualScale.X, visualScale.Y, visualScale.Z); } - else if (viewItem.GetBit(ViewItem.Bits.HasScale)) + else if (viewItem.GetBit(Bits.HasScale)) hostDisplayScale *= viewItem.Scale; viewItem = viewItem.Parent; } @@ -682,7 +682,7 @@ namespace Microsoft.Iris.UI internal void NotifyEffectiveScaleChange(bool forceFlag) { - if (!this.IsZoned || !this.ChangeBit(ViewItem.Bits.ScaleChanged, true) && !forceFlag) + if (!this.IsZoned || !this.ChangeBit(Bits.ScaleChanged, true) && !forceFlag) return; this.Zone.ScheduleScaleChangeNotifications(); } @@ -690,9 +690,9 @@ namespace Microsoft.Iris.UI internal void DeliverEffectiveScaleChange(bool parentChangedFlag) { if (parentChangedFlag) - this.SetBit(ViewItem.Bits.ScaleChanged, false); + this.SetBit(Bits.ScaleChanged, false); else - parentChangedFlag = this.ChangeBit(ViewItem.Bits.ScaleChanged, false); + parentChangedFlag = this.ChangeBit(Bits.ScaleChanged, false); if (parentChangedFlag) this.OnEffectiveScaleChange(); foreach (ViewItem child in this.Children) @@ -701,11 +701,11 @@ namespace Microsoft.Iris.UI public bool Visible { - get => this.GetBit(ViewItem.Bits.LayoutInputVisible); + get => this.GetBit(Bits.LayoutInputVisible); set { bool fullyVisible = this.FullyVisible; - if (!this.ChangeBit(ViewItem.Bits.LayoutInputVisible, value)) + if (!this.ChangeBit(Bits.LayoutInputVisible, value)) return; this.MarkLayoutInvalid(); if (fullyVisible != this.FullyVisible) @@ -718,12 +718,12 @@ namespace Microsoft.Iris.UI public object MaximumSizeObject { - get => this.GetBit(ViewItem.Bits.LayoutInputMaxSize) ? this.GetData(ViewItem.s_maxSizeProperty) : Size.ZeroBox; + get => this.GetBit(Bits.LayoutInputMaxSize) ? this.GetData(s_maxSizeProperty) : Size.ZeroBox; set { if (!(this.MaximumSize != (Size)value)) return; - this.SetLayoutData(ViewItem.s_maxSizeProperty, ViewItem.Bits.LayoutInputMaxSize, value, Size.ZeroBox); + this.SetLayoutData(s_maxSizeProperty, Bits.LayoutInputMaxSize, value, Size.ZeroBox); this.FireNotification(NotificationID.MaximumSize); } } @@ -732,12 +732,12 @@ namespace Microsoft.Iris.UI public object MinimumSizeObject { - get => this.GetBit(ViewItem.Bits.LayoutInputMinSize) ? this.GetData(ViewItem.s_minSizeProperty) : Size.ZeroBox; + get => this.GetBit(Bits.LayoutInputMinSize) ? this.GetData(s_minSizeProperty) : Size.ZeroBox; set { if (!(this.MinimumSize != (Size)value)) return; - this.SetLayoutData(ViewItem.s_minSizeProperty, ViewItem.Bits.LayoutInputMinSize, value, Size.ZeroBox); + this.SetLayoutData(s_minSizeProperty, Bits.LayoutInputMinSize, value, Size.ZeroBox); this.FireNotification(NotificationID.MinimumSize); this.OnMinimumSizeChanged(); } @@ -749,24 +749,24 @@ namespace Microsoft.Iris.UI public ItemAlignment Alignment { - get => this.GetBit(ViewItem.Bits.LayoutAlignment) ? (ItemAlignment)this.GetData(ViewItem.s_alignmentProperty) : ItemAlignment.Default; + get => this.GetBit(Bits.LayoutAlignment) ? (ItemAlignment)this.GetData(s_alignmentProperty) : ItemAlignment.Default; set { if (!(this.Alignment != value)) return; - this.SetLayoutData(ViewItem.s_alignmentProperty, ViewItem.Bits.LayoutAlignment, value, ItemAlignment.Default); + this.SetLayoutData(s_alignmentProperty, Bits.LayoutAlignment, value, ItemAlignment.Default); this.FireNotification(NotificationID.Alignment); } } public ItemAlignment ChildAlignment { - get => this.GetBit(ViewItem.Bits.LayoutChildAlignment) ? (ItemAlignment)this.GetData(ViewItem.s_childAlignmentProperty) : ItemAlignment.Default; + get => this.GetBit(Bits.LayoutChildAlignment) ? (ItemAlignment)this.GetData(s_childAlignmentProperty) : ItemAlignment.Default; set { if (!(this.ChildAlignment != value)) return; - this.SetLayoutData(ViewItem.s_childAlignmentProperty, ViewItem.Bits.LayoutChildAlignment, value, ItemAlignment.Default); + this.SetLayoutData(s_childAlignmentProperty, Bits.LayoutChildAlignment, value, ItemAlignment.Default); this.FireNotification(NotificationID.ChildAlignment); } } @@ -774,7 +774,7 @@ namespace Microsoft.Iris.UI internal ItemAlignment GetEffectiveAlignment() { ItemAlignment alignment = this.Alignment; - if (this.Parent != null && (alignment.Horizontal == Microsoft.Iris.Layout.Alignment.Unspecified || alignment.Vertical == Microsoft.Iris.Layout.Alignment.Unspecified)) + if (this.Parent != null && (alignment.Horizontal == Iris.Layout.Alignment.Unspecified || alignment.Vertical == Iris.Layout.Alignment.Unspecified)) { alignment = ItemAlignment.Merge(alignment, this.Parent.ChildAlignment); if (this.Parent.Layout != null) @@ -785,14 +785,14 @@ namespace Microsoft.Iris.UI public SharedSize SharedSize { - get => this.GetBit(ViewItem.Bits.LayoutInputSharedSize) ? (SharedSize)this.GetData(ViewItem.s_sharedSizeProperty) : null; + get => this.GetBit(Bits.LayoutInputSharedSize) ? (SharedSize)this.GetData(s_sharedSizeProperty) : null; set { SharedSize sharedSize = this.SharedSize; if (sharedSize == value) return; sharedSize?.Unregister(this); - this.SetLayoutData(ViewItem.s_sharedSizeProperty, ViewItem.Bits.LayoutInputSharedSize, value, null); + this.SetLayoutData(s_sharedSizeProperty, Bits.LayoutInputSharedSize, value, null); value?.Register(this); this.FireNotification(NotificationID.SharedSize); } @@ -800,36 +800,36 @@ namespace Microsoft.Iris.UI public SharedSizePolicy SharedSizePolicy { - get => this.GetBit(ViewItem.Bits.LayoutInputSharedSizePolicy) ? (SharedSizePolicy)this.GetData(ViewItem.s_sharedSizePolicyProperty) : SharedSizePolicy.Default; + get => this.GetBit(Bits.LayoutInputSharedSizePolicy) ? (SharedSizePolicy)this.GetData(s_sharedSizePolicyProperty) : SharedSizePolicy.Default; set { if (this.SharedSizePolicy == value) return; - this.SetLayoutData(ViewItem.s_sharedSizePolicyProperty, ViewItem.Bits.LayoutInputSharedSizePolicy, value, SharedSizePolicy.Default); + this.SetLayoutData(s_sharedSizePolicyProperty, Bits.LayoutInputSharedSizePolicy, value, SharedSizePolicy.Default); this.FireNotification(NotificationID.SharedSizePolicy); } } public Inset Margins { - get => this.GetInset(ViewItem.s_marginsProperty, ViewItem.Bits.LayoutInputMargins); + get => this.GetInset(s_marginsProperty, Bits.LayoutInputMargins); set { if (!(this.Margins != value)) return; - this.SetLayoutData(ViewItem.s_marginsProperty, ViewItem.Bits.LayoutInputMargins, value, Inset.Zero); + this.SetLayoutData(s_marginsProperty, Bits.LayoutInputMargins, value, Inset.Zero); this.FireNotification(NotificationID.Margins); } } public Inset Padding { - get => this.GetInset(ViewItem.s_paddingProperty, ViewItem.Bits.LayoutInputPadding); + get => this.GetInset(s_paddingProperty, Bits.LayoutInputPadding); set { if (!(this.Padding != value)) return; - this.SetLayoutData(ViewItem.s_paddingProperty, ViewItem.Bits.LayoutInputPadding, value, Inset.Zero); + this.SetLayoutData(s_paddingProperty, Bits.LayoutInputPadding, value, Inset.Zero); this.FireNotification(NotificationID.Padding); } } @@ -903,9 +903,9 @@ namespace Microsoft.Iris.UI { get { - if (this.ChangeBit(ViewItem.Bits2.HasLayoutOutput, true)) - this.SetData(ViewItem.s_layoutOutputProperty, new LayoutOutput(this.LayoutSize)); - return (LayoutOutput)this.GetData(ViewItem.s_layoutOutputProperty); + if (this.ChangeBit(Bits2.HasLayoutOutput, true)) + this.SetData(s_layoutOutputProperty, new LayoutOutput(this.LayoutSize)); + return (LayoutOutput)this.GetData(s_layoutOutputProperty); } } @@ -921,8 +921,8 @@ namespace Microsoft.Iris.UI public bool LayoutOffscreen { - get => this.GetBit(ViewItem.Bits2.LayoutOffscreen); - private set => this.SetBit(ViewItem.Bits2.LayoutOffscreen, value); + get => this.GetBit(Bits2.LayoutOffscreen); + private set => this.SetBit(Bits2.LayoutOffscreen, value); } public int LayoutRequestedCount => this._requestedCount; @@ -952,8 +952,8 @@ namespace Microsoft.Iris.UI private bool LayoutContributesToWidth { - get => this.GetBit(ViewItem.Bits2.ContributesToWidth); - set => this.SetBit(ViewItem.Bits2.ContributesToWidth, value); + get => this.GetBit(Bits2.ContributesToWidth); + set => this.SetBit(Bits2.ContributesToWidth, value); } public Size LayoutMaximumSize @@ -996,8 +996,8 @@ namespace Microsoft.Iris.UI public bool IsOffscreen { - get => this.GetBit(ViewItem.Bits2.IsOffscreen); - set => this.SetBit(ViewItem.Bits2.IsOffscreen, value); + get => this.GetBit(Bits2.IsOffscreen); + set => this.SetBit(Bits2.IsOffscreen, value); } public ILayoutInput LayoutInput @@ -1005,7 +1005,7 @@ namespace Microsoft.Iris.UI set => this.SetLayoutInput(value.Data, value); } - public bool LayoutInvalid => this.GetBit(ViewItem.Bits.LayoutInvalid); + public bool LayoutInvalid => this.GetBit(Bits.LayoutInvalid); public void MarkLayoutInvalid() { @@ -1015,7 +1015,7 @@ namespace Microsoft.Iris.UI while (!viewItem.LayoutInvalid) { viewItem.ClearLayoutInfo(); - viewItem.SetBit(ViewItem.Bits.LayoutInvalid, true); + viewItem.SetBit(Bits.LayoutInvalid, true); viewItem = viewItem.Parent; if (viewItem == null) { @@ -1030,7 +1030,7 @@ namespace Microsoft.Iris.UI private void ClearLayoutInfo() { - this.SetBit(ViewItem.Bits2.BuiltLayoutChildren, false); + this.SetBit(Bits2.BuiltLayoutChildren, false); this._visibleChildCount = 0; this.Measured = false; this._constraint = Size.Zero; @@ -1041,7 +1041,7 @@ namespace Microsoft.Iris.UI public void ResetLayoutInvalid() { - if (!this.ChangeBit(ViewItem.Bits.LayoutInvalid, false)) + if (!this.ChangeBit(Bits.LayoutInvalid, false)) return; foreach (ViewItem child in this.Children) child.ResetLayoutInvalid(); @@ -1051,13 +1051,13 @@ namespace Microsoft.Iris.UI { add { - if (!this.AddEventHandler(ViewItem.s_deepLayoutChangeEvent, value)) + if (!this.AddEventHandler(s_deepLayoutChangeEvent, value)) return; this.EnableDeepLayoutNotifications(true); } remove { - if (!this.RemoveEventHandler(ViewItem.s_deepLayoutChangeEvent, value)) + if (!this.RemoveEventHandler(s_deepLayoutChangeEvent, value)) return; this.EnableDeepLayoutNotifications(false); } @@ -1067,31 +1067,31 @@ namespace Microsoft.Iris.UI { if (!enableFlag) { - this.SetBit(ViewItem.Bits.DeepLayoutNotifySelf, false); + this.SetBit(Bits.DeepLayoutNotifySelf, false); } else { - if (this.GetBit(ViewItem.Bits.DeepLayoutNotifySelf)) + if (this.GetBit(Bits.DeepLayoutNotifySelf)) return; - this.SetBit(ViewItem.Bits.DeepLayoutNotifySelf, true); + this.SetBit(Bits.DeepLayoutNotifySelf, true); ViewItem viewItem = this; do { - viewItem.SetBit(ViewItem.Bits.DeepLayoutNotifyTree, true); + viewItem.SetBit(Bits.DeepLayoutNotifyTree, true); ViewItem parent = viewItem.Parent; if (parent == null) break; viewItem = parent; } - while (!viewItem.GetBit(ViewItem.Bits.DeepLayoutNotifyTree)); + while (!viewItem.GetBit(Bits.DeepLayoutNotifyTree)); } } private void BuildLayoutChildren() { - if (this.GetBit(ViewItem.Bits2.BuiltLayoutChildren)) + if (this.GetBit(Bits2.BuiltLayoutChildren)) return; - this.SetBit(ViewItem.Bits2.BuiltLayoutChildren, true); + this.SetBit(Bits2.BuiltLayoutChildren, true); this._visibleChildCount = 0; foreach (ILayoutNode child in this.Children) { @@ -1280,20 +1280,20 @@ namespace Microsoft.Iris.UI private bool Measured { - get => this.GetBit(ViewItem.Bits2.Measured); - set => this.SetBit(ViewItem.Bits2.Measured, value); + get => this.GetBit(Bits2.Measured); + set => this.SetBit(Bits2.Measured, value); } private bool Arranged { - get => this.GetBit(ViewItem.Bits2.Arranged); - set => this.SetBit(ViewItem.Bits2.Arranged, value); + get => this.GetBit(Bits2.Arranged); + set => this.SetBit(Bits2.Arranged, value); } private bool Committed { - get => this.GetBit(ViewItem.Bits2.Committed); - set => this.SetBit(ViewItem.Bits2.Committed, value); + get => this.GetBit(Bits2.Committed); + set => this.SetBit(Bits2.Committed, value); } [Conditional("DEBUG")] @@ -1346,9 +1346,9 @@ namespace Microsoft.Iris.UI if (!flag && this.Parent != null) { ViewItem parent = this.Parent; - flag = parent.GetBit(ViewItem.Bits2.KeepAlive) && !parent.DiscardOffscreenVisuals; + flag = parent.GetBit(Bits2.KeepAlive) && !parent.DiscardOffscreenVisuals; } - this.SetBit(ViewItem.Bits2.KeepAlive, flag); + this.SetBit(Bits2.KeepAlive, flag); this.SharedSize?.AccumulateSize(this._location.Size, this.SharedSizePolicy); Inset padding = this.Padding; Size size = padding.Size; @@ -1370,7 +1370,7 @@ namespace Microsoft.Iris.UI if (((ILayoutNode)this).TryGetAreaOfInterest(AreaOfInterestID.ScrollableRange, out area)) location.Union(area.Rectangle); this._visible = location.IntersectsWith(parentSlot.PeripheralView) || flag ? Visibility.Visible : Visibility.ImplicitlyHidden; - this.SetBit(ViewItem.Bits2.LayoutOffscreen, !location.IntersectsWith(parentSlot.View)); + this.SetBit(Bits2.LayoutOffscreen, !location.IntersectsWith(parentSlot.View)); } this._slot = parentSlot; this._bounds = bounds; @@ -1399,27 +1399,27 @@ namespace Microsoft.Iris.UI int num = this.DesiredSize.GetDimension(orientation); switch (alignment.GetAlignment(orientation)) { - case Microsoft.Iris.Layout.Alignment.Unspecified: - case Microsoft.Iris.Layout.Alignment.Fill: + case Iris.Layout.Alignment.Unspecified: + case Iris.Layout.Alignment.Fill: int dimension2 = this.LayoutMaximumSize.GetDimension(orientation); if (dimension2 > 0) { int val2 = dimension2 + this.Margins.Size.GetDimension(orientation); num = Math.Min(dimension1, val2); - goto case Microsoft.Iris.Layout.Alignment.Near; + goto case Iris.Layout.Alignment.Near; } else { num = dimension1; - goto case Microsoft.Iris.Layout.Alignment.Near; + goto case Iris.Layout.Alignment.Near; } - case Microsoft.Iris.Layout.Alignment.Near: + case Iris.Layout.Alignment.Near: alignmentOffset.SetDimension(orientation, 0); break; - case Microsoft.Iris.Layout.Alignment.Center: + case Iris.Layout.Alignment.Center: alignmentOffset.SetDimension(orientation, (dimension1 - num) / 2); break; - case Microsoft.Iris.Layout.Alignment.Far: + case Iris.Layout.Alignment.Far: alignmentOffset.SetDimension(orientation, dimension1 - num); break; } @@ -1511,13 +1511,13 @@ namespace Microsoft.Iris.UI public void MarkLayoutOutputDirty(bool forceFlag) { - if (!forceFlag && this.GetBit(ViewItem.Bits.OutputSelfDirty)) + if (!forceFlag && this.GetBit(Bits.OutputSelfDirty)) return; - this.SetBit(ViewItem.Bits.OutputSelfDirty, true); + this.SetBit(Bits.OutputSelfDirty, true); ViewItem viewItem = this; do { - viewItem.SetBit(ViewItem.Bits.OutputTreeDirty, true); + viewItem.SetBit(Bits.OutputTreeDirty, true); ViewItem parent = viewItem.Parent; if (parent == null) { @@ -1526,7 +1526,7 @@ namespace Microsoft.Iris.UI } viewItem = parent; } - while (!viewItem.GetBit(ViewItem.Bits.OutputTreeDirty)); + while (!viewItem.GetBit(Bits.OutputTreeDirty)); } [Conditional("DEBUG")] @@ -1538,7 +1538,7 @@ namespace Microsoft.Iris.UI public void ApplyLayoutOutputs(bool visibilityChanging) { - if (!visibilityChanging && !this.GetBit(ViewItem.Bits.OutputTreeDirty)) + if (!visibilityChanging && !this.GetBit(Bits.OutputTreeDirty)) return; var args = new LayoutApplyParams() { @@ -1552,11 +1552,11 @@ namespace Microsoft.Iris.UI private void ApplyLayoutOutputWorker(ref ViewItem.LayoutApplyParams selfApplyParams) { - this.SetBit(ViewItem.Bits.OutputTreeDirty, false); + this.SetBit(Bits.OutputTreeDirty, false); bool flag1 = false; - if (selfApplyParams.visibilityChanging || selfApplyParams.offscreenChanging || this.GetBit(ViewItem.Bits.OutputSelfDirty)) + if (selfApplyParams.visibilityChanging || selfApplyParams.offscreenChanging || this.GetBit(Bits.OutputSelfDirty)) { - this.SetBit(ViewItem.Bits.OutputSelfDirty, false); + this.SetBit(Bits.OutputSelfDirty, false); bool flag2 = false; bool offscreenChange = false; if (this._ownerUI == null) @@ -1588,7 +1588,7 @@ namespace Microsoft.Iris.UI { foreach (ViewItem child in this.Children) { - if (selfApplyParams.visibilityChanging || selfApplyParams.offscreenChanging || child.GetBit(ViewItem.Bits.OutputTreeDirty) || selfApplyParams.deepLayoutChanged && child.GetBit(ViewItem.Bits.DeepLayoutNotifyTree)) + if (selfApplyParams.visibilityChanging || selfApplyParams.offscreenChanging || child.GetBit(Bits.OutputTreeDirty) || selfApplyParams.deepLayoutChanged && child.GetBit(Bits.DeepLayoutNotifyTree)) { ViewItem.LayoutApplyParams selfApplyParams1 = new ViewItem.LayoutApplyParams(); selfApplyParams1.fullyVisible = selfApplyParams.fullyVisible; @@ -1602,20 +1602,20 @@ namespace Microsoft.Iris.UI } } } - if (selfApplyParams.deepLayoutChanged && this.GetBit(ViewItem.Bits.DeepLayoutNotifyTree)) + if (selfApplyParams.deepLayoutChanged && this.GetBit(Bits.DeepLayoutNotifyTree)) { - if (this.GetBit(ViewItem.Bits.DeepLayoutNotifySelf)) + if (this.GetBit(Bits.DeepLayoutNotifySelf)) { - if (this.GetEventHandler(ViewItem.s_deepLayoutChangeEvent) is EventHandler eventHandler) + if (this.GetEventHandler(s_deepLayoutChangeEvent) is EventHandler eventHandler) { eventHandler(this, EventArgs.Empty); selfApplyParams.anyDeepChangesDelivered = true; } else - this.SetBit(ViewItem.Bits.DeepLayoutNotifySelf, false); + this.SetBit(Bits.DeepLayoutNotifySelf, false); } if (!selfApplyParams.anyDeepChangesDelivered) - this.SetBit(ViewItem.Bits.DeepLayoutNotifyTree, false); + this.SetBit(Bits.DeepLayoutNotifyTree, false); } if (!flag1) return; @@ -1782,10 +1782,10 @@ namespace Microsoft.Iris.UI public void PlayShowAnimation() { IAnimationProvider ab = null; - if (this.GetBit(ViewItem.Bits2.InsideContentChange)) + if (this.GetBit(Bits2.InsideContentChange)) { ab = this.GetAnimation(AnimationEventType.ContentChangeShow); - this.SetBit(ViewItem.Bits2.InsideContentChange, false); + this.SetBit(Bits2.InsideContentChange, false); } if (ab == null) ab = this.GetAnimation(AnimationEventType.Show); @@ -1798,7 +1798,7 @@ namespace Microsoft.Iris.UI public void PlayHideAnimation(OrphanedVisualCollection orphans) { IAnimationProvider animationProvider = null; - if (this.GetBit(ViewItem.Bits2.InsideContentChange)) + if (this.GetBit(Bits2.InsideContentChange)) animationProvider = this.GetAnimation(AnimationEventType.ContentChangeHide); if (animationProvider == null) animationProvider = this.GetAnimation(AnimationEventType.Hide); @@ -1822,12 +1822,12 @@ namespace Microsoft.Iris.UI { Vector activeAnimations = this.GetActiveAnimations(false); this.TransferAnimationsList(orphans, activeAnimations, new EventHandler(this.OnAnimationComplete)); - this.SetData(ViewItem.s_activeAnimationsProperty, null); - this.SetBit(ViewItem.Bits.ActiveAnimations, false); + this.SetData(s_activeAnimationsProperty, null); + this.SetBit(Bits.ActiveAnimations, false); Vector idleAnimations = this.GetIdleAnimations(false); this.TransferAnimationsList(orphans, idleAnimations, new EventHandler(this.OnIdleAnimationComplete)); - this.SetData(ViewItem.s_idleAnimationsProperty, null); - this.SetBit(ViewItem.Bits.IdleAnimations, false); + this.SetData(s_idleAnimationsProperty, null); + this.SetBit(Bits.IdleAnimations, false); this.OnAnimationListChanged(); } @@ -1848,7 +1848,7 @@ namespace Microsoft.Iris.UI } } - public Dictionary GetAnimationSet() => !this.GetBit(ViewItem.Bits.AnimationBuilders) ? null : (Dictionary)this.GetData(ViewItem.s_animationBuildersProperty); + public Dictionary GetAnimationSet() => !this.GetBit(Bits.AnimationBuilders) ? null : (Dictionary)this.GetData(s_animationBuildersProperty); public IAnimationProvider GetAnimation(AnimationEventType type) { @@ -1876,7 +1876,7 @@ namespace Microsoft.Iris.UI this.SetAnimationHandle(type, null); } - private Dictionary GetAnimationHandleSet() => !this.GetBit(ViewItem.Bits2.AnimationHandles) ? null : (Dictionary)this.GetData(ViewItem.s_animationHandlesProperty); + private Dictionary GetAnimationHandleSet() => !this.GetBit(Bits2.AnimationHandles) ? null : (Dictionary)this.GetData(s_animationHandlesProperty); public AnimationHandle GetAnimationHandle(AnimationEventType type) { @@ -1895,8 +1895,8 @@ namespace Microsoft.Iris.UI if (dictionary == null && flag) { dictionary = new Dictionary(); - this.SetData(ViewItem.s_animationHandlesProperty, dictionary); - this.SetBit(ViewItem.Bits2.AnimationHandles, true); + this.SetData(s_animationHandlesProperty, dictionary); + this.SetBit(Bits2.AnimationHandles, true); } if (dictionary == null) return; @@ -1909,8 +1909,8 @@ namespace Microsoft.Iris.UI dictionary.Remove(type); if (dictionary.Count != 0) return; - this.SetData(ViewItem.s_animationHandlesProperty, null); - this.SetBit(ViewItem.Bits2.AnimationHandles, false); + this.SetData(s_animationHandlesProperty, null); + this.SetBit(Bits2.AnimationHandles, false); } } @@ -1980,8 +1980,8 @@ namespace Microsoft.Iris.UI this.OnAnimationListChanged(); if (activeAnimations.Count == 0) { - this.SetData(ViewItem.s_activeAnimationsProperty, null); - this.SetBit(ViewItem.Bits.ActiveAnimations, false); + this.SetData(s_activeAnimationsProperty, null); + this.SetBit(Bits.ActiveAnimations, false); this.TryToPlayIdleAnimation(); } if (activeSequence.Template is Animation template && template.DisableMouseInput) @@ -1998,8 +1998,8 @@ namespace Microsoft.Iris.UI this.OnAnimationListChanged(); if (idleAnimations.Count == 0) { - this.SetData(ViewItem.s_idleAnimationsProperty, null); - this.SetBit(ViewItem.Bits.IdleAnimations, false); + this.SetData(s_idleAnimationsProperty, null); + this.SetBit(Bits.IdleAnimations, false); } activeSequence.Dispose(this); } @@ -2055,7 +2055,7 @@ namespace Microsoft.Iris.UI private void StopActiveAnimations() { - if (!this.GetBit(ViewItem.Bits.ActiveAnimations)) + if (!this.GetBit(Bits.ActiveAnimations)) return; foreach (ActiveSequence activeAnimation in this.GetActiveAnimations(true)) activeAnimation.Stop(); @@ -2083,8 +2083,8 @@ namespace Microsoft.Iris.UI if (dictionary == null && flag) { dictionary = new Dictionary(); - this.SetData(ViewItem.s_animationBuildersProperty, dictionary); - this.SetBit(ViewItem.Bits.AnimationBuilders, true); + this.SetData(s_animationBuildersProperty, dictionary); + this.SetBit(Bits.AnimationBuilders, true); } if (dictionary != null) { @@ -2097,8 +2097,8 @@ namespace Microsoft.Iris.UI dictionary.Remove(type); if (dictionary.Count == 0) { - this.SetData(ViewItem.s_animationBuildersProperty, null); - this.SetBit(ViewItem.Bits.AnimationBuilders, false); + this.SetData(s_animationBuildersProperty, null); + this.SetBit(Bits.AnimationBuilders, false); } } } @@ -2106,7 +2106,7 @@ namespace Microsoft.Iris.UI return; if (flag) { - if (this.GetBit(ViewItem.Bits.ActiveAnimations)) + if (this.GetBit(Bits.ActiveAnimations)) return; this.TryToPlayIdleAnimation(); } @@ -2114,9 +2114,9 @@ namespace Microsoft.Iris.UI this.StopIdleAnimation(); } - private Vector GetActiveAnimations(bool createIfNone) => this.GetAnimationSequence(ViewItem.Bits.ActiveAnimations, ViewItem.s_activeAnimationsProperty, createIfNone); + private Vector GetActiveAnimations(bool createIfNone) => this.GetAnimationSequence(Bits.ActiveAnimations, s_activeAnimationsProperty, createIfNone); - private Vector GetIdleAnimations(bool createIfNone) => this.GetAnimationSequence(ViewItem.Bits.IdleAnimations, ViewItem.s_idleAnimationsProperty, createIfNone); + private Vector GetIdleAnimations(bool createIfNone) => this.GetAnimationSequence(Bits.IdleAnimations, s_idleAnimationsProperty, createIfNone); private Vector GetAnimationSequence( ViewItem.Bits propertyHint, @@ -2140,7 +2140,7 @@ namespace Microsoft.Iris.UI private void OnAnimationListChanged() { - if (!this.ChangeBit(ViewItem.Bits2.IsAlphaAnimationPlaying, ViewItem.DoesAnimationListContainAnimationType(this.GetActiveAnimations(false), ActiveTransitions.Alpha) || ViewItem.DoesAnimationListContainAnimationType(this.GetIdleAnimations(false), ActiveTransitions.Alpha)) || Alpha != 0.0) + if (!this.ChangeBit(Bits2.IsAlphaAnimationPlaying, DoesAnimationListContainAnimationType(this.GetActiveAnimations(false), ActiveTransitions.Alpha) || DoesAnimationListContainAnimationType(this.GetIdleAnimations(false), ActiveTransitions.Alpha)) || Alpha != 0.0) return; this.OnVisibilityChange(); } @@ -2162,10 +2162,10 @@ namespace Microsoft.Iris.UI public bool MouseInteractive { - get => this.GetBit(ViewItem.Bits.MouseInteractive); + get => this.GetBit(Bits.MouseInteractive); set { - if (!this.ChangeBit(ViewItem.Bits.MouseInteractive, value)) + if (!this.ChangeBit(Bits.MouseInteractive, value)) return; this.UI.UpdateMouseHandling(this); this.FireNotification(NotificationID.MouseInteractive); @@ -2174,10 +2174,10 @@ namespace Microsoft.Iris.UI public bool ClipMouse { - get => this.GetBit(ViewItem.Bits.ClipMouse); + get => this.GetBit(Bits.ClipMouse); set { - if (!this.ChangeBit(ViewItem.Bits.ClipMouse, value) || this.UI == null) + if (!this.ChangeBit(Bits.ClipMouse, value) || this.UI == null) return; this.UI.UpdateMouseHandling(this); } @@ -2215,7 +2215,7 @@ namespace Microsoft.Iris.UI this.VisualAlpha = this.Alpha; this.VisualRotation = this.Rotation; this.VisualCenterPoint = this.CenterPointPercent; - if (this.GetBit(ViewItem.Bits.PendingNavigateInto) && !this.GetBit(ViewItem.Bits.PendingNavigateIntoScheduled)) + if (this.GetBit(Bits.PendingNavigateInto) && !this.GetBit(Bits.PendingNavigateIntoScheduled)) this.ScheduleNavigateInto(); this.MarkPaintInvalid(); } @@ -2252,13 +2252,13 @@ namespace Microsoft.Iris.UI set { this._container = value; - if (!this.GetBit(ViewItem.Bits2.HasCamera)) + if (!this.GetBit(Bits2.HasCamera)) return; - this._container.Camera = ((Camera)this.GetData(ViewItem.s_cameraProperty)).APICamera; + this._container.Camera = ((Camera)this.GetData(s_cameraProperty)).APICamera; } } - private bool IsVisibleToRenderer => this.HasVisual || this.GetBit(ViewItem.Bits2.InsideContentChange); + private bool IsVisibleToRenderer => this.HasVisual || this.GetBit(Bits2.InsideContentChange); public void ForceContentChange() { @@ -2267,7 +2267,7 @@ namespace Microsoft.Iris.UI Dictionary animationSet = this.GetAnimationSet(); if (animationSet == null || !animationSet.ContainsKey(AnimationEventType.ContentChangeShow) && !animationSet.ContainsKey(AnimationEventType.ContentChangeHide)) return; - this.SetBit(ViewItem.Bits2.InsideContentChange, true); + this.SetBit(Bits2.InsideContentChange, true); if (this.UI == null) return; this.UI.DestroyVisualTree(this, true); @@ -2309,7 +2309,7 @@ namespace Microsoft.Iris.UI return false; Vector3 parentOffsetPxlVector; Vector3 scaleVector; - ViewItem.GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); + GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); positionPxlVector = parentOffsetPxlVector; Vector2 visualSize = this.VisualSize; sizePxlVector = new Vector3(visualSize.X, visualSize.Y, 0.0f) * scaleVector; @@ -2324,10 +2324,10 @@ namespace Microsoft.Iris.UI { parentOffsetPxlVector = Vector3.Zero; scaleVector = Vector3.UnitVector; - ArrayList arrayList = ViewItem.s_pathListCache.Acquire(); + ArrayList arrayList = s_pathListCache.Acquire(); if (!((ViewItem)childStart).GetParentChain(childStop as ViewItem, arrayList)) { - ViewItem.s_pathListCache.Release(arrayList); + s_pathListCache.Release(arrayList); } else { @@ -2350,7 +2350,7 @@ namespace Microsoft.Iris.UI parentOffsetPxlVector += vector3_1 * scaleVector; scaleVector *= vector3_2; } - ViewItem.s_pathListCache.Release(arrayList); + s_pathListCache.Release(arrayList); } } @@ -2358,7 +2358,7 @@ namespace Microsoft.Iris.UI { Vector3 parentOffsetPxlVector; Vector3 scaleVector; - ViewItem.GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); + GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); rect.X -= parentOffsetPxlVector.X; rect.Y -= parentOffsetPxlVector.Y; rect.X /= scaleVector.X; @@ -2372,7 +2372,7 @@ namespace Microsoft.Iris.UI { Vector3 parentOffsetPxlVector; Vector3 scaleVector; - ViewItem.GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); + GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); rect.X *= scaleVector.X; rect.Y *= scaleVector.Y; rect.Width *= scaleVector.X; @@ -2386,7 +2386,7 @@ namespace Microsoft.Iris.UI { Vector3 parentOffsetPxlVector; Vector3 scaleVector; - ViewItem.GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); + GetAccumulatedOffsetAndScale(this, ancestor, out parentOffsetPxlVector, out scaleVector); Vector2 vector2 = this.HasVisual ? this.VisualSize : Vector2.Zero; return new RectangleF(parentOffsetPxlVector.X, parentOffsetPxlVector.Y, vector2.X * scaleVector.X, vector2.Y * scaleVector.Y); } @@ -2432,9 +2432,9 @@ namespace Microsoft.Iris.UI protected virtual void OnLayoutComplete(ViewItem sender) { - if (this.GetEventHandler(ViewItem.s_layoutCompleteEvent) is LayoutCompleteEventHandler eventHandler) + if (this.GetEventHandler(s_layoutCompleteEvent) is LayoutCompleteEventHandler eventHandler) eventHandler(sender); - if (!this.GetBit(ViewItem.Bits2.HasLayoutOutput)) + if (!this.GetBit(Bits2.HasLayoutOutput)) return; this.LayoutOutput.OnLayoutComplete(this.LayoutSize); } @@ -2450,8 +2450,8 @@ namespace Microsoft.Iris.UI public event LayoutCompleteEventHandler LayoutComplete { - add => this.AddEventHandler(ViewItem.s_layoutCompleteEvent, value); - remove => this.RemoveEventHandler(ViewItem.s_layoutCompleteEvent, value); + add => this.AddEventHandler(s_layoutCompleteEvent, value); + remove => this.RemoveEventHandler(s_layoutCompleteEvent, value); } internal void ClearStickyFocus() => NavigationServices.ClearDefaultFocus(this); @@ -2460,9 +2460,9 @@ namespace Microsoft.Iris.UI { if (this.PendingScrollIntoView) return; - this.SetBit(ViewItem.Bits2.PendingScrollIntoView, true); + this.SetBit(Bits2.PendingScrollIntoView, true); this.LockVisible(true); - DeferredCall.Post(DispatchPriority.LayoutSync, ViewItem.s_scrollIntoViewCleanup, this); + DeferredCall.Post(DispatchPriority.LayoutSync, s_scrollIntoViewCleanup, this); } private static void CleanUpAfterScrollIntoView(object obj) => ((ViewItem)obj).CleanUpAfterScrollIntoView(); @@ -2471,12 +2471,12 @@ namespace Microsoft.Iris.UI { if (!this.PendingScrollIntoView) return; - this.SetBit(ViewItem.Bits2.PendingScrollIntoView, false); + this.SetBit(Bits2.PendingScrollIntoView, false); this.UnlockVisible(); this.HACK_RemoveCachedScrollIntoViewAreasOfInterest(); } - public bool PendingScrollIntoView => this.GetBit(ViewItem.Bits2.PendingScrollIntoView); + public bool PendingScrollIntoView => this.GetBit(Bits2.PendingScrollIntoView); public virtual bool DiscardOffscreenVisuals { @@ -2512,19 +2512,19 @@ namespace Microsoft.Iris.UI public void NavigateInto(bool isDefault) { - if (this.ChangeBit(ViewItem.Bits.PendingNavigateInto, true)) + if (this.ChangeBit(Bits.PendingNavigateInto, true)) { this.LockVisible(!this.IsVisibleToRenderer); if (this.IsVisibleToRenderer) this.ScheduleNavigateInto(); } - this.SetBit(ViewItem.Bits.PendingNavigateIntoIsDefault, isDefault); + this.SetBit(Bits.PendingNavigateIntoIsDefault, isDefault); } private void ScheduleNavigateInto() { DeferredCall.Post(DispatchPriority.LayoutSync, new SimpleCallback(this.NavigateIntoWorker)); - this.SetBit(ViewItem.Bits.PendingNavigateIntoScheduled, true); + this.SetBit(Bits.PendingNavigateIntoScheduled, true); } private void NavigateIntoWorker() @@ -2532,12 +2532,12 @@ namespace Microsoft.Iris.UI if (this.IsDisposed) return; this.UnlockVisible(); - this.SetBit(ViewItem.Bits.PendingNavigateInto, false); - this.SetBit(ViewItem.Bits.PendingNavigateIntoScheduled, false); + this.SetBit(Bits.PendingNavigateInto, false); + this.SetBit(Bits.PendingNavigateIntoScheduled, false); INavigationSite resultSite; if (!NavigationServices.FindNextWithin(this, Direction.Next, RectangleF.Zero, out resultSite) || resultSite == null || !(resultSite is ViewItem viewItem)) return; - viewItem.UI.NotifyNavigationDestination(this.GetBit(ViewItem.Bits.PendingNavigateIntoIsDefault) ? KeyFocusReason.Default : KeyFocusReason.Other); + viewItem.UI.NotifyNavigationDestination(this.GetBit(Bits.PendingNavigateIntoIsDefault) ? KeyFocusReason.Default : KeyFocusReason.Other); } public NavigationPolicies Navigation @@ -2545,9 +2545,9 @@ namespace Microsoft.Iris.UI get { NavigationPolicies navigationPolicies = NavigationPolicies.None; - if (this.GetBit(ViewItem.Bits.HasNavMode)) + if (this.GetBit(Bits.HasNavMode)) { - object data = this.GetData(ViewItem.s_navModeProperty); + object data = this.GetData(s_navModeProperty); if (data != null) navigationPolicies = (NavigationPolicies)data; } @@ -2557,16 +2557,16 @@ namespace Microsoft.Iris.UI { if (value != NavigationPolicies.None) { - this.SetData(ViewItem.s_navModeProperty, value); - this.SetBit(ViewItem.Bits.HasNavMode, true); + this.SetData(s_navModeProperty, value); + this.SetBit(Bits.HasNavMode, true); this.FireNotification(NotificationID.Navigation); } else { - if (!this.GetBit(ViewItem.Bits.HasNavMode)) + if (!this.GetBit(Bits.HasNavMode)) return; - this.SetData(ViewItem.s_navModeProperty, null); - this.SetBit(ViewItem.Bits.HasNavMode, false); + this.SetData(s_navModeProperty, null); + this.SetBit(Bits.HasNavMode, false); this.FireNotification(NotificationID.Navigation); } } @@ -2579,9 +2579,9 @@ namespace Microsoft.Iris.UI get { int num = int.MaxValue; - if (this.GetBit(ViewItem.Bits.HasFocusOrder)) + if (this.GetBit(Bits.HasFocusOrder)) { - object data = this.GetData(ViewItem.s_focusOrderProperty); + object data = this.GetData(s_focusOrderProperty); if (data != null) num = (int)data; } @@ -2591,16 +2591,16 @@ namespace Microsoft.Iris.UI { if (value != int.MaxValue) { - this.SetData(ViewItem.s_focusOrderProperty, value); - this.SetBit(ViewItem.Bits.HasFocusOrder, true); + this.SetData(s_focusOrderProperty, value); + this.SetBit(Bits.HasFocusOrder, true); this.FireNotification(NotificationID.FocusOrder); } else { - if (!this.GetBit(ViewItem.Bits.HasFocusOrder)) + if (!this.GetBit(Bits.HasFocusOrder)) return; - this.SetData(ViewItem.s_focusOrderProperty, null); - this.SetBit(ViewItem.Bits.HasFocusOrder, false); + this.SetData(s_focusOrderProperty, null); + this.SetBit(Bits.HasFocusOrder, false); this.FireNotification(NotificationID.FocusOrder); } } @@ -2655,8 +2655,8 @@ namespace Microsoft.Iris.UI object INavigationSite.StateCache { - get => this.GetData(ViewItem.s_navCacheProperty); - set => this.SetData(ViewItem.s_navCacheProperty, value); + get => this.GetData(s_navCacheProperty); + set => this.SetData(s_navCacheProperty, value); } internal virtual void FaultInChild(ViewItemID component, ChildFaultedInDelegate handler) @@ -2723,7 +2723,7 @@ namespace Microsoft.Iris.UI protected bool GetBit(ViewItem.Bits2 lookupBit) => this._bits2[(int)lookupBit]; - private uint GetBitAsUInt(ViewItem.Bits lookupBit) => ((ViewItem.Bits)this._bits.Data & lookupBit) == ~(ViewItem.Bits.PendingNavigateInto | ViewItem.Bits.PendingNavigateIntoIsDefault | ViewItem.Bits.PendingNavigateIntoScheduled | ViewItem.Bits.ClipMouse | ViewItem.Bits.MouseInteractive | ViewItem.Bits.PaintInvalid | ViewItem.Bits.HasScale | ViewItem.Bits.ScaleChanged | ViewItem.Bits.LayoutInputMaxSize | ViewItem.Bits.LayoutInputMinSize | ViewItem.Bits.LayoutInputMargins | ViewItem.Bits.LayoutInputPadding | ViewItem.Bits.LayoutInputVisible | ViewItem.Bits.LayoutAlignment | ViewItem.Bits.LayoutChildAlignment | ViewItem.Bits.LayoutInputSharedSize | ViewItem.Bits.LayoutInputSharedSizePolicy | ViewItem.Bits.OutputSelfDirty | ViewItem.Bits.OutputTreeDirty | ViewItem.Bits.LayoutInvalid | ViewItem.Bits.ActiveAnimations | ViewItem.Bits.AnimationBuilders | ViewItem.Bits.IdleAnimations | ViewItem.Bits.HasNavMode | ViewItem.Bits.HasFocusOrder | ViewItem.Bits.DeepLayoutNotifySelf | ViewItem.Bits.DeepLayoutNotifyTree | ViewItem.Bits.Unused1 | ViewItem.Bits.Unused2 | ViewItem.Bits.Unused3 | ViewItem.Bits.Unused4 | ViewItem.Bits.Unused5) ? 0U : 1U; + private uint GetBitAsUInt(ViewItem.Bits lookupBit) => ((ViewItem.Bits)this._bits.Data & lookupBit) == ~(Bits.PendingNavigateInto | Bits.PendingNavigateIntoIsDefault | Bits.PendingNavigateIntoScheduled | Bits.ClipMouse | Bits.MouseInteractive | Bits.PaintInvalid | Bits.HasScale | Bits.ScaleChanged | Bits.LayoutInputMaxSize | Bits.LayoutInputMinSize | Bits.LayoutInputMargins | Bits.LayoutInputPadding | Bits.LayoutInputVisible | Bits.LayoutAlignment | Bits.LayoutChildAlignment | Bits.LayoutInputSharedSize | Bits.LayoutInputSharedSizePolicy | Bits.OutputSelfDirty | Bits.OutputTreeDirty | Bits.LayoutInvalid | Bits.ActiveAnimations | Bits.AnimationBuilders | Bits.IdleAnimations | Bits.HasNavMode | Bits.HasFocusOrder | Bits.DeepLayoutNotifySelf | Bits.DeepLayoutNotifyTree | Bits.Unused1 | Bits.Unused2 | Bits.Unused3 | Bits.Unused4 | Bits.Unused5) ? 0U : 1U; protected uint GetBitAsUInt(ViewItem.Bits2 lookupBit) => ((ViewItem.Bits2)this._bits2.Data & lookupBit) == 0 ? 0U : 1U; @@ -2751,13 +2751,13 @@ namespace Microsoft.Iris.UI public string Name { - get => (string)this.GetData(ViewItem.s_nameProperty); + get => (string)this.GetData(s_nameProperty); set { - if (!((string)this.GetData(ViewItem.s_nameProperty) != value)) + if (!((string)this.GetData(s_nameProperty) != value)) return; string str = NotifyService.CanonicalizeString(value); - this.SetData(ViewItem.s_nameProperty, str); + this.SetData(s_nameProperty, str); } } @@ -2765,14 +2765,14 @@ namespace Microsoft.Iris.UI { get { - object data = this.GetData(ViewItem.s_debugOutlineProperty); + object data = this.GetData(s_debugOutlineProperty); return data == null ? Color.Transparent : (Color)data; } set { if (!(this.DebugOutline != value)) return; - this.SetData(ViewItem.s_debugOutlineProperty, value); + this.SetData(s_debugOutlineProperty, value); this.FireNotification(NotificationID.DebugOutline); } } diff --git a/UIX/Microsoft/Iris/ViewItems/CountLayoutInput.cs b/UIX/Microsoft/Iris/ViewItems/CountLayoutInput.cs index f2d1cb0..2701185 100644 --- a/UIX/Microsoft/Iris/ViewItems/CountLayoutInput.cs +++ b/UIX/Microsoft/Iris/ViewItems/CountLayoutInput.cs @@ -22,9 +22,9 @@ namespace Microsoft.Iris.ViewItems set => this._count = value; } - DataCookie ILayoutInput.Data => CountLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; - public static DataCookie Data => CountLayoutInput.s_dataProperty; + public static DataCookie Data => s_dataProperty; public override string ToString() => InvariantString.Format("{0}(Count={1})", this.GetType().Name, _count); } diff --git a/UIX/Microsoft/Iris/ViewItems/Graphic.cs b/UIX/Microsoft/Iris/ViewItems/Graphic.cs index c0c2936..198acf1 100644 --- a/UIX/Microsoft/Iris/ViewItems/Graphic.cs +++ b/UIX/Microsoft/Iris/ViewItems/Graphic.cs @@ -43,20 +43,20 @@ namespace Microsoft.Iris.ViewItems public static void EnsureFallbackImages() { - if (Graphic.s_AcquiringDefaultImage != null) + if (s_AcquiringDefaultImage != null) return; - Graphic.s_AcquiringDefaultImage = new UriImage(Graphic.s_AcquiringDefaultImageUri, new Inset(3, 3, 53, 53), Size.Zero, false); - Graphic.s_AcquiringDefaultImage.Load(); - Graphic.s_ErrorDefaultImage = new UriImage(Graphic.s_ErrorDefaultImageUri, new Inset(3, 3, 53, 53), Size.Zero, false); - Graphic.s_ErrorDefaultImage.Load(); + s_AcquiringDefaultImage = new UriImage(s_AcquiringDefaultImageUri, new Inset(3, 3, 53, 53), Size.Zero, false); + s_AcquiringDefaultImage.Load(); + s_ErrorDefaultImage = new UriImage(s_ErrorDefaultImageUri, new Inset(3, 3, 53, 53), Size.Zero, false); + s_ErrorDefaultImage.Load(); } protected override void OnDispose() { this.ReleaseInUseImage(this._contentImage, null); this.ReleaseInUseImage(this._preloadImage, null); - this.ReleaseInUseImage(this.AcquiringImage, Graphic.s_AcquiringDefaultImage); - this.ReleaseInUseImage(this.ErrorImage, Graphic.s_ErrorDefaultImage); + this.ReleaseInUseImage(this.AcquiringImage, s_AcquiringDefaultImage); + this.ReleaseInUseImage(this.ErrorImage, s_ErrorDefaultImage); this._preloadImage = null; this._contentImage = null; this.AsyncLoadCompleteHandler = null; @@ -97,14 +97,14 @@ namespace Microsoft.Iris.ViewItems public UIImage AcquiringImage { - get => this.GetStatusImage(Graphic.s_acquiringImageProperty, Graphic.s_AcquiringDefaultImage); - set => this.SetStatusImage(value, NotificationID.AcquiringImage, Graphic.s_acquiringImageProperty, Graphic.s_AcquiringDefaultImage); + get => this.GetStatusImage(s_acquiringImageProperty, s_AcquiringDefaultImage); + set => this.SetStatusImage(value, NotificationID.AcquiringImage, s_acquiringImageProperty, s_AcquiringDefaultImage); } public UIImage ErrorImage { - get => this.GetStatusImage(Graphic.s_errorImageProperty, Graphic.s_ErrorDefaultImage); - set => this.SetStatusImage(value, NotificationID.ErrorImage, Graphic.s_errorImageProperty, Graphic.s_ErrorDefaultImage); + get => this.GetStatusImage(s_errorImageProperty, s_ErrorDefaultImage); + set => this.SetStatusImage(value, NotificationID.ErrorImage, s_errorImageProperty, s_ErrorDefaultImage); } public UIImage PreloadContent @@ -125,7 +125,7 @@ namespace Microsoft.Iris.ViewItems private UIImage GetStatusImage(DataCookie cookie, UIImage defaultImage) { object data = this.GetData(cookie); - return data != null ? (data != Graphic.s_NullImage ? (UIImage)data : null) : defaultImage; + return data != null ? (data != s_NullImage ? (UIImage)data : null) : defaultImage; } private void SetStatusImage( @@ -147,7 +147,7 @@ namespace Microsoft.Iris.ViewItems value.AddUser(this); } else - obj = Graphic.s_NullImage; + obj = s_NullImage; this.ReleaseInUseImage(statusImage, defaultImage); this.SetData(cookie, obj); this.MarkPaintInvalid(); @@ -307,8 +307,8 @@ namespace Microsoft.Iris.ViewItems private ContentLoadCompleteHandler AsyncLoadCompleteHandler { - get => (ContentLoadCompleteHandler)this.GetData(Graphic.s_pendingLoadCompleteHandlerProperty); - set => this.SetData(Graphic.s_pendingLoadCompleteHandlerProperty, value); + get => (ContentLoadCompleteHandler)this.GetData(s_pendingLoadCompleteHandlerProperty); + set => this.SetData(s_pendingLoadCompleteHandlerProperty, value); } public void CommitPreload() => this.Content = this.PreloadContent; diff --git a/UIX/Microsoft/Iris/ViewItems/Host.cs b/UIX/Microsoft/Iris/ViewItems/Host.cs index 0cce3e5..8d612f3 100644 --- a/UIX/Microsoft/Iris/ViewItems/Host.cs +++ b/UIX/Microsoft/Iris/ViewItems/Host.cs @@ -31,7 +31,7 @@ namespace Microsoft.Iris.ViewItems private string _loadNotifyURI; private HostRequestPacket _pendingHostRequest; private uint _islandId; - private static DeferredHandler s_startRequestHandler = new DeferredHandler(Host.StartSourceRequest); + private static DeferredHandler s_startRequestHandler = new DeferredHandler(StartSourceRequest); public Host() : this(null, null) @@ -109,7 +109,7 @@ namespace Microsoft.Iris.ViewItems hostRequestPacket.Properties = properties; this._pendingHostRequest = hostRequestPacket; this._lastRequestedSource = source; - DeferredCall.Post(DispatchPriority.High, Host.s_startRequestHandler, hostRequestPacket); + DeferredCall.Post(DispatchPriority.High, s_startRequestHandler, hostRequestPacket); } public void Cancel() @@ -139,7 +139,7 @@ namespace Microsoft.Iris.ViewItems LoadResult loadResult = null; string uiToCreate = null; if (type == null && source != null) - loadResult = MarkupSystem.Load(Host.CrackSourceUri(source, out uiToCreate), host.InheritedIslandId); + loadResult = MarkupSystem.Load(CrackSourceUri(source, out uiToCreate), host.InheritedIslandId); host.CompleteSourceRequest(source, type, properties, loadResult, uiToCreate); } finally diff --git a/UIX/Microsoft/Iris/ViewItems/HwndHost.cs b/UIX/Microsoft/Iris/ViewItems/HwndHost.cs index 346e924..ee687ee 100644 --- a/UIX/Microsoft/Iris/ViewItems/HwndHost.cs +++ b/UIX/Microsoft/Iris/ViewItems/HwndHost.cs @@ -104,7 +104,7 @@ namespace Microsoft.Iris.ViewItems return; Vector3 parentOffsetPxlVector; Vector3 scaleVector; - ViewItem.GetAccumulatedOffsetAndScale(this, null, out parentOffsetPxlVector, out scaleVector); + GetAccumulatedOffsetAndScale(this, null, out parentOffsetPxlVector, out scaleVector); Vector2 visualSize = this.VisualSize; this._window.ClientPosition = new Point((int)Math.Round(parentOffsetPxlVector.X), (int)Math.Round(parentOffsetPxlVector.Y)); this._window.WindowSize = new Size(Math2.RoundUp(scaleVector.X * visualSize.X), Math2.RoundUp(scaleVector.Y * visualSize.Y)); diff --git a/UIX/Microsoft/Iris/ViewItems/ImageLayout.cs b/UIX/Microsoft/Iris/ViewItems/ImageLayout.cs index 7f56a15..d62c2ab 100644 --- a/UIX/Microsoft/Iris/ViewItems/ImageLayout.cs +++ b/UIX/Microsoft/Iris/ViewItems/ImageLayout.cs @@ -53,7 +53,7 @@ namespace Microsoft.Iris.ViewItems size = Size.Min(Size.Max(this._minimumSize, this._sourceExtent), constraint); if (this._maintainAspectRatio && this._sourceExtent != Size.Zero && size != this._sourceExtent) { - Size sz1 = ImageLayout.SmallestFillingFit(this._sourceExtent, size); + Size sz1 = SmallestFillingFit(this._sourceExtent, size); if (sz1.Height > constraint.Height || sz1.Width > constraint.Width) sz1 = Size.LargestFit(this._sourceExtent, constraint); size = Size.Min(sz1, constraint); diff --git a/UIX/Microsoft/Iris/ViewItems/IndexLayoutInput.cs b/UIX/Microsoft/Iris/ViewItems/IndexLayoutInput.cs index 1c5d719..035d759 100644 --- a/UIX/Microsoft/Iris/ViewItems/IndexLayoutInput.cs +++ b/UIX/Microsoft/Iris/ViewItems/IndexLayoutInput.cs @@ -25,9 +25,9 @@ namespace Microsoft.Iris.ViewItems public IndexType Type => this._type; - DataCookie ILayoutInput.Data => IndexLayoutInput.Data; + DataCookie ILayoutInput.Data => Data; - public static DataCookie Data => IndexLayoutInput.s_dataProperty; + public static DataCookie Data => s_dataProperty; public override string ToString() => InvariantString.Format("{0}(Index={1}, Type={2})", this.GetType().Name, Index, _type); } diff --git a/UIX/Microsoft/Iris/ViewItems/Repeater.cs b/UIX/Microsoft/Iris/ViewItems/Repeater.cs index 136ac0e..6e508f9 100644 --- a/UIX/Microsoft/Iris/ViewItems/Repeater.cs +++ b/UIX/Microsoft/Iris/ViewItems/Repeater.cs @@ -42,15 +42,15 @@ namespace Microsoft.Iris.ViewItems private ViewItem _lastMouseFocusedItem; private RepeaterContentSelector _contentSelector; private LayoutCompleteEventHandler _repeatedItemLayoutComplete; - private static ChildFaultedInDelegate s_scrollIndexIntoViewHandler = new ChildFaultedInDelegate(Repeater.ScrollIndexIntoViewItemFaultedIn); - private static ChildFaultedInDelegate s_navigateIntoIndexHandler = new ChildFaultedInDelegate(Repeater.NavigateIntoIndexItemFaultedIn); + private static ChildFaultedInDelegate s_scrollIndexIntoViewHandler = new ChildFaultedInDelegate(ScrollIndexIntoViewItemFaultedIn); + private static ChildFaultedInDelegate s_navigateIntoIndexHandler = new ChildFaultedInDelegate(NavigateIntoIndexItemFaultedIn); private static string[] s_repeatedItemParameters = new string[2] { "RepeatedItem", "RepeatedItemIndex" }; private static string c_childIDSentinel = "Repeater child#"; - private static DeferredHandler s_listContentsChangedHandler = new DeferredHandler(Repeater.AsyncListContentsChangedHandler); + private static DeferredHandler s_listContentsChangedHandler = new DeferredHandler(AsyncListContentsChangedHandler); private static object s_unavailableObject = new object(); protected override void OnDispose() @@ -258,7 +258,7 @@ namespace Microsoft.Iris.ViewItems } else { - if (Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, 5)) + if (Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, 5)) { int num = this._pendingIndexRequest.HasValue ? 1 : 0; } @@ -389,7 +389,7 @@ namespace Microsoft.Iris.ViewItems int generationValue, object dataItemObject) { - if (dataItemObject == Repeater.UnavailableItem) + if (dataItemObject == UnavailableItem) return; bool flag = false; IVirtualList source = null; @@ -437,7 +437,7 @@ namespace Microsoft.Iris.ViewItems out ViewItem repeatedItem, out ViewItem dividerItem) { - ParameterContext parameterContext = new ParameterContext(Repeater.s_repeatedItemParameters, new object[2] + ParameterContext parameterContext = new ParameterContext(s_repeatedItemParameters, new object[2] { dataItemObject, index @@ -641,7 +641,7 @@ namespace Microsoft.Iris.ViewItems private void QueueListContentsChanged(IList senderList, UIListContentsChangedArgs args) { RepeaterListContentsChangedArgs contentsChangedArgs = new RepeaterListContentsChangedArgs(args, this, this._sourceGeneration); - DeferredCall.Post(DispatchPriority.Normal, Repeater.s_listContentsChangedHandler, contentsChangedArgs); + DeferredCall.Post(DispatchPriority.Normal, s_listContentsChangedHandler, contentsChangedArgs); } private static void AsyncListContentsChangedHandler(object args) @@ -907,11 +907,11 @@ namespace Microsoft.Iris.ViewItems int dataOldIndex, int dataNewIndex) { - Microsoft.Iris.Library.TreeNode.LinkType lt = Microsoft.Iris.Library.TreeNode.LinkType.Before; + Microsoft.Iris.Library.TreeNode.LinkType lt = LinkType.Before; if (dataNewIndex > dataOldIndex) - lt = Microsoft.Iris.Library.TreeNode.LinkType.Behind; + lt = LinkType.Behind; ViewItem viewItem = itemFinal.Repeated; - if (itemFinal.Divider != null && lt == Microsoft.Iris.Library.TreeNode.LinkType.Before) + if (itemFinal.Divider != null && lt == LinkType.Before) viewItem = itemFinal.Divider; item.Repeated.MoveNode(viewItem, lt); if (this.DividerName != null) @@ -933,12 +933,12 @@ namespace Microsoft.Iris.ViewItems itemFinal.Divider = item.Divider; item.Divider = null; } - divider?.MoveNode(repeated, Microsoft.Iris.Library.TreeNode.LinkType.Before); + divider?.MoveNode(repeated, LinkType.Before); } return true; } - protected override ViewItemID IDForChild(ViewItem childItem) => new ViewItemID((childItem.GetLayoutInput(IndexLayoutInput.Data) as IndexLayoutInput).Index.Value, Repeater.c_childIDSentinel); + protected override ViewItemID IDForChild(ViewItem childItem) => new ViewItemID((childItem.GetLayoutInput(IndexLayoutInput.Data) as IndexLayoutInput).Index.Value, c_childIDSentinel); protected override FindChildResult ChildForID( ViewItemID part, @@ -946,7 +946,7 @@ namespace Microsoft.Iris.ViewItems { resultItem = null; FindChildResult findChildResult = FindChildResult.Failure; - if (part.IDValid && part.StringPartValid && part.StringPart == Repeater.c_childIDSentinel) + if (part.IDValid && part.StringPartValid && part.StringPart == c_childIDSentinel) { resultItem = this.GetRepeatedItemForVirtualIndex(part.ID); findChildResult = resultItem == null || !resultItem.HasVisual ? FindChildResult.PotentiallyFaultIn : FindChildResult.Success; @@ -978,7 +978,7 @@ namespace Microsoft.Iris.ViewItems if (itemForVirtualIndex != null) itemForVirtualIndex.ScrollIntoView(); else - this.FaultInChild(index, Repeater.PendingIndexRequestType.ScrollIndexIntoView, Repeater.s_scrollIndexIntoViewHandler); + this.FaultInChild(index, PendingIndexRequestType.ScrollIndexIntoView, s_scrollIndexIntoViewHandler); } private static void ScrollIndexIntoViewItemFaultedIn(ViewItem repeater, ViewItem faultedItem) @@ -1003,7 +1003,7 @@ namespace Microsoft.Iris.ViewItems { if (!allowFaultIn) return; - this.FaultInChild(index, Repeater.PendingIndexRequestType.NavigateIntoIndex, Repeater.s_navigateIntoIndexHandler); + this.FaultInChild(index, PendingIndexRequestType.NavigateIntoIndex, s_navigateIntoIndexHandler); } } @@ -1014,7 +1014,7 @@ namespace Microsoft.Iris.ViewItems faultedItem.NavigateInto(); } - internal override void FaultInChild(ViewItemID child, ChildFaultedInDelegate handler) => this.FaultInChild(child.ID, Repeater.PendingIndexRequestType.FaultInChild, handler); + internal override void FaultInChild(ViewItemID child, ChildFaultedInDelegate handler) => this.FaultInChild(child.ID, PendingIndexRequestType.FaultInChild, handler); private void FaultInChild( int virtualIndex, @@ -1041,13 +1041,13 @@ namespace Microsoft.Iris.ViewItems [Conditional("DEBUG")] private void DEBUG_DumpRepeatedItems(string st, byte level) { - if (!Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, level)) + if (!Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, level)) return; for (int index = 0; index < this._repeatedViewItems.Count; ++index) { Repeater.RepeatedViewItemSet repeatedViewItem = this._repeatedViewItems[index]; } - if (!Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, (byte)(level + 1U))) + if (!Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, (byte)(level + 1U))) return; foreach (ViewItem child in this.Children) ; @@ -1056,7 +1056,7 @@ namespace Microsoft.Iris.ViewItems [Conditional("DEBUG")] private void DEBUG_DumpRepeatedItem(Repeater.RepeatedViewItemSet item, byte level) { - if (!Microsoft.Iris.Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, level) || !ListUtility.IsValidIndex(this._source, item.DataIndex)) + if (!Debug.Trace.IsCategoryEnabled(TraceCategory.Repeating, level) || !ListUtility.IsValidIndex(this._source, item.DataIndex)) return; this._source[item.DataIndex]?.ToString(); } @@ -1076,7 +1076,7 @@ namespace Microsoft.Iris.ViewItems num = list[index].VirtualIndex; } - public static object UnavailableItem => Repeater.s_unavailableObject; + public static object UnavailableItem => s_unavailableObject; public delegate void ContentTypeHandler(object repeatObject, ref string contentName); diff --git a/UIX/Microsoft/Iris/ViewItems/Text.cs b/UIX/Microsoft/Iris/ViewItems/Text.cs index ef53352..1706d17 100644 --- a/UIX/Microsoft/Iris/ViewItems/Text.cs +++ b/UIX/Microsoft/Iris/ViewItems/Text.cs @@ -75,7 +75,7 @@ namespace Microsoft.Iris.ViewItems public Text() { this.Layout = this; - this._font = Microsoft.Iris.ViewItems.Text.s_defaultFont; + this._font = s_defaultFont; this._textColor = Color.Black; this._textHighlightColor = Color.White; this._backHighlightColor = Color.Black; @@ -84,17 +84,17 @@ namespace Microsoft.Iris.ViewItems this._maxLines = int.MaxValue; this._passwordChar = '•'; this._lineAlignment = LineAlignment.Near; - this._richTextRasterizer = Microsoft.Iris.ViewItems.Text.SharedNonOversampledRasterizer; + this._richTextRasterizer = SharedNonOversampledRasterizer; this._renderingHelper = new TextFlowRenderingHelper(); this.ContributesToWidth = true; this.TextFitsWidth = true; this.TextFitsHeight = true; this.SetClipped(false); this.MarkScaleDirty(); - if (Microsoft.Iris.ViewItems.Text.s_simpleTextMeasureAvailable) + if (s_simpleTextMeasureAvailable) return; - this.ClearBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasurePossible); - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasureValid); + this.ClearBit(Bits.FastMeasurePossible); + this.SetBit(Bits.FastMeasureValid); } public Text(UIClass ownerUI) @@ -123,29 +123,29 @@ namespace Microsoft.Iris.ViewItems public static void Uninitialize() { - if (Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer != null) + if (s_sharedOversampledRasterizer != null) { - Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer.Dispose(); - Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer = null; + s_sharedOversampledRasterizer.Dispose(); + s_sharedOversampledRasterizer = null; } - if (Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer != null) + if (s_sharedNonOversampledRasterizer != null) { - Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer.Dispose(); - Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer = null; + s_sharedNonOversampledRasterizer.Dispose(); + s_sharedNonOversampledRasterizer = null; } - if (Microsoft.Iris.ViewItems.Text.s_sharedSimpleTextRasterizer == null) + if (s_sharedSimpleTextRasterizer == null) return; - Microsoft.Iris.ViewItems.Text.s_sharedSimpleTextRasterizer.Dispose(); - Microsoft.Iris.ViewItems.Text.s_sharedSimpleTextRasterizer = null; + s_sharedSimpleTextRasterizer.Dispose(); + s_sharedSimpleTextRasterizer = null; } private static SimpleText SharedSimpleTextRasterizer { get { - if (Microsoft.Iris.ViewItems.Text.s_sharedSimpleTextRasterizer == null) - Microsoft.Iris.ViewItems.Text.s_sharedSimpleTextRasterizer = new SimpleText(); - return Microsoft.Iris.ViewItems.Text.s_sharedSimpleTextRasterizer; + if (s_sharedSimpleTextRasterizer == null) + s_sharedSimpleTextRasterizer = new SimpleText(); + return s_sharedSimpleTextRasterizer; } } @@ -153,13 +153,13 @@ namespace Microsoft.Iris.ViewItems { get { - if (Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer == null) + if (s_sharedOversampledRasterizer == null) { - Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer = new RichText(true); - Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer.Oversample = true; - Microsoft.Iris.ViewItems.Text.s_simpleTextMeasureAvailable = NativeApi.SpSimpleTextIsAvailable(); + s_sharedOversampledRasterizer = new RichText(true); + s_sharedOversampledRasterizer.Oversample = true; + s_simpleTextMeasureAvailable = NativeApi.SpSimpleTextIsAvailable(); } - return Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer; + return s_sharedOversampledRasterizer; } } @@ -167,12 +167,12 @@ namespace Microsoft.Iris.ViewItems { get { - if (Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer == null) + if (s_sharedNonOversampledRasterizer == null) { - Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer = new RichText(true); - Microsoft.Iris.ViewItems.Text.s_simpleTextMeasureAvailable = NativeApi.SpSimpleTextIsAvailable(); + s_sharedNonOversampledRasterizer = new RichText(true); + s_simpleTextMeasureAvailable = NativeApi.SpSimpleTextIsAvailable(); } - return Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer; + return s_sharedNonOversampledRasterizer; } } @@ -185,7 +185,7 @@ namespace Microsoft.Iris.ViewItems return; if (value != null && value.Length > 3) { - this._content = value.TrimEnd(Microsoft.Iris.ViewItems.Text.s_whitespaceChars); + this._content = value.TrimEnd(s_whitespaceChars); char ch1 = value[value.Length - 1]; char ch2 = value[value.Length - 2]; if (ch1 == ' ' && ch2 != ' ') @@ -200,12 +200,12 @@ namespace Microsoft.Iris.ViewItems } } - public void MarkScaleDirty() => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.ScaleDirty); + public void MarkScaleDirty() => this.SetBit(Bits.ScaleDirty); private bool InMeasure { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.InMeasure); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.InMeasure, value); + get => this.GetBit(Bits.InMeasure); + set => this.SetBit(Bits.InMeasure, value); } public void OnDisplayedContentChange() @@ -297,10 +297,10 @@ namespace Microsoft.Iris.ViewItems flag = true; break; } - if (this._richTextRasterizer == Microsoft.Iris.ViewItems.Text.s_sharedNonOversampledRasterizer && flag) - this._richTextRasterizer = Microsoft.Iris.ViewItems.Text.SharedOversampledRasterizer; - else if (this._richTextRasterizer == Microsoft.Iris.ViewItems.Text.s_sharedOversampledRasterizer && !flag) - this._richTextRasterizer = Microsoft.Iris.ViewItems.Text.SharedNonOversampledRasterizer; + if (this._richTextRasterizer == s_sharedNonOversampledRasterizer && flag) + this._richTextRasterizer = SharedOversampledRasterizer; + else if (this._richTextRasterizer == s_sharedOversampledRasterizer && !flag) + this._richTextRasterizer = SharedNonOversampledRasterizer; else this._richTextRasterizer.Oversample = flag; this.MarkTextLayoutInvalid(); @@ -311,12 +311,12 @@ namespace Microsoft.Iris.ViewItems public bool WordWrap { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.WordWrap); + get => this.GetBit(Bits.WordWrap); set { if (this.WordWrap == value) return; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.WordWrap, value); + this.SetBit(Bits.WordWrap, value); if (value) this.KeepFlowAlive = true; this.MarkPaintInvalid(); @@ -328,12 +328,12 @@ namespace Microsoft.Iris.ViewItems public bool UsePasswordMask { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.PasswordMasked); + get => this.GetBit(Bits.PasswordMasked); set { if (this.UsePasswordMask == value) return; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.PasswordMasked, value); + this.SetBit(Bits.PasswordMasked, value); this.MarkPaintInvalid(); this.MarkTextLayoutInvalid(); this.FireNotification(NotificationID.UsePasswordMask); @@ -387,13 +387,13 @@ namespace Microsoft.Iris.ViewItems public float LineSpacing { - get => !this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.LineSpacingSet) ? 0.0f : this._lineSpacing; + get => !this.GetBit(Bits.LineSpacingSet) ? 0.0f : this._lineSpacing; set { if (LineSpacing == (double)value) return; this._lineSpacing = value; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.LineSpacingSet); + this.SetBit(Bits.LineSpacingSet); this.MarkPaintInvalid(); this.MarkTextLayoutInvalid(); this.FireNotification(NotificationID.LineSpacing); @@ -402,13 +402,13 @@ namespace Microsoft.Iris.ViewItems public float CharacterSpacing { - get => !this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.CharacterSpacingSet) ? 0.0f : this._characterSpacing; + get => !this.GetBit(Bits.CharacterSpacingSet) ? 0.0f : this._characterSpacing; set { if (CharacterSpacing == (double)value) return; this._characterSpacing = value; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.CharacterSpacingSet); + this.SetBit(Bits.CharacterSpacingSet); this.MarkPaintInvalid(); this.MarkTextLayoutInvalid(); this.FireNotification(NotificationID.CharacterSpacing); @@ -417,13 +417,13 @@ namespace Microsoft.Iris.ViewItems public bool EnableKerning { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.EnableKerningSet) && this._enableKerning; + get => this.GetBit(Bits.EnableKerningSet) && this._enableKerning; set { if (this.EnableKerning == value) return; this._enableKerning = value; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.EnableKerningSet); + this.SetBit(Bits.EnableKerningSet); this.MarkPaintInvalid(); this.MarkTextLayoutInvalid(); this.FireNotification(NotificationID.EnableKerning); @@ -511,12 +511,12 @@ namespace Microsoft.Iris.ViewItems public bool ContributesToWidth { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.ContributesToWidth); + get => this.GetBit(Bits.ContributesToWidth); set { if (this.ContributesToWidth == value) return; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.ContributesToWidth, value); + this.SetBit(Bits.ContributesToWidth, value); this.FireNotification(NotificationID.ContributesToWidth); this.MarkLayoutInvalid(); } @@ -535,13 +535,13 @@ namespace Microsoft.Iris.ViewItems } } - public bool Clipped => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.Clipped); + public bool Clipped => this.GetBit(Bits.Clipped); private void SetClipped(bool value) { - if (this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.Clipped) == value) + if (this.GetBit(Bits.Clipped) == value) return; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.Clipped, value); + this.SetBit(Bits.Clipped, value); this.FireNotification(NotificationID.Clipped); } @@ -559,7 +559,7 @@ namespace Microsoft.Iris.ViewItems this.MarkScaleDirty(); } else - this._richTextRasterizer = !oversample ? Microsoft.Iris.ViewItems.Text.SharedNonOversampledRasterizer : Microsoft.Iris.ViewItems.Text.SharedOversampledRasterizer; + this._richTextRasterizer = !oversample ? SharedNonOversampledRasterizer : SharedOversampledRasterizer; this.MarkTextLayoutInvalid(); } } @@ -584,7 +584,7 @@ namespace Microsoft.Iris.ViewItems public ItemAlignment DefaultChildAlignment => ItemAlignment.Default; - public bool IsViewDependent(ViewItem node) => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.ViewDependent); + public bool IsViewDependent(ViewItem node) => this.GetBit(Bits.ViewDependent); public void GetInitialChildrenRequests(out int more) => more = 0; @@ -747,7 +747,7 @@ namespace Microsoft.Iris.ViewItems } } this.KeepFlowAlive |= flag1; - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.ViewDependent, flag1); + this.SetBit(Bits.ViewDependent, flag1); DefaultLayout.Arrange(layoutNode, slot); } @@ -771,7 +771,7 @@ namespace Microsoft.Iris.ViewItems TextStyle effectiveTextStyle = this.GetEffectiveTextStyle(); Size constraint = new Size(boundingWidth, boundingHeight); this.DisposeFlow(); - this._flow = Microsoft.Iris.ViewItems.Text.SharedSimpleTextRasterizer.Measure(this._content, alignment, effectiveTextStyle, constraint); + this._flow = SharedSimpleTextRasterizer.Measure(this._content, alignment, effectiveTextStyle, constraint); this._flow.DeclareOwner(this); } @@ -793,7 +793,7 @@ namespace Microsoft.Iris.ViewItems if (this._parsedContent == null && content != null) { this._parsedContentMarkedRanges = new ArrayList(); - this._parsedContent = Microsoft.Iris.ViewItems.Text.ParseMarkedUpText(content, this._parsedContentMarkedRanges); + this._parsedContent = ParseMarkedUpText(content, this._parsedContentMarkedRanges); } content = this._parsedContent; } @@ -807,9 +807,9 @@ namespace Microsoft.Iris.ViewItems measureParams.SetFormat(alignment, effectiveTextStyle); if ((this._boundsType & TextBounds.TrimLeftSideBearing) != TextBounds.Full && this._lineAlignment == LineAlignment.Near) measureParams.TrimLeftSideBearing(); - if (!this.UsedForEditing || this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.ScaleDirty)) + if (!this.UsedForEditing || this.GetBit(Bits.ScaleDirty)) { - this.ClearBit(Microsoft.Iris.ViewItems.Text.Bits.ScaleDirty); + this.ClearBit(Bits.ScaleDirty); measureParams.SetScale(this._scale); } if (this._parsedContent != null) @@ -825,22 +825,22 @@ namespace Microsoft.Iris.ViewItems { get { - if (!this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasureValid)) + if (!this.GetBit(Bits.FastMeasureValid)) { bool flag = this.UsingSharedRasterizer && !this.WordWrap && (this._namedStyles == null && _scale == 1.0) && (this.TextSharpness == TextSharpness.Sharp && !this.UsePasswordMask) && !this.Zone.Session.IsRtl; if (flag) - flag = Microsoft.Iris.ViewItems.Text.SharedSimpleTextRasterizer.CanMeasure(this.Content, this.GetEffectiveTextStyle()); - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasurePossible, flag); - this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasureValid); + flag = SharedSimpleTextRasterizer.CanMeasure(this.Content, this.GetEffectiveTextStyle()); + this.SetBit(Bits.FastMeasurePossible, flag); + this.SetBit(Bits.FastMeasureValid); } - return this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasurePossible); + return this.GetBit(Bits.FastMeasurePossible); } } internal TextStyle GetEffectiveTextStyle() { TextStyle textStyle = new TextStyle(); - Font font = this._font ?? Microsoft.Iris.ViewItems.Text.s_defaultFont; + Font font = this._font ?? s_defaultFont; textStyle.FontFace = font.FontName; textStyle.FontSize = font.FontSize; if (font.AltFontSize != (double)font.FontSize) @@ -852,11 +852,11 @@ namespace Microsoft.Iris.ViewItems if ((font.FontStyle & FontStyles.Underline) != FontStyles.None) textStyle.Underline = true; textStyle.Color = this._textColor; - if (this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.LineSpacingSet)) + if (this.GetBit(Bits.LineSpacingSet)) textStyle.LineSpacing = this.LineSpacing; - if (this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.CharacterSpacingSet)) + if (this.GetBit(Bits.CharacterSpacingSet)) textStyle.CharacterSpacing = this.CharacterSpacing; - if (this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.EnableKerningSet)) + if (this.GetBit(Bits.EnableKerningSet)) textStyle.EnableKerning = this.EnableKerning; if (this._textStyle != null) textStyle.Add(this._textStyle); @@ -872,7 +872,7 @@ namespace Microsoft.Iris.ViewItems arrayList = this.AnnotateFragments(); bool flag = false; if (this._fragments != null || arrayList != null) - flag = this.TextLayoutInvalid || !Microsoft.Iris.ViewItems.Text.AreFragmentListsEquivalent(_fragments, arrayList); + flag = this.TextLayoutInvalid || !AreFragmentListsEquivalent(_fragments, arrayList); if (flag) { this.UnregisterFragmentUsage(); @@ -1198,7 +1198,7 @@ namespace Microsoft.Iris.ViewItems if (run.Visible && !run.IsFragment) { Color effectiveColor = this.GetEffectiveColor(run); - IImage imageForRun = Microsoft.Iris.ViewItems.Text.GetImageForRun(this.UISession, run, effectiveColor); + IImage imageForRun = GetImageForRun(this.UISession, run, effectiveColor); if (imageForRun != null) { float x = run.RenderBounds.Left + _lineAlignmentOffset; @@ -1325,8 +1325,8 @@ namespace Microsoft.Iris.ViewItems private void MarkTextLayoutInvalid() { this.TextLayoutInvalid = true; - if (Microsoft.Iris.ViewItems.Text.s_simpleTextMeasureAvailable) - this.ClearBit(Microsoft.Iris.ViewItems.Text.Bits.FastMeasureValid); + if (s_simpleTextMeasureAvailable) + this.ClearBit(Bits.FastMeasureValid); this.DisposeFlow(); this.MarkLayoutInvalid(); } @@ -1363,50 +1363,50 @@ namespace Microsoft.Iris.ViewItems private bool TextFitsWidth { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.TextFitsWidth); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.TextFitsWidth, value); + get => this.GetBit(Bits.TextFitsWidth); + set => this.SetBit(Bits.TextFitsWidth, value); } private bool TextFitsHeight { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.TextFitsHeight); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.TextFitsHeight, value); + get => this.GetBit(Bits.TextFitsHeight); + set => this.SetBit(Bits.TextFitsHeight, value); } private bool ClipToHeight { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.ClipToHeight); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.ClipToHeight, value); + get => this.GetBit(Bits.ClipToHeight); + set => this.SetBit(Bits.ClipToHeight, value); } private bool KeepFlowAlive { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.KeepFlowAlive); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.KeepFlowAlive, value); + get => this.GetBit(Bits.KeepFlowAlive); + set => this.SetBit(Bits.KeepFlowAlive, value); } private bool HasEverPainted { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.HasEverPainted); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.HasEverPainted, value); + get => this.GetBit(Bits.HasEverPainted); + set => this.SetBit(Bits.HasEverPainted, value); } private bool TextLayoutInvalid { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.TextLayoutInvalid); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.TextLayoutInvalid, value); + get => this.GetBit(Bits.TextLayoutInvalid); + set => this.SetBit(Bits.TextLayoutInvalid, value); } private bool UpdateFragmentsAfterLayout { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.UpdateFragmentsAfterLayout); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.UpdateFragmentsAfterLayout, value); + get => this.GetBit(Bits.UpdateFragmentsAfterLayout); + set => this.SetBit(Bits.UpdateFragmentsAfterLayout, value); } private bool IgnoreEffectiveScaleChanges { - get => this.GetBit(Microsoft.Iris.ViewItems.Text.Bits.IgnoreEffectiveScaleChanges); - set => this.SetBit(Microsoft.Iris.ViewItems.Text.Bits.IgnoreEffectiveScaleChanges, value); + get => this.GetBit(Bits.IgnoreEffectiveScaleChanges); + set => this.SetBit(Bits.IgnoreEffectiveScaleChanges, value); } private bool GetBit(Microsoft.Iris.ViewItems.Text.Bits lookupBit) => ((Microsoft.Iris.ViewItems.Text.Bits)this._bits & lookupBit) != 0; @@ -1437,7 +1437,7 @@ namespace Microsoft.Iris.ViewItems public TextFragment fragment; private static uint s_rangeIDIndicator = 1073741824; - public Color RangeIDAsColor => new Color(Microsoft.Iris.ViewItems.Text.MarkedRange.s_rangeIDIndicator | this.rangeID); + public Color RangeIDAsColor => new Color(s_rangeIDIndicator | this.rangeID); public Color GetEffectiveColor(Color defaultColor) { diff --git a/UIX/Microsoft/Iris/ViewItems/UIPropertyRecord.cs b/UIX/Microsoft/Iris/ViewItems/UIPropertyRecord.cs index c93f3eb..e45654f 100644 --- a/UIX/Microsoft/Iris/ViewItems/UIPropertyRecord.cs +++ b/UIX/Microsoft/Iris/ViewItems/UIPropertyRecord.cs @@ -32,6 +32,6 @@ namespace Microsoft.Iris.ViewItems return null; } - public static bool IsInList(Vector list, string name) => UIPropertyRecord.FindInList(list, name) != null; + public static bool IsInList(Vector list, string name) => FindInList(list, name) != null; } } diff --git a/UIX/Microsoft/Iris/ViewItems/VisibleIndexRangeLayoutOutput.cs b/UIX/Microsoft/Iris/ViewItems/VisibleIndexRangeLayoutOutput.cs index 8c1aba5..eaeac90 100644 --- a/UIX/Microsoft/Iris/ViewItems/VisibleIndexRangeLayoutOutput.cs +++ b/UIX/Microsoft/Iris/ViewItems/VisibleIndexRangeLayoutOutput.cs @@ -42,9 +42,9 @@ namespace Microsoft.Iris.ViewItems public int EndVisibleOffscreen => this._endVisibleOffscreen; - public override DataCookie OutputID => VisibleIndexRangeLayoutOutput.DataCookie; + public override DataCookie OutputID => DataCookie; - public static DataCookie DataCookie => VisibleIndexRangeLayoutOutput.s_dataProperty; + public static DataCookie DataCookie => s_dataProperty; public override string ToString() => InvariantString.Format("{0} (BeginVisibleOffscreen={1}, EndVisibleOffscreen={2})", this.GetType().Name, _beginVisibleOffscreen, _endVisibleOffscreen); } diff --git a/UIX/Microsoft/Iris/VirtualList.cs b/UIX/Microsoft/Iris/VirtualList.cs index 77e24f7..640a4b0 100644 --- a/UIX/Microsoft/Iris/VirtualList.cs +++ b/UIX/Microsoft/Iris/VirtualList.cs @@ -698,7 +698,7 @@ namespace Microsoft.Iris { if (obj is IDisposable disposable) disposable.Dispose(); - else if (obj != VirtualList.UnavailableItem) + else if (obj != UnavailableItem) throw new InvalidOperationException(InvariantString.Format("VirtualList {0} was configured with the {1} ReleaseBehavior. This is only valid if the contents of the list implement IDisposable. Unable to dispose object: {2}.", this, _releaseBehavior, obj)); } @@ -776,12 +776,12 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(VirtualList.s_listContentsChangedEvent, value); + this.AddEventHandler(s_listContentsChangedEvent, value); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(VirtualList.s_listContentsChangedEvent, value); + this.RemoveEventHandler(s_listContentsChangedEvent, value); } } @@ -790,12 +790,12 @@ namespace Microsoft.Iris add { using (this.ThreadValidator) - this.AddEventHandler(VirtualList.s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); + this.AddEventHandler(s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); } remove { using (this.ThreadValidator) - this.RemoveEventHandler(VirtualList.s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); + this.RemoveEventHandler(s_listContentsChangedEvent, ListContentsChangedProxy.Thunk(value)); } } @@ -808,7 +808,7 @@ namespace Microsoft.Iris int count) { UIDispatcher.VerifyOnApplicationThread(); - UIListContentsChangedHandler eventHandler = (UIListContentsChangedHandler)this.GetEventHandler(VirtualList.s_listContentsChangedEvent); + UIListContentsChangedHandler eventHandler = (UIListContentsChangedHandler)this.GetEventHandler(s_listContentsChangedEvent); if (eventHandler != null) { UIListContentsChangedArgs args = new UIListContentsChangedArgs(type, oldIndex, newIndex, count); diff --git a/UIX/Microsoft/Iris/WindowColor.cs b/UIX/Microsoft/Iris/WindowColor.cs index 33ed243..0431b53 100644 --- a/UIX/Microsoft/Iris/WindowColor.cs +++ b/UIX/Microsoft/Iris/WindowColor.cs @@ -15,17 +15,17 @@ namespace Microsoft.Iris public WindowColor(int red, int green, int blue) { - WindowColor.CheckByte(red, nameof(red)); - WindowColor.CheckByte(green, nameof(green)); - WindowColor.CheckByte(blue, nameof(blue)); + CheckByte(red, nameof(red)); + CheckByte(green, nameof(green)); + CheckByte(blue, nameof(blue)); this._color = new Color(red, green, blue); } public WindowColor(float red, float green, float blue) { - WindowColor.CheckFloat(red, nameof(red)); - WindowColor.CheckFloat(green, nameof(green)); - WindowColor.CheckFloat(blue, nameof(blue)); + CheckFloat(red, nameof(red)); + CheckFloat(green, nameof(green)); + CheckFloat(blue, nameof(blue)); this._color = new Color(red, green, blue); } diff --git a/UIXControls/CodeDialogManager.cs b/UIXControls/CodeDialogManager.cs index fab22af..5f19fc7 100644 --- a/UIXControls/CodeDialogManager.cs +++ b/UIXControls/CodeDialogManager.cs @@ -17,7 +17,7 @@ namespace UIXControls private CodeDialogManager() => this._pendingCodeDialogs = new ArrayListDataSet(); - public static CodeDialogManager Instance => CodeDialogManager.s_instance; + public static CodeDialogManager Instance => s_instance; public ArrayListDataSet PendingCodeDialogs => this._pendingCodeDialogs; diff --git a/UIXControls/DialogHelper.cs b/UIXControls/DialogHelper.cs index 994a605..a721ed1 100644 --- a/UIXControls/DialogHelper.cs +++ b/UIXControls/DialogHelper.cs @@ -20,26 +20,26 @@ namespace UIXControls public static string DialogCancel { - get => DialogHelper.s_dialogCancel; - set => DialogHelper.s_dialogCancel = value; + get => s_dialogCancel; + set => s_dialogCancel = value; } public static string DialogYes { - get => DialogHelper.s_dialogYes; - set => DialogHelper.s_dialogYes = value; + get => s_dialogYes; + set => s_dialogYes = value; } public static string DialogNo { - get => DialogHelper.s_dialogNo; - set => DialogHelper.s_dialogNo = value; + get => s_dialogNo; + set => s_dialogNo = value; } public static string DialogOk { - get => DialogHelper.s_dialogOk; - set => DialogHelper.s_dialogOk = value; + get => s_dialogOk; + set => s_dialogOk = value; } public DialogHelper() @@ -51,7 +51,7 @@ namespace UIXControls { this._contentUI = contentUI; this._cancel = new Command(); - this._cancel.Description = DialogHelper.DialogCancel; + this._cancel.Description = DialogCancel; } public string ContentUI => this._contentUI; diff --git a/UIXControls/MessageBox.cs b/UIXControls/MessageBox.cs index bf0dac2..1c85469 100644 --- a/UIXControls/MessageBox.cs +++ b/UIXControls/MessageBox.cs @@ -47,7 +47,7 @@ namespace UIXControls EventHandler okCommandHandler) { MessageBox dialog = new MessageBox(title, message, okCommandHandler, null, null, null, null); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -58,7 +58,7 @@ namespace UIXControls EventHandler noCommandHandler) { MessageBox dialog = new MessageBox(title, message, null, yesCommandHandler, noCommandHandler, null, null); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -71,7 +71,7 @@ namespace UIXControls EventHandler cancelCommandHandler) { MessageBox dialog = new MessageBox(title, message, okCommandHandler, yesCommandHandler, noCommandHandler, cancelCommandHandler, null); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -85,7 +85,7 @@ namespace UIXControls BooleanChoice doNotAskMeAgain) { MessageBox dialog = new MessageBox(title, message, okCommandHandler, yesCommandHandler, noCommandHandler, cancelCommandHandler, doNotAskMeAgain); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -97,14 +97,14 @@ namespace UIXControls BooleanChoice doNotAskMeAgain) { MessageBox dialog = new MessageBox(title, message, null, false, null, yesCommand, noCommand, null, doNotAskMeAgain); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } public static MessageBox ShowYesNo(string title, string message, Command yesCommand) { - MessageBox dialog = new MessageBox(title, message, DialogHelper.DialogNo, false, null, yesCommand, null, null, null); - MessageBox.ShowCodeDialog(dialog); + MessageBox dialog = new MessageBox(title, message, DialogNo, false, null, yesCommand, null, null, null); + ShowCodeDialog(dialog); return dialog; } @@ -115,7 +115,7 @@ namespace UIXControls BooleanChoice doNotAskMeAgain) { MessageBox dialog = new MessageBox(title, message, null, false, okCommand, null, null, null, doNotAskMeAgain); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -127,7 +127,7 @@ namespace UIXControls bool isOKDefault) { MessageBox dialog = new MessageBox(title, message, cancelText, isOKDefault, okCommand, null, null, null, null); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -140,7 +140,7 @@ namespace UIXControls bool isOKDefault) { MessageBox dialog = new MessageBox(title, message, cancelText, isOKDefault, okCommand, null, null, cancelCommand, null); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -156,7 +156,7 @@ namespace UIXControls BooleanChoice doNotAskMeAgain) { MessageBox dialog = new MessageBox(title, message, cancelText, isOKDefault, okCommand, yesCommand, noCommand, cancelCommand, doNotAskMeAgain); - MessageBox.ShowCodeDialog(dialog); + ShowCodeDialog(dialog); return dialog; } @@ -188,25 +188,25 @@ namespace UIXControls { if (yesCommandHandler == null) { - this.Cancel.Description = DialogHelper.DialogOk; + this.Cancel.Description = DialogOk; this.Cancel.Invoked += eventHandler; } else - this.Cancel.Description = DialogHelper.DialogNo; + this.Cancel.Description = DialogNo; } if (okCommandHandler != null) { - this._okCommand = new Command(this, DialogHelper.DialogOk, okCommandHandler); + this._okCommand = new Command(this, DialogOk, okCommandHandler); this._okCommand.Invoked += eventHandler; } if (yesCommandHandler != null) { - this._yesCommand = new Command(this, DialogHelper.DialogYes, yesCommandHandler); + this._yesCommand = new Command(this, DialogYes, yesCommandHandler); this._yesCommand.Invoked += eventHandler; } if (noCommandHandler != null) { - this._noCommand = new Command(this, DialogHelper.DialogNo, noCommandHandler); + this._noCommand = new Command(this, DialogNo, noCommandHandler); this._noCommand.Invoked += eventHandler; } if (cancelCommandHandler == null) @@ -230,7 +230,7 @@ namespace UIXControls EventHandler eventHandler = new EventHandler(this.OnInvoked); if (okCommand == null && yesCommand == null && (noCommand == null && cancelHandler == null)) { - this.Cancel.Description = DialogHelper.DialogOk; + this.Cancel.Description = DialogOk; this.Cancel.Invoked += eventHandler; } if (okCommand != null) diff --git a/UIXControls/OSInfo.cs b/UIXControls/OSInfo.cs index f130d48..67f440b 100644 --- a/UIXControls/OSInfo.cs +++ b/UIXControls/OSInfo.cs @@ -12,22 +12,22 @@ namespace UIXControls { private const uint SPI_GETKEYBOARDSPEED = 10; private const uint SPI_GETKEYBOARDDELAY = 22; - private static int s_defaultKeyDelay = OSInfo.GetDefaultKeyDelay(); - private static int s_defaultKeyRepeat = OSInfo.GetDefaultKeyRepeat(); + private static int s_defaultKeyDelay = GetDefaultKeyDelay(); + private static int s_defaultKeyRepeat = GetDefaultKeyRepeat(); - public static bool IsCapsLockOn() => (OSInfo.GetKeyState(20U) & 1) != 0; + public static bool IsCapsLockOn() => (GetKeyState(20U) & 1) != 0; [DllImport("user32.dll")] private static extern ushort GetKeyState(uint nVirtKey); - public static int DefaultKeyDelay => OSInfo.s_defaultKeyDelay; + public static int DefaultKeyDelay => s_defaultKeyDelay; - public static int DefaultKeyRepeat => OSInfo.s_defaultKeyRepeat; + public static int DefaultKeyRepeat => s_defaultKeyRepeat; private static int GetDefaultKeyDelay() { int pParam; - if (!OSInfo.SystemParametersInfo(22U, 0U, out pParam, 0)) + if (!SystemParametersInfo(22U, 0U, out pParam, 0)) pParam = 1; return (pParam + 1) * 250; } @@ -35,7 +35,7 @@ namespace UIXControls private static int GetDefaultKeyRepeat() { int pParam; - if (!OSInfo.SystemParametersInfo(10U, 0U, out pParam, 0)) + if (!SystemParametersInfo(10U, 0U, out pParam, 0)) pParam = 1; return 31000 / (62 + 28 * pParam); } diff --git a/UIXControls/RegistryHelper.cs b/UIXControls/RegistryHelper.cs index a033fd3..5db03f9 100644 --- a/UIXControls/RegistryHelper.cs +++ b/UIXControls/RegistryHelper.cs @@ -18,37 +18,37 @@ namespace UIXControls public static string SettingsRegistryPath { - get => RegistryHelper.s_settingsRegistryPath; - set => RegistryHelper.s_settingsRegistryPath = value; + get => s_settingsRegistryPath; + set => s_settingsRegistryPath = value; } public static void SaveString(string keyName, string value) { - if (string.IsNullOrEmpty(RegistryHelper.SettingsRegistryPath)) + if (string.IsNullOrEmpty(SettingsRegistryPath)) return; - Registry.SetValue(RegistryHelper.SettingsRegistryPath, keyName, value); + Registry.SetValue(SettingsRegistryPath, keyName, value); } public static string GetString(string keyName, string defaultValue) { string str = null; - if (!string.IsNullOrEmpty(RegistryHelper.SettingsRegistryPath)) - str = Registry.GetValue(RegistryHelper.SettingsRegistryPath, keyName, defaultValue) as string; + if (!string.IsNullOrEmpty(SettingsRegistryPath)) + str = Registry.GetValue(SettingsRegistryPath, keyName, defaultValue) as string; return str ?? defaultValue; } public static void SaveInt(string keyName, int value) { - if (string.IsNullOrEmpty(RegistryHelper.SettingsRegistryPath)) + if (string.IsNullOrEmpty(SettingsRegistryPath)) return; - Registry.SetValue(RegistryHelper.SettingsRegistryPath, keyName, value); + Registry.SetValue(SettingsRegistryPath, keyName, value); } - public static int GetInt(string keyName, int min, int max, int defaultValue) => string.IsNullOrEmpty(keyName) || string.IsNullOrEmpty(RegistryHelper.SettingsRegistryPath) || (!(Registry.GetValue(RegistryHelper.SettingsRegistryPath, keyName, defaultValue) is int num) || num < min || num > max) ? defaultValue : num; + public static int GetInt(string keyName, int min, int max, int defaultValue) => string.IsNullOrEmpty(keyName) || string.IsNullOrEmpty(SettingsRegistryPath) || (!(Registry.GetValue(SettingsRegistryPath, keyName, defaultValue) is int num) || num < min || num > max) ? defaultValue : num; private static void SaveList(string keyName, IList values, RegistryHelper.ToStringer toString) { - if (string.IsNullOrEmpty(RegistryHelper.SettingsRegistryPath)) + if (string.IsNullOrEmpty(SettingsRegistryPath)) return; StringBuilder stringBuilder = new StringBuilder(); foreach (object obj in values) @@ -57,21 +57,21 @@ namespace UIXControls stringBuilder.Append(';'); stringBuilder.Append(toString(obj)); } - Registry.SetValue(RegistryHelper.SettingsRegistryPath, keyName, stringBuilder.ToString()); + Registry.SetValue(SettingsRegistryPath, keyName, stringBuilder.ToString()); } - public static void SaveIntList(string keyName, IList values) => RegistryHelper.SaveList(keyName, values, value => ((int)value).ToString(NumberFormatInfo.InvariantInfo)); + public static void SaveIntList(string keyName, IList values) => SaveList(keyName, values, value => ((int)value).ToString(NumberFormatInfo.InvariantInfo)); - public static void SaveFloatList(string keyName, IList values) => RegistryHelper.SaveList(keyName, values, value => ((float)value).ToString(NumberFormatInfo.InvariantInfo)); + public static void SaveFloatList(string keyName, IList values) => SaveList(keyName, values, value => ((float)value).ToString(NumberFormatInfo.InvariantInfo)); private static IList GetList( string keyName, int expectedCount, RegistryHelper.TryParser tryParse) { - if (string.IsNullOrEmpty(RegistryHelper.SettingsRegistryPath)) + if (string.IsNullOrEmpty(SettingsRegistryPath)) return null; - string str = Registry.GetValue(RegistryHelper.SettingsRegistryPath, keyName, null) as string; + string str = Registry.GetValue(SettingsRegistryPath, keyName, null) as string; if (string.IsNullOrEmpty(str)) return null; string[] strArray = str.Split(';'); @@ -88,7 +88,7 @@ namespace UIXControls return arrayList; } - public static IList GetIntList(string keyName, int expectedCount) => RegistryHelper.GetList(keyName, expectedCount, (string s, out object value) => + public static IList GetIntList(string keyName, int expectedCount) => GetList(keyName, expectedCount, (string s, out object value) => { int result; bool flag = int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result); @@ -98,7 +98,7 @@ namespace UIXControls public static IList GetPositiveIntList(string keyName, int expectedCount) { - IList list = RegistryHelper.GetIntList(keyName, expectedCount); + IList list = GetIntList(keyName, expectedCount); if (list != null) { foreach (int num in list) @@ -115,7 +115,7 @@ namespace UIXControls public static IList GetReorderedIntList(string keyName, int expectedCount) { - IList list = RegistryHelper.GetIntList(keyName, expectedCount); + IList list = GetIntList(keyName, expectedCount); if (list != null) { BitArray bitArray = new BitArray(expectedCount); @@ -132,7 +132,7 @@ namespace UIXControls return list; } - public static IList GetFloatList(string keyName, int expectedCount) => RegistryHelper.GetList(keyName, expectedCount, (string s, out object value) => + public static IList GetFloatList(string keyName, int expectedCount) => GetList(keyName, expectedCount, (string s, out object value) => { float result; bool flag = float.TryParse(s, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result); @@ -142,7 +142,7 @@ namespace UIXControls public static IList GetPositionList(string keyName, int expectedCount) { - IList list = RegistryHelper.GetFloatList(keyName, expectedCount); + IList list = GetFloatList(keyName, expectedCount); if (list != null) { float num1 = 0.0f;