diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs index 76f326234ce..d8e16e52a15 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs @@ -44,8 +44,6 @@ public sealed partial class TextDecoration : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -55,8 +53,6 @@ public sealed partial class TextDecoration : Animatable //------------------------------------------------------ - - #region Public Properties /// @@ -158,8 +154,6 @@ protected override Freezable CreateInstanceCore() return new TextDecoration(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -171,13 +165,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -189,9 +176,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -233,10 +217,6 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const double c_PenOffset = 0.0; internal const TextDecorationUnit c_PenOffsetUnit = TextDecorationUnit.FontRecommended; internal const TextDecorationUnit c_PenThicknessUnit = TextDecorationUnit.FontRecommended; @@ -245,7 +225,6 @@ protected override Freezable CreateInstanceCore() #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -312,7 +291,6 @@ static TextDecoration() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs index 63ae156e705..cdd210ee0d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs @@ -18,7 +18,6 @@ namespace System.Windows /// /// A collection of TextDecoration objects. /// - public sealed partial class TextDecorationCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -48,8 +47,6 @@ public sealed partial class TextDecorationCollection : Animatable, IList, IList< } - - #endregion Public Methods //------------------------------------------------------ @@ -58,7 +55,6 @@ public sealed partial class TextDecorationCollection : Animatable, IList, IList< // //------------------------------------------------------ - #region IList /// @@ -125,8 +121,6 @@ public void Insert(int index, TextDecoration value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -156,9 +150,6 @@ public bool Remove(TextDecoration value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -183,7 +174,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -200,15 +190,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -229,18 +215,15 @@ public TextDecoration this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + TextDecoration oldValue = _collection[index]; - TextDecoration oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -522,13 +505,13 @@ internal int AddWithoutFiringPublicEvents(TextDecoration value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); TextDecoration newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -536,8 +519,6 @@ internal int AddWithoutFiringPublicEvents(TextDecoration value) return index; } - - #endregion Private Helpers private static TextDecorationCollection s_empty; @@ -546,7 +527,6 @@ internal int AddWithoutFiringPublicEvents(TextDecoration value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -581,11 +561,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { TextDecoration newValue = (TextDecoration)sourceTextDecorationCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -603,11 +582,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { TextDecoration newValue = (TextDecoration)sourceTextDecorationCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -625,11 +603,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { TextDecoration newValue = (TextDecoration)sourceTextDecorationCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -647,11 +624,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { TextDecoration newValue = (TextDecoration)sourceTextDecorationCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -680,13 +656,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -698,9 +667,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -712,7 +678,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -723,13 +688,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -866,7 +827,6 @@ public TextDecoration Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -922,10 +882,11 @@ public TextDecorationCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + TextDecoration newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -940,12 +901,11 @@ public TextDecorationCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs index fa69138577e..64ca7bc5ce2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs @@ -410,8 +410,6 @@ protected sealed override Boolean GetCurrentValueCore( currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress); } - - return currentIterationValue; } @@ -517,7 +515,6 @@ public bool ShouldSerializeKeyFrames() #endregion - #region Private Methods private struct KeyTimeBlock diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs index a80d2ce8fa1..597e9500116 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs index 270a061924f..cc8e8af0578 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Byte GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Byte GetCurrentValueCore( return AnimatedTypeHelpers.AddByte(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs index 5c24df3f7e6..5523239b0e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs index dec2fc75cdb..952924a251f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs @@ -410,8 +410,6 @@ protected sealed override Char GetCurrentValueCore( currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress); } - - return currentIterationValue; } @@ -517,7 +515,6 @@ public bool ShouldSerializeKeyFrames() #endregion - #region Private Methods private struct KeyTimeBlock diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs index fd41654f737..4bba2c4130f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs index 83185840fe1..2c59c3274c2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Color GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Color GetCurrentValueCore( return AnimatedTypeHelpers.AddColor(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs index 84f377b99dc..d8f065427ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs index b019778c1a9..3b06a2421a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Decimal GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Decimal GetCurrentValueCore( return AnimatedTypeHelpers.AddDecimal(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs index 5d989188532..ca206300d9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs index 184e71fa8ae..cae2f119164 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Double GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Double GetCurrentValueCore( return AnimatedTypeHelpers.AddDouble(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs index b97b7742025..669c831869e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs index d2d73e2c8fd..59f524472e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs @@ -15,7 +15,6 @@ namespace System.Windows.Media.Animation { - /// /// This class is used as part of a ByteKeyFrameCollection in /// conjunction with a KeyFrameByteAnimation to animate a @@ -140,7 +139,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a ColorKeyFrameCollection in /// conjunction with a KeyFrameColorAnimation to animate a @@ -265,7 +263,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a DecimalKeyFrameCollection in /// conjunction with a KeyFrameDecimalAnimation to animate a @@ -390,7 +387,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a DoubleKeyFrameCollection in /// conjunction with a KeyFrameDoubleAnimation to animate a @@ -515,7 +511,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a Int16KeyFrameCollection in /// conjunction with a KeyFrameInt16Animation to animate a @@ -640,7 +635,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a Int32KeyFrameCollection in /// conjunction with a KeyFrameInt32Animation to animate a @@ -765,7 +759,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a Int64KeyFrameCollection in /// conjunction with a KeyFrameInt64Animation to animate a @@ -890,7 +883,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a PointKeyFrameCollection in /// conjunction with a KeyFramePointAnimation to animate a @@ -1015,7 +1007,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a Point3DKeyFrameCollection in /// conjunction with a KeyFramePoint3DAnimation to animate a @@ -1140,7 +1131,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a QuaternionKeyFrameCollection in /// conjunction with a KeyFrameQuaternionAnimation to animate a @@ -1265,7 +1255,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a Rotation3DKeyFrameCollection in /// conjunction with a KeyFrameRotation3DAnimation to animate a @@ -1390,7 +1379,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a RectKeyFrameCollection in /// conjunction with a KeyFrameRectAnimation to animate a @@ -1515,7 +1503,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a SingleKeyFrameCollection in /// conjunction with a KeyFrameSingleAnimation to animate a @@ -1640,7 +1627,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a SizeKeyFrameCollection in /// conjunction with a KeyFrameSizeAnimation to animate a @@ -1765,7 +1751,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a VectorKeyFrameCollection in /// conjunction with a KeyFrameVectorAnimation to animate a @@ -1890,7 +1875,6 @@ public IEasingFunction EasingFunction #endregion } - /// /// This class is used as part of a Vector3DKeyFrameCollection in /// conjunction with a KeyFrameVector3DAnimation to animate a diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs index 89192dd58b9..866d427d14a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Int16 GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Int16 GetCurrentValueCore( return AnimatedTypeHelpers.AddInt16(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs index 5db440e5cf1..0fcbc84ebc6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs index d85af82dbf4..cfd4db8ec6d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Int32 GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Int32 GetCurrentValueCore( return AnimatedTypeHelpers.AddInt32(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs index 3b6526cdc03..e763ce4dacd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs index 6a62d039b8e..63f798c3496 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Int64 GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Int64 GetCurrentValueCore( return AnimatedTypeHelpers.AddInt64(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs index 728794a8c29..ca2d7929436 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs index 95ccb1de7d0..6d7b273b7f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs @@ -13,7 +13,6 @@ namespace System.Windows.Media.Animation { - /// /// This class is used as part of a BooleanKeyFrameCollection in /// conjunction with a KeyFrameBooleanAnimation to animate a @@ -154,7 +153,6 @@ protected abstract Boolean InterpolateValueCore( #endregion } - /// /// This class is used as part of a ByteKeyFrameCollection in /// conjunction with a KeyFrameByteAnimation to animate a @@ -295,7 +293,6 @@ protected abstract Byte InterpolateValueCore( #endregion } - /// /// This class is used as part of a CharKeyFrameCollection in /// conjunction with a KeyFrameCharAnimation to animate a @@ -436,7 +433,6 @@ protected abstract Char InterpolateValueCore( #endregion } - /// /// This class is used as part of a ColorKeyFrameCollection in /// conjunction with a KeyFrameColorAnimation to animate a @@ -577,7 +573,6 @@ protected abstract Color InterpolateValueCore( #endregion } - /// /// This class is used as part of a DecimalKeyFrameCollection in /// conjunction with a KeyFrameDecimalAnimation to animate a @@ -718,7 +713,6 @@ protected abstract Decimal InterpolateValueCore( #endregion } - /// /// This class is used as part of a DoubleKeyFrameCollection in /// conjunction with a KeyFrameDoubleAnimation to animate a @@ -859,7 +853,6 @@ protected abstract Double InterpolateValueCore( #endregion } - /// /// This class is used as part of a Int16KeyFrameCollection in /// conjunction with a KeyFrameInt16Animation to animate a @@ -1000,7 +993,6 @@ protected abstract Int16 InterpolateValueCore( #endregion } - /// /// This class is used as part of a Int32KeyFrameCollection in /// conjunction with a KeyFrameInt32Animation to animate a @@ -1141,7 +1133,6 @@ protected abstract Int32 InterpolateValueCore( #endregion } - /// /// This class is used as part of a Int64KeyFrameCollection in /// conjunction with a KeyFrameInt64Animation to animate a @@ -1282,7 +1273,6 @@ protected abstract Int64 InterpolateValueCore( #endregion } - /// /// This class is used as part of a MatrixKeyFrameCollection in /// conjunction with a KeyFrameMatrixAnimation to animate a @@ -1423,7 +1413,6 @@ protected abstract Matrix InterpolateValueCore( #endregion } - /// /// This class is used as part of a ObjectKeyFrameCollection in /// conjunction with a KeyFrameObjectAnimation to animate a @@ -1564,7 +1553,6 @@ protected abstract Object InterpolateValueCore( #endregion } - /// /// This class is used as part of a PointKeyFrameCollection in /// conjunction with a KeyFramePointAnimation to animate a @@ -1705,7 +1693,6 @@ protected abstract Point InterpolateValueCore( #endregion } - /// /// This class is used as part of a Point3DKeyFrameCollection in /// conjunction with a KeyFramePoint3DAnimation to animate a @@ -1846,7 +1833,6 @@ protected abstract Point3D InterpolateValueCore( #endregion } - /// /// This class is used as part of a QuaternionKeyFrameCollection in /// conjunction with a KeyFrameQuaternionAnimation to animate a @@ -1987,7 +1973,6 @@ protected abstract Quaternion InterpolateValueCore( #endregion } - /// /// This class is used as part of a Rotation3DKeyFrameCollection in /// conjunction with a KeyFrameRotation3DAnimation to animate a @@ -2128,7 +2113,6 @@ protected abstract Rotation3D InterpolateValueCore( #endregion } - /// /// This class is used as part of a RectKeyFrameCollection in /// conjunction with a KeyFrameRectAnimation to animate a @@ -2269,7 +2253,6 @@ protected abstract Rect InterpolateValueCore( #endregion } - /// /// This class is used as part of a SingleKeyFrameCollection in /// conjunction with a KeyFrameSingleAnimation to animate a @@ -2410,7 +2393,6 @@ protected abstract Single InterpolateValueCore( #endregion } - /// /// This class is used as part of a SizeKeyFrameCollection in /// conjunction with a KeyFrameSizeAnimation to animate a @@ -2551,7 +2533,6 @@ protected abstract Size InterpolateValueCore( #endregion } - /// /// This class is used as part of a StringKeyFrameCollection in /// conjunction with a KeyFrameStringAnimation to animate a @@ -2692,7 +2673,6 @@ protected abstract String InterpolateValueCore( #endregion } - /// /// This class is used as part of a VectorKeyFrameCollection in /// conjunction with a KeyFrameVectorAnimation to animate a @@ -2833,7 +2813,6 @@ protected abstract Vector InterpolateValueCore( #endregion } - /// /// This class is used as part of a Vector3DKeyFrameCollection in /// conjunction with a KeyFrameVector3DAnimation to animate a diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs index 77ab2d1bc2a..dcd2dc5c2d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs @@ -410,8 +410,6 @@ protected sealed override Matrix GetCurrentValueCore( currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress); } - - return currentIterationValue; } @@ -517,7 +515,6 @@ public bool ShouldSerializeKeyFrames() #endregion - #region Private Methods private struct KeyTimeBlock diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs index 0f529a73a1c..e224be59026 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs index 45794e23e78..7c86352ea66 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs @@ -117,7 +117,6 @@ public override sealed Type TargetPropertyType #region Methods - /// /// Calculates the value this animation believes should be the current value for the property. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs index 147ba8b9506..c16ce419119 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs @@ -410,8 +410,6 @@ protected sealed override Object GetCurrentValueCore( currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress); } - - return currentIterationValue; } @@ -517,7 +515,6 @@ public bool ShouldSerializeKeyFrames() #endregion - #region Private Methods private struct KeyTimeBlock diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs index 40500673f8e..4776006013d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs index 4aaaf35d261..08c3f098eb0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs @@ -43,8 +43,6 @@ public partial class ParallelTimeline : TimelineGroup } - - #endregion Public Methods //------------------------------------------------------ @@ -54,12 +52,9 @@ public partial class ParallelTimeline : TimelineGroup //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,8 +74,6 @@ protected override Freezable CreateInstanceCore() return new ParallelTimeline(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -92,13 +85,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -110,9 +96,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -124,7 +107,6 @@ protected override Freezable CreateInstanceCore() #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -136,15 +118,9 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -154,8 +130,6 @@ protected override Freezable CreateInstanceCore() //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs index 2d3e5222dd7..7050768ad9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Point3D GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Point3D GetCurrentValueCore( return AnimatedTypeHelpers.AddPoint3D(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs index 65bc9fc596b..e527a1101d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs index a0f2fa239f2..9b79ca99d63 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Point GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Point GetCurrentValueCore( return AnimatedTypeHelpers.AddPoint(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs index 167cebdaa30..40ebe043db5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs index 5b3492493c5..e7cd01e00cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Quaternion GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Quaternion GetCurrentValueCore( return AnimatedTypeHelpers.AddQuaternion(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs index 9470f2cdc9c..33b76a3804b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs index a28630e60be..89c833237cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Rect GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Rect GetCurrentValueCore( return AnimatedTypeHelpers.AddRect(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs index ce86798a0e7..9223ba0dad4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs index 24f657aeb0f..31485c24e6e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Rotation3D GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Rotation3D GetCurrentValueCore( return AnimatedTypeHelpers.AddRotation3D(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs index 84542b5d9f7..e5ddb0dc071 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs index 7db67919900..e5a36141bf3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Single GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Single GetCurrentValueCore( return AnimatedTypeHelpers.AddSingle(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs index 9ffc9e8c3e6..90f582baf86 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs index f969f030667..82e2657c2f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Size GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Size GetCurrentValueCore( return AnimatedTypeHelpers.AddSize(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs index 40aef0f0a14..85dfea189de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs index afcbe158191..bb7ecf4fe7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs @@ -20,7 +20,6 @@ namespace System.Windows.Media.Animation { - /// /// This class is used as part of a ByteKeyFrameCollection in /// conjunction with a KeyFrameByteAnimation to animate a @@ -83,7 +82,7 @@ public SplineByteKeyFrame(Byte value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineByteKeyFrame(); + return new SplineByteKeyFrame(); } #endregion @@ -146,8 +145,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a ColorKeyFrameCollection in /// conjunction with a KeyFrameColorAnimation to animate a @@ -210,7 +207,7 @@ public SplineColorKeyFrame(Color value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineColorKeyFrame(); + return new SplineColorKeyFrame(); } #endregion @@ -273,8 +270,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a DecimalKeyFrameCollection in /// conjunction with a KeyFrameDecimalAnimation to animate a @@ -337,7 +332,7 @@ public SplineDecimalKeyFrame(Decimal value, KeyTime keyTime, KeySpline keySpline /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineDecimalKeyFrame(); + return new SplineDecimalKeyFrame(); } #endregion @@ -400,8 +395,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a DoubleKeyFrameCollection in /// conjunction with a KeyFrameDoubleAnimation to animate a @@ -464,7 +457,7 @@ public SplineDoubleKeyFrame(Double value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineDoubleKeyFrame(); + return new SplineDoubleKeyFrame(); } #endregion @@ -527,8 +520,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a Int16KeyFrameCollection in /// conjunction with a KeyFrameInt16Animation to animate a @@ -591,7 +582,7 @@ public SplineInt16KeyFrame(Int16 value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineInt16KeyFrame(); + return new SplineInt16KeyFrame(); } #endregion @@ -654,8 +645,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a Int32KeyFrameCollection in /// conjunction with a KeyFrameInt32Animation to animate a @@ -718,7 +707,7 @@ public SplineInt32KeyFrame(Int32 value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineInt32KeyFrame(); + return new SplineInt32KeyFrame(); } #endregion @@ -781,8 +770,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a Int64KeyFrameCollection in /// conjunction with a KeyFrameInt64Animation to animate a @@ -845,7 +832,7 @@ public SplineInt64KeyFrame(Int64 value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineInt64KeyFrame(); + return new SplineInt64KeyFrame(); } #endregion @@ -908,8 +895,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a PointKeyFrameCollection in /// conjunction with a KeyFramePointAnimation to animate a @@ -972,7 +957,7 @@ public SplinePointKeyFrame(Point value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplinePointKeyFrame(); + return new SplinePointKeyFrame(); } #endregion @@ -1035,8 +1020,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a Point3DKeyFrameCollection in /// conjunction with a KeyFramePoint3DAnimation to animate a @@ -1099,7 +1082,7 @@ public SplinePoint3DKeyFrame(Point3D value, KeyTime keyTime, KeySpline keySpline /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplinePoint3DKeyFrame(); + return new SplinePoint3DKeyFrame(); } #endregion @@ -1162,8 +1145,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a QuaternionKeyFrameCollection in /// conjunction with a KeyFrameQuaternionAnimation to animate a @@ -1226,7 +1207,7 @@ public SplineQuaternionKeyFrame(Quaternion value, KeyTime keyTime, KeySpline key /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineQuaternionKeyFrame(); + return new SplineQuaternionKeyFrame(); } #endregion @@ -1289,8 +1270,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a Rotation3DKeyFrameCollection in /// conjunction with a KeyFrameRotation3DAnimation to animate a @@ -1353,7 +1332,7 @@ public SplineRotation3DKeyFrame(Rotation3D value, KeyTime keyTime, KeySpline key /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineRotation3DKeyFrame(); + return new SplineRotation3DKeyFrame(); } #endregion @@ -1416,8 +1395,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a RectKeyFrameCollection in /// conjunction with a KeyFrameRectAnimation to animate a @@ -1480,7 +1457,7 @@ public SplineRectKeyFrame(Rect value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineRectKeyFrame(); + return new SplineRectKeyFrame(); } #endregion @@ -1543,8 +1520,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a SingleKeyFrameCollection in /// conjunction with a KeyFrameSingleAnimation to animate a @@ -1607,7 +1582,7 @@ public SplineSingleKeyFrame(Single value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineSingleKeyFrame(); + return new SplineSingleKeyFrame(); } #endregion @@ -1670,8 +1645,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a SizeKeyFrameCollection in /// conjunction with a KeyFrameSizeAnimation to animate a @@ -1734,7 +1707,7 @@ public SplineSizeKeyFrame(Size value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineSizeKeyFrame(); + return new SplineSizeKeyFrame(); } #endregion @@ -1797,8 +1770,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a VectorKeyFrameCollection in /// conjunction with a KeyFrameVectorAnimation to animate a @@ -1861,7 +1832,7 @@ public SplineVectorKeyFrame(Vector value, KeyTime keyTime, KeySpline keySpline) /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineVectorKeyFrame(); + return new SplineVectorKeyFrame(); } #endregion @@ -1924,8 +1895,6 @@ public KeySpline KeySpline #endregion } - - /// /// This class is used as part of a Vector3DKeyFrameCollection in /// conjunction with a KeyFrameVector3DAnimation to animate a @@ -1988,7 +1957,7 @@ public SplineVector3DKeyFrame(Vector3D value, KeyTime keyTime, KeySpline keySpli /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineVector3DKeyFrame(); + return new SplineVector3DKeyFrame(); } #endregion @@ -2051,5 +2020,4 @@ public KeySpline KeySpline #endregion } - } \ No newline at end of file diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs index 81ad1f8ca19..b07cac6b1f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs @@ -410,8 +410,6 @@ protected sealed override String GetCurrentValueCore( currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress); } - - return currentIterationValue; } @@ -517,7 +515,6 @@ public bool ShouldSerializeKeyFrames() #endregion - #region Private Methods private struct KeyTimeBlock diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs index fac0a9a1698..48f15bd7220 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs index 5c221ee40a4..57345cb86a6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs @@ -43,8 +43,6 @@ public abstract partial class Timeline : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -54,12 +52,9 @@ public abstract partial class Timeline : Animatable //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -71,9 +66,6 @@ public abstract partial class Timeline : Animatable #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -85,13 +77,6 @@ public abstract partial class Timeline : Animatable #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -103,9 +88,6 @@ public abstract partial class Timeline : Animatable #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -117,7 +99,6 @@ public abstract partial class Timeline : Animatable #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -129,15 +110,9 @@ public abstract partial class Timeline : Animatable #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -147,8 +122,6 @@ public abstract partial class Timeline : Animatable //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs index bf818613481..80afe1de3f4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs @@ -17,7 +17,6 @@ namespace System.Windows.Media.Animation /// /// A collection of Timeline objects. /// - public sealed partial class TimelineCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -47,8 +46,6 @@ public sealed partial class TimelineCollection : Animatable, IList, IList /// @@ -124,8 +120,6 @@ public void Insert(int index, Timeline value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -155,9 +149,6 @@ public bool Remove(Timeline value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -182,7 +173,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -199,15 +189,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -228,18 +214,15 @@ public Timeline this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Timeline oldValue = _collection[index]; - Timeline oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -521,13 +504,13 @@ internal int AddWithoutFiringPublicEvents(Timeline value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Timeline newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -535,8 +518,6 @@ internal int AddWithoutFiringPublicEvents(Timeline value) return index; } - - #endregion Private Helpers private static TimelineCollection s_empty; @@ -545,7 +526,6 @@ internal int AddWithoutFiringPublicEvents(Timeline value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -580,11 +560,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Timeline newValue = (Timeline)sourceTimelineCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -602,11 +581,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Timeline newValue = (Timeline)sourceTimelineCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -624,11 +602,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Timeline newValue = (Timeline)sourceTimelineCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -646,11 +623,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Timeline newValue = (Timeline)sourceTimelineCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -679,13 +655,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -697,9 +666,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -711,7 +677,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -722,13 +687,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -865,7 +826,6 @@ public Timeline Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -921,10 +881,11 @@ public TimelineCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Timeline newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -939,12 +900,11 @@ public TimelineCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs index 3a9d048d4cc..e96ed9000a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs @@ -43,8 +43,6 @@ public abstract partial class TimelineGroup : Timeline } - - #endregion Public Methods //------------------------------------------------------ @@ -54,8 +52,6 @@ public abstract partial class TimelineGroup : Timeline //------------------------------------------------------ - - #region Public Properties /// @@ -84,9 +80,6 @@ public TimelineCollection Children #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -98,13 +91,6 @@ public TimelineCollection Children #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -116,9 +102,6 @@ public TimelineCollection Children #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -144,16 +127,11 @@ public TimelineCollection Children #region Internal Fields - - - - internal static TimelineCollection s_Children = TimelineCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -186,7 +164,6 @@ static TimelineGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs index 63c7ff1a4aa..7cba5c57021 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Vector3D GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Vector3D GetCurrentValueCore( return AnimatedTypeHelpers.AddVector3D(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs index 758e83f7dd3..222c7a205ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs index 29fbd994c52..b0ef80eca91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Vector GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Vector GetCurrentValueCore( return AnimatedTypeHelpers.AddVector(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs index 99a3ed7d90b..bdaf1734fbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs index 1e897903de6..f947299c6f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs @@ -46,8 +46,6 @@ public sealed partial class BevelBitmapEffect : BitmapEffect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,32 +58,27 @@ private static void BevelWidthPropertyChanged(DependencyObject d, DependencyProp { BevelBitmapEffect target = ((BevelBitmapEffect) d); - target.PropertyChanged(BevelWidthProperty); } private static void ReliefPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BevelBitmapEffect target = ((BevelBitmapEffect) d); - target.PropertyChanged(ReliefProperty); } private static void LightAnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BevelBitmapEffect target = ((BevelBitmapEffect) d); - target.PropertyChanged(LightAngleProperty); } private static void SmoothnessPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BevelBitmapEffect target = ((BevelBitmapEffect) d); - target.PropertyChanged(SmoothnessProperty); } - #region Public Properties /// @@ -182,8 +175,6 @@ protected override Freezable CreateInstanceCore() return new BevelBitmapEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -195,13 +186,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -213,9 +197,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -257,10 +238,6 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const double c_BevelWidth = 5.0; internal const double c_Relief = 0.3; internal const double c_LightAngle = 135.0; @@ -270,7 +247,6 @@ protected override Freezable CreateInstanceCore() #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -337,7 +313,6 @@ static BevelBitmapEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs index c8d557d9a0e..f650a1db12f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs @@ -46,8 +46,6 @@ public abstract partial class BitmapEffect : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -57,12 +55,9 @@ public abstract partial class BitmapEffect : Animatable //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -74,9 +69,6 @@ public abstract partial class BitmapEffect : Animatable #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -88,13 +80,6 @@ public abstract partial class BitmapEffect : Animatable #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -106,9 +91,6 @@ public abstract partial class BitmapEffect : Animatable #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -120,7 +102,6 @@ public abstract partial class BitmapEffect : Animatable #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -132,15 +113,9 @@ public abstract partial class BitmapEffect : Animatable #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -150,8 +125,6 @@ public abstract partial class BitmapEffect : Animatable //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs index 52a1a7076b7..20b317830e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs @@ -20,7 +20,6 @@ namespace System.Windows.Media.Effects /// /// A collection of BitmapEffect objects. /// - public sealed partial class BitmapEffectCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -50,8 +49,6 @@ public sealed partial class BitmapEffectCollection : Animatable, IList, IList /// @@ -127,8 +123,6 @@ public void Insert(int index, BitmapEffect value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -158,9 +152,6 @@ public bool Remove(BitmapEffect value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -185,7 +176,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -202,15 +192,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -231,18 +217,15 @@ public BitmapEffect this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + BitmapEffect oldValue = _collection[index]; - BitmapEffect oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -524,13 +507,13 @@ internal int AddWithoutFiringPublicEvents(BitmapEffect value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); BitmapEffect newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -538,8 +521,6 @@ internal int AddWithoutFiringPublicEvents(BitmapEffect value) return index; } - - #endregion Private Helpers private static BitmapEffectCollection s_empty; @@ -548,7 +529,6 @@ internal int AddWithoutFiringPublicEvents(BitmapEffect value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -583,11 +563,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { BitmapEffect newValue = (BitmapEffect)sourceBitmapEffectCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -605,11 +584,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { BitmapEffect newValue = (BitmapEffect)sourceBitmapEffectCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -627,11 +605,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { BitmapEffect newValue = (BitmapEffect)sourceBitmapEffectCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -649,11 +626,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { BitmapEffect newValue = (BitmapEffect)sourceBitmapEffectCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -682,13 +658,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -700,9 +669,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -714,7 +680,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -725,13 +690,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -868,7 +829,6 @@ public BitmapEffect Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -924,10 +884,11 @@ public BitmapEffectCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + BitmapEffect newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -942,12 +903,11 @@ public BitmapEffectCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs index 706de9f3ab9..453618581fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs @@ -46,8 +46,6 @@ public sealed partial class BitmapEffectGroup : BitmapEffect } - - #endregion Public Methods //------------------------------------------------------ @@ -57,8 +55,6 @@ public sealed partial class BitmapEffectGroup : BitmapEffect //------------------------------------------------------ - - #region Public Properties /// @@ -95,8 +91,6 @@ protected override Freezable CreateInstanceCore() return new BitmapEffectGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -108,13 +102,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -140,8 +127,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -167,16 +152,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static BitmapEffectCollection s_Children = BitmapEffectCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -209,7 +189,6 @@ static BitmapEffectGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs index c3d58ec1053..3db4b4afd9f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs @@ -46,8 +46,6 @@ public sealed partial class BitmapEffectInput : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -60,11 +58,9 @@ private static void AreaToApplyEffectPropertyChanged(DependencyObject d, Depende { BitmapEffectInput target = ((BitmapEffectInput) d); - target.PropertyChanged(AreaToApplyEffectProperty); } - #region Public Properties /// @@ -131,8 +127,6 @@ protected override Freezable CreateInstanceCore() return new BitmapEffectInput(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -144,13 +138,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -162,9 +149,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -198,10 +182,6 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal static BitmapSource s_Input = BitmapEffectInput.ContextInputSource; internal const BrushMappingMode c_AreaToApplyEffectUnits = BrushMappingMode.RelativeToBoundingBox; internal static Rect s_AreaToApplyEffect = Rect.Empty; @@ -209,7 +189,6 @@ protected override Freezable CreateInstanceCore() #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -260,7 +239,6 @@ static BitmapEffectInput() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs index 03875251fc3..c139439f919 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs @@ -46,8 +46,6 @@ public sealed partial class BlurBitmapEffect : BitmapEffect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,11 +58,9 @@ private static void RadiusPropertyChanged(DependencyObject d, DependencyProperty { BlurBitmapEffect target = ((BlurBitmapEffect) d); - target.PropertyChanged(RadiusProperty); } - #region Public Properties /// @@ -116,8 +112,6 @@ protected override Freezable CreateInstanceCore() return new BlurBitmapEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -129,13 +123,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -147,9 +134,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -179,17 +163,12 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const double c_Radius = 5.0; internal const KernelType c_KernelType = KernelType.Gaussian; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -229,7 +208,6 @@ static BlurBitmapEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs index 29d5fa00b9c..3cab5065335 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs @@ -46,8 +46,6 @@ public sealed partial class BlurEffect : Effect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,25 +58,21 @@ private static void RadiusPropertyChanged(DependencyObject d, DependencyProperty { BlurEffect target = ((BlurEffect) d); - target.PropertyChanged(RadiusProperty); } private static void KernelTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BlurEffect target = ((BlurEffect) d); - target.PropertyChanged(KernelTypeProperty); } private static void RenderingBiasPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BlurEffect target = ((BlurEffect) d); - target.PropertyChanged(RenderingBiasProperty); } - #region Public Properties /// @@ -145,8 +139,6 @@ protected override Freezable CreateInstanceCore() return new BlurEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -192,33 +184,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_BLUREFFECT)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -236,7 +220,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -248,9 +231,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -284,10 +264,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_Radius = 5.0; internal const KernelType c_KernelType = KernelType.Gaussian; internal const RenderingBias c_RenderingBias = RenderingBias.Performance; @@ -295,7 +272,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -344,7 +320,6 @@ static BlurEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs index 624a731806f..f03bfe3bbea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs @@ -46,8 +46,6 @@ public sealed partial class DropShadowBitmapEffect : BitmapEffect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,46 +58,39 @@ private static void ShadowDepthPropertyChanged(DependencyObject d, DependencyPro { DropShadowBitmapEffect target = ((DropShadowBitmapEffect) d); - target.PropertyChanged(ShadowDepthProperty); } private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowBitmapEffect target = ((DropShadowBitmapEffect) d); - target.PropertyChanged(ColorProperty); } private static void DirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowBitmapEffect target = ((DropShadowBitmapEffect) d); - target.PropertyChanged(DirectionProperty); } private static void NoisePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowBitmapEffect target = ((DropShadowBitmapEffect) d); - target.PropertyChanged(NoiseProperty); } private static void OpacityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowBitmapEffect target = ((DropShadowBitmapEffect) d); - target.PropertyChanged(OpacityProperty); } private static void SoftnessPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowBitmapEffect target = ((DropShadowBitmapEffect) d); - target.PropertyChanged(SoftnessProperty); } - #region Public Properties /// @@ -211,8 +202,6 @@ protected override Freezable CreateInstanceCore() return new DropShadowBitmapEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -224,13 +213,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -242,9 +224,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -290,10 +269,6 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const double c_ShadowDepth = 5.0; internal static Color s_Color = Colors.Black; internal const double c_Direction = 315.0; @@ -304,7 +279,6 @@ protected override Freezable CreateInstanceCore() #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -380,7 +354,6 @@ static DropShadowBitmapEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs index 00e0722ba6a..06628efa4ab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs @@ -46,8 +46,6 @@ public sealed partial class DropShadowEffect : Effect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,46 +58,39 @@ private static void ShadowDepthPropertyChanged(DependencyObject d, DependencyPro { DropShadowEffect target = ((DropShadowEffect) d); - target.PropertyChanged(ShadowDepthProperty); } private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowEffect target = ((DropShadowEffect) d); - target.PropertyChanged(ColorProperty); } private static void DirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowEffect target = ((DropShadowEffect) d); - target.PropertyChanged(DirectionProperty); } private static void OpacityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowEffect target = ((DropShadowEffect) d); - target.PropertyChanged(OpacityProperty); } private static void BlurRadiusPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowEffect target = ((DropShadowEffect) d); - target.PropertyChanged(BlurRadiusProperty); } private static void RenderingBiasPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropShadowEffect target = ((DropShadowEffect) d); - target.PropertyChanged(RenderingBiasProperty); } - #region Public Properties /// @@ -211,8 +202,6 @@ protected override Freezable CreateInstanceCore() return new DropShadowEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -281,33 +270,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DROPSHADOWEFFECT)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -325,7 +306,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -337,9 +317,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -385,10 +362,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_ShadowDepth = 5.0; internal static Color s_Color = Colors.Black; internal const double c_Direction = 315.0; @@ -399,7 +373,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -475,7 +448,6 @@ static DropShadowEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs index 0b95ad69f46..9fd0edf8afe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs @@ -46,8 +46,6 @@ public abstract partial class Effect : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -57,12 +55,9 @@ public abstract partial class Effect : Animatable, DUCE.IResource //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -74,9 +69,6 @@ public abstract partial class Effect : Animatable, DUCE.IResource #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -87,7 +79,6 @@ public abstract partial class Effect : Animatable, DUCE.IResource #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -151,7 +142,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -163,9 +153,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -177,7 +164,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -189,15 +175,9 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -207,8 +187,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs index 338c96b46d9..4011e4f7fcb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs @@ -46,8 +46,6 @@ public sealed partial class EmbossBitmapEffect : BitmapEffect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,18 +58,15 @@ private static void LightAnglePropertyChanged(DependencyObject d, DependencyProp { EmbossBitmapEffect target = ((EmbossBitmapEffect) d); - target.PropertyChanged(LightAngleProperty); } private static void ReliefPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { EmbossBitmapEffect target = ((EmbossBitmapEffect) d); - target.PropertyChanged(ReliefProperty); } - #region Public Properties /// @@ -123,8 +118,6 @@ protected override Freezable CreateInstanceCore() return new EmbossBitmapEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -136,13 +129,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -154,9 +140,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -186,17 +169,12 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const double c_LightAngle = 45.0; internal const double c_Relief = 0.44; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -236,7 +214,6 @@ static EmbossBitmapEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs index a3c1e58dbe9..3d1540626f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs @@ -46,8 +46,6 @@ internal sealed partial class ImplicitInputBrush : Brush } - - #endregion Public Methods //------------------------------------------------------ @@ -57,12 +55,9 @@ internal sealed partial class ImplicitInputBrush : Brush //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -82,8 +77,6 @@ protected override Freezable CreateInstanceCore() return new ImplicitInputBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -157,7 +150,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_IMPLICITINPUTBRUSH)) { Transform vTransform = Transform; @@ -167,16 +159,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -187,9 +176,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vRelativeTransform != null) ((DUCE.IResource)vRelativeTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -207,7 +194,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -219,9 +205,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -233,7 +216,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -244,16 +226,11 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -263,8 +240,6 @@ internal override DUCE.Channel GetChannelCore(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs index 4916b314962..5f22b19500c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs @@ -46,8 +46,6 @@ public sealed partial class OuterGlowBitmapEffect : BitmapEffect } - - #endregion Public Methods //------------------------------------------------------ @@ -60,32 +58,27 @@ private static void GlowColorPropertyChanged(DependencyObject d, DependencyPrope { OuterGlowBitmapEffect target = ((OuterGlowBitmapEffect) d); - target.PropertyChanged(GlowColorProperty); } private static void GlowSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { OuterGlowBitmapEffect target = ((OuterGlowBitmapEffect) d); - target.PropertyChanged(GlowSizeProperty); } private static void NoisePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { OuterGlowBitmapEffect target = ((OuterGlowBitmapEffect) d); - target.PropertyChanged(NoiseProperty); } private static void OpacityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { OuterGlowBitmapEffect target = ((OuterGlowBitmapEffect) d); - target.PropertyChanged(OpacityProperty); } - #region Public Properties /// @@ -167,8 +160,6 @@ protected override Freezable CreateInstanceCore() return new OuterGlowBitmapEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -180,13 +171,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -198,9 +182,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -238,10 +219,6 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal static Color s_GlowColor = Colors.Gold; internal const double c_GlowSize = 5.0; internal const double c_Noise = 0.0; @@ -250,7 +227,6 @@ protected override Freezable CreateInstanceCore() #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -308,7 +284,6 @@ static OuterGlowBitmapEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs index 71caa47be72..434bf6cfbc0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs @@ -46,8 +46,6 @@ public sealed partial class PixelShader : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -60,20 +58,18 @@ private static void UriSourcePropertyChanged(DependencyObject d, DependencyPrope { PixelShader target = ((PixelShader) d); - target.UriSourcePropertyChangedHook(e); + target.PropertyChanged(UriSourceProperty); } private static void ShaderRenderModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PixelShader target = ((PixelShader) d); - target.PropertyChanged(ShaderRenderModeProperty); } - #region Public Properties /// @@ -125,8 +121,6 @@ protected override Freezable CreateInstanceCore() return new PixelShader(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -149,10 +143,8 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_PIXELSHADER)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } @@ -168,9 +160,7 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } } } @@ -195,7 +185,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -221,8 +210,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -252,17 +239,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Uri s_UriSource = null; internal const ShaderRenderMode c_ShaderRenderMode = ShaderRenderMode.Auto; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -302,7 +285,6 @@ static PixelShader() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs index f4a880314d3..37a1108cf15 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs @@ -46,8 +46,6 @@ public partial class ShaderEffect : Effect } - - #endregion Public Methods //------------------------------------------------------ @@ -65,7 +63,6 @@ private static void PixelShaderPropertyChanged(DependencyObject d, DependencyPro target.PixelShaderPropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -80,8 +77,6 @@ private static void PixelShaderPropertyChanged(DependencyObject d, DependencyPro return; } - - PixelShader oldV = (PixelShader) e.OldValue; PixelShader newV = (PixelShader) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -107,7 +102,6 @@ private static void PixelShaderPropertyChanged(DependencyObject d, DependencyPro target.PropertyChanged(PixelShaderProperty); } - #region Public Properties /// @@ -147,8 +141,6 @@ protected override Freezable CreateInstanceCore() return (Freezable)Activator.CreateInstance(this.GetType()); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -166,7 +158,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } private DUCE.ResourceHandle GeneratedAddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SHADEREFFECT)) { PixelShader vPixelShader = PixelShader; @@ -174,16 +165,13 @@ private DUCE.ResourceHandle GeneratedAddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } private void GeneratedReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -192,9 +180,7 @@ private void GeneratedReleaseOnChannelCore(DUCE.Channel channel) if (vPixelShader != null) ((DUCE.IResource)vPixelShader).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -212,7 +198,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -224,9 +209,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -252,16 +234,11 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -292,7 +269,6 @@ static ShaderEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs index acbe93b3a2e..16fbfd8584b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs @@ -53,8 +53,6 @@ public sealed partial class ArcSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class ArcSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -162,8 +158,6 @@ protected override Freezable CreateInstanceCore() return new ArcSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -175,13 +169,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -193,9 +180,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -237,10 +221,6 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal static Point s_Point = new Point(); internal static Size s_Size = new Size(); internal const double c_RotationAngle = 0.0; @@ -250,7 +230,6 @@ protected override Freezable CreateInstanceCore() #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -317,7 +296,6 @@ static ArcSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs index 53292135231..8c72020da6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs @@ -53,8 +53,6 @@ public sealed partial class BezierSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class BezierSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -132,8 +128,6 @@ protected override Freezable CreateInstanceCore() return new BezierSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -145,13 +139,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -179,8 +166,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -214,10 +199,6 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static Point s_Point1 = new Point(); internal static Point s_Point2 = new Point(); internal static Point s_Point3 = new Point(); @@ -225,7 +206,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -274,7 +254,6 @@ static BezierSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs index 453bfc9b1be..aeb991df4f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs @@ -53,8 +53,6 @@ public sealed partial class BitmapCache : CacheMode } - - #endregion Public Methods //------------------------------------------------------ @@ -67,25 +65,21 @@ private static void RenderAtScalePropertyChanged(DependencyObject d, DependencyP { BitmapCache target = ((BitmapCache) d); - target.PropertyChanged(RenderAtScaleProperty); } private static void SnapsToDevicePixelsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapCache target = ((BitmapCache) d); - target.PropertyChanged(SnapsToDevicePixelsProperty); } private static void EnableClearTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapCache target = ((BitmapCache) d); - target.PropertyChanged(EnableClearTypeProperty); } - #region Public Properties /// @@ -152,8 +146,6 @@ protected override Freezable CreateInstanceCore() return new BitmapCache(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -199,33 +191,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_BITMAPCACHE)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -243,7 +227,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -255,9 +238,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -291,10 +271,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_RenderAtScale = 1.0; internal const bool c_SnapsToDevicePixels = false; internal const bool c_EnableClearType = false; @@ -302,7 +279,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -351,7 +327,6 @@ static BitmapCache() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs index 19317a2d172..57015b9ea00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs @@ -53,8 +53,6 @@ public sealed partial class BitmapCacheBrush : Brush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,15 +65,11 @@ private static void TargetPropertyChanged(DependencyObject d, DependencyProperty { BitmapCacheBrush target = ((BitmapCacheBrush) d); - target.PropertyChanged(TargetProperty); } private static void BitmapCachePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -93,7 +87,6 @@ private static void BitmapCachePropertyChanged(DependencyObject d, DependencyPro BitmapCacheBrush target = ((BitmapCacheBrush) d); - BitmapCache oldV = (BitmapCache) e.OldValue; BitmapCache newV = (BitmapCache) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -122,14 +115,12 @@ private static void AutoLayoutContentPropertyChanged(DependencyObject d, Depende { BitmapCacheBrush target = ((BitmapCacheBrush) d); - target.PropertyChanged(AutoLayoutContentProperty); } private static void InternalTargetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapCacheBrush target = ((BitmapCacheBrush) d); - Visual oldV = (Visual) e.OldValue; // @@ -183,11 +174,9 @@ private static void AutoWrapTargetPropertyChanged(DependencyObject d, Dependency { BitmapCacheBrush target = ((BitmapCacheBrush) d); - target.PropertyChanged(AutoWrapTargetProperty); } - #region Public Properties /// @@ -289,8 +278,6 @@ protected override Freezable CreateInstanceCore() return new BitmapCacheBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -372,7 +359,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_BITMAPCACHEBRUSH)) { Transform vTransform = Transform; @@ -383,18 +369,16 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) if (vBitmapCache != null) ((DUCE.IResource)vBitmapCache).AddRefOnChannel(channel); Visual vInternalTarget = InternalTarget; vInternalTarget?.AddRefOnChannelForCyclicBrush(this, channel); - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -407,10 +391,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vBitmapCache != null) ((DUCE.IResource)vBitmapCache).ReleaseOnChannel(channel); Visual vInternalTarget = InternalTarget; vInternalTarget?.ReleaseOnChannelForCyclicBrush(this, channel); - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -428,7 +411,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -454,8 +436,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -497,17 +477,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const bool c_AutoLayoutContent = true; internal const bool c_AutoWrapTarget = false; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -575,7 +551,6 @@ static BitmapCacheBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs index a6b396a0010..7ffd3f3ccec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs @@ -24,7 +24,6 @@ namespace System.Windows.Media { - [TypeConverter(typeof(BrushConverter))] [ValueSerializer(typeof(BrushValueSerializer))] // Used by MarkupWriter public abstract partial class Brush : Animatable, IFormattable, DUCE.IResource @@ -56,8 +55,6 @@ public abstract partial class Brush : Animatable, IFormattable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -70,15 +67,11 @@ private static void OpacityPropertyChanged(DependencyObject d, DependencyPropert { Brush target = ((Brush) d); - target.PropertyChanged(OpacityProperty); } private static void TransformPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -96,7 +89,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope Brush target = ((Brush) d); - Transform oldV = (Transform) e.OldValue; Transform newV = (Transform) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -124,9 +116,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope private static void RelativeTransformPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -144,7 +133,6 @@ private static void RelativeTransformPropertyChanged(DependencyObject d, Depende Brush target = ((Brush) d); - Transform oldV = (Transform) e.OldValue; Transform newV = (Transform) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -170,7 +158,6 @@ private static void RelativeTransformPropertyChanged(DependencyObject d, Depende target.PropertyChanged(RelativeTransformProperty); } - #region Public Properties /// @@ -229,9 +216,6 @@ public Transform RelativeTransform #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -242,7 +226,6 @@ public Transform RelativeTransform #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -306,7 +289,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -317,7 +299,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -375,7 +356,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -409,10 +389,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - internal const double c_Opacity = 1.0; internal static Transform s_Transform = Transform.Identity; internal static Transform s_RelativeTransform = Transform.Identity; @@ -420,7 +396,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -475,7 +450,6 @@ static Brush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs index f9e2e33db06..8afda504a7e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs @@ -24,7 +24,6 @@ namespace System.Windows.Media { - [TypeConverter(typeof(CacheModeConverter))] [ValueSerializer(typeof(CacheModeValueSerializer))] // Used by MarkupWriter public abstract partial class CacheMode : Animatable, DUCE.IResource @@ -56,8 +55,6 @@ public abstract partial class CacheMode : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -67,12 +64,9 @@ public abstract partial class CacheMode : Animatable, DUCE.IResource //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -84,9 +78,6 @@ public abstract partial class CacheMode : Animatable, DUCE.IResource #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -97,7 +88,6 @@ public abstract partial class CacheMode : Animatable, DUCE.IResource #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -161,7 +151,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -173,9 +162,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -187,7 +173,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -199,15 +184,9 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -217,8 +196,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs index 556c24bd086..deacd088e2a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs @@ -53,8 +53,6 @@ public sealed partial class CombinedGeometry : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,15 +65,11 @@ private static void GeometryCombineModePropertyChanged(DependencyObject d, Depen { CombinedGeometry target = ((CombinedGeometry) d); - target.PropertyChanged(GeometryCombineModeProperty); } private static void Geometry1PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -93,7 +87,6 @@ private static void Geometry1PropertyChanged(DependencyObject d, DependencyPrope CombinedGeometry target = ((CombinedGeometry) d); - Geometry oldV = (Geometry) e.OldValue; Geometry newV = (Geometry) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -121,9 +114,6 @@ private static void Geometry1PropertyChanged(DependencyObject d, DependencyPrope private static void Geometry2PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -141,7 +131,6 @@ private static void Geometry2PropertyChanged(DependencyObject d, DependencyPrope CombinedGeometry target = ((CombinedGeometry) d); - Geometry oldV = (Geometry) e.OldValue; Geometry newV = (Geometry) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -167,7 +156,6 @@ private static void Geometry2PropertyChanged(DependencyObject d, DependencyPrope target.PropertyChanged(Geometry2Property); } - #region Public Properties /// @@ -234,8 +222,6 @@ protected override Freezable CreateInstanceCore() return new CombinedGeometry(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -295,7 +281,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_COMBINEDGEOMETRY)) { Transform vTransform = Transform; @@ -307,16 +292,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -329,9 +311,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vGeometry2 != null) ((DUCE.IResource)vGeometry2).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -349,7 +329,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -377,8 +356,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -412,10 +389,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const GeometryCombineMode c_GeometryCombineMode = GeometryCombineMode.Union; internal static Geometry s_Geometry1 = Geometry.Empty; internal static Geometry s_Geometry2 = Geometry.Empty; @@ -423,7 +397,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -478,7 +451,6 @@ static CombinedGeometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs index d88299bcac9..11ca3326377 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs @@ -53,8 +53,6 @@ public sealed partial class DashStyle : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -67,22 +65,16 @@ private static void OffsetPropertyChanged(DependencyObject d, DependencyProperty { DashStyle target = ((DashStyle) d); - target.PropertyChanged(OffsetProperty); } private static void DashesPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - DashStyle target = ((DashStyle) d); - target.PropertyChanged(DashesProperty); } - #region Public Properties /// @@ -134,8 +126,6 @@ protected override Freezable CreateInstanceCore() return new DashStyle(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -183,7 +173,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.DashesSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < DashesCount; i++) { @@ -205,10 +194,8 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DASHSTYLE)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } @@ -224,9 +211,7 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } } } @@ -251,7 +236,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -277,8 +261,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -308,17 +290,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_Offset = 0.0; internal static DoubleCollection s_Dashes = DoubleCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -360,7 +338,6 @@ static DashStyle() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs index 873ca96d141..6a9b622b624 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs @@ -58,8 +58,6 @@ public sealed partial class DoubleCollection : Freezable, IFormattable, IList, I } - - #endregion Public Methods //------------------------------------------------------ @@ -68,7 +66,6 @@ public sealed partial class DoubleCollection : Freezable, IFormattable, IList, I // //------------------------------------------------------ - #region IList /// @@ -117,12 +114,9 @@ public int IndexOf(double value) /// public void Insert(int index, double value) { - - WritePreamble(); _collection.Insert(index, value); - ++_version; WritePostscript(); } @@ -164,7 +158,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -176,13 +169,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) WritePreamble(); _collection.RemoveAt(index); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -196,11 +187,8 @@ public double this[int index] } set { - - WritePreamble(); - _collection[ index ] = value; - + _collection[index] = value; ++_version; WritePostscript(); @@ -441,7 +429,6 @@ internal double Internal_GetItem(int i) } - #endregion #region Private Helpers @@ -476,11 +463,9 @@ internal int AddWithoutFiringPublicEvents(double value) { int index = -1; - WritePreamble(); index = _collection.Add(value); - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -488,8 +473,6 @@ internal int AddWithoutFiringPublicEvents(double value) return index; } - - #endregion Private Helpers private static DoubleCollection s_empty; @@ -498,7 +481,6 @@ internal int AddWithoutFiringPublicEvents(double value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -534,7 +516,6 @@ protected override void CloneCore(Freezable source) { _collection.Add(sourceDoubleCollection._collection[i]); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -553,7 +534,6 @@ protected override void CloneCurrentValueCore(Freezable source) { _collection.Add(sourceDoubleCollection._collection[i]); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -572,7 +552,6 @@ protected override void GetAsFrozenCore(Freezable source) { _collection.Add(sourceDoubleCollection._collection[i]); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -591,10 +570,8 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) { _collection.Add(sourceDoubleCollection._collection[i]); } - } - #endregion ProtectedMethods //------------------------------------------------------ @@ -606,13 +583,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -623,7 +593,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -739,7 +708,6 @@ public static DoubleCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -750,13 +718,9 @@ public static DoubleCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -893,7 +857,6 @@ public double Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -945,7 +908,6 @@ public DoubleCollection(IEnumerable collection) foreach (double item in collection) { - _collection.Add(item); } @@ -958,7 +920,6 @@ public DoubleCollection(IEnumerable collection) - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs index 712d5d98a64..604c3652b0b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs @@ -53,8 +53,6 @@ public abstract partial class Drawing : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -64,12 +62,9 @@ public abstract partial class Drawing : Animatable, DUCE.IResource //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -81,9 +76,6 @@ public abstract partial class Drawing : Animatable, DUCE.IResource #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -94,7 +86,6 @@ public abstract partial class Drawing : Animatable, DUCE.IResource #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -158,7 +149,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -170,9 +160,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -184,7 +171,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -196,15 +182,9 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -214,8 +194,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs index 208983cfb46..7b4879f9f96 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs @@ -53,8 +53,6 @@ public sealed partial class DrawingBrush : TileBrush } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class DrawingBrush : TileBrush private static void DrawingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void DrawingPropertyChanged(DependencyObject d, DependencyPropert DrawingBrush target = ((DrawingBrush) d); - Drawing oldV = (Drawing) e.OldValue; Drawing newV = (Drawing) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -112,7 +106,6 @@ private static void DrawingPropertyChanged(DependencyObject d, DependencyPropert target.PropertyChanged(DrawingProperty); } - #region Public Properties /// @@ -149,8 +142,6 @@ protected override Freezable CreateInstanceCore() return new DrawingBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -248,7 +239,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DRAWINGBRUSH)) { Transform vTransform = Transform; @@ -260,16 +250,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -282,9 +269,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vDrawing != null) ((DUCE.IResource)vDrawing).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -302,7 +287,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -328,8 +312,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -355,16 +337,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -395,7 +372,6 @@ static DrawingBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs index e49a048e740..bbb4f17bea5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of Drawing objects. /// - public sealed partial class DrawingCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class DrawingCollection : Animatable, IList, IList /// @@ -147,7 +143,6 @@ public void Insert(int index, Drawing value) _collection.Insert(index, value); OnInsert(value); - ++_version; WritePostscript(); } @@ -179,7 +174,6 @@ public bool Remove(Drawing value) OnRemove(oldValue); - ++_version; WritePostscript(); @@ -204,7 +198,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -223,13 +216,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) OnRemove(oldValue); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -250,18 +241,17 @@ public Drawing this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Drawing oldValue = _collection[index]; - Drawing oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; + _collection[index] = value; OnSet(oldValue, value); } - ++_version; WritePostscript(); } @@ -543,12 +533,14 @@ internal int AddWithoutFiringPublicEvents(Drawing value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Drawing newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - OnInsert(newValue); + OnInsert(newValue); ++_version; @@ -590,7 +582,6 @@ private void OnSet(object oldValue, object newValue) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -625,11 +616,12 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Drawing newValue = (Drawing)sourceDrawingCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -647,11 +639,12 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Drawing newValue = (Drawing)sourceDrawingCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -669,11 +662,12 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Drawing newValue = (Drawing)sourceDrawingCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -691,11 +685,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Drawing newValue = (Drawing)sourceDrawingCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.FreezeCore. @@ -724,13 +719,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -742,9 +730,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -756,7 +741,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -767,13 +751,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -910,7 +890,6 @@ public Drawing Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -966,9 +945,12 @@ public DrawingCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Drawing newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } @@ -984,12 +966,12 @@ public DrawingCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs index a673acef96f..5405548674a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs @@ -53,8 +53,6 @@ public sealed partial class DrawingGroup : Drawing } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class DrawingGroup : Drawing private static void ChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper DrawingGroup target = ((DrawingGroup) d); - // If this is both non-null and mutable, we need to unhook the Changed event. DrawingCollection oldCollection = null; DrawingCollection newCollection = null; @@ -157,9 +151,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper private static void ClipGeometryPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -177,7 +168,6 @@ private static void ClipGeometryPropertyChanged(DependencyObject d, DependencyPr DrawingGroup target = ((DrawingGroup) d); - Geometry oldV = (Geometry) e.OldValue; Geometry newV = (Geometry) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -206,15 +196,11 @@ private static void OpacityPropertyChanged(DependencyObject d, DependencyPropert { DrawingGroup target = ((DrawingGroup) d); - target.PropertyChanged(OpacityProperty); } private static void OpacityMaskPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -232,7 +218,6 @@ private static void OpacityMaskPropertyChanged(DependencyObject d, DependencyPro DrawingGroup target = ((DrawingGroup) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -260,9 +245,6 @@ private static void OpacityMaskPropertyChanged(DependencyObject d, DependencyPro private static void TransformPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -280,7 +262,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope DrawingGroup target = ((DrawingGroup) d); - Transform oldV = (Transform) e.OldValue; Transform newV = (Transform) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -308,9 +289,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope private static void GuidelineSetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -328,7 +306,6 @@ private static void GuidelineSetPropertyChanged(DependencyObject d, DependencyPr DrawingGroup target = ((DrawingGroup) d); - GuidelineSet oldV = (GuidelineSet) e.OldValue; GuidelineSet newV = (GuidelineSet) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -357,47 +334,35 @@ private static void EdgeModePropertyChanged(DependencyObject d, DependencyProper { DrawingGroup target = ((DrawingGroup) d); - target.PropertyChanged(RenderOptions.EdgeModeProperty); } private static void BitmapEffectPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - DrawingGroup target = ((DrawingGroup) d); - target.PropertyChanged(BitmapEffectProperty); } private static void BitmapEffectInputPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - DrawingGroup target = ((DrawingGroup) d); - target.PropertyChanged(BitmapEffectInputProperty); } private static void BitmapScalingModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DrawingGroup target = ((DrawingGroup) d); - target.PropertyChanged(RenderOptions.BitmapScalingModeProperty); } private static void ClearTypeHintPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DrawingGroup target = ((DrawingGroup) d); - target.PropertyChanged(RenderOptions.ClearTypeHintProperty); } - #region Public Properties /// @@ -539,8 +504,6 @@ protected override Freezable CreateInstanceCore() return new DrawingGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -615,7 +578,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.ChildrenSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < ChildrenCount; i++) { @@ -632,7 +594,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DRAWINGGROUP)) { Geometry vClipGeometry = ClipGeometry; @@ -654,18 +615,16 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).AddRefOnChannel(channel); } } - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -689,10 +648,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).ReleaseOnChannel(channel); } } - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -771,9 +729,6 @@ private void ChildrenItemRemoved(object sender, object item) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -827,10 +782,7 @@ private void ChildrenItemRemoved(object sender, object item) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static DrawingCollection s_Children = DrawingCollection.Empty; internal const double c_Opacity = 1.0; internal const EdgeMode c_EdgeMode = EdgeMode.Unspecified; @@ -840,7 +792,6 @@ private void ChildrenItemRemoved(object sender, object item) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -951,7 +902,6 @@ static DrawingGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs index 2281e35ca36..05f740b383b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs @@ -53,8 +53,6 @@ public sealed partial class DrawingImage : ImageSource } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class DrawingImage : ImageSource private static void DrawingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void DrawingPropertyChanged(DependencyObject d, DependencyPropert DrawingImage target = ((DrawingImage) d); - Drawing oldV = (Drawing) e.OldValue; Drawing newV = (Drawing) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -112,7 +106,6 @@ private static void DrawingPropertyChanged(DependencyObject d, DependencyPropert target.PropertyChanged(DrawingProperty); } - #region Public Properties /// @@ -149,8 +142,6 @@ protected override Freezable CreateInstanceCore() return new DrawingImage(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -193,7 +184,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DRAWINGIMAGE)) { Drawing vDrawing = Drawing; @@ -201,16 +191,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -219,9 +206,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vDrawing != null) ((DUCE.IResource)vDrawing).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -239,7 +224,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -265,8 +249,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -292,16 +274,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -332,7 +309,6 @@ static DrawingImage() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs index 49eea01d28b..3cf20b232b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs @@ -53,8 +53,6 @@ public sealed partial class EllipseGeometry : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,25 +65,21 @@ private static void RadiusXPropertyChanged(DependencyObject d, DependencyPropert { EllipseGeometry target = ((EllipseGeometry) d); - target.PropertyChanged(RadiusXProperty); } private static void RadiusYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { EllipseGeometry target = ((EllipseGeometry) d); - target.PropertyChanged(RadiusYProperty); } private static void CenterPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { EllipseGeometry target = ((EllipseGeometry) d); - target.PropertyChanged(CenterProperty); } - #region Public Properties /// @@ -152,8 +146,6 @@ protected override Freezable CreateInstanceCore() return new EllipseGeometry(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -226,7 +218,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_ELLIPSEGEOMETRY)) { Transform vTransform = Transform; @@ -234,16 +225,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -252,9 +240,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -272,7 +258,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -300,8 +285,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -335,10 +318,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_RadiusX = 0.0; internal const double c_RadiusY = 0.0; internal static Point s_Center = new Point(); @@ -346,7 +326,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -395,7 +374,6 @@ static EllipseGeometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs index f1bbb93ca47..926897ede22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs @@ -53,8 +53,6 @@ public abstract partial class GeneralTransform : Animatable, IFormattable } - - #endregion Public Methods //------------------------------------------------------ @@ -64,12 +62,9 @@ public abstract partial class GeneralTransform : Animatable, IFormattable //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -81,9 +76,6 @@ public abstract partial class GeneralTransform : Animatable, IFormattable #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -95,13 +87,6 @@ public abstract partial class GeneralTransform : Animatable, IFormattable #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -112,7 +97,6 @@ public abstract partial class GeneralTransform : Animatable, IFormattable #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -170,7 +154,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -182,7 +165,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -194,15 +176,9 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -212,8 +188,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs index a532862632f..74413604575 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of GeneralTransform objects. /// - public sealed partial class GeneralTransformCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class GeneralTransformCollection : Animatable, IList, ILis } - - #endregion Public Methods //------------------------------------------------------ @@ -67,7 +64,6 @@ public sealed partial class GeneralTransformCollection : Animatable, IList, ILis // //------------------------------------------------------ - #region IList /// @@ -134,8 +130,6 @@ public void Insert(int index, GeneralTransform value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -165,9 +159,6 @@ public bool Remove(GeneralTransform value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -192,7 +183,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -209,15 +199,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -238,18 +224,15 @@ public GeneralTransform this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + GeneralTransform oldValue = _collection[index]; - GeneralTransform oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -531,13 +514,13 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); GeneralTransform newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -545,8 +528,6 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform value) return index; } - - #endregion Private Helpers private static GeneralTransformCollection s_empty; @@ -555,7 +536,6 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -590,11 +570,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform newValue = (GeneralTransform)sourceGeneralTransformCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -612,11 +591,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform newValue = (GeneralTransform)sourceGeneralTransformCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -634,11 +612,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform newValue = (GeneralTransform)sourceGeneralTransformCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -656,11 +633,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform newValue = (GeneralTransform)sourceGeneralTransformCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -689,13 +665,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -707,9 +676,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -721,7 +687,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -732,13 +697,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -875,7 +836,6 @@ public GeneralTransform Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -931,10 +891,11 @@ public GeneralTransformCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + GeneralTransform newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -949,12 +910,11 @@ public GeneralTransformCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs index 234db9e95ff..4d6e6dc3b49 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs @@ -53,8 +53,6 @@ public sealed partial class GeneralTransformGroup : GeneralTransform } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class GeneralTransformGroup : GeneralTransform //------------------------------------------------------ - - #region Public Properties /// @@ -102,8 +98,6 @@ protected override Freezable CreateInstanceCore() return new GeneralTransformGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -115,13 +109,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -133,9 +120,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -161,16 +145,11 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal static GeneralTransformCollection s_Children = GeneralTransformCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -203,7 +182,6 @@ static GeneralTransformGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs index 554abc34082..34ac837db4f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs @@ -24,7 +24,6 @@ namespace System.Windows.Media { - [TypeConverter(typeof(GeometryConverter))] [ValueSerializer(typeof(GeometryValueSerializer))] // Used by MarkupWriter public abstract partial class Geometry : Animatable, IFormattable, DUCE.IResource @@ -56,8 +55,6 @@ public abstract partial class Geometry : Animatable, IFormattable, DUCE.IResourc } - - #endregion Public Methods //------------------------------------------------------ @@ -75,7 +72,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope target.TransformPropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -90,8 +86,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope return; } - - Transform oldV = (Transform) e.OldValue; Transform newV = (Transform) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -117,7 +111,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope target.PropertyChanged(TransformProperty); } - #region Public Properties /// @@ -146,9 +139,6 @@ public Transform Transform #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -159,7 +149,6 @@ public Transform Transform #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -223,7 +212,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -234,7 +222,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -328,16 +315,11 @@ public static Geometry Parse(string source) #region Internal Fields - - - - internal static Transform s_Transform = Transform.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -370,7 +352,6 @@ static Geometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs index b29016bf964..d64c50ee222 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of Geometry objects. /// - public sealed partial class GeometryCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class GeometryCollection : Animatable, IList, IList /// @@ -147,7 +143,6 @@ public void Insert(int index, Geometry value) _collection.Insert(index, value); OnInsert(value); - ++_version; WritePostscript(); } @@ -179,7 +174,6 @@ public bool Remove(Geometry value) OnRemove(oldValue); - ++_version; WritePostscript(); @@ -204,7 +198,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -223,13 +216,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) OnRemove(oldValue); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -250,18 +241,17 @@ public Geometry this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Geometry oldValue = _collection[index]; - Geometry oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; + _collection[index] = value; OnSet(oldValue, value); } - ++_version; WritePostscript(); } @@ -543,12 +533,14 @@ internal int AddWithoutFiringPublicEvents(Geometry value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Geometry newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - OnInsert(newValue); + OnInsert(newValue); ++_version; @@ -590,7 +582,6 @@ private void OnSet(object oldValue, object newValue) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -625,11 +616,12 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Geometry newValue = (Geometry)sourceGeometryCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -647,11 +639,12 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Geometry newValue = (Geometry)sourceGeometryCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -669,11 +662,12 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Geometry newValue = (Geometry)sourceGeometryCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -691,11 +685,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Geometry newValue = (Geometry)sourceGeometryCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.FreezeCore. @@ -724,13 +719,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -742,9 +730,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -756,7 +741,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -767,13 +751,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -910,7 +890,6 @@ public Geometry Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -966,9 +945,12 @@ public GeometryCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Geometry newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } @@ -984,12 +966,12 @@ public GeometryCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs index 2e7c9ad95b7..d22ff0e965f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs @@ -53,8 +53,6 @@ public sealed partial class GeometryDrawing : Drawing } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class GeometryDrawing : Drawing private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC GeometryDrawing target = ((GeometryDrawing) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -114,9 +108,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC private static void PenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -134,7 +125,6 @@ private static void PenPropertyChanged(DependencyObject d, DependencyPropertyCha GeometryDrawing target = ((GeometryDrawing) d); - Pen oldV = (Pen) e.OldValue; Pen newV = (Pen) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -162,9 +152,6 @@ private static void PenPropertyChanged(DependencyObject d, DependencyPropertyCha private static void GeometryPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -182,7 +169,6 @@ private static void GeometryPropertyChanged(DependencyObject d, DependencyProper GeometryDrawing target = ((GeometryDrawing) d); - Geometry oldV = (Geometry) e.OldValue; Geometry newV = (Geometry) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -208,7 +194,6 @@ private static void GeometryPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(GeometryProperty); } - #region Public Properties /// @@ -275,8 +260,6 @@ protected override Freezable CreateInstanceCore() return new GeometryDrawing(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -325,7 +308,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_GEOMETRYDRAWING)) { Brush vBrush = Brush; @@ -337,16 +319,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -359,9 +338,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vGeometry != null) ((DUCE.IResource)vGeometry).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -379,7 +356,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -391,9 +367,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -427,16 +400,11 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -485,7 +453,6 @@ static GeometryDrawing() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs index 191ee89dcfc..9eb9d8b1ad1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs @@ -53,8 +53,6 @@ public sealed partial class GeometryGroup : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,15 +65,11 @@ private static void FillRulePropertyChanged(DependencyObject d, DependencyProper { GeometryGroup target = ((GeometryGroup) d); - target.PropertyChanged(FillRuleProperty); } private static void ChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -93,7 +87,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper GeometryGroup target = ((GeometryGroup) d); - // If this is both non-null and mutable, we need to unhook the Changed event. GeometryCollection oldCollection = null; GeometryCollection newCollection = null; @@ -162,7 +155,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(ChildrenProperty); } - #region Public Properties /// @@ -214,8 +206,6 @@ protected override Freezable CreateInstanceCore() return new GeometryGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -271,7 +261,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.ChildrenSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < ChildrenCount; i++) { @@ -288,7 +277,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_GEOMETRYGROUP)) { Transform vTransform = Transform; @@ -304,18 +292,16 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).AddRefOnChannel(channel); } } - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -333,10 +319,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).ReleaseOnChannel(channel); } } - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -429,8 +414,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -460,17 +443,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const FillRule c_FillRule = FillRule.EvenOdd; internal static GeometryCollection s_Children = GeometryCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -512,7 +491,6 @@ static GeometryGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs index ac7df18194e..7f001aa75cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs @@ -53,8 +53,6 @@ public sealed partial class GlyphRunDrawing : Drawing } - - #endregion Public Methods //------------------------------------------------------ @@ -67,7 +65,6 @@ private static void GlyphRunPropertyChanged(DependencyObject d, DependencyProper { GlyphRunDrawing target = ((GlyphRunDrawing) d); - GlyphRun oldV = (GlyphRun) e.OldValue; GlyphRun newV = (GlyphRun) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -95,9 +92,6 @@ private static void GlyphRunPropertyChanged(DependencyObject d, DependencyProper private static void ForegroundBrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -115,7 +109,6 @@ private static void ForegroundBrushPropertyChanged(DependencyObject d, Dependenc GlyphRunDrawing target = ((GlyphRunDrawing) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -141,7 +134,6 @@ private static void ForegroundBrushPropertyChanged(DependencyObject d, Dependenc target.PropertyChanged(ForegroundBrushProperty); } - #region Public Properties /// @@ -193,8 +185,6 @@ protected override Freezable CreateInstanceCore() return new GlyphRunDrawing(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -240,7 +230,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_GLYPHRUNDRAWING)) { GlyphRun vGlyphRun = GlyphRun; @@ -250,16 +239,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -270,9 +256,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vForegroundBrush != null) ((DUCE.IResource)vForegroundBrush).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -290,7 +274,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -302,9 +285,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -334,16 +314,11 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -383,7 +358,6 @@ static GlyphRunDrawing() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs index 4b20cd6372f..cb8793dd419 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs @@ -53,8 +53,6 @@ public abstract partial class GradientBrush : Brush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,36 +65,28 @@ private static void ColorInterpolationModePropertyChanged(DependencyObject d, De { GradientBrush target = ((GradientBrush) d); - target.PropertyChanged(ColorInterpolationModeProperty); } private static void MappingModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GradientBrush target = ((GradientBrush) d); - target.PropertyChanged(MappingModeProperty); } private static void SpreadMethodPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GradientBrush target = ((GradientBrush) d); - target.PropertyChanged(SpreadMethodProperty); } private static void GradientStopsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - GradientBrush target = ((GradientBrush) d); - target.PropertyChanged(GradientStopsProperty); } - #region Public Properties /// @@ -170,9 +160,6 @@ public GradientStopCollection GradientStops #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -184,13 +171,6 @@ public GradientStopCollection GradientStops #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -216,8 +196,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -255,10 +233,6 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal const ColorInterpolationMode c_ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation; internal const BrushMappingMode c_MappingMode = BrushMappingMode.RelativeToBoundingBox; internal const GradientSpreadMethod c_SpreadMethod = GradientSpreadMethod.Pad; @@ -267,7 +241,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -327,7 +300,6 @@ static GradientBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs index ba2a440952d..8c547bb966d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of GradientStop objects. /// - public sealed partial class GradientStopCollection : Animatable, IFormattable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class GradientStopCollection : Animatable, IFormattable, I } - - #endregion Public Methods //------------------------------------------------------ @@ -67,7 +64,6 @@ public sealed partial class GradientStopCollection : Animatable, IFormattable, I // //------------------------------------------------------ - #region IList /// @@ -134,8 +130,6 @@ public void Insert(int index, GradientStop value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -165,9 +159,6 @@ public bool Remove(GradientStop value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -192,7 +183,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -209,15 +199,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -238,18 +224,15 @@ public GradientStop this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + GradientStop oldValue = _collection[index]; - GradientStop oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -531,13 +514,13 @@ internal int AddWithoutFiringPublicEvents(GradientStop value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); GradientStop newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -545,8 +528,6 @@ internal int AddWithoutFiringPublicEvents(GradientStop value) return index; } - - #endregion Private Helpers private static GradientStopCollection s_empty; @@ -555,7 +536,6 @@ internal int AddWithoutFiringPublicEvents(GradientStop value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -590,11 +570,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { GradientStop newValue = (GradientStop)sourceGradientStopCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -612,11 +591,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { GradientStop newValue = (GradientStop)sourceGradientStopCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -634,11 +612,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { GradientStop newValue = (GradientStop)sourceGradientStopCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -656,11 +633,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { GradientStop newValue = (GradientStop)sourceGradientStopCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -689,13 +665,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -706,7 +675,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -824,7 +792,6 @@ public static GradientStopCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -835,13 +802,9 @@ public static GradientStopCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -978,7 +941,6 @@ public GradientStop Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -1034,10 +996,11 @@ public GradientStopCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + GradientStop newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -1052,12 +1015,11 @@ public GradientStopCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs index f7db432bb3e..2640117c254 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs @@ -53,8 +53,6 @@ public sealed partial class GuidelineSet : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -66,34 +64,24 @@ public sealed partial class GuidelineSet : Animatable, DUCE.IResource private static void GuidelinesXPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - GuidelineSet target = ((GuidelineSet) d); - target.PropertyChanged(GuidelinesXProperty); } private static void GuidelinesYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - GuidelineSet target = ((GuidelineSet) d); - target.PropertyChanged(GuidelinesYProperty); } private static void IsDynamicPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GuidelineSet target = ((GuidelineSet) d); - target.PropertyChanged(IsDynamicProperty); } - #region Public Properties /// @@ -160,8 +148,6 @@ protected override Freezable CreateInstanceCore() return new GuidelineSet(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -206,7 +192,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh data.GuidelinesYSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < GuidelinesXCount; i++) { @@ -238,10 +223,8 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_GUIDELINESET)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } @@ -257,9 +240,7 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } } } @@ -284,7 +265,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -296,9 +276,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -332,10 +309,7 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static DoubleCollection s_GuidelinesX = DoubleCollection.Empty; internal static DoubleCollection s_GuidelinesY = DoubleCollection.Empty; internal const bool c_IsDynamic = false; @@ -343,7 +317,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -398,7 +371,6 @@ static GuidelineSet() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs index b01ee7801f6..5a6b37f910c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs @@ -53,8 +53,6 @@ public sealed partial class ImageBrush : TileBrush } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class ImageBrush : TileBrush private static void ImageSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void ImageSourcePropertyChanged(DependencyObject d, DependencyPro ImageBrush target = ((ImageBrush) d); - ImageSource oldV = (ImageSource) e.OldValue; ImageSource newV = (ImageSource) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -112,7 +106,6 @@ private static void ImageSourcePropertyChanged(DependencyObject d, DependencyPro target.PropertyChanged(ImageSourceProperty); } - #region Public Properties /// @@ -149,8 +142,6 @@ protected override Freezable CreateInstanceCore() return new ImageBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -248,7 +239,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_IMAGEBRUSH)) { Transform vTransform = Transform; @@ -260,16 +250,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -282,9 +269,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vImageSource != null) ((DUCE.IResource)vImageSource).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -302,7 +287,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -328,8 +312,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -355,16 +337,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -395,7 +372,6 @@ static ImageBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs index 1185fa22e67..1a9ee983999 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs @@ -53,8 +53,6 @@ public sealed partial class ImageDrawing : Drawing } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class ImageDrawing : Drawing private static void ImageSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void ImageSourcePropertyChanged(DependencyObject d, DependencyPro ImageDrawing target = ((ImageDrawing) d); - ImageSource oldV = (ImageSource) e.OldValue; ImageSource newV = (ImageSource) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -115,11 +109,9 @@ private static void RectPropertyChanged(DependencyObject d, DependencyPropertyCh { ImageDrawing target = ((ImageDrawing) d); - target.PropertyChanged(RectProperty); } - #region Public Properties /// @@ -171,8 +163,6 @@ protected override Freezable CreateInstanceCore() return new ImageDrawing(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -223,7 +213,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_IMAGEDRAWING)) { ImageSource vImageSource = ImageSource; @@ -231,16 +220,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -249,9 +235,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vImageSource != null) ((DUCE.IResource)vImageSource).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -269,7 +253,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -281,9 +264,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -313,16 +293,12 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Rect s_Rect = Rect.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -362,7 +338,6 @@ static ImageDrawing() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs index b61a87452b9..fe585a71d19 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs @@ -53,8 +53,6 @@ public abstract partial class ImageSource : Animatable, IFormattable, DUCE.IReso } - - #endregion Public Methods //------------------------------------------------------ @@ -64,12 +62,9 @@ public abstract partial class ImageSource : Animatable, IFormattable, DUCE.IReso //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -81,9 +76,6 @@ public abstract partial class ImageSource : Animatable, IFormattable, DUCE.IReso #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -94,7 +86,6 @@ public abstract partial class ImageSource : Animatable, IFormattable, DUCE.IReso #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -158,7 +149,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -169,7 +159,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -227,7 +216,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -239,7 +227,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -251,15 +238,9 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -269,8 +250,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs index a5089ad0599..88a71f7f7c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs @@ -58,8 +58,6 @@ public sealed partial class Int32Collection : Freezable, IFormattable, IList, IL } - - #endregion Public Methods //------------------------------------------------------ @@ -68,7 +66,6 @@ public sealed partial class Int32Collection : Freezable, IFormattable, IList, IL // //------------------------------------------------------ - #region IList /// @@ -117,12 +114,9 @@ public int IndexOf(int value) /// public void Insert(int index, int value) { - - WritePreamble(); _collection.Insert(index, value); - ++_version; WritePostscript(); } @@ -164,7 +158,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -176,13 +169,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) WritePreamble(); _collection.RemoveAt(index); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -196,11 +187,8 @@ public int this[int index] } set { - - WritePreamble(); - _collection[ index ] = value; - + _collection[index] = value; ++_version; WritePostscript(); @@ -441,7 +429,6 @@ internal int Internal_GetItem(int i) } - #endregion #region Private Helpers @@ -476,11 +463,9 @@ internal int AddWithoutFiringPublicEvents(int value) { int index = -1; - WritePreamble(); index = _collection.Add(value); - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -488,8 +473,6 @@ internal int AddWithoutFiringPublicEvents(int value) return index; } - - #endregion Private Helpers private static Int32Collection s_empty; @@ -498,7 +481,6 @@ internal int AddWithoutFiringPublicEvents(int value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -534,7 +516,6 @@ protected override void CloneCore(Freezable source) { _collection.Add(sourceInt32Collection._collection[i]); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -553,7 +534,6 @@ protected override void CloneCurrentValueCore(Freezable source) { _collection.Add(sourceInt32Collection._collection[i]); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -572,7 +552,6 @@ protected override void GetAsFrozenCore(Freezable source) { _collection.Add(sourceInt32Collection._collection[i]); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -591,10 +570,8 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) { _collection.Add(sourceInt32Collection._collection[i]); } - } - #endregion ProtectedMethods //------------------------------------------------------ @@ -606,13 +583,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -623,7 +593,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -739,7 +708,6 @@ public static Int32Collection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -750,13 +718,9 @@ public static Int32Collection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -893,7 +857,6 @@ public int Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -945,7 +908,6 @@ public Int32Collection(IEnumerable collection) foreach (int item in collection) { - _collection.Add(item); } @@ -958,7 +920,6 @@ public Int32Collection(IEnumerable collection) - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs index c4add07549c..6f2592ac80a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs @@ -53,8 +53,6 @@ public sealed partial class LineGeometry : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,18 +65,15 @@ private static void StartPointPropertyChanged(DependencyObject d, DependencyProp { LineGeometry target = ((LineGeometry) d); - target.PropertyChanged(StartPointProperty); } private static void EndPointPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { LineGeometry target = ((LineGeometry) d); - target.PropertyChanged(EndPointProperty); } - #region Public Properties /// @@ -130,8 +125,6 @@ protected override Freezable CreateInstanceCore() return new LineGeometry(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -198,7 +191,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_LINEGEOMETRY)) { Transform vTransform = Transform; @@ -206,16 +198,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -224,9 +213,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -244,7 +231,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -256,9 +242,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -288,17 +271,13 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Point s_StartPoint = new Point(); internal static Point s_EndPoint = new Point(); #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -338,7 +317,6 @@ static LineGeometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs index a20e7138efa..7087eb731bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs @@ -53,8 +53,6 @@ public sealed partial class LineSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class LineSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -102,8 +98,6 @@ protected override Freezable CreateInstanceCore() return new LineSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -115,13 +109,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -147,8 +134,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -174,16 +159,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static Point s_Point = new Point(); #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -214,7 +194,6 @@ static LineSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs index 3e6e69c8773..6d7c3e6c71d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs @@ -53,8 +53,6 @@ public sealed partial class LinearGradientBrush : GradientBrush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,18 +65,15 @@ private static void StartPointPropertyChanged(DependencyObject d, DependencyProp { LinearGradientBrush target = ((LinearGradientBrush) d); - target.PropertyChanged(StartPointProperty); } private static void EndPointPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { LinearGradientBrush target = ((LinearGradientBrush) d); - target.PropertyChanged(EndPointProperty); } - #region Public Properties /// @@ -130,8 +125,6 @@ protected override Freezable CreateInstanceCore() return new LinearGradientBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -149,7 +142,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_LINEARGRADIENTBRUSH)) { Transform vTransform = Transform; @@ -159,16 +151,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -179,9 +168,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vRelativeTransform != null) ((DUCE.IResource)vRelativeTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -199,7 +186,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -227,8 +213,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -258,17 +242,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Point s_StartPoint = new Point(0,0); internal static Point s_EndPoint = new Point(1,1); #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -308,7 +288,6 @@ static LinearGradientBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs index e988bdd3c95..40f8652b5a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs @@ -53,8 +53,6 @@ public sealed partial class MatrixTransform : Transform } - - #endregion Public Methods //------------------------------------------------------ @@ -67,11 +65,9 @@ private static void MatrixPropertyChanged(DependencyObject d, DependencyProperty { MatrixTransform target = ((MatrixTransform) d); - target.PropertyChanged(MatrixProperty); } - #region Public Properties /// @@ -108,8 +104,6 @@ protected override Freezable CreateInstanceCore() return new MatrixTransform(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -153,33 +147,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_MATRIXTRANSFORM)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -197,7 +183,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -223,8 +208,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -250,16 +233,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Matrix s_Matrix = new Matrix(); #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -290,7 +269,6 @@ static MatrixTransform() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs index 94b1889bfa3..513421caaac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs @@ -53,8 +53,6 @@ public partial class MediaTimeline : Timeline } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public partial class MediaTimeline : Timeline //------------------------------------------------------ - - #region Public Properties /// @@ -102,8 +98,6 @@ protected override Freezable CreateInstanceCore() return new MediaTimeline(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -115,13 +109,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -147,8 +134,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -174,16 +159,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static Uri s_Source = null; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -214,7 +194,6 @@ static MediaTimeline() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs index e913fa7e068..447fd160d4d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs @@ -53,8 +53,6 @@ public sealed partial class PathFigure : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class PathFigure : Animatable //------------------------------------------------------ - - #region Public Properties /// @@ -147,8 +143,6 @@ protected override Freezable CreateInstanceCore() return new PathFigure(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -160,13 +154,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -194,8 +181,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -233,10 +218,6 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static Point s_StartPoint = new Point(); internal const bool c_IsFilled = true; internal static PathSegmentCollection s_Segments = PathSegmentCollection.Empty; @@ -245,7 +226,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -305,7 +285,6 @@ static PathFigure() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs index 0c0ecea03f8..9c129e7bf6f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs @@ -58,8 +58,6 @@ public sealed partial class PathFigureCollection : Animatable, IFormattable, ILi } - - #endregion Public Methods //------------------------------------------------------ @@ -68,7 +66,6 @@ public sealed partial class PathFigureCollection : Animatable, IFormattable, ILi // //------------------------------------------------------ - #region IList /// @@ -135,8 +132,6 @@ public void Insert(int index, PathFigure value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -166,9 +161,6 @@ public bool Remove(PathFigure value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -193,7 +185,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -210,15 +201,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -239,18 +226,15 @@ public PathFigure this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + PathFigure oldValue = _collection[index]; - PathFigure oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -532,13 +516,13 @@ internal int AddWithoutFiringPublicEvents(PathFigure value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); PathFigure newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -546,8 +530,6 @@ internal int AddWithoutFiringPublicEvents(PathFigure value) return index; } - - #endregion Private Helpers private static PathFigureCollection s_empty; @@ -556,7 +538,6 @@ internal int AddWithoutFiringPublicEvents(PathFigure value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -591,11 +572,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { PathFigure newValue = (PathFigure)sourcePathFigureCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -613,11 +593,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { PathFigure newValue = (PathFigure)sourcePathFigureCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -635,11 +614,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { PathFigure newValue = (PathFigure)sourcePathFigureCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -657,11 +635,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { PathFigure newValue = (PathFigure)sourcePathFigureCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -690,13 +667,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -707,7 +677,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -811,7 +780,6 @@ public static PathFigureCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -822,13 +790,9 @@ public static PathFigureCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -965,7 +929,6 @@ public PathFigure Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -1021,10 +984,11 @@ public PathFigureCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + PathFigure newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -1039,12 +1003,11 @@ public PathFigureCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs index 0ad690eb764..4ff0b267612 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs @@ -53,8 +53,6 @@ public sealed partial class PathGeometry : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,7 +65,6 @@ private static void FillRulePropertyChanged(DependencyObject d, DependencyProper { PathGeometry target = ((PathGeometry) d); - target.PropertyChanged(FillRuleProperty); } private static void FiguresPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) @@ -78,13 +75,9 @@ private static void FiguresPropertyChanged(DependencyObject d, DependencyPropert target.FiguresPropertyChangedHook(e); - - - target.PropertyChanged(FiguresProperty); } - #region Public Properties /// @@ -136,8 +129,6 @@ protected override Freezable CreateInstanceCore() return new PathGeometry(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -155,7 +146,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_PATHGEOMETRY)) { Transform vTransform = Transform; @@ -163,16 +153,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -181,9 +168,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -201,7 +186,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -227,8 +211,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -258,17 +240,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const FillRule c_FillRule = FillRule.EvenOdd; internal static PathFigureCollection s_Figures = PathFigureCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -310,7 +288,6 @@ static PathGeometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs index b309cccd929..baa1a8c8b3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs @@ -53,8 +53,6 @@ public abstract partial class PathSegment : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public abstract partial class PathSegment : Animatable //------------------------------------------------------ - - #region Public Properties /// @@ -109,9 +105,6 @@ public bool IsSmoothJoin #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -123,13 +116,6 @@ public bool IsSmoothJoin #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -141,9 +127,6 @@ public bool IsSmoothJoin #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -173,17 +156,12 @@ public bool IsSmoothJoin #region Internal Fields - - - - internal const bool c_IsStroked = true; internal const bool c_IsSmoothJoin = false; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -223,7 +201,6 @@ static PathSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs index e39eb3a6a89..c27d975ede0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of PathSegment objects. /// - public sealed partial class PathSegmentCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class PathSegmentCollection : Animatable, IList, IList /// @@ -134,8 +130,6 @@ public void Insert(int index, PathSegment value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -165,9 +159,6 @@ public bool Remove(PathSegment value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -192,7 +183,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -209,15 +199,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -238,18 +224,15 @@ public PathSegment this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + PathSegment oldValue = _collection[index]; - PathSegment oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -531,13 +514,13 @@ internal int AddWithoutFiringPublicEvents(PathSegment value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); PathSegment newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -545,8 +528,6 @@ internal int AddWithoutFiringPublicEvents(PathSegment value) return index; } - - #endregion Private Helpers private static PathSegmentCollection s_empty; @@ -555,7 +536,6 @@ internal int AddWithoutFiringPublicEvents(PathSegment value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -590,11 +570,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { PathSegment newValue = (PathSegment)sourcePathSegmentCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -612,11 +591,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { PathSegment newValue = (PathSegment)sourcePathSegmentCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -634,11 +612,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { PathSegment newValue = (PathSegment)sourcePathSegmentCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -656,11 +633,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { PathSegment newValue = (PathSegment)sourcePathSegmentCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -689,13 +665,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -707,9 +676,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -721,7 +687,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -732,13 +697,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -875,7 +836,6 @@ public PathSegment Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -931,10 +891,11 @@ public PathSegmentCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + PathSegment newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -949,12 +910,11 @@ public PathSegmentCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs index 5e77b3ab9c5..f16888927b0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs @@ -53,8 +53,6 @@ public sealed partial class Pen : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class Pen : Animatable, DUCE.IResource private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC Pen target = ((Pen) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -115,50 +109,41 @@ private static void ThicknessPropertyChanged(DependencyObject d, DependencyPrope { Pen target = ((Pen) d); - target.PropertyChanged(ThicknessProperty); } private static void StartLineCapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Pen target = ((Pen) d); - target.PropertyChanged(StartLineCapProperty); } private static void EndLineCapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Pen target = ((Pen) d); - target.PropertyChanged(EndLineCapProperty); } private static void DashCapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Pen target = ((Pen) d); - target.PropertyChanged(DashCapProperty); } private static void LineJoinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Pen target = ((Pen) d); - target.PropertyChanged(LineJoinProperty); } private static void MiterLimitPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Pen target = ((Pen) d); - target.PropertyChanged(MiterLimitProperty); } private static void DashStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -176,7 +161,6 @@ private static void DashStylePropertyChanged(DependencyObject d, DependencyPrope Pen target = ((Pen) d); - DashStyle oldV = (DashStyle) e.OldValue; DashStyle newV = (DashStyle) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -202,7 +186,6 @@ private static void DashStylePropertyChanged(DependencyObject d, DependencyPrope target.PropertyChanged(DashStyleProperty); } - #region Public Properties /// @@ -344,8 +327,6 @@ protected override Freezable CreateInstanceCore() return new Pen(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -415,7 +396,6 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } @@ -436,7 +416,6 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) if (vDashStyle != null) ((DUCE.IResource)vDashStyle).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } } } @@ -461,7 +440,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -473,9 +451,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -529,10 +504,7 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_Thickness = 1.0; internal const PenLineCap c_StartLineCap = PenLineCap.Flat; internal const PenLineCap c_EndLineCap = PenLineCap.Flat; @@ -544,7 +516,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -640,7 +611,6 @@ static Pen() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs index 3edd6c9abe3..0e6e689ee89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs @@ -58,8 +58,6 @@ public sealed partial class PointCollection : Freezable, IFormattable, IList, IL } - - #endregion Public Methods //------------------------------------------------------ @@ -68,7 +66,6 @@ public sealed partial class PointCollection : Freezable, IFormattable, IList, IL // //------------------------------------------------------ - #region IList /// @@ -117,12 +114,9 @@ public int IndexOf(Point value) /// public void Insert(int index, Point value) { - - WritePreamble(); _collection.Insert(index, value); - ++_version; WritePostscript(); } @@ -164,7 +158,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -176,13 +169,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) WritePreamble(); _collection.RemoveAt(index); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -196,11 +187,8 @@ public Point this[int index] } set { - - WritePreamble(); - _collection[ index ] = value; - + _collection[index] = value; ++_version; WritePostscript(); @@ -441,7 +429,6 @@ internal Point Internal_GetItem(int i) } - #endregion #region Private Helpers @@ -476,11 +463,9 @@ internal int AddWithoutFiringPublicEvents(Point value) { int index = -1; - WritePreamble(); index = _collection.Add(value); - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -488,8 +473,6 @@ internal int AddWithoutFiringPublicEvents(Point value) return index; } - - #endregion Private Helpers private static PointCollection s_empty; @@ -498,7 +481,6 @@ internal int AddWithoutFiringPublicEvents(Point value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -534,7 +516,6 @@ protected override void CloneCore(Freezable source) { _collection.Add(sourcePointCollection._collection[i]); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -553,7 +534,6 @@ protected override void CloneCurrentValueCore(Freezable source) { _collection.Add(sourcePointCollection._collection[i]); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -572,7 +552,6 @@ protected override void GetAsFrozenCore(Freezable source) { _collection.Add(sourcePointCollection._collection[i]); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -591,10 +570,8 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) { _collection.Add(sourcePointCollection._collection[i]); } - } - #endregion ProtectedMethods //------------------------------------------------------ @@ -606,13 +583,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -623,7 +593,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -741,7 +710,6 @@ public static PointCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -752,13 +720,9 @@ public static PointCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -895,7 +859,6 @@ public Point Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -947,7 +910,6 @@ public PointCollection(IEnumerable collection) foreach (Point item in collection) { - _collection.Add(item); } @@ -960,7 +922,6 @@ public PointCollection(IEnumerable collection) - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs index 7ea345f22a1..2fdfeba1e79 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs @@ -53,8 +53,6 @@ public sealed partial class PolyBezierSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class PolyBezierSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -102,8 +98,6 @@ protected override Freezable CreateInstanceCore() return new PolyBezierSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -115,13 +109,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -147,8 +134,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -174,16 +159,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static PointCollection s_Points = PointCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -216,7 +196,6 @@ static PolyBezierSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs index 7a7f925a040..17a6a0a7b31 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs @@ -53,8 +53,6 @@ public sealed partial class PolyLineSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class PolyLineSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -102,8 +98,6 @@ protected override Freezable CreateInstanceCore() return new PolyLineSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -115,13 +109,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -147,8 +134,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -174,16 +159,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static PointCollection s_Points = PointCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -216,7 +196,6 @@ static PolyLineSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs index 12f610377b4..a58df0ee553 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs @@ -53,8 +53,6 @@ public sealed partial class PolyQuadraticBezierSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class PolyQuadraticBezierSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -102,8 +98,6 @@ protected override Freezable CreateInstanceCore() return new PolyQuadraticBezierSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -115,13 +109,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -147,8 +134,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -174,16 +159,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static PointCollection s_Points = PointCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -216,7 +196,6 @@ static PolyQuadraticBezierSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs index 705504163f4..20c4a6ed900 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs @@ -53,8 +53,6 @@ public sealed partial class QuadraticBezierSegment : PathSegment } - - #endregion Public Methods //------------------------------------------------------ @@ -64,8 +62,6 @@ public sealed partial class QuadraticBezierSegment : PathSegment //------------------------------------------------------ - - #region Public Properties /// @@ -117,8 +113,6 @@ protected override Freezable CreateInstanceCore() return new QuadraticBezierSegment(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -130,13 +124,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -148,9 +135,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -180,17 +164,12 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal static Point s_Point1 = new Point(); internal static Point s_Point2 = new Point(); #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -230,7 +209,6 @@ static QuadraticBezierSegment() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs index 43f3af77b99..f601520651f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs @@ -53,8 +53,6 @@ public sealed partial class RadialGradientBrush : GradientBrush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,32 +65,27 @@ private static void CenterPropertyChanged(DependencyObject d, DependencyProperty { RadialGradientBrush target = ((RadialGradientBrush) d); - target.PropertyChanged(CenterProperty); } private static void RadiusXPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RadialGradientBrush target = ((RadialGradientBrush) d); - target.PropertyChanged(RadiusXProperty); } private static void RadiusYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RadialGradientBrush target = ((RadialGradientBrush) d); - target.PropertyChanged(RadiusYProperty); } private static void GradientOriginPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RadialGradientBrush target = ((RadialGradientBrush) d); - target.PropertyChanged(GradientOriginProperty); } - #region Public Properties /// @@ -174,8 +167,6 @@ protected override Freezable CreateInstanceCore() return new RadialGradientBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -193,7 +184,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_RADIALGRADIENTBRUSH)) { Transform vTransform = Transform; @@ -203,16 +193,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -223,9 +210,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vRelativeTransform != null) ((DUCE.IResource)vRelativeTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -243,7 +228,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -269,8 +253,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -308,10 +290,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Point s_Center = new Point(0.5,0.5); internal const double c_RadiusX = 0.5; internal const double c_RadiusY = 0.5; @@ -320,7 +299,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -378,7 +356,6 @@ static RadialGradientBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs index d58d120500d..3155e208849 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs @@ -53,8 +53,6 @@ public sealed partial class RectangleGeometry : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,25 +65,21 @@ private static void RadiusXPropertyChanged(DependencyObject d, DependencyPropert { RectangleGeometry target = ((RectangleGeometry) d); - target.PropertyChanged(RadiusXProperty); } private static void RadiusYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RectangleGeometry target = ((RectangleGeometry) d); - target.PropertyChanged(RadiusYProperty); } private static void RectPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RectangleGeometry target = ((RectangleGeometry) d); - target.PropertyChanged(RectProperty); } - #region Public Properties /// @@ -152,8 +146,6 @@ protected override Freezable CreateInstanceCore() return new RectangleGeometry(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -226,7 +218,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_RECTANGLEGEOMETRY)) { Transform vTransform = Transform; @@ -234,16 +225,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -252,9 +240,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -272,7 +258,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -298,8 +283,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -333,10 +316,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_RadiusX = 0.0; internal const double c_RadiusY = 0.0; internal static Rect s_Rect = Rect.Empty; @@ -344,7 +324,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -393,7 +372,6 @@ static RectangleGeometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs index fd2373458ae..dccdbac370a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs @@ -53,8 +53,6 @@ public sealed partial class RotateTransform : Transform } - - #endregion Public Methods //------------------------------------------------------ @@ -67,25 +65,21 @@ private static void AnglePropertyChanged(DependencyObject d, DependencyPropertyC { RotateTransform target = ((RotateTransform) d); - target.PropertyChanged(AngleProperty); } private static void CenterXPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RotateTransform target = ((RotateTransform) d); - target.PropertyChanged(CenterXProperty); } private static void CenterYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RotateTransform target = ((RotateTransform) d); - target.PropertyChanged(CenterYProperty); } - #region Public Properties /// @@ -152,8 +146,6 @@ protected override Freezable CreateInstanceCore() return new RotateTransform(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -209,33 +201,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_ROTATETRANSFORM)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -253,7 +237,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -265,9 +248,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -301,10 +281,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_Angle = 0.0; internal const double c_CenterX = 0.0; internal const double c_CenterY = 0.0; @@ -312,7 +289,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -361,7 +337,6 @@ static RotateTransform() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs index 6c35f002b58..2980f2021c1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs @@ -53,8 +53,6 @@ public sealed partial class ScaleTransform : Transform } - - #endregion Public Methods //------------------------------------------------------ @@ -67,32 +65,27 @@ private static void ScaleXPropertyChanged(DependencyObject d, DependencyProperty { ScaleTransform target = ((ScaleTransform) d); - target.PropertyChanged(ScaleXProperty); } private static void ScaleYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ScaleTransform target = ((ScaleTransform) d); - target.PropertyChanged(ScaleYProperty); } private static void CenterXPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ScaleTransform target = ((ScaleTransform) d); - target.PropertyChanged(CenterXProperty); } private static void CenterYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ScaleTransform target = ((ScaleTransform) d); - target.PropertyChanged(CenterYProperty); } - #region Public Properties /// @@ -174,8 +167,6 @@ protected override Freezable CreateInstanceCore() return new ScaleTransform(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -237,33 +228,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SCALETRANSFORM)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -281,7 +264,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -293,9 +275,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -333,10 +312,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_ScaleX = 1.0; internal const double c_ScaleY = 1.0; internal const double c_CenterX = 0.0; @@ -345,7 +321,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -403,7 +378,6 @@ static ScaleTransform() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs index 95ee06e3aa8..303e1271c5e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs @@ -53,8 +53,6 @@ public sealed partial class SkewTransform : Transform } - - #endregion Public Methods //------------------------------------------------------ @@ -67,32 +65,27 @@ private static void AngleXPropertyChanged(DependencyObject d, DependencyProperty { SkewTransform target = ((SkewTransform) d); - target.PropertyChanged(AngleXProperty); } private static void AngleYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SkewTransform target = ((SkewTransform) d); - target.PropertyChanged(AngleYProperty); } private static void CenterXPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SkewTransform target = ((SkewTransform) d); - target.PropertyChanged(CenterXProperty); } private static void CenterYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SkewTransform target = ((SkewTransform) d); - target.PropertyChanged(CenterYProperty); } - #region Public Properties /// @@ -174,8 +167,6 @@ protected override Freezable CreateInstanceCore() return new SkewTransform(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -237,33 +228,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SKEWTRANSFORM)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -281,7 +264,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -293,9 +275,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -333,10 +312,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_AngleX = 0.0; internal const double c_AngleY = 0.0 ; internal const double c_CenterX = 0.0; @@ -345,7 +321,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -403,7 +378,6 @@ static SkewTransform() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs index 7039e365b75..583a8ca02c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs @@ -53,8 +53,6 @@ public sealed partial class SolidColorBrush : Brush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,11 +65,9 @@ private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyC { SolidColorBrush target = ((SolidColorBrush) d); - target.PropertyChanged(ColorProperty); } - #region Public Properties /// @@ -108,8 +104,6 @@ protected override Freezable CreateInstanceCore() return new SolidColorBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -189,7 +183,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SOLIDCOLORBRUSH)) { Transform vTransform = Transform; @@ -199,16 +192,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -219,9 +209,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vRelativeTransform != null) ((DUCE.IResource)vRelativeTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -239,7 +227,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -265,8 +252,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -292,16 +277,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Color s_Color = Colors.Transparent; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -332,7 +313,6 @@ static SolidColorBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs index 2c3b04f43a1..b24dd29f2ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs @@ -53,8 +53,6 @@ public sealed partial class StreamGeometry : Geometry } - - #endregion Public Methods //------------------------------------------------------ @@ -67,11 +65,9 @@ private static void FillRulePropertyChanged(DependencyObject d, DependencyProper { StreamGeometry target = ((StreamGeometry) d); - target.PropertyChanged(FillRuleProperty); } - #region Public Properties /// @@ -108,8 +104,6 @@ protected override Freezable CreateInstanceCore() return new StreamGeometry(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -121,13 +115,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -139,9 +126,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -167,16 +151,11 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const FillRule c_FillRule = FillRule.EvenOdd; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -207,7 +186,6 @@ static StreamGeometry() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs index 18985b38a42..ac600a9a541 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs @@ -53,8 +53,6 @@ public sealed partial class TextEffect : Animatable } - - #endregion Public Methods //------------------------------------------------------ @@ -84,7 +82,6 @@ private static bool ValidatePositionCountValue(object value) return true; } - #region Public Properties /// @@ -186,8 +183,6 @@ protected override Freezable CreateInstanceCore() return new TextEffect(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -199,13 +194,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -217,9 +205,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -261,17 +246,12 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal const int c_PositionStart = 0; internal const int c_PositionCount = 0; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -338,7 +318,6 @@ static TextEffect() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs index 2d69fe808e2..7757412559d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of TextEffect objects. /// - public sealed partial class TextEffectCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class TextEffectCollection : Animatable, IList, IList /// @@ -134,8 +130,6 @@ public void Insert(int index, TextEffect value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -165,9 +159,6 @@ public bool Remove(TextEffect value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -192,7 +183,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -209,15 +199,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -238,18 +224,15 @@ public TextEffect this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + TextEffect oldValue = _collection[index]; - TextEffect oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -531,13 +514,13 @@ internal int AddWithoutFiringPublicEvents(TextEffect value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); TextEffect newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -545,8 +528,6 @@ internal int AddWithoutFiringPublicEvents(TextEffect value) return index; } - - #endregion Private Helpers private static TextEffectCollection s_empty; @@ -555,7 +536,6 @@ internal int AddWithoutFiringPublicEvents(TextEffect value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -590,11 +570,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { TextEffect newValue = (TextEffect)sourceTextEffectCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -612,11 +591,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { TextEffect newValue = (TextEffect)sourceTextEffectCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -634,11 +612,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { TextEffect newValue = (TextEffect)sourceTextEffectCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -656,11 +633,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { TextEffect newValue = (TextEffect)sourceTextEffectCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -689,13 +665,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -707,9 +676,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -721,7 +687,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -732,13 +697,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -875,7 +836,6 @@ public TextEffect Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -931,10 +891,11 @@ public TextEffectCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + TextEffect newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -949,12 +910,11 @@ public TextEffectCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs index ae9016acd69..2d1dae36f9a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs @@ -53,8 +53,6 @@ public abstract partial class TileBrush : Brush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,81 +65,69 @@ private static void ViewportUnitsPropertyChanged(DependencyObject d, DependencyP { TileBrush target = ((TileBrush) d); - target.PropertyChanged(ViewportUnitsProperty); } private static void ViewboxUnitsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(ViewboxUnitsProperty); } private static void ViewportPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(ViewportProperty); } private static void ViewboxPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(ViewboxProperty); } private static void StretchPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(StretchProperty); } private static void TileModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(TileModeProperty); } private static void AlignmentXPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(AlignmentXProperty); } private static void AlignmentYPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(AlignmentYProperty); } private static void CachingHintPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(RenderOptions.CachingHintProperty); } private static void CacheInvalidationThresholdMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(RenderOptions.CacheInvalidationThresholdMinimumProperty); } private static void CacheInvalidationThresholdMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TileBrush target = ((TileBrush) d); - target.PropertyChanged(RenderOptions.CacheInvalidationThresholdMaximumProperty); } - #region Public Properties /// @@ -275,9 +261,6 @@ public AlignmentY AlignmentY #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -289,13 +272,6 @@ public AlignmentY AlignmentY #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -307,9 +283,6 @@ public AlignmentY AlignmentY #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -363,10 +336,6 @@ public AlignmentY AlignmentY #region Internal Fields - - - - internal const BrushMappingMode c_ViewportUnits = BrushMappingMode.RelativeToBoundingBox; internal const BrushMappingMode c_ViewboxUnits = BrushMappingMode.RelativeToBoundingBox; internal static Rect s_Viewport = new Rect(0,0,1,1); @@ -382,7 +351,6 @@ public AlignmentY AlignmentY #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -489,7 +457,6 @@ static TileBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs index 88f91e7299e..69effdc357b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs @@ -24,7 +24,6 @@ namespace System.Windows.Media { - [TypeConverter(typeof(TransformConverter))] [ValueSerializer(typeof(TransformValueSerializer))] // Used by MarkupWriter public abstract partial class Transform : GeneralTransform, DUCE.IResource @@ -56,8 +55,6 @@ public abstract partial class Transform : GeneralTransform, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -67,12 +64,9 @@ public abstract partial class Transform : GeneralTransform, DUCE.IResource //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -84,9 +78,6 @@ public abstract partial class Transform : GeneralTransform, DUCE.IResource #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -97,7 +88,6 @@ public abstract partial class Transform : GeneralTransform, DUCE.IResource #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -161,7 +151,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -172,8 +161,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - /// /// Parse - returns an instance converted from the provided string /// using the current culture @@ -197,7 +184,6 @@ public static Transform Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -209,15 +195,9 @@ public static Transform Parse(string source) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -227,8 +207,6 @@ public static Transform Parse(string source) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs index e36530735bf..7aef3c46b5a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs @@ -27,7 +27,6 @@ namespace System.Windows.Media /// /// A collection of Transform objects. /// - public sealed partial class TransformCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -57,8 +56,6 @@ public sealed partial class TransformCollection : Animatable, IList, IList /// @@ -147,7 +143,6 @@ public void Insert(int index, Transform value) _collection.Insert(index, value); OnInsert(value); - ++_version; WritePostscript(); } @@ -179,7 +174,6 @@ public bool Remove(Transform value) OnRemove(oldValue); - ++_version; WritePostscript(); @@ -204,7 +198,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -223,13 +216,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) OnRemove(oldValue); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -250,18 +241,17 @@ public Transform this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Transform oldValue = _collection[index]; - Transform oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; + _collection[index] = value; OnSet(oldValue, value); } - ++_version; WritePostscript(); } @@ -543,12 +533,14 @@ internal int AddWithoutFiringPublicEvents(Transform value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Transform newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - OnInsert(newValue); + OnInsert(newValue); ++_version; @@ -590,7 +582,6 @@ private void OnSet(object oldValue, object newValue) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -625,11 +616,12 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Transform newValue = (Transform)sourceTransformCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -647,11 +639,12 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Transform newValue = (Transform)sourceTransformCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -669,11 +662,12 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Transform newValue = (Transform)sourceTransformCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -691,11 +685,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Transform newValue = (Transform)sourceTransformCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.FreezeCore. @@ -724,13 +719,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -742,9 +730,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -756,7 +741,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -767,13 +751,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -910,7 +890,6 @@ public Transform Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -966,9 +945,12 @@ public TransformCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Transform newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } @@ -984,12 +966,12 @@ public TransformCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs index a4991dc2b5c..8b275ffd1c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs @@ -53,8 +53,6 @@ public sealed partial class TransformGroup : Transform } - - #endregion Public Methods //------------------------------------------------------ @@ -66,9 +64,6 @@ public sealed partial class TransformGroup : Transform private static void ChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -86,7 +81,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper TransformGroup target = ((TransformGroup) d); - // If this is both non-null and mutable, we need to unhook the Changed event. TransformCollection oldCollection = null; TransformCollection newCollection = null; @@ -155,7 +149,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(ChildrenProperty); } - #region Public Properties /// @@ -192,8 +185,6 @@ protected override Freezable CreateInstanceCore() return new TransformGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -233,7 +224,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.ChildrenSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < ChildrenCount; i++) { @@ -250,11 +240,9 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_TRANSFORMGROUP)) { - TransformCollection vChildren = Children; if (vChildren != null) @@ -265,24 +253,21 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).AddRefOnChannel(channel); } } - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - TransformCollection vChildren = Children; if (vChildren != null) @@ -293,10 +278,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).ReleaseOnChannel(channel); } } - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -389,8 +373,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -416,16 +398,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static TransformCollection s_Children = TransformCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -458,7 +436,6 @@ static TransformGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs index d95b23f1f3e..3264770ecc1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs @@ -53,8 +53,6 @@ public sealed partial class TranslateTransform : Transform } - - #endregion Public Methods //------------------------------------------------------ @@ -67,18 +65,15 @@ private static void XPropertyChanged(DependencyObject d, DependencyPropertyChang { TranslateTransform target = ((TranslateTransform) d); - target.PropertyChanged(XProperty); } private static void YPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TranslateTransform target = ((TranslateTransform) d); - target.PropertyChanged(YProperty); } - #region Public Properties /// @@ -130,8 +125,6 @@ protected override Freezable CreateInstanceCore() return new TranslateTransform(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -181,33 +174,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_TRANSLATETRANSFORM)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -225,7 +210,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -237,9 +221,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -269,17 +250,13 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_X = 0.0; internal const double c_Y = 0.0; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -319,7 +296,6 @@ static TranslateTransform() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs index b4d22f1dfaa..731b649b5d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs @@ -58,8 +58,6 @@ public sealed partial class VectorCollection : Freezable, IFormattable, IList, I } - - #endregion Public Methods //------------------------------------------------------ @@ -68,7 +66,6 @@ public sealed partial class VectorCollection : Freezable, IFormattable, IList, I // //------------------------------------------------------ - #region IList /// @@ -117,12 +114,9 @@ public int IndexOf(Vector value) /// public void Insert(int index, Vector value) { - - WritePreamble(); _collection.Insert(index, value); - ++_version; WritePostscript(); } @@ -164,7 +158,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -176,13 +169,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) WritePreamble(); _collection.RemoveAt(index); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -196,11 +187,8 @@ public Vector this[int index] } set { - - WritePreamble(); - _collection[ index ] = value; - + _collection[index] = value; ++_version; WritePostscript(); @@ -441,7 +429,6 @@ internal Vector Internal_GetItem(int i) } - #endregion #region Private Helpers @@ -476,11 +463,9 @@ internal int AddWithoutFiringPublicEvents(Vector value) { int index = -1; - WritePreamble(); index = _collection.Add(value); - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -488,8 +473,6 @@ internal int AddWithoutFiringPublicEvents(Vector value) return index; } - - #endregion Private Helpers private static VectorCollection s_empty; @@ -498,7 +481,6 @@ internal int AddWithoutFiringPublicEvents(Vector value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -534,7 +516,6 @@ protected override void CloneCore(Freezable source) { _collection.Add(sourceVectorCollection._collection[i]); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -553,7 +534,6 @@ protected override void CloneCurrentValueCore(Freezable source) { _collection.Add(sourceVectorCollection._collection[i]); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -572,7 +552,6 @@ protected override void GetAsFrozenCore(Freezable source) { _collection.Add(sourceVectorCollection._collection[i]); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -591,10 +570,8 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) { _collection.Add(sourceVectorCollection._collection[i]); } - } - #endregion ProtectedMethods //------------------------------------------------------ @@ -606,13 +583,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -623,7 +593,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -741,7 +710,6 @@ public static VectorCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -752,13 +720,9 @@ public static VectorCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -895,7 +859,6 @@ public Vector Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -947,7 +910,6 @@ public VectorCollection(IEnumerable collection) foreach (Vector item in collection) { - _collection.Add(item); } @@ -960,7 +922,6 @@ public VectorCollection(IEnumerable collection) - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs index e48649361a3..40e543020b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs @@ -53,8 +53,6 @@ public sealed partial class VideoDrawing : Drawing } - - #endregion Public Methods //------------------------------------------------------ @@ -67,7 +65,6 @@ private static void PlayerPropertyChanged(DependencyObject d, DependencyProperty { VideoDrawing target = ((VideoDrawing) d); - MediaPlayer oldV = (MediaPlayer) e.OldValue; MediaPlayer newV = (MediaPlayer) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -96,11 +93,9 @@ private static void RectPropertyChanged(DependencyObject d, DependencyPropertyCh { VideoDrawing target = ((VideoDrawing) d); - target.PropertyChanged(RectProperty); } - #region Public Properties /// @@ -152,8 +147,6 @@ protected override Freezable CreateInstanceCore() return new VideoDrawing(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -204,7 +197,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_VIDEODRAWING)) { MediaPlayer vPlayer = Player; @@ -212,16 +204,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -230,9 +219,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vPlayer != null) ((DUCE.IResource)vPlayer).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -250,7 +237,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -262,9 +248,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -294,16 +277,12 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Rect s_Rect = Rect.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -343,7 +322,6 @@ static VideoDrawing() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs index bf5927192f5..db83e802c2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs @@ -53,8 +53,6 @@ public sealed partial class VisualBrush : TileBrush } - - #endregion Public Methods //------------------------------------------------------ @@ -67,7 +65,6 @@ private static void VisualPropertyChanged(DependencyObject d, DependencyProperty { VisualBrush target = ((VisualBrush) d); - Visual oldV = (Visual) e.OldValue; // @@ -121,11 +118,9 @@ private static void AutoLayoutContentPropertyChanged(DependencyObject d, Depende { VisualBrush target = ((VisualBrush) d); - target.PropertyChanged(AutoLayoutContentProperty); } - #region Public Properties /// @@ -179,8 +174,6 @@ protected override Freezable CreateInstanceCore() return new VisualBrush(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -280,7 +273,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_VISUALBRUSH)) { Transform vTransform = Transform; @@ -289,18 +281,16 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) if (vRelativeTransform != null) ((DUCE.IResource)vRelativeTransform).AddRefOnChannel(channel); Visual vVisual = Visual; vVisual?.AddRefOnChannelForCyclicBrush(this, channel); - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -311,10 +301,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vRelativeTransform != null) ((DUCE.IResource)vRelativeTransform).ReleaseOnChannel(channel); Visual vVisual = Visual; vVisual?.ReleaseOnChannelForCyclicBrush(this, channel); - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -332,7 +321,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -358,8 +346,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -389,16 +375,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const bool c_AutoLayoutContent = true; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -438,7 +420,6 @@ static VisualBrush() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs index 96339075fb7..8ae7fbccace 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs @@ -43,8 +43,6 @@ public sealed partial class BitmapImage : BitmapSource } - - #endregion Public Methods //------------------------------------------------------ @@ -57,85 +55,84 @@ private static void UriCachePolicyPropertyChanged(DependencyObject d, Dependency { BitmapImage target = ((BitmapImage) d); - target.UriCachePolicyPropertyChangedHook(e); + target.PropertyChanged(UriCachePolicyProperty); } private static void UriSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.UriSourcePropertyChangedHook(e); + target.PropertyChanged(UriSourceProperty); } private static void StreamSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.StreamSourcePropertyChangedHook(e); + target.PropertyChanged(StreamSourceProperty); } private static void DecodePixelWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.DecodePixelWidthPropertyChangedHook(e); + target.PropertyChanged(DecodePixelWidthProperty); } private static void DecodePixelHeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.DecodePixelHeightPropertyChangedHook(e); + target.PropertyChanged(DecodePixelHeightProperty); } private static void RotationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.RotationPropertyChangedHook(e); + target.PropertyChanged(RotationProperty); } private static void SourceRectPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.SourceRectPropertyChangedHook(e); + target.PropertyChanged(SourceRectProperty); } private static void CreateOptionsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.CreateOptionsPropertyChangedHook(e); + target.PropertyChanged(CreateOptionsProperty); } private static void CacheOptionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BitmapImage target = ((BitmapImage) d); - target.CacheOptionPropertyChangedHook(e); + target.PropertyChanged(CacheOptionProperty); } - #region Public Properties /// @@ -306,7 +303,6 @@ protected override void CloneCore(Freezable source) base.CloneCore(source); - // Set state once clone has finished ClonePostscript(sourceBitmapImage); } @@ -323,7 +319,6 @@ protected override void CloneCurrentValueCore(Freezable source) base.CloneCurrentValueCore(source); - // Set state once clone has finished ClonePostscript(sourceBitmapImage); } @@ -340,7 +335,6 @@ protected override void GetAsFrozenCore(Freezable source) base.GetAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceBitmapImage); } @@ -357,12 +351,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) base.GetCurrentValueAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceBitmapImage); } - #endregion ProtectedMethods //------------------------------------------------------ @@ -374,13 +366,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -392,9 +377,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -452,10 +434,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Fields - - - - internal static RequestCachePolicy s_UriCachePolicy = null; internal static Uri s_UriSource = null; internal static Stream s_StreamSource = null; @@ -469,7 +447,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -572,7 +549,6 @@ static BitmapImage() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs index 66a525ded92..4a359811eeb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs @@ -43,8 +43,6 @@ public sealed partial class ColorConvertedBitmap : BitmapSource } - - #endregion Public Methods //------------------------------------------------------ @@ -62,7 +60,6 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty target.SourcePropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -77,39 +74,36 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty return; } - - target.PropertyChanged(SourceProperty); } private static void SourceColorContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); - target.SourceColorContextPropertyChangedHook(e); + target.PropertyChanged(SourceColorContextProperty); } private static void DestinationColorContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); - target.DestinationColorContextPropertyChangedHook(e); + target.PropertyChanged(DestinationColorContextProperty); } private static void DestinationFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ColorConvertedBitmap target = ((ColorConvertedBitmap) d); - target.DestinationFormatPropertyChangedHook(e); + target.PropertyChanged(DestinationFormatProperty); } - #region Public Properties /// @@ -203,7 +197,6 @@ protected override void CloneCore(Freezable source) base.CloneCore(source); - // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } @@ -220,7 +213,6 @@ protected override void CloneCurrentValueCore(Freezable source) base.CloneCurrentValueCore(source); - // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } @@ -237,7 +229,6 @@ protected override void GetAsFrozenCore(Freezable source) base.GetAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } @@ -254,12 +245,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) base.GetCurrentValueAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceColorConvertedBitmap); } - #endregion ProtectedMethods //------------------------------------------------------ @@ -271,13 +260,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -289,9 +271,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -329,10 +308,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Fields - - - - internal static BitmapSource s_Source = null; internal static ColorContext s_SourceColorContext = null; internal static ColorContext s_DestinationColorContext = null; @@ -341,7 +316,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -401,7 +375,6 @@ static ColorConvertedBitmap() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs index e75c27a2046..cb60c5f6fc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs @@ -43,8 +43,6 @@ public sealed partial class CroppedBitmap : BitmapSource } - - #endregion Public Methods //------------------------------------------------------ @@ -62,7 +60,6 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty target.SourcePropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -77,21 +74,18 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty return; } - - target.PropertyChanged(SourceProperty); } private static void SourceRectPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { CroppedBitmap target = ((CroppedBitmap) d); - target.SourceRectPropertyChangedHook(e); + target.PropertyChanged(SourceRectProperty); } - #region Public Properties /// @@ -155,7 +149,6 @@ protected override void CloneCore(Freezable source) base.CloneCore(source); - // Set state once clone has finished ClonePostscript(sourceCroppedBitmap); } @@ -172,7 +165,6 @@ protected override void CloneCurrentValueCore(Freezable source) base.CloneCurrentValueCore(source); - // Set state once clone has finished ClonePostscript(sourceCroppedBitmap); } @@ -189,7 +181,6 @@ protected override void GetAsFrozenCore(Freezable source) base.GetAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceCroppedBitmap); } @@ -206,12 +197,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) base.GetCurrentValueAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceCroppedBitmap); } - #endregion ProtectedMethods //------------------------------------------------------ @@ -223,13 +212,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -241,9 +223,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -273,17 +252,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Fields - - - - internal static BitmapSource s_Source = null; internal static Int32Rect s_SourceRect = Int32Rect.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -325,7 +299,6 @@ static CroppedBitmap() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs index 8ccdf0b7d34..365881012aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs @@ -43,8 +43,6 @@ public sealed partial class FormatConvertedBitmap : BitmapSource } - - #endregion Public Methods //------------------------------------------------------ @@ -62,7 +60,6 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty target.SourcePropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -77,39 +74,36 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty return; } - - target.PropertyChanged(SourceProperty); } private static void DestinationFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); - target.DestinationFormatPropertyChangedHook(e); + target.PropertyChanged(DestinationFormatProperty); } private static void DestinationPalettePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); - target.DestinationPalettePropertyChangedHook(e); + target.PropertyChanged(DestinationPaletteProperty); } private static void AlphaThresholdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FormatConvertedBitmap target = ((FormatConvertedBitmap) d); - target.AlphaThresholdPropertyChangedHook(e); + target.PropertyChanged(AlphaThresholdProperty); } - #region Public Properties /// @@ -203,7 +197,6 @@ protected override void CloneCore(Freezable source) base.CloneCore(source); - // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } @@ -220,7 +213,6 @@ protected override void CloneCurrentValueCore(Freezable source) base.CloneCurrentValueCore(source); - // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } @@ -237,7 +229,6 @@ protected override void GetAsFrozenCore(Freezable source) base.GetAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } @@ -254,12 +245,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) base.GetCurrentValueAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceFormatConvertedBitmap); } - #endregion ProtectedMethods //------------------------------------------------------ @@ -271,13 +260,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -289,9 +271,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -329,10 +308,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Fields - - - - internal static BitmapSource s_Source = null; internal static PixelFormat s_DestinationFormat = PixelFormats.Pbgra32; internal static BitmapPalette s_DestinationPalette = null; @@ -341,7 +316,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -401,7 +375,6 @@ static FormatConvertedBitmap() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs index aa834817b66..56dea74e34e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs @@ -43,8 +43,6 @@ public sealed partial class TransformedBitmap : BitmapSource } - - #endregion Public Methods //------------------------------------------------------ @@ -62,7 +60,6 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty target.SourcePropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -77,8 +74,6 @@ private static void SourcePropertyChanged(DependencyObject d, DependencyProperty return; } - - target.PropertyChanged(SourceProperty); } private static void TransformPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) @@ -90,7 +85,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope target.TransformPropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -105,12 +99,9 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope return; } - - target.PropertyChanged(TransformProperty); } - #region Public Properties /// @@ -174,7 +165,6 @@ protected override void CloneCore(Freezable source) base.CloneCore(source); - // Set state once clone has finished ClonePostscript(sourceTransformedBitmap); } @@ -191,7 +181,6 @@ protected override void CloneCurrentValueCore(Freezable source) base.CloneCurrentValueCore(source); - // Set state once clone has finished ClonePostscript(sourceTransformedBitmap); } @@ -208,7 +197,6 @@ protected override void GetAsFrozenCore(Freezable source) base.GetAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceTransformedBitmap); } @@ -225,12 +213,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) base.GetCurrentValueAsFrozenCore(source); - // Set state once clone has finished ClonePostscript(sourceTransformedBitmap); } - #endregion ProtectedMethods //------------------------------------------------------ @@ -242,13 +228,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -260,9 +239,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -292,17 +268,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Fields - - - - internal static BitmapSource s_Source = null; internal static Transform s_Transform = Transform.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -348,7 +319,6 @@ static TransformedBitmap() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs index a1d708de6ef..a053cc0dbbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs @@ -51,8 +51,6 @@ public abstract partial class AffineTransform3D : Transform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public abstract partial class AffineTransform3D : Transform3D //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,9 +74,6 @@ public abstract partial class AffineTransform3D : Transform3D #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -93,13 +85,6 @@ public abstract partial class AffineTransform3D : Transform3D #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -111,9 +96,6 @@ public abstract partial class AffineTransform3D : Transform3D #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -125,7 +107,6 @@ public abstract partial class AffineTransform3D : Transform3D #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -137,15 +118,9 @@ public abstract partial class AffineTransform3D : Transform3D #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -155,8 +130,6 @@ public abstract partial class AffineTransform3D : Transform3D //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs index eab1b27bbd5..b6917980e6f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs @@ -51,8 +51,6 @@ public sealed partial class AmbientLight : Light } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public sealed partial class AmbientLight : Light //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -87,8 +82,6 @@ protected override Freezable CreateInstanceCore() return new AmbientLight(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -149,7 +142,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_AMBIENTLIGHT)) { Transform3D vTransform = Transform; @@ -157,16 +149,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -175,9 +164,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -195,7 +182,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -221,8 +207,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -234,7 +218,6 @@ internal override int EffectiveValuesInitialSize #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -245,16 +228,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -264,8 +242,6 @@ internal override int EffectiveValuesInitialSize //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs index f955609f283..07a58ef79b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs @@ -51,8 +51,6 @@ public sealed partial class AxisAngleRotation3D : Rotation3D } - - #endregion Public Methods //------------------------------------------------------ @@ -65,22 +63,21 @@ private static void AxisPropertyChanged(DependencyObject d, DependencyPropertyCh { AxisAngleRotation3D target = ((AxisAngleRotation3D) d); - target.AxisPropertyChangedHook(e); + target.PropertyChanged(AxisProperty); } private static void AnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { AxisAngleRotation3D target = ((AxisAngleRotation3D) d); - target.AnglePropertyChangedHook(e); + target.PropertyChanged(AngleProperty); } - #region Public Properties /// @@ -132,8 +129,6 @@ protected override Freezable CreateInstanceCore() return new AxisAngleRotation3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -183,33 +178,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_AXISANGLEROTATION3D)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -227,7 +214,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -239,9 +225,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -271,17 +254,13 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Vector3D s_Axis = new Vector3D(0,1,0); internal const double c_Angle = (double)0.0; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -321,7 +300,6 @@ static AxisAngleRotation3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs index fa5d98cd293..11b2fccb806 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs @@ -51,8 +51,6 @@ public abstract partial class Camera : Animatable, IFormattable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -64,9 +62,6 @@ public abstract partial class Camera : Animatable, IFormattable, DUCE.IResource private static void TransformPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -84,7 +79,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope Camera target = ((Camera) d); - Transform3D oldV = (Transform3D) e.OldValue; Transform3D newV = (Transform3D) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -110,7 +104,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope target.PropertyChanged(TransformProperty); } - #region Public Properties /// @@ -139,9 +132,6 @@ public Transform3D Transform #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -152,7 +142,6 @@ public Transform3D Transform #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -216,7 +205,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -227,7 +215,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -285,7 +272,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -311,16 +297,11 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - internal static Transform3D s_Transform = Transform3D.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -353,7 +334,6 @@ static Camera() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs index d83736be36e..3276ec82946 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs @@ -51,8 +51,6 @@ public sealed partial class DiffuseMaterial : Material } - - #endregion Public Methods //------------------------------------------------------ @@ -65,22 +63,17 @@ private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyC { DiffuseMaterial target = ((DiffuseMaterial) d); - target.PropertyChanged(ColorProperty); } private static void AmbientColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DiffuseMaterial target = ((DiffuseMaterial) d); - target.PropertyChanged(AmbientColorProperty); } private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -98,7 +91,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC DiffuseMaterial target = ((DiffuseMaterial) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -124,7 +116,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC target.PropertyChanged(BrushProperty); } - #region Public Properties /// @@ -191,8 +182,6 @@ protected override Freezable CreateInstanceCore() return new DiffuseMaterial(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -237,7 +226,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DIFFUSEMATERIAL)) { Brush vBrush = Brush; @@ -245,16 +233,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -263,9 +248,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vBrush != null) ((DUCE.IResource)vBrush).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -283,7 +266,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -309,8 +291,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -344,10 +324,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Color s_Color = Colors.White; internal static Color s_AmbientColor = Colors.White; internal static Brush s_Brush = null; @@ -355,7 +332,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -406,7 +382,6 @@ static DiffuseMaterial() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs index 08f20331e37..5817ba314ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs @@ -51,8 +51,6 @@ public sealed partial class DirectionalLight : Light } - - #endregion Public Methods //------------------------------------------------------ @@ -65,11 +63,9 @@ private static void DirectionPropertyChanged(DependencyObject d, DependencyPrope { DirectionalLight target = ((DirectionalLight) d); - target.PropertyChanged(DirectionProperty); } - #region Public Properties /// @@ -106,8 +102,6 @@ protected override Freezable CreateInstanceCore() return new DirectionalLight(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -174,7 +168,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_DIRECTIONALLIGHT)) { Transform3D vTransform = Transform; @@ -182,16 +175,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -200,9 +190,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -220,7 +208,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -232,9 +219,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -260,16 +244,12 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Vector3D s_Direction = new Vector3D(0,0,-1); #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -300,7 +280,6 @@ static DirectionalLight() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs index a4a242bbd8b..6add8e5553a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs @@ -51,8 +51,6 @@ public sealed partial class EmissiveMaterial : Material } - - #endregion Public Methods //------------------------------------------------------ @@ -65,15 +63,11 @@ private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyC { EmissiveMaterial target = ((EmissiveMaterial) d); - target.PropertyChanged(ColorProperty); } private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -91,7 +85,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC EmissiveMaterial target = ((EmissiveMaterial) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -117,7 +110,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC target.PropertyChanged(BrushProperty); } - #region Public Properties /// @@ -169,8 +161,6 @@ protected override Freezable CreateInstanceCore() return new EmissiveMaterial(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -214,7 +204,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_EMISSIVEMATERIAL)) { Brush vBrush = Brush; @@ -222,16 +211,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -240,9 +226,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vBrush != null) ((DUCE.IResource)vBrush).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -260,7 +244,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -286,8 +269,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -317,17 +298,13 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Color s_Color = Colors.White; internal static Brush s_Brush = null; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -369,7 +346,6 @@ static EmissiveMaterial() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs index 867641e0f06..8206d16e5de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs @@ -51,8 +51,6 @@ public abstract partial class GeneralTransform3D : Animatable, IFormattable } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public abstract partial class GeneralTransform3D : Animatable, IFormattable //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,9 +74,6 @@ public abstract partial class GeneralTransform3D : Animatable, IFormattable #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -93,13 +85,6 @@ public abstract partial class GeneralTransform3D : Animatable, IFormattable #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -110,7 +95,6 @@ public abstract partial class GeneralTransform3D : Animatable, IFormattable #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -168,7 +152,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -180,7 +163,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -192,15 +174,9 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -210,8 +186,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs index 48c6ddae1fe..bba7b6a2da7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs @@ -25,7 +25,6 @@ namespace System.Windows.Media.Media3D /// /// A collection of GeneralTransform3D objects. /// - public sealed partial class GeneralTransform3DCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -55,8 +54,6 @@ public sealed partial class GeneralTransform3DCollection : Animatable, IList, IL } - - #endregion Public Methods //------------------------------------------------------ @@ -65,7 +62,6 @@ public sealed partial class GeneralTransform3DCollection : Animatable, IList, IL // //------------------------------------------------------ - #region IList /// @@ -132,8 +128,6 @@ public void Insert(int index, GeneralTransform3D value) _collection.Insert(index, value); - - ++_version; WritePostscript(); } @@ -163,9 +157,6 @@ public bool Remove(GeneralTransform3D value) _collection.RemoveAt(index); - - - ++_version; WritePostscript(); @@ -190,7 +181,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -207,15 +197,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) _collection.RemoveAt(index); - - - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -236,18 +222,15 @@ public GeneralTransform3D this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + GeneralTransform3D oldValue = _collection[index]; - GeneralTransform3D oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; - - + _collection[index] = value; } - ++_version; WritePostscript(); } @@ -529,13 +512,13 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform3D value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); GeneralTransform3D newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -543,8 +526,6 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform3D value) return index; } - - #endregion Private Helpers private static GeneralTransform3DCollection s_empty; @@ -553,7 +534,6 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform3D value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -588,11 +568,10 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform3D newValue = (GeneralTransform3D)sourceGeneralTransform3DCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -610,11 +589,10 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform3D newValue = (GeneralTransform3D)sourceGeneralTransform3DCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -632,11 +610,10 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform3D newValue = (GeneralTransform3D)sourceGeneralTransform3DCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -654,11 +631,10 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { GeneralTransform3D newValue = (GeneralTransform3D)sourceGeneralTransform3DCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } - } /// /// Implementation of Freezable.FreezeCore. @@ -687,13 +663,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -705,9 +674,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -719,7 +685,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -730,13 +695,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -873,7 +834,6 @@ public GeneralTransform3D Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -929,10 +889,11 @@ public GeneralTransform3DCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + GeneralTransform3D newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); - } needsItemValidation = false; @@ -947,12 +908,11 @@ public GeneralTransform3DCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } - OnFreezablePropertyChanged(/* oldValue = */ null, item); + OnFreezablePropertyChanged(/* oldValue = */ null, item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs index 23f87c4d6de..843b4f81312 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs @@ -51,8 +51,6 @@ public sealed partial class GeneralTransform3DGroup : GeneralTransform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -62,8 +60,6 @@ public sealed partial class GeneralTransform3DGroup : GeneralTransform3D //------------------------------------------------------ - - #region Public Properties /// @@ -100,8 +96,6 @@ protected override Freezable CreateInstanceCore() return new GeneralTransform3DGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -113,13 +107,6 @@ protected override Freezable CreateInstanceCore() #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -131,9 +118,6 @@ protected override Freezable CreateInstanceCore() #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -159,16 +143,11 @@ protected override Freezable CreateInstanceCore() #region Internal Fields - - - - internal static GeneralTransform3DCollection s_Children = GeneralTransform3DCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -201,7 +180,6 @@ static GeneralTransform3DGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs index 92fa45a8570..6214c708a69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs @@ -51,8 +51,6 @@ public abstract partial class Geometry3D : Animatable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public abstract partial class Geometry3D : Animatable, DUCE.IResource //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,9 +74,6 @@ public abstract partial class Geometry3D : Animatable, DUCE.IResource #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -92,7 +84,6 @@ public abstract partial class Geometry3D : Animatable, DUCE.IResource #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -156,7 +147,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -168,9 +158,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -182,7 +169,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -194,15 +180,9 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -212,8 +192,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs index 2aa55547a87..657cdee19bc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs @@ -51,8 +51,6 @@ public sealed partial class GeometryModel3D : Model3D } - - #endregion Public Methods //------------------------------------------------------ @@ -64,9 +62,6 @@ public sealed partial class GeometryModel3D : Model3D private static void GeometryPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -84,7 +79,6 @@ private static void GeometryPropertyChanged(DependencyObject d, DependencyProper GeometryModel3D target = ((GeometryModel3D) d); - Geometry3D oldV = (Geometry3D) e.OldValue; Geometry3D newV = (Geometry3D) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -118,7 +112,6 @@ private static void MaterialPropertyChanged(DependencyObject d, DependencyProper target.MaterialPropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -133,8 +126,6 @@ private static void MaterialPropertyChanged(DependencyObject d, DependencyProper return; } - - Material oldV = (Material) e.OldValue; Material newV = (Material) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -168,7 +159,6 @@ private static void BackMaterialPropertyChanged(DependencyObject d, DependencyPr target.BackMaterialPropertyChangedHook(e); - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -183,8 +173,6 @@ private static void BackMaterialPropertyChanged(DependencyObject d, DependencyPr return; } - - Material oldV = (Material) e.OldValue; Material newV = (Material) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -210,7 +198,6 @@ private static void BackMaterialPropertyChanged(DependencyObject d, DependencyPr target.PropertyChanged(BackMaterialProperty); } - #region Public Properties /// @@ -277,8 +264,6 @@ protected override Freezable CreateInstanceCore() return new GeometryModel3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -340,7 +325,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_GEOMETRYMODEL3D)) { Transform3D vTransform = Transform; @@ -354,16 +338,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -378,9 +359,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vBackMaterial != null) ((DUCE.IResource)vBackMaterial).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -398,7 +377,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -410,9 +388,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -446,16 +421,11 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -504,7 +474,6 @@ static GeometryModel3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs index 52cbd1d0c2b..2484875a7c4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs @@ -51,8 +51,6 @@ public abstract partial class Light : Model3D } - - #endregion Public Methods //------------------------------------------------------ @@ -65,11 +63,9 @@ private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyC { Light target = ((Light) d); - target.PropertyChanged(ColorProperty); } - #region Public Properties /// @@ -98,9 +94,6 @@ public Color Color #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -112,13 +105,6 @@ public Color Color #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -144,8 +130,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -171,16 +155,11 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - - - internal static Color s_Color = Colors.White; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -211,7 +190,6 @@ static Light() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs index aecf7bb5ed1..f8abe6d299b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs @@ -51,8 +51,6 @@ public abstract partial class Material : Animatable, IFormattable, DUCE.IResourc } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public abstract partial class Material : Animatable, IFormattable, DUCE.IResourc //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,9 +74,6 @@ public abstract partial class Material : Animatable, IFormattable, DUCE.IResourc #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -92,7 +84,6 @@ public abstract partial class Material : Animatable, IFormattable, DUCE.IResourc #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -156,7 +147,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -167,7 +157,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -225,7 +214,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -237,7 +225,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -249,15 +236,9 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -267,8 +248,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs index 660119a25c6..73c276d26e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs @@ -25,7 +25,6 @@ namespace System.Windows.Media.Media3D /// /// A collection of Material objects. /// - public sealed partial class MaterialCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -55,8 +54,6 @@ public sealed partial class MaterialCollection : Animatable, IList, IList /// @@ -145,7 +141,6 @@ public void Insert(int index, Material value) _collection.Insert(index, value); OnInsert(value); - ++_version; WritePostscript(); } @@ -177,7 +172,6 @@ public bool Remove(Material value) OnRemove(oldValue); - ++_version; WritePostscript(); @@ -202,7 +196,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -221,13 +214,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) OnRemove(oldValue); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -248,18 +239,17 @@ public Material this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Material oldValue = _collection[index]; - Material oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; + _collection[index] = value; OnSet(oldValue, value); } - ++_version; WritePostscript(); } @@ -541,12 +531,14 @@ internal int AddWithoutFiringPublicEvents(Material value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Material newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - OnInsert(newValue); + OnInsert(newValue); ++_version; @@ -588,7 +580,6 @@ private void OnSet(object oldValue, object newValue) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -623,11 +614,12 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Material newValue = (Material)sourceMaterialCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -645,11 +637,12 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Material newValue = (Material)sourceMaterialCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -667,11 +660,12 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Material newValue = (Material)sourceMaterialCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -689,11 +683,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Material newValue = (Material)sourceMaterialCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.FreezeCore. @@ -722,13 +717,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -740,9 +728,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -754,7 +739,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -765,13 +749,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -908,7 +888,6 @@ public Material Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -964,9 +943,12 @@ public MaterialCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Material newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } @@ -982,12 +964,12 @@ public MaterialCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs index 9bd1ba8fc0b..d7e39ffd145 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs @@ -51,8 +51,6 @@ public sealed partial class MaterialGroup : Material } - - #endregion Public Methods //------------------------------------------------------ @@ -64,9 +62,6 @@ public sealed partial class MaterialGroup : Material private static void ChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -84,7 +79,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper MaterialGroup target = ((MaterialGroup) d); - // If this is both non-null and mutable, we need to unhook the Changed event. MaterialCollection oldCollection = null; MaterialCollection newCollection = null; @@ -153,7 +147,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(ChildrenProperty); } - #region Public Properties /// @@ -190,8 +183,6 @@ protected override Freezable CreateInstanceCore() return new MaterialGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -231,7 +222,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.ChildrenSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < ChildrenCount; i++) { @@ -248,11 +238,9 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_MATERIALGROUP)) { - MaterialCollection vChildren = Children; if (vChildren != null) @@ -263,24 +251,21 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).AddRefOnChannel(channel); } } - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - MaterialCollection vChildren = Children; if (vChildren != null) @@ -291,10 +276,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).ReleaseOnChannel(channel); } } - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -387,8 +371,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -414,16 +396,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static MaterialCollection s_Children = MaterialCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -456,7 +434,6 @@ static MaterialGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs index b6fbab5cb47..f33ea5936cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(Matrix3DConverter))] [ValueSerializer(typeof(Matrix3DValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Matrix3D : IFormattable #region Public Methods - - - /// /// Compares two Matrix3D instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -259,12 +255,9 @@ public static Matrix3D Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -276,9 +269,6 @@ public static Matrix3D Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -290,13 +280,6 @@ public static Matrix3D Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -307,7 +290,6 @@ public static Matrix3D Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -316,7 +298,6 @@ public static Matrix3D Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -330,7 +311,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -346,7 +326,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -391,7 +370,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -403,7 +381,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -415,15 +392,9 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -433,8 +404,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs index df3705fefc6..e83e388fb76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs @@ -51,8 +51,6 @@ public sealed partial class MatrixCamera : Camera } - - #endregion Public Methods //------------------------------------------------------ @@ -65,18 +63,15 @@ private static void ViewMatrixPropertyChanged(DependencyObject d, DependencyProp { MatrixCamera target = ((MatrixCamera) d); - target.PropertyChanged(ViewMatrixProperty); } private static void ProjectionMatrixPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MatrixCamera target = ((MatrixCamera) d); - target.PropertyChanged(ProjectionMatrixProperty); } - #region Public Properties /// @@ -128,8 +123,6 @@ protected override Freezable CreateInstanceCore() return new MatrixCamera(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -184,7 +177,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_MATRIXCAMERA)) { Transform3D vTransform = Transform; @@ -192,16 +184,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -210,9 +199,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -230,7 +217,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -242,9 +228,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -274,17 +257,13 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Matrix3D s_ViewMatrix = Matrix3D.Identity; internal static Matrix3D s_ProjectionMatrix = Matrix3D.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -324,7 +303,6 @@ static MatrixCamera() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs index f642340e840..0bcfaab7e61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs @@ -51,8 +51,6 @@ public sealed partial class MatrixTransform3D : Transform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -65,11 +63,9 @@ private static void MatrixPropertyChanged(DependencyObject d, DependencyProperty { MatrixTransform3D target = ((MatrixTransform3D) d); - target.PropertyChanged(MatrixProperty); } - #region Public Properties /// @@ -106,8 +102,6 @@ protected override Freezable CreateInstanceCore() return new MatrixTransform3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -144,33 +138,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_MATRIXTRANSFORM3D)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -188,7 +174,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -214,8 +199,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -241,16 +224,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Matrix3D s_Matrix = Matrix3D.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -281,7 +260,6 @@ static MatrixTransform3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs index 27f41fd2ff8..b174d38eaca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs @@ -51,8 +51,6 @@ public sealed partial class MeshGeometry3D : Geometry3D } - - #endregion Public Methods //------------------------------------------------------ @@ -64,49 +62,32 @@ public sealed partial class MeshGeometry3D : Geometry3D private static void PositionsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - MeshGeometry3D target = ((MeshGeometry3D) d); - target.PropertyChanged(PositionsProperty); } private static void NormalsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - MeshGeometry3D target = ((MeshGeometry3D) d); - target.PropertyChanged(NormalsProperty); } private static void TextureCoordinatesPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - MeshGeometry3D target = ((MeshGeometry3D) d); - target.PropertyChanged(TextureCoordinatesProperty); } private static void TriangleIndicesPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - MeshGeometry3D target = ((MeshGeometry3D) d); - target.PropertyChanged(TriangleIndicesProperty); } - #region Public Properties /// @@ -188,8 +169,6 @@ protected override Freezable CreateInstanceCore() return new MeshGeometry3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -241,7 +220,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh data.TriangleIndicesSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < PositionsCount; i++) { @@ -288,33 +266,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_MESHGEOMETRY3D)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -332,7 +302,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -361,8 +330,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -400,10 +367,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Point3DCollection s_Positions = Point3DCollection.Empty; internal static Vector3DCollection s_Normals = Vector3DCollection.Empty; internal static PointCollection s_TextureCoordinates = PointCollection.Empty; @@ -412,7 +376,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -484,7 +447,6 @@ static MeshGeometry3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs index baa67c71878..d4cc47f363b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs @@ -51,8 +51,6 @@ public abstract partial class Model3D : Animatable, IFormattable, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -64,9 +62,6 @@ public abstract partial class Model3D : Animatable, IFormattable, DUCE.IResource private static void TransformPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -84,7 +79,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope Model3D target = ((Model3D) d); - Transform3D oldV = (Transform3D) e.OldValue; Transform3D newV = (Transform3D) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -110,7 +104,6 @@ private static void TransformPropertyChanged(DependencyObject d, DependencyPrope target.PropertyChanged(TransformProperty); } - #region Public Properties /// @@ -139,9 +132,6 @@ public Transform3D Transform #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -152,7 +142,6 @@ public Transform3D Transform #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -216,7 +205,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -227,7 +215,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -285,7 +272,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -311,16 +297,11 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - internal static Transform3D s_Transform = Transform3D.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -353,7 +334,6 @@ static Model3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs index 4f2ccbf0eb6..1d09013cdc6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs @@ -25,7 +25,6 @@ namespace System.Windows.Media.Media3D /// /// A collection of Model3D objects. /// - public sealed partial class Model3DCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -55,8 +54,6 @@ public sealed partial class Model3DCollection : Animatable, IList, IList /// @@ -145,7 +141,6 @@ public void Insert(int index, Model3D value) _collection.Insert(index, value); OnInsert(value); - ++_version; WritePostscript(); } @@ -177,7 +172,6 @@ public bool Remove(Model3D value) OnRemove(oldValue); - ++_version; WritePostscript(); @@ -202,7 +196,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -221,13 +214,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) OnRemove(oldValue); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -248,18 +239,17 @@ public Model3D this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Model3D oldValue = _collection[index]; - Model3D oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; + _collection[index] = value; OnSet(oldValue, value); } - ++_version; WritePostscript(); } @@ -541,12 +531,14 @@ internal int AddWithoutFiringPublicEvents(Model3D value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Model3D newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - OnInsert(newValue); + OnInsert(newValue); ++_version; @@ -588,7 +580,6 @@ private void OnSet(object oldValue, object newValue) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -623,11 +614,12 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Model3D newValue = (Model3D)sourceModel3DCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -645,11 +637,12 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Model3D newValue = (Model3D)sourceModel3DCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -667,11 +660,12 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Model3D newValue = (Model3D)sourceModel3DCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -689,11 +683,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Model3D newValue = (Model3D)sourceModel3DCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.FreezeCore. @@ -722,13 +717,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -740,9 +728,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -754,7 +739,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -765,13 +749,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -908,7 +888,6 @@ public Model3D Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -964,9 +943,12 @@ public Model3DCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Model3D newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } @@ -982,12 +964,12 @@ public Model3DCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs index 52d8d08afd7..714188c54d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs @@ -51,8 +51,6 @@ public sealed partial class Model3DGroup : Model3D } - - #endregion Public Methods //------------------------------------------------------ @@ -64,9 +62,6 @@ public sealed partial class Model3DGroup : Model3D private static void ChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -84,7 +79,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper Model3DGroup target = ((Model3DGroup) d); - // If this is both non-null and mutable, we need to unhook the Changed event. Model3DCollection oldCollection = null; Model3DCollection newCollection = null; @@ -153,7 +147,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(ChildrenProperty); } - #region Public Properties /// @@ -190,8 +183,6 @@ protected override Freezable CreateInstanceCore() return new Model3DGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -246,7 +237,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.ChildrenSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < ChildrenCount; i++) { @@ -263,7 +253,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_MODEL3DGROUP)) { Transform3D vTransform = Transform; @@ -279,18 +268,16 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).AddRefOnChannel(channel); } } - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -308,10 +295,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).ReleaseOnChannel(channel); } } - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -404,8 +390,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -431,16 +415,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Model3DCollection s_Children = Model3DCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -473,7 +453,6 @@ static Model3DGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs index 197739e88ab..2accc0dd904 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs @@ -51,8 +51,6 @@ public sealed partial class OrthographicCamera : ProjectionCamera } - - #endregion Public Methods //------------------------------------------------------ @@ -65,11 +63,9 @@ private static void WidthPropertyChanged(DependencyObject d, DependencyPropertyC { OrthographicCamera target = ((OrthographicCamera) d); - target.PropertyChanged(WidthProperty); } - #region Public Properties /// @@ -106,8 +102,6 @@ protected override Freezable CreateInstanceCore() return new OrthographicCamera(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -198,7 +192,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_ORTHOGRAPHICCAMERA)) { Transform3D vTransform = Transform; @@ -206,16 +199,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -224,9 +214,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -244,7 +232,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -256,9 +243,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -284,16 +268,12 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_Width = (double)2.0; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -324,7 +304,6 @@ static OrthographicCamera() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs index 19f209d696b..146466f5666 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs @@ -51,8 +51,6 @@ public sealed partial class PerspectiveCamera : ProjectionCamera } - - #endregion Public Methods //------------------------------------------------------ @@ -65,11 +63,9 @@ private static void FieldOfViewPropertyChanged(DependencyObject d, DependencyPro { PerspectiveCamera target = ((PerspectiveCamera) d); - target.PropertyChanged(FieldOfViewProperty); } - #region Public Properties /// @@ -106,8 +102,6 @@ protected override Freezable CreateInstanceCore() return new PerspectiveCamera(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -198,7 +192,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_PERSPECTIVECAMERA)) { Transform3D vTransform = Transform; @@ -206,16 +199,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -224,9 +214,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -244,7 +232,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -256,9 +243,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -284,16 +268,12 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_FieldOfView = (double)45.0; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -324,7 +304,6 @@ static PerspectiveCamera() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs index 5ede4627686..22a309c9e18 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(Point3DConverter))] [ValueSerializer(typeof(Point3DValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Point3D : IFormattable #region Public Methods - - - /// /// Compares two Point3D instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -177,8 +173,6 @@ public static Point3D Parse(string source) //------------------------------------------------------ - - #region Public Properties /// @@ -190,12 +184,10 @@ public double X { return _x; } - set { _x = value; } - } /// @@ -207,12 +199,10 @@ public double Y { return _y; } - set { _y = value; } - } /// @@ -224,12 +214,10 @@ public double Z { return _z; } - set { _z = value; } - } #endregion Public Properties @@ -243,9 +231,6 @@ public double Z #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -257,13 +242,6 @@ public double Z #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -274,7 +252,6 @@ public double Z #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -283,7 +260,6 @@ public double Z /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -297,7 +273,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -313,7 +288,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -340,7 +314,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -352,7 +325,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -363,18 +335,13 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; internal double _z; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -384,8 +351,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs index 7e35533ba6d..0f9ebb5c27b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs @@ -56,8 +56,6 @@ public sealed partial class Point3DCollection : Freezable, IFormattable, IList, } - - #endregion Public Methods //------------------------------------------------------ @@ -66,7 +64,6 @@ public sealed partial class Point3DCollection : Freezable, IFormattable, IList, // //------------------------------------------------------ - #region IList /// @@ -115,12 +112,9 @@ public int IndexOf(Point3D value) /// public void Insert(int index, Point3D value) { - - WritePreamble(); _collection.Insert(index, value); - ++_version; WritePostscript(); } @@ -162,7 +156,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -174,13 +167,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) WritePreamble(); _collection.RemoveAt(index); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -194,11 +185,8 @@ public Point3D this[int index] } set { - - WritePreamble(); - _collection[ index ] = value; - + _collection[index] = value; ++_version; WritePostscript(); @@ -439,7 +427,6 @@ internal Point3D Internal_GetItem(int i) } - #endregion #region Private Helpers @@ -474,11 +461,9 @@ internal int AddWithoutFiringPublicEvents(Point3D value) { int index = -1; - WritePreamble(); index = _collection.Add(value); - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -486,8 +471,6 @@ internal int AddWithoutFiringPublicEvents(Point3D value) return index; } - - #endregion Private Helpers private static Point3DCollection s_empty; @@ -496,7 +479,6 @@ internal int AddWithoutFiringPublicEvents(Point3D value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -532,7 +514,6 @@ protected override void CloneCore(Freezable source) { _collection.Add(sourcePoint3DCollection._collection[i]); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -551,7 +532,6 @@ protected override void CloneCurrentValueCore(Freezable source) { _collection.Add(sourcePoint3DCollection._collection[i]); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -570,7 +550,6 @@ protected override void GetAsFrozenCore(Freezable source) { _collection.Add(sourcePoint3DCollection._collection[i]); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -589,10 +568,8 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) { _collection.Add(sourcePoint3DCollection._collection[i]); } - } - #endregion ProtectedMethods //------------------------------------------------------ @@ -604,13 +581,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -621,7 +591,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -740,7 +709,6 @@ public static Point3DCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -751,13 +719,9 @@ public static Point3DCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -894,7 +858,6 @@ public Point3D Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -946,7 +909,6 @@ public Point3DCollection(IEnumerable collection) foreach (Point3D item in collection) { - _collection.Add(item); } @@ -959,7 +921,6 @@ public Point3DCollection(IEnumerable collection) - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs index 5966cfcea50..d3eb2f9e70d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(Point4DConverter))] [ValueSerializer(typeof(Point4DValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Point4D : IFormattable #region Public Methods - - - /// /// Compares two Point4D instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -181,8 +177,6 @@ public static Point4D Parse(string source) //------------------------------------------------------ - - #region Public Properties /// @@ -194,12 +188,10 @@ public double X { return _x; } - set { _x = value; } - } /// @@ -211,12 +203,10 @@ public double Y { return _y; } - set { _y = value; } - } /// @@ -228,12 +218,10 @@ public double Z { return _z; } - set { _z = value; } - } /// @@ -245,12 +233,10 @@ public double W { return _w; } - set { _w = value; } - } #endregion Public Properties @@ -264,9 +250,6 @@ public double W #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -278,13 +261,6 @@ public double W #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -295,7 +271,6 @@ public double W #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -304,7 +279,6 @@ public double W /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -318,7 +292,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -334,7 +307,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -362,7 +334,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -374,7 +345,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -385,19 +355,14 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; internal double _z; internal double _w; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -407,8 +372,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs index e536d7c9028..c131182b3a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs @@ -51,8 +51,6 @@ public sealed partial class PointLight : PointLightBase } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public sealed partial class PointLight : PointLightBase //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -87,8 +82,6 @@ protected override Freezable CreateInstanceCore() return new PointLight(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -179,7 +172,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_POINTLIGHT)) { Transform3D vTransform = Transform; @@ -187,16 +179,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -205,9 +194,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -225,7 +212,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -237,9 +223,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -251,7 +234,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -262,16 +244,11 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -281,8 +258,6 @@ internal override DUCE.Channel GetChannelCore(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs index 4675433c589..f54694d469d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs @@ -51,8 +51,6 @@ public abstract partial class PointLightBase : Light } - - #endregion Public Methods //------------------------------------------------------ @@ -65,39 +63,33 @@ private static void PositionPropertyChanged(DependencyObject d, DependencyProper { PointLightBase target = ((PointLightBase) d); - target.PropertyChanged(PositionProperty); } private static void RangePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PointLightBase target = ((PointLightBase) d); - target.PropertyChanged(RangeProperty); } private static void ConstantAttenuationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PointLightBase target = ((PointLightBase) d); - target.PropertyChanged(ConstantAttenuationProperty); } private static void LinearAttenuationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PointLightBase target = ((PointLightBase) d); - target.PropertyChanged(LinearAttenuationProperty); } private static void QuadraticAttenuationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PointLightBase target = ((PointLightBase) d); - target.PropertyChanged(QuadraticAttenuationProperty); } - #region Public Properties /// @@ -186,9 +178,6 @@ public double QuadraticAttenuation #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -200,13 +189,6 @@ public double QuadraticAttenuation #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -218,9 +200,6 @@ public double QuadraticAttenuation #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -262,10 +241,6 @@ public double QuadraticAttenuation #region Internal Fields - - - - internal static Point3D s_Position = new Point3D(); internal const double c_Range = Double.PositiveInfinity; internal const double c_ConstantAttenuation = 1.0; @@ -275,7 +250,6 @@ public double QuadraticAttenuation #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -342,7 +316,6 @@ static PointLightBase() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs index a3566f4be46..b2931a7b718 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs @@ -51,8 +51,6 @@ public abstract partial class ProjectionCamera : Camera } - - #endregion Public Methods //------------------------------------------------------ @@ -65,39 +63,33 @@ private static void NearPlaneDistancePropertyChanged(DependencyObject d, Depende { ProjectionCamera target = ((ProjectionCamera) d); - target.PropertyChanged(NearPlaneDistanceProperty); } private static void FarPlaneDistancePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ProjectionCamera target = ((ProjectionCamera) d); - target.PropertyChanged(FarPlaneDistanceProperty); } private static void PositionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ProjectionCamera target = ((ProjectionCamera) d); - target.PropertyChanged(PositionProperty); } private static void LookDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ProjectionCamera target = ((ProjectionCamera) d); - target.PropertyChanged(LookDirectionProperty); } private static void UpDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ProjectionCamera target = ((ProjectionCamera) d); - target.PropertyChanged(UpDirectionProperty); } - #region Public Properties /// @@ -186,9 +178,6 @@ public Vector3D UpDirection #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -200,13 +189,6 @@ public Vector3D UpDirection #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -218,9 +200,6 @@ public Vector3D UpDirection #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -262,10 +241,6 @@ public Vector3D UpDirection #region Internal Fields - - - - internal const double c_NearPlaneDistance = (double)0.125; internal const double c_FarPlaneDistance = (double)Double.PositiveInfinity; internal static Point3D s_Position = new Point3D(); @@ -275,7 +250,6 @@ public Vector3D UpDirection #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -342,7 +316,6 @@ static ProjectionCamera() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs index a0bc65484fc..f0474b2d2f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(QuaternionConverter))] [ValueSerializer(typeof(QuaternionValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Quaternion : IFormattable #region Public Methods - - - /// /// Compares two Quaternion instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -211,12 +207,9 @@ public static Quaternion Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -228,9 +221,6 @@ public static Quaternion Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -242,13 +232,6 @@ public static Quaternion Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -259,7 +242,6 @@ public static Quaternion Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -268,7 +250,6 @@ public static Quaternion Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -282,7 +263,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -298,7 +278,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -331,7 +310,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -343,7 +321,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -355,15 +332,9 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -373,8 +344,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs index 70c51308cbd..7cfb55f5e3b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs @@ -51,8 +51,6 @@ public sealed partial class QuaternionRotation3D : Rotation3D } - - #endregion Public Methods //------------------------------------------------------ @@ -71,7 +69,6 @@ private static void QuaternionPropertyChanged(DependencyObject d, DependencyProp target.PropertyChanged(QuaternionProperty); } - #region Public Properties /// @@ -109,8 +106,6 @@ protected override Freezable CreateInstanceCore() return new QuaternionRotation3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -154,33 +149,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_QUATERNIONROTATION3D)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -198,7 +185,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -224,8 +210,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -252,15 +236,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields private Quaternion _cachedQuaternionValue = Quaternion.Identity; - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Quaternion s_Quaternion = Quaternion.Identity; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -291,7 +272,6 @@ static QuaternionRotation3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs index b29758f9d53..61e9cac9406 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(Rect3DConverter))] [ValueSerializer(typeof(Rect3DValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Rect3D : IFormattable #region Public Methods - - - /// /// Compares two Rect3D instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -212,12 +208,9 @@ public static Rect3D Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -229,9 +222,6 @@ public static Rect3D Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -243,13 +233,6 @@ public static Rect3D Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -260,7 +243,6 @@ public static Rect3D Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -269,7 +251,6 @@ public static Rect3D Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -283,7 +264,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -299,7 +279,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -334,7 +313,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -346,7 +324,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -357,7 +334,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; internal double _z; @@ -365,13 +341,9 @@ internal string ConvertToString(string format, IFormatProvider provider) internal double _sizeY; internal double _sizeZ; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -381,8 +353,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs index 1a0b5f753c5..019a5f574ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs @@ -51,8 +51,6 @@ public sealed partial class RotateTransform3D : AffineTransform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -91,9 +89,6 @@ private static void CenterZPropertyChanged(DependencyObject d, DependencyPropert private static void RotationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -139,7 +134,6 @@ private static void RotationPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(RotationProperty); } - #region Public Properties /// @@ -225,8 +219,6 @@ protected override Freezable CreateInstanceCore() return new RotateTransform3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -289,7 +281,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_ROTATETRANSFORM3D)) { Rotation3D vRotation = Rotation; @@ -297,16 +288,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -315,9 +303,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vRotation != null) ((DUCE.IResource)vRotation).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -335,7 +321,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -347,9 +332,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -391,9 +373,7 @@ internal override DUCE.Channel GetChannelCore(int index) private double _cachedCenterYValue = 0.0; private double _cachedCenterZValue = 0.0; private Rotation3D _cachedRotationValue = Rotation3D.Identity; - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_CenterX = 0.0; internal const double c_CenterY = 0.0; internal const double c_CenterZ = 0.0; @@ -402,7 +382,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -462,7 +441,6 @@ static RotateTransform3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs index 57b02dfe6bb..d36c7c69cb7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs @@ -51,8 +51,6 @@ public abstract partial class Rotation3D : Animatable, IFormattable, DUCE.IResou } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public abstract partial class Rotation3D : Animatable, IFormattable, DUCE.IResou //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,9 +74,6 @@ public abstract partial class Rotation3D : Animatable, IFormattable, DUCE.IResou #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -92,7 +84,6 @@ public abstract partial class Rotation3D : Animatable, IFormattable, DUCE.IResou #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -156,7 +147,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -167,7 +157,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -225,7 +214,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) return base.ToString(); } - #endregion Internal Properties //------------------------------------------------------ @@ -237,7 +225,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -249,15 +236,9 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -267,8 +248,6 @@ internal virtual string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs index e903f605c8a..80b28489d03 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs @@ -51,8 +51,6 @@ public sealed partial class ScaleTransform3D : AffineTransform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -116,7 +114,6 @@ private static void CenterZPropertyChanged(DependencyObject d, DependencyPropert target.PropertyChanged(CenterZProperty); } - #region Public Properties /// @@ -234,8 +231,6 @@ protected override Freezable CreateInstanceCore() return new ScaleTransform3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -309,33 +304,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SCALETRANSFORM3D)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -353,7 +340,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -365,9 +351,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -419,9 +402,7 @@ internal override DUCE.Channel GetChannelCore(int index) private double _cachedCenterXValue = 0.0; private double _cachedCenterYValue = 0.0; private double _cachedCenterZValue = 0.0; - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_ScaleX = 1.0; internal const double c_ScaleY = 1.0; internal const double c_ScaleZ = 1.0; @@ -432,7 +413,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -508,7 +488,6 @@ static ScaleTransform3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs index 79443c5c524..d03b8f38444 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(Size3DConverter))] [ValueSerializer(typeof(Size3DValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Size3D : IFormattable #region Public Methods - - - /// /// Compares two Size3D instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -200,12 +196,9 @@ public static Size3D Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -217,9 +210,6 @@ public static Size3D Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -231,13 +221,6 @@ public static Size3D Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -248,7 +231,6 @@ public static Size3D Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -257,7 +239,6 @@ public static Size3D Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -271,7 +252,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -287,7 +267,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -319,7 +298,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -331,7 +309,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -342,18 +319,13 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; internal double _z; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -363,8 +335,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs index e3b59603f32..1c01276c86a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs @@ -51,8 +51,6 @@ public sealed partial class SpecularMaterial : Material } - - #endregion Public Methods //------------------------------------------------------ @@ -65,15 +63,11 @@ private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyC { SpecularMaterial target = ((SpecularMaterial) d); - target.PropertyChanged(ColorProperty); } private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -91,7 +85,6 @@ private static void BrushPropertyChanged(DependencyObject d, DependencyPropertyC SpecularMaterial target = ((SpecularMaterial) d); - Brush oldV = (Brush) e.OldValue; Brush newV = (Brush) e.NewValue; System.Windows.Threading.Dispatcher dispatcher = target.Dispatcher; @@ -120,11 +113,9 @@ private static void SpecularPowerPropertyChanged(DependencyObject d, DependencyP { SpecularMaterial target = ((SpecularMaterial) d); - target.PropertyChanged(SpecularPowerProperty); } - #region Public Properties /// @@ -191,8 +182,6 @@ protected override Freezable CreateInstanceCore() return new SpecularMaterial(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -237,7 +226,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SPECULARMATERIAL)) { Brush vBrush = Brush; @@ -245,16 +233,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -263,9 +248,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vBrush != null) ((DUCE.IResource)vBrush).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -283,7 +266,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -309,8 +291,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -344,10 +324,7 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Color s_Color = Colors.White; internal static Brush s_Brush = null; internal const double c_SpecularPower = 40.0; @@ -355,7 +332,6 @@ internal override int EffectiveValuesInitialSize #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -406,7 +382,6 @@ static SpecularMaterial() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs index e08eb66aae3..ff33a63483c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs @@ -51,8 +51,6 @@ public sealed partial class SpotLight : PointLightBase } - - #endregion Public Methods //------------------------------------------------------ @@ -65,25 +63,21 @@ private static void DirectionPropertyChanged(DependencyObject d, DependencyPrope { SpotLight target = ((SpotLight) d); - target.PropertyChanged(DirectionProperty); } private static void OuterConeAnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SpotLight target = ((SpotLight) d); - target.PropertyChanged(OuterConeAngleProperty); } private static void InnerConeAnglePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SpotLight target = ((SpotLight) d); - target.PropertyChanged(InnerConeAngleProperty); } - #region Public Properties /// @@ -150,8 +144,6 @@ protected override Freezable CreateInstanceCore() return new SpotLight(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -260,7 +252,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_SPOTLIGHT)) { Transform3D vTransform = Transform; @@ -268,16 +259,13 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -286,9 +274,7 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) if (vTransform != null) ((DUCE.IResource)vTransform).ReleaseOnChannel(channel); ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -306,7 +292,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -318,9 +303,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -354,10 +336,7 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Vector3D s_Direction = new Vector3D(0,0,-1); internal const double c_OuterConeAngle = 90.0; internal const double c_InnerConeAngle = 180.0; @@ -365,7 +344,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -414,7 +392,6 @@ static SpotLight() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs index 29fead293af..823932834ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs @@ -51,8 +51,6 @@ public abstract partial class Transform3D : GeneralTransform3D, DUCE.IResource } - - #endregion Public Methods //------------------------------------------------------ @@ -62,12 +60,9 @@ public abstract partial class Transform3D : GeneralTransform3D, DUCE.IResource //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -79,9 +74,6 @@ public abstract partial class Transform3D : GeneralTransform3D, DUCE.IResource #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -92,7 +84,6 @@ public abstract partial class Transform3D : GeneralTransform3D, DUCE.IResource #region Internal Methods - internal abstract DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel); /// @@ -156,7 +147,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) return GetChannelCore(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -168,9 +158,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -182,7 +169,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -194,15 +180,9 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -212,8 +192,6 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs index 974ba14003a..3d91e617806 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs @@ -25,7 +25,6 @@ namespace System.Windows.Media.Media3D /// /// A collection of Transform3D objects. /// - public sealed partial class Transform3DCollection : Animatable, IList, IList { //------------------------------------------------------ @@ -55,8 +54,6 @@ public sealed partial class Transform3DCollection : Animatable, IList, IList /// @@ -145,7 +141,6 @@ public void Insert(int index, Transform3D value) _collection.Insert(index, value); OnInsert(value); - ++_version; WritePostscript(); } @@ -177,7 +172,6 @@ public bool Remove(Transform3D value) OnRemove(oldValue); - ++_version; WritePostscript(); @@ -202,7 +196,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -221,13 +214,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) OnRemove(oldValue); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -248,18 +239,17 @@ public Transform3D this[int index] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ index ], value)) + if (!Object.ReferenceEquals(_collection[index], value)) { + Transform3D oldValue = _collection[index]; - Transform3D oldValue = _collection[ index ]; OnFreezablePropertyChanged(oldValue, value); - _collection[ index ] = value; + _collection[index] = value; OnSet(oldValue, value); } - ++_version; WritePostscript(); } @@ -541,12 +531,14 @@ internal int AddWithoutFiringPublicEvents(Transform3D value) { throw new System.ArgumentException(SR.Collection_NoNull); } + WritePreamble(); Transform3D newValue = value; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); index = _collection.Add(newValue); - OnInsert(newValue); + OnInsert(newValue); ++_version; @@ -588,7 +580,6 @@ private void OnSet(object oldValue, object newValue) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -623,11 +614,12 @@ protected override void CloneCore(Freezable source) for (int i = 0; i < count; i++) { Transform3D newValue = (Transform3D)sourceTransform3DCollection._collection[i].Clone(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -645,11 +637,12 @@ protected override void CloneCurrentValueCore(Freezable source) for (int i = 0; i < count; i++) { Transform3D newValue = (Transform3D)sourceTransform3DCollection._collection[i].CloneCurrentValue(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -667,11 +660,12 @@ protected override void GetAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Transform3D newValue = (Transform3D)sourceTransform3DCollection._collection[i].GetAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -689,11 +683,12 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) for (int i = 0; i < count; i++) { Transform3D newValue = (Transform3D)sourceTransform3DCollection._collection[i].GetCurrentValueAsFrozen(); + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } - } /// /// Implementation of Freezable.FreezeCore. @@ -722,13 +717,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -740,9 +728,6 @@ protected override bool FreezeCore(bool isChecking) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -754,7 +739,6 @@ protected override bool FreezeCore(bool isChecking) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -765,13 +749,9 @@ protected override bool FreezeCore(bool isChecking) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -908,7 +888,6 @@ public Transform3D Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -964,9 +943,12 @@ public Transform3DCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + Transform3D newValue = item; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); _collection.Add(newValue); + OnInsert(newValue); } @@ -982,12 +964,12 @@ public Transform3DCollection(IEnumerable collection) { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); } } - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs index b79b3e6a2a5..36444626aa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs @@ -51,8 +51,6 @@ public sealed partial class Transform3DGroup : Transform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -64,9 +62,6 @@ public sealed partial class Transform3DGroup : Transform3D private static void ChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - - - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -84,7 +79,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper Transform3DGroup target = ((Transform3DGroup) d); - // If this is both non-null and mutable, we need to unhook the Changed event. Transform3DCollection oldCollection = null; Transform3DCollection newCollection = null; @@ -153,7 +147,6 @@ private static void ChildrenPropertyChanged(DependencyObject d, DependencyProper target.PropertyChanged(ChildrenProperty); } - #region Public Properties /// @@ -190,8 +183,6 @@ protected override Freezable CreateInstanceCore() return new Transform3DGroup(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -231,7 +222,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh (int)(data.ChildrenSize) ); - // Copy this collection's elements (or their handles) to reserved data for (int i = 0; i < ChildrenCount; i++) { @@ -248,11 +238,9 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_TRANSFORM3DGROUP)) { - Transform3DCollection vChildren = Children; if (vChildren != null) @@ -263,24 +251,21 @@ internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).AddRefOnChannel(channel); } } - AddRefOnChannelAnimations(channel); + AddRefOnChannelAnimations(channel); UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - Transform3DCollection vChildren = Children; if (vChildren != null) @@ -291,10 +276,9 @@ internal override void ReleaseOnChannelCore(DUCE.Channel channel) ((DUCE.IResource) vChildren.Internal_GetItem(i)).ReleaseOnChannel(channel); } } - ReleaseOnChannelAnimations(channel); + ReleaseOnChannelAnimations(channel); } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -387,8 +371,6 @@ internal override int EffectiveValuesInitialSize } } - - #endregion Internal Properties //------------------------------------------------------ @@ -414,16 +396,12 @@ internal override int EffectiveValuesInitialSize #region Internal Fields - - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal static Transform3DCollection s_Children = Transform3DCollection.Empty; #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -456,7 +434,6 @@ static Transform3DGroup() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs index d030eeef9bc..c2b0cbc30c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs @@ -51,8 +51,6 @@ public sealed partial class TranslateTransform3D : AffineTransform3D } - - #endregion Public Methods //------------------------------------------------------ @@ -89,7 +87,6 @@ private static void OffsetZPropertyChanged(DependencyObject d, DependencyPropert target.PropertyChanged(OffsetZProperty); } - #region Public Properties /// @@ -159,8 +156,6 @@ protected override Freezable CreateInstanceCore() return new TranslateTransform3D(); } - - #endregion ProtectedMethods //------------------------------------------------------ @@ -216,33 +211,25 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh } internal override DUCE.ResourceHandle AddRefOnChannelCore(DUCE.Channel channel) { - if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_TRANSLATETRANSFORM3D)) { - AddRefOnChannelAnimations(channel); - UpdateResource(channel, true /* skip "on channel" check - we already know that we're on channel */ ); } return _duceResource.GetHandle(channel); - } internal override void ReleaseOnChannelCore(DUCE.Channel channel) { - Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) { - ReleaseOnChannelAnimations(channel); - } - } internal override DUCE.ResourceHandle GetHandleCore(DUCE.Channel channel) { @@ -260,7 +247,6 @@ internal override DUCE.Channel GetChannelCore(int index) return _duceResource.GetChannel(index); } - #endregion Internal Methods //------------------------------------------------------ @@ -272,9 +258,6 @@ internal override DUCE.Channel GetChannelCore(int index) #region Internal Properties - - - #endregion Internal Properties //------------------------------------------------------ @@ -311,9 +294,7 @@ internal override DUCE.Channel GetChannelCore(int index) private double _cachedOffsetXValue = 0.0; private double _cachedOffsetYValue = 0.0; private double _cachedOffsetZValue = 0.0; - internal System.Windows.Media.Composition.DUCE.MultiChannelResource _duceResource = new System.Windows.Media.Composition.DUCE.MultiChannelResource(); - internal const double c_OffsetX = 0.0; internal const double c_OffsetY = 0.0; internal const double c_OffsetZ = 0.0; @@ -321,7 +302,6 @@ internal override DUCE.Channel GetChannelCore(int index) #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -370,7 +350,6 @@ static TranslateTransform3D() } - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs index 3e634f554b9..dd8252289f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs @@ -22,7 +22,6 @@ namespace System.Windows.Media.Media3D { - [Serializable] [TypeConverter(typeof(Vector3DConverter))] [ValueSerializer(typeof(Vector3DValueSerializer))] // Used by MarkupWriter @@ -36,9 +35,6 @@ public partial struct Vector3D : IFormattable #region Public Methods - - - /// /// Compares two Vector3D instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -177,8 +173,6 @@ public static Vector3D Parse(string source) //------------------------------------------------------ - - #region Public Properties /// @@ -190,12 +184,10 @@ public double X { return _x; } - set { _x = value; } - } /// @@ -207,12 +199,10 @@ public double Y { return _y; } - set { _y = value; } - } /// @@ -224,12 +214,10 @@ public double Z { return _z; } - set { _z = value; } - } #endregion Public Properties @@ -243,9 +231,6 @@ public double Z #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -257,13 +242,6 @@ public double Z #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -274,7 +252,6 @@ public double Z #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -283,7 +260,6 @@ public double Z /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -297,7 +273,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -313,7 +288,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -340,7 +314,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -352,7 +325,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -363,18 +335,13 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; internal double _z; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -384,8 +351,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs index 5f75a49f6fd..b1308b49c3a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs @@ -56,8 +56,6 @@ public sealed partial class Vector3DCollection : Freezable, IFormattable, IList, } - - #endregion Public Methods //------------------------------------------------------ @@ -66,7 +64,6 @@ public sealed partial class Vector3DCollection : Freezable, IFormattable, IList, // //------------------------------------------------------ - #region IList /// @@ -115,12 +112,9 @@ public int IndexOf(Vector3D value) /// public void Insert(int index, Vector3D value) { - - WritePreamble(); _collection.Insert(index, value); - ++_version; WritePostscript(); } @@ -162,7 +156,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -174,13 +167,11 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) WritePreamble(); _collection.RemoveAt(index); - ++_version; // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -194,11 +185,8 @@ public Vector3D this[int index] } set { - - WritePreamble(); - _collection[ index ] = value; - + _collection[index] = value; ++_version; WritePostscript(); @@ -439,7 +427,6 @@ internal Vector3D Internal_GetItem(int i) } - #endregion #region Private Helpers @@ -474,11 +461,9 @@ internal int AddWithoutFiringPublicEvents(Vector3D value) { int index = -1; - WritePreamble(); index = _collection.Add(value); - ++_version; // No WritePostScript to avoid firing the Changed event. @@ -486,8 +471,6 @@ internal int AddWithoutFiringPublicEvents(Vector3D value) return index; } - - #endregion Private Helpers private static Vector3DCollection s_empty; @@ -496,7 +479,6 @@ internal int AddWithoutFiringPublicEvents(Vector3D value) #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -532,7 +514,6 @@ protected override void CloneCore(Freezable source) { _collection.Add(sourceVector3DCollection._collection[i]); } - } /// /// Implementation of Freezable.CloneCurrentValueCore() @@ -551,7 +532,6 @@ protected override void CloneCurrentValueCore(Freezable source) { _collection.Add(sourceVector3DCollection._collection[i]); } - } /// /// Implementation of Freezable.GetAsFrozenCore() @@ -570,7 +550,6 @@ protected override void GetAsFrozenCore(Freezable source) { _collection.Add(sourceVector3DCollection._collection[i]); } - } /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore() @@ -589,10 +568,8 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) { _collection.Add(sourceVector3DCollection._collection[i]); } - } - #endregion ProtectedMethods //------------------------------------------------------ @@ -604,13 +581,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -621,7 +591,6 @@ protected override void GetCurrentValueAsFrozenCore(Freezable source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -740,7 +709,6 @@ public static Vector3DCollection Parse(string source) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -751,13 +719,9 @@ public static Vector3DCollection Parse(string source) #region Internal Fields - - - internal FrugalStructList _collection; internal uint _version = 0; - #endregion Internal Fields #region Enumerator @@ -894,7 +858,6 @@ public Vector3D Current // //------------------------------------------------------ - /// /// Initializes a new instance that is empty. /// @@ -946,7 +909,6 @@ public Vector3DCollection(IEnumerable collection) foreach (Vector3D item in collection) { - _collection.Add(item); } @@ -959,7 +921,6 @@ public Vector3DCollection(IEnumerable collection) - WritePostscript(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs index e3dfbcbfc60..3fe9af0ded9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs @@ -367,7 +367,6 @@ internal virtual void OnNewParent(DependencyObject newParent) } - // Synchronize ReverseInheritProperty Flags // // NOTE: do this AFTER synchronizing force-inherited flags, since @@ -387,7 +386,6 @@ internal void OnAncestorChangedInternal(TreeChangeInfo parentTreeState) // Clear the HasStyleChanged flag HasStyleChanged = false; HasStyleInvalidated = false; - } // If this is a tree add operation update the ShouldLookupImplicitStyles @@ -395,8 +393,8 @@ internal void OnAncestorChangedInternal(TreeChangeInfo parentTreeState) if (parentTreeState.IsAddOperation) { FrameworkObject fo = - new FrameworkObject(null, this); + fo.SetShouldLookupImplicitStyles(); } @@ -443,7 +441,6 @@ internal FrugalObjectList InvalidateTreeDependentProperties( { AncestorChangeInProgress = true; - try { // Style property is a special case of a non-inherited property that needs @@ -513,7 +510,6 @@ internal FrugalObjectList InvalidateTreeDependentProperties( finally { AncestorChangeInProgress = false; - } } @@ -548,7 +544,6 @@ internal bool ThisHasLoadedChangeEventHandler { return true; } - if (HasFefLoadedChangeHandler) { return true; @@ -678,7 +673,6 @@ internal void FireLoadedOnDescendentsInternal() { DependencyObject parent = Parent; - // Check if this Loaded cancels against a previously queued Unloaded event // Note that if the Loaded and the Unloaded do not change the position of // the node within the loagical tree they are considered to cancel each other out. @@ -707,7 +701,6 @@ internal void FireUnloadedOnDescendentsInternal() { DependencyObject parent = Parent; - // Check if this Unloaded cancels against a previously queued Loaded event // Note that if the Loaded and the Unloaded do not change the position of // the node within the loagical tree they are considered to cancel each other out. @@ -846,7 +839,6 @@ private void ConnectMentor(DependencyObject mentor) // invalidate the mentee's tree TreeWalkHelper.InvalidateOnTreeChange( - null, this, foMentor.DO, true /* isAddOperation */ @@ -880,7 +872,6 @@ private void DisconnectMentor(DependencyObject mentor) // invalidate the mentee's tree TreeWalkHelper.InvalidateOnTreeChange( - null, this, foMentor.DO, false /* isAddOperation */ @@ -979,7 +970,6 @@ private void DisconnectLoadedEvents(ref FrameworkObject foMentor, bool isLoaded) private void OnMentorInheritedPropertyChanged(object sender, InheritedPropertyChangedEventArgs e) { TreeWalkHelper.InvalidateOnInheritablePropertyChange( - null, this, e.Info, false /*skipStartNode*/); } @@ -988,7 +978,6 @@ private void OnMentorInheritedPropertyChanged(object sender, InheritedPropertyCh private void OnMentorResourcesChanged(object sender, EventArgs e) { TreeWalkHelper.InvalidateOnResourcesChange( - null, this, ResourcesChangeInfo.CatastrophicDictionaryChangeInfo); } @@ -1085,7 +1074,6 @@ internal bool HasStyleChanged } - // Indicates if the StyleProperty has been invalidated during a tree walk internal bool HasStyleInvalidated { @@ -1168,7 +1156,6 @@ internal bool PotentiallyHasMentees } - /// /// ResourceReferenceExpressions on non-[FE/FCE] add listeners to this /// event so they can get notified when there is a ResourcesChange @@ -1188,7 +1175,6 @@ internal event EventHandler ResourcesChanged } - /// /// Mentees add listeners to this /// event so they can get notified when there is a InheritedPropertyChange diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs index 221dd438ba4..f67f82f4f03 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs @@ -324,7 +324,6 @@ internal void ChangeLogicalParent(DependencyObject newParent) BroadcastEventHelper.AddOrRemoveHasLoadedChangeHandlerFlag(this, oldParent, newParent); - /////////////////// // OnParentChanged: /////////////////// @@ -353,7 +352,6 @@ internal virtual void OnNewParent(DependencyObject newParent) _parent = newParent; - // Synchronize ForceInherit properties if (_parent != null && _parent is ContentElement) { @@ -416,7 +414,6 @@ internal void OnAncestorChangedInternal(TreeChangeInfo parentTreeState) parentTreeState.InheritablePropertiesStack.Push(currentInheritableProperties); - // Call OnAncestorChanged OnAncestorChanged(); @@ -877,7 +874,6 @@ private void ConnectMentor(DependencyObject mentor) // invalidate the mentee's tree TreeWalkHelper.InvalidateOnTreeChange( this, null, - foMentor.DO, true /* isAddOperation */ ); @@ -911,7 +907,6 @@ private void DisconnectMentor(DependencyObject mentor) // invalidate the mentee's tree TreeWalkHelper.InvalidateOnTreeChange( this, null, - foMentor.DO, false /* isAddOperation */ ); @@ -1010,7 +1005,6 @@ private void OnMentorInheritedPropertyChanged(object sender, InheritedPropertyCh { TreeWalkHelper.InvalidateOnInheritablePropertyChange( this, null, - e.Info, false /*skipStartNode*/); } @@ -1019,7 +1013,6 @@ private void OnMentorResourcesChanged(object sender, EventArgs e) { TreeWalkHelper.InvalidateOnResourcesChange( this, null, - ResourcesChangeInfo.CatastrophicDictionaryChangeInfo); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs index e6b94b52c73..280fa93d4fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs @@ -15,7 +15,6 @@ namespace System.Windows.Media.Animation { - /// /// This class is used as part of a ThicknessKeyFrameCollection in /// conjunction with a KeyFrameThicknessAnimation to animate a diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs index 2d55c2baee8..214d99abfea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs @@ -13,7 +13,6 @@ namespace System.Windows.Media.Animation { - /// /// This class is used as part of a ThicknessKeyFrameCollection in /// conjunction with a KeyFrameThicknessAnimation to animate a diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs index d1a4e52c938..ba6bdfdc50a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs @@ -20,7 +20,6 @@ namespace System.Windows.Media.Animation { - /// /// This class is used as part of a ThicknessKeyFrameCollection in /// conjunction with a KeyFrameThicknessAnimation to animate a @@ -83,7 +82,7 @@ public SplineThicknessKeyFrame(Thickness value, KeyTime keyTime, KeySpline keySp /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new SplineThicknessKeyFrame(); + return new SplineThicknessKeyFrame(); } #endregion @@ -146,5 +145,4 @@ public KeySpline KeySpline #endregion } - } \ No newline at end of file diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs index 5eb86889fd5..6a67fc1d4f7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs @@ -422,7 +422,6 @@ protected sealed override Thickness GetCurrentValueCore( } - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -444,7 +443,6 @@ protected sealed override Thickness GetCurrentValueCore( return AnimatedTypeHelpers.AddThickness(defaultOriginValue, currentIterationValue); } - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs index 76ca771bb68..14be4808a74 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs @@ -105,7 +105,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -126,7 +125,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -147,7 +145,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32Rect.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32Rect.cs index 8fddea8419e..97f29be413a 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32Rect.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32Rect.cs @@ -16,7 +16,6 @@ namespace System.Windows { - [Serializable] [TypeConverter(typeof(Int32RectConverter))] [ValueSerializer(typeof(Int32RectValueSerializer))] // Used by MarkupWriter @@ -30,9 +29,6 @@ public partial struct Int32Rect : IFormattable #region Public Methods - - - /// /// Compares two Int32Rect instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -198,8 +194,6 @@ public static Int32Rect Parse(string source) //------------------------------------------------------ - - #region Public Properties /// @@ -211,12 +205,10 @@ public int X { return _x; } - set { _x = value; } - } /// @@ -228,12 +220,10 @@ public int Y { return _y; } - set { _y = value; } - } /// @@ -245,12 +235,10 @@ public int Width { return _width; } - set { _width = value; } - } /// @@ -262,12 +250,10 @@ public int Height { return _height; } - set { _height = value; } - } #endregion Public Properties @@ -281,9 +267,6 @@ public int Height #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -295,13 +278,6 @@ public int Height #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -312,7 +288,6 @@ public int Height #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -321,7 +296,6 @@ public int Height /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -335,7 +309,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -351,7 +324,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -384,7 +356,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -396,7 +367,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -407,19 +377,14 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal int _x; internal int _y; internal int _width; internal int _height; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -429,8 +394,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Point.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Point.cs index bc7256f5c48..9407a410306 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Point.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Point.cs @@ -16,7 +16,6 @@ namespace System.Windows { - [Serializable] [TypeConverter(typeof(PointConverter))] [ValueSerializer(typeof(PointValueSerializer))] // Used by MarkupWriter @@ -30,9 +29,6 @@ public partial struct Point : IFormattable #region Public Methods - - - /// /// Compares two Point instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -167,8 +163,6 @@ public static Point Parse(string source) //------------------------------------------------------ - - #region Public Properties /// @@ -180,12 +174,10 @@ public double X { return _x; } - set { _x = value; } - } /// @@ -197,12 +189,10 @@ public double Y { return _y; } - set { _y = value; } - } #endregion Public Properties @@ -216,9 +206,6 @@ public double Y #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -230,13 +217,6 @@ public double Y #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -247,7 +227,6 @@ public double Y #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -256,7 +235,6 @@ public double Y /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -270,7 +248,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -286,7 +263,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -312,7 +288,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -324,7 +299,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -335,17 +309,12 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -355,8 +324,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Rect.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Rect.cs index 019bec08f2c..135d9f33a0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Rect.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Rect.cs @@ -16,7 +16,6 @@ namespace System.Windows { - [Serializable] [TypeConverter(typeof(RectConverter))] [ValueSerializer(typeof(RectValueSerializer))] // Used by MarkupWriter @@ -30,9 +29,6 @@ public partial struct Rect : IFormattable #region Public Methods - - - /// /// Compares two Rect instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -198,12 +194,9 @@ public static Rect Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -215,9 +208,6 @@ public static Rect Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -229,13 +219,6 @@ public static Rect Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -246,7 +229,6 @@ public static Rect Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -255,7 +237,6 @@ public static Rect Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -269,7 +250,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -285,7 +265,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -318,7 +297,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -330,7 +308,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -341,19 +318,14 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; internal double _width; internal double _height; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -363,8 +335,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Size.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Size.cs index 3f7ed59bbb5..b4f9b5f40fb 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Size.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Size.cs @@ -16,7 +16,6 @@ namespace System.Windows { - [Serializable] [TypeConverter(typeof(SizeConverter))] [ValueSerializer(typeof(SizeValueSerializer))] // Used by MarkupWriter @@ -30,9 +29,6 @@ public partial struct Size : IFormattable #region Public Methods - - - /// /// Compares two Size instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -190,12 +186,9 @@ public static Size Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -207,9 +200,6 @@ public static Size Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -221,13 +211,6 @@ public static Size Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -238,7 +221,6 @@ public static Size Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -247,7 +229,6 @@ public static Size Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -261,7 +242,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -277,7 +257,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -308,7 +287,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -320,7 +298,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -331,17 +308,12 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _width; internal double _height; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -351,8 +323,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Vector.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Vector.cs index 9a6b4a2e102..9d3ff8c7a34 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Vector.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Vector.cs @@ -16,7 +16,6 @@ namespace System.Windows { - [Serializable] [TypeConverter(typeof(VectorConverter))] [ValueSerializer(typeof(VectorValueSerializer))] // Used by MarkupWriter @@ -30,9 +29,6 @@ public partial struct Vector : IFormattable #region Public Methods - - - /// /// Compares two Vector instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -167,8 +163,6 @@ public static Vector Parse(string source) //------------------------------------------------------ - - #region Public Properties /// @@ -180,12 +174,10 @@ public double X { return _x; } - set { _x = value; } - } /// @@ -197,12 +189,10 @@ public double Y { return _y; } - set { _y = value; } - } #endregion Public Properties @@ -216,9 +206,6 @@ public double Y #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -230,13 +217,6 @@ public double Y #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -247,7 +227,6 @@ public double Y #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -256,7 +235,6 @@ public double Y /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -270,7 +248,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -286,7 +263,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -312,7 +288,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -324,7 +299,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -335,17 +309,12 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - internal double _x; internal double _y; - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -355,8 +324,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Generated/Matrix.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Generated/Matrix.cs index 33e20a457b7..f464bc9a75b 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Generated/Matrix.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Generated/Matrix.cs @@ -16,7 +16,6 @@ namespace System.Windows.Media { - [Serializable] [TypeConverter(typeof(MatrixConverter))] [ValueSerializer(typeof(MatrixValueSerializer))] // Used by MarkupWriter @@ -30,9 +29,6 @@ public partial struct Matrix : IFormattable #region Public Methods - - - /// /// Compares two Matrix instances for exact equality. /// Note that double values can acquire error when operated upon, such that @@ -213,12 +209,9 @@ public static Matrix Parse(string source) //------------------------------------------------------ - - #region Public Properties - #endregion Public Properties //------------------------------------------------------ @@ -230,9 +223,6 @@ public static Matrix Parse(string source) #region Protected Methods - - - #endregion ProtectedMethods //------------------------------------------------------ @@ -244,13 +234,6 @@ public static Matrix Parse(string source) #region Internal Methods - - - - - - - #endregion Internal Methods //------------------------------------------------------ @@ -261,7 +244,6 @@ public static Matrix Parse(string source) #region Internal Properties - /// /// Creates a string representation of this object based on the current culture. /// @@ -270,7 +252,6 @@ public static Matrix Parse(string source) /// public override string ToString() { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, null /* format provider */); } @@ -284,7 +265,6 @@ public override string ToString() /// public string ToString(IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(null /* format string */, provider); } @@ -300,7 +280,6 @@ public string ToString(IFormatProvider provider) /// string IFormattable.ToString(string format, IFormatProvider provider) { - // Delegate to the internal method which implements all ToString calls. return ConvertToString(format, provider); } @@ -335,7 +314,6 @@ internal string ConvertToString(string format, IFormatProvider provider) } - #endregion Internal Properties //------------------------------------------------------ @@ -347,7 +325,6 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Dependency Properties - #endregion Dependency Properties //------------------------------------------------------ @@ -359,15 +336,9 @@ internal string ConvertToString(string format, IFormatProvider provider) #region Internal Fields - - - - - #endregion Internal Fields - #region Constructors //------------------------------------------------------ @@ -377,8 +348,6 @@ internal string ConvertToString(string format, IFormatProvider provider) //------------------------------------------------------ - - #endregion Constructors } } diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/Runtime/CodeSink.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/Runtime/CodeSink.cs index 2af433748f4..1a991b93ae2 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/Runtime/CodeSink.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/Runtime/CodeSink.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -200,18 +200,22 @@ private void WriteWithIndentation(string output) InternalWrite(spaces); } - InternalWrite(output.Substring(startIndex, endIndex - startIndex)); - - if (endIndex != output.Length) - { - InternalWrite("\n"); - _doIndent = true; - } - else - { - _doIndent = false; - } - + string currentLine = output.Substring(startIndex, endIndex - startIndex); + if (currentLine.Trim() != "") + { + InternalWrite(currentLine.Replace("", string.Empty)); + + if (endIndex != output.Length) + { + InternalWrite("\n"); + _doIndent = true; + } + else + { + _doIndent = false; + } + } + startIndex = endIndex + 1; } } diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs index 1957fdf34d4..8c9b37f03c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs @@ -487,9 +487,8 @@ protected sealed override [[instance.TypeName]] GetCurrentValueCore( currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress); } - + [[conditional(instance.CanInterpolate == true)]] - // If we're cumulative, we need to multiply the final key frame // value by the current repeat count and add this to the return // value. @@ -511,7 +510,6 @@ protected sealed override [[instance.TypeName]] GetCurrentValueCore( return AnimatedTypeHelpers.Add[[instance.TypeName]](defaultOriginValue, currentIterationValue); } [[/conditional]] - return currentIterationValue; } diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/EasingKeyFrameTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/EasingKeyFrameTemplate.cs index 6d2512762db..e92ca466878 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/EasingKeyFrameTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/EasingKeyFrameTemplate.cs @@ -91,7 +91,6 @@ public override void Go(ResourceModel resourceModel) csFile.WriteBlock( [[inline]] - /// /// This class is used as part of a [[instance.TypeName]]KeyFrameCollection in /// conjunction with a KeyFrame[[instance.TypeName]]Animation to animate a diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs index f82ffdf454a..2c23c5301f2 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs @@ -471,6 +471,7 @@ internal void OnAncestorChangedInternal(TreeChangeInfo parentTreeState) FrameworkObject fo = [[conditional(instance.ClassName == "FrameworkElement")]]new FrameworkObject(this, null);[[/conditional]] [[conditional(instance.ClassName == "FrameworkContentElement")]]new FrameworkObject(null, this);[[/conditional]] + fo.SetShouldLookupImplicitStyles(); } diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameCollectionTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameCollectionTemplate.cs index 489f14793b3..d2c432a9990 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameCollectionTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameCollectionTemplate.cs @@ -165,7 +165,6 @@ protected override void CloneCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.CloneCurrentValueCore. /// @@ -186,7 +185,6 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetAsFrozenCore. /// @@ -207,7 +205,6 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) } } - /// /// Implementation of Freezable.GetCurrentValueAsFrozenCore. /// diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameTemplate.cs index ab9dbc04e36..cb317674e11 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/KeyFrameTemplate.cs @@ -82,7 +82,6 @@ public override void Go(ResourceModel resourceModel) csFile.WriteBlock( [[inline]] - /// /// This class is used as part of a [[instance.TypeName]]KeyFrameCollection in /// conjunction with a KeyFrame[[instance.TypeName]]Animation to animate a diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs index 151e56a84ac..223ac24cf16 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -71,7 +71,7 @@ public override void Go() List modifiers = new List(); List extends = new List(); - string attributes = String.Empty; + string attributes = null; // TODO: Add accessibility modifiers in McgType data model if (resource.Name != "ImplicitInputBrush") @@ -173,7 +173,6 @@ namespace [[resource.ManagedNamespace]] [[WriteClone(resource)]] [[WriteCloneCurrentValue(resource)]] - [[WriteObjectMethods(resource)]] #endregion Public Methods @@ -327,9 +326,7 @@ [[modifiersStr]]struct [[name]][[extendsStr]] private string WriteCloneCoreMethods(McgResource resource) { if (resource.IsValueType || (!resource.AddCloneHooks && !resource.IsCollection)) - { - return String.Empty; - } + return null; string cloneCoreMethods = String.Empty; @@ -397,14 +394,16 @@ private string WriteFreezeCore(McgResource resource) private string WriteClone(McgResource resource) { - if (!resource.IsFreezable) return String.Empty; + if (!resource.IsFreezable) + return null; return WriteStronglyTypedShadow("Clone", resource.Name); } private string WriteCloneCurrentValue(McgResource resource) { - if (!resource.IsFreezable) return String.Empty; + if (!resource.IsFreezable) + return null; return WriteStronglyTypedShadow("CloneCurrentValue", resource.Name); } @@ -573,12 +572,12 @@ private bool NeedsPropertyChangedCallback(McgResource resource, McgField field) private string WriteLocalPropertyDelegates(McgResource resource) { - if (resource.SkipProperties) return String.Empty; - if (resource.IsValueType) return String.Empty; + if (resource.SkipProperties || resource.IsValueType) + return null; StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in resource.LocalFields) + foreach (McgField field in resource.LocalFields) { if (field.IsUnmanagedOnly) continue; @@ -673,7 +672,6 @@ private static void [[field.PropertyName]]PropertyChanged(DependencyObject d, De target.[[field.PropertyName]]PropertyChangedHook(e); [[/conditional]] [[conditional(canEarlyOutIfIsASubPropertyChange)]] - // The first change to the default value of a mutable collection property (e.g. GeometryGroup.Children) // will promote the property value from a default value to a local value. This is technically a sub-property // change because the collection was changed and not a new collection set (GeometryGroup.Children. @@ -828,6 +826,7 @@ private static void [[field.PropertyName]]PropertyChanged(DependencyObject d, De [[conditional(field.PropertyChangedHook)]] target.[[field.PropertyName]]PropertyChangedHook(e); [[/conditional]] + [[/inline]] ); } @@ -952,17 +951,17 @@ private static void [[field.PropertyName]]PropertyChanged(DependencyObject d, De } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } private string WriteRegisterDPProperty(McgResource resource) { - if (resource.SkipProperties) return String.Empty; - if (resource.IsValueType) return String.Empty; + if (resource.SkipProperties || resource.IsValueType) + return null; StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in resource.LocalFields) + foreach (McgField field in resource.LocalFields) { if (field.IsAliased || field.IsUnmanagedOnly) continue; @@ -1043,7 +1042,7 @@ private string WriteRegisterDPProperty(McgResource resource) ); } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } private string GetDefaultValue(McgField field) @@ -1107,7 +1106,7 @@ private string WriteLocallyCachedProperties(McgResource resource) } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } /// @@ -1116,7 +1115,8 @@ private string WriteLocallyCachedProperties(McgResource resource) /// private string WriteCacheDecls(McgResource resource) { - if (resource.SkipFields) return String.Empty; + if (resource.SkipFields) + return null; StringCodeSink cs = new StringCodeSink(); @@ -1138,17 +1138,17 @@ private string WriteCacheDecls(McgResource resource) } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } private string WriteDefaultValues(McgResource resource) { - if (resource.SkipProperties) return String.Empty; - if (resource.IsValueType) return String.Empty; + if (resource.SkipProperties || resource.IsValueType) + return null; StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in resource.LocalFields) + foreach (McgField field in resource.LocalFields) { if (field.IsUnmanagedOnly) continue; @@ -1174,20 +1174,17 @@ private string WriteDefaultValues(McgResource resource) } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } private string WriteStaticCtor(McgResource resource) { - if (_staticCtorText.IsEmpty) - { - if (resource.SkipProperties) return String.Empty; - if (resource.IsValueType) return String.Empty; - } + if (_staticCtorText.IsEmpty && (resource.SkipProperties || resource.IsValueType)) + return null; StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in resource.LocalFields) + foreach (McgField field in resource.LocalFields) { if (field.IsUnmanagedOnly) continue; @@ -1246,10 +1243,8 @@ static [[resource.Name]]() [[/inline]]; } - else - { - return String.Empty; - } + + return null; } /// @@ -1260,7 +1255,8 @@ static [[resource.Name]]() /// private string WriteEffectiveValuesInitialSize(McgResource resource) { - if (resource.IsValueType) return String.Empty; + if (resource.IsValueType) + return null; // The default value is 2, so we don't need to emit this if the count == 2. if ((resource.CommonlySetFieldCount > 0) && @@ -1302,19 +1298,18 @@ internal override int EffectiveValuesInitialSize return cs.ToString(); } - else - { - return String.Empty; - } + + return null; } private string WriteProperties(McgResource resource) { - if (resource.SkipProperties) return String.Empty; + if (resource.SkipProperties) + return null; StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in resource.LocalFields) + foreach (McgField field in resource.LocalFields) { if (field.IsAliased || field.IsUnmanagedOnly) continue; @@ -1329,7 +1324,7 @@ private string WriteProperties(McgResource resource) } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } /// @@ -1441,7 +1436,7 @@ private string WriteSimpleProperty(McgResource resource, McgField field) "/// " + field.PropertyName + " - " + field.Type.ManagedName + ". Default value is 0.", true); - cs.WriteBlock( + cs.Write( [[inline]] /// [[comment]] @@ -1457,7 +1452,7 @@ [[visibility]] [[field.Type.ManagedName]] [[field.PropertyName]] if (!field.IsReadOnly) { - cs.WriteBlock( + cs.Write( [[inline]] set { @@ -1478,7 +1473,8 @@ [[visibility]] [[field.Type.ManagedName]] [[field.PropertyName]] private string WriteCreateInstanceCore(McgResource resource) { - if (resource.IsAbstract || resource.IsValueType) return String.Empty; + if (resource.IsAbstract || resource.IsValueType) + return null; if (resource.CreateInstanceCoreViaActivator) { @@ -1519,8 +1515,8 @@ protected override Freezable CreateInstanceCore() private string WriteResourceHandleField(McgResource resource) { - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; StringCodeSink cs = new StringCodeSink(); @@ -1542,7 +1538,7 @@ private string WriteResourceHandleField(McgResource resource) ); } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } @@ -1671,12 +1667,12 @@ private string WriteCollectionMarshal(McgType collectionType, private string WriteUpdateResource(McgResource resource) { + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; + StringCodeSink cs = new StringCodeSink(); StringCodeSink duceUpdate = new StringCodeSink(); - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; - if (!resource.IsAbstract && (resource.IsCollection || resource.AllUceFields.Length > 0)) { if (resource.SkipUpdate) @@ -1990,7 +1986,6 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh sizeof([[milcmdStruct]]), (int)([[additionalDataCalculation.ToString()]]) ); - [[/inline]] ); @@ -2062,13 +2057,13 @@ internal override void UpdateResource(DUCE.Channel channel, bool skipOnChannelCh ); } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } private string WriteAddRefOnChannel(McgResource resource) { - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; StringCodeSink cs = new StringCodeSink(); @@ -2095,14 +2090,14 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) } else { - return ""; + return null; } } string methodName = String.Empty; - string duceAddRef = String.Empty; - string duceAddRefAnimations = String.Empty; - string addRefCollection = String.Empty; + string duceAddRef = null; + string duceAddRefAnimations = null; + string addRefCollection = null; bool lockThis = false; if (!resource.DerivesFromTypeWhichHasUnmanagedResource) @@ -2152,15 +2147,20 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) string visualAddRef = Helpers.CodeGenHelpers.WriteFieldStatements(visualFields, "{managedType} v{propertyName} = {propertyName};\n" + "v{propertyName}?.AddRefOnChannelForCyclicBrush(this, channel);"); - if (visualAddRef != String.Empty) + if (visualAddRef != null) { duceAddRef = duceAddRef + visualAddRef; } - duceAddRef = duceAddRef + - [[inline]] - [[Helpers.CodeGenHelpers.WriteFieldStatements(collectionFields, addrefCollectionTemplate)]] + duceAddRef = duceAddRef + Helpers.CodeGenHelpers.WriteFieldStatements(collectionFields, addrefCollectionTemplate); + + if (duceAddRef != null) + { + duceAddRef = [[inline]] + [[duceAddRef]] + [[/inline]]; + } if (resource.IsAnimatable) { @@ -2188,7 +2188,7 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) [[inline]] [[methodName]] { - [[(lockThis ? "using (CompositionEngineLock.Acquire()) \n{" : "")]] + [[(lockThis ? "using (CompositionEngineLock.Acquire()) \n{" : null)]] if (_duceResource.CreateOrAddRefOnChannel(this, channel, System.Windows.Media.Composition.DUCE.ResourceType.TYPE_[[resource.ManagedName.ToUpper()]])) { [[duceAddRef]] @@ -2199,7 +2199,7 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) } return _duceResource.GetHandle(channel); - [[(lockThis ? "}" : "")]] + [[(lockThis ? "}" : null)]] } [[/inline]] ); @@ -2209,11 +2209,11 @@ DUCE.ResourceHandle DUCE.IResource.AddRefOnChannel(DUCE.Channel channel) private string WriteReleaseOnChannel(McgResource resource) { - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; StringCodeSink cs = new StringCodeSink(); - string duceRelease = String.Empty; + string duceRelease = null; if (resource.IsAbstract) { @@ -2238,13 +2238,13 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) } else { - return ""; + return null; } } string methodName = String.Empty; - string duceReleaseAnimations = String.Empty; - string releaseCollection = String.Empty; + string duceReleaseAnimations = null; + string releaseCollection = null; bool lockThis = false; if (!resource.DerivesFromTypeWhichHasUnmanagedResource) @@ -2296,15 +2296,20 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) "{managedType} v{propertyName} = {propertyName};\n" + "v{propertyName}?.ReleaseOnChannelForCyclicBrush(this, channel);"); - if (visualRelease != String.Empty) + if (visualRelease != null) { duceRelease = duceRelease + visualRelease; } - duceRelease = duceRelease + - [[inline]] - [[Helpers.CodeGenHelpers.WriteFieldStatements(collectionFields, releaseCollectionTemplate)]] + duceRelease = duceRelease + Helpers.CodeGenHelpers.WriteFieldStatements(collectionFields, releaseCollectionTemplate); + + if (duceRelease != null) + { + duceRelease = [[inline]] + [[duceRelease]] + [[/inline]]; + } if (resource.IsAnimatable) { @@ -2331,7 +2336,7 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) [[inline]] [[methodName]] { - [[(lockThis ? "using (CompositionEngineLock.Acquire()) \n{" : "")]] + [[(lockThis ? "using (CompositionEngineLock.Acquire()) \n{" : null)]] Debug.Assert(_duceResource.IsOnChannel(channel)); if (_duceResource.ReleaseOnChannel(channel)) @@ -2340,7 +2345,7 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) [[duceReleaseAnimations]] [[releaseCollection]] } - [[(lockThis ? "}" : "")]] + [[(lockThis ? "}" : null)]] } [[/inline]] ); @@ -2350,8 +2355,8 @@ void DUCE.IResource.ReleaseOnChannel(DUCE.Channel channel) private string WriteGetDuceResource(McgResource resource) { - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; StringCodeSink cs = new StringCodeSink(); StringCodeSink releaseString = new StringCodeSink(); @@ -2382,7 +2387,7 @@ DUCE.ResourceHandle DUCE.IResource.GetHandle(DUCE.Channel channel) } else { - return String.Empty; + return null; } } @@ -2427,8 +2432,8 @@ DUCE.ResourceHandle DUCE.IResource.GetHandle(DUCE.Channel channel) private string WriteGetChannelCount(McgResource resource) { - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; StringCodeSink cs = new StringCodeSink(); StringCodeSink releaseString = new StringCodeSink(); @@ -2453,7 +2458,7 @@ int DUCE.IResource.GetChannelCount() } else { - return String.Empty; + return null; } } @@ -2494,8 +2499,8 @@ int DUCE.IResource.GetChannelCount() private string WriteGetChannel(McgResource resource) { - if (resource.IsValueType) return String.Empty; - if (!resource.HasUnmanagedResource) return String.Empty; + if (resource.IsValueType || !resource.HasUnmanagedResource) + return null; StringCodeSink cs = new StringCodeSink(); StringCodeSink releaseString = new StringCodeSink(); @@ -2520,7 +2525,7 @@ DUCE.Channel DUCE.IResource.GetChannel(int index) } else { - return String.Empty; + return null; } } @@ -2563,7 +2568,7 @@ private string WriteListMarshalling(McgResource resource) { StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in resource.LocalFields) + foreach (McgField field in resource.LocalFields) { McgResource fieldResource = field.Type as McgResource; @@ -2628,7 +2633,7 @@ private void [[field.PropertyName]]ItemRemoved(object sender, object item) } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } //------------------------------------------------------ @@ -2800,60 +2805,58 @@ internal [[modifiers]] InstanceDescriptor ToInstanceDescriptor() } } - private static string WriteParse(McgResource resource) - { - if (resource.SkipToString) return String.Empty; - - // Should we emit the parse code? - if (resource.IsCollection || - ((resource.ParseMethod != null) && (resource.ParseMethod.Length > 0))) - { - string parseBody; - - // A ParseMethod trumps the automatic handling of a collection - if ((resource.ParseMethod != null) && (resource.ParseMethod.Length > 0)) - { - parseBody = "return " + resource.ParseMethod + "(source, formatProvider);\n"; - } - else - { - parseBody = - [[inline]] - TokenizerHelper th = new TokenizerHelper(source, formatProvider); - [[resource.ManagedName]] resource = new [[resource.ManagedName]](); - - [[resource.CollectionType.ManagedName]] value; - - while (th.NextToken()) - { - [[WriteParseBody(resource.CollectionType, "th.GetCurrentToken()")]] - - resource.Add(value); - } - - return resource; - [[/inline]]; - } - - return - [[inline]] - /// - /// Parse - returns an instance converted from the provided string - /// using the current culture - /// string with [[resource.Name]] data - /// - public static [[resource.Name]] Parse(string source) - { - IFormatProvider formatProvider = System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS; - - [[parseBody]] - } - [[/inline]]; - } - else - { - return String.Empty; - } + private static string WriteParse(McgResource resource) + { + if (resource.SkipToString) + return null; + + // Should we emit the parse code? + if (resource.IsCollection || ((resource.ParseMethod != null) && (resource.ParseMethod.Length > 0))) + { + string parseBody; + + // A ParseMethod trumps the automatic handling of a collection + if ((resource.ParseMethod != null) && (resource.ParseMethod.Length > 0)) + { + parseBody = "return " + resource.ParseMethod + "(source, formatProvider);\n"; + } + else + { + parseBody = + [[inline]] + TokenizerHelper th = new TokenizerHelper(source, formatProvider); + [[resource.ManagedName]] resource = new [[resource.ManagedName]](); + + [[resource.CollectionType.ManagedName]] value; + + while (th.NextToken()) + { + [[WriteParseBody(resource.CollectionType, "th.GetCurrentToken()")]] + + resource.Add(value); + } + + return resource; + [[/inline]]; + } + + return + [[inline]] + /// + /// Parse - returns an instance converted from the provided string + /// using the current culture + /// string with [[resource.Name]] data + /// + public static [[resource.Name]] Parse(string source) + { + IFormatProvider formatProvider = System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS; + + [[parseBody]] + } + [[/inline]]; + } + + return null; } #endregion Helper Methods diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs index f3c24e831af..c4df4ab4362 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs @@ -236,13 +236,14 @@ public bool Equals([[resource.Name]] value) private static string WriteToString(McgResource resource) { - if (resource.SkipToString) return String.Empty; + if (resource.SkipToString) + return null; StringCodeSink cs = new StringCodeSink(); if (resource.Extends == null) { - string readPreamble = String.Empty; + string readPreamble = null; if (resource.IsFreezable) { @@ -468,7 +469,7 @@ internal[[modifiers]] string ConvertToString(string format, IFormatProvider prov } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } /// @@ -583,7 +584,7 @@ private string WriteObjectMethods(McgResource resource) WriteGetHashCode(resource, cs); WriteParse(resource, cs); - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } private void WriteValueMethods(McgResource resource, StringCodeSink cs) diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/SplineKeyFrameTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/SplineKeyFrameTemplate.cs index e192a9af7d4..4ce4056a51a 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/SplineKeyFrameTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/SplineKeyFrameTemplate.cs @@ -91,7 +91,6 @@ public override void Go(ResourceModel resourceModel) csFile.WriteBlock( [[inline]] - /// /// This class is used as part of a [[instance.TypeName]]KeyFrameCollection in /// conjunction with a KeyFrame[[instance.TypeName]]Animation to animate a @@ -154,7 +153,7 @@ public Spline[[instance.TypeName]]KeyFrame([[instance.TypeName]] value, KeyTime /// The new Freezable. protected override Freezable CreateInstanceCore() { - return new Spline[[instance.TypeName]]KeyFrame(); + return new Spline[[instance.TypeName]]KeyFrame(); } #endregion @@ -216,7 +215,6 @@ public KeySpline KeySpline #endregion } - [[/inline]] ); diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CodeGenHelpers.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CodeGenHelpers.cs index af3f2852ade..122a859acfa 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CodeGenHelpers.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CodeGenHelpers.cs @@ -67,19 +67,19 @@ internal static string WriteFieldStatementsFirstLastWithSeparator(McgField[] fie } } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } internal static string WriteFieldStatements(McgField[] fields, string statement) { StringCodeSink cs = new StringCodeSink(); - foreach(McgField field in fields) + foreach (McgField field in fields) { cs.WriteBlock(WriteFieldStatement(field, statement)); } - return cs.ToString(); + return cs.IsEmpty ? null : cs.ToString(); } internal static string WriteFieldStatement(McgField field, string statement) diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs index f5e43b7bea8..d79c33e0e34 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs @@ -26,7 +26,8 @@ public class CollectionHelper : GeneratorMethods { public static string UpdateResource(McgResource resource) { - if (!resource.HasUnmanagedResource) return String.Empty; + if (!resource.HasUnmanagedResource) + return null; return [[inline]] @@ -66,6 +67,7 @@ public static string Collection_Clear(McgResource resource, string type) // At this time, these call-outs are not public, so we do not handle exceptions. OnRemove( /* oldValue */ oldCollection[i]); } + [[/inline]]; } else @@ -82,6 +84,7 @@ public static string Collection_Clear(McgResource resource, string type) _collection.Clear(); Debug.Assert(_collection.Count == 0); + [[/inline]]; } } @@ -92,6 +95,7 @@ public static string Collection_Clear(McgResource resource, string type) WritePreamble(); _collection.Clear(); + [[/inline]]; } } @@ -100,7 +104,7 @@ public static string Collection_Insert(McgResource resource, string type, string { if (resource.CollectionType.IsFreezable) { - string onInsert = String.Empty; + string onInsert = null; if (resource.IsCollectionOfHandles) { @@ -206,11 +210,14 @@ public static string Collection_RemoveAt(McgResource resource, string type, stri // Helper used by Remove and RemoveAt for removing Freezables. private static string Collection_RemoveFreezableAt(McgResource resource, string oldValue, string index) { - string onRemove = String.Empty; + string onRemove = null; if (resource.IsCollectionOfHandles) { - onRemove = [[inline]]OnRemove([[oldValue]]);[[/inline]]; + onRemove = [[inline]] + + OnRemove([[oldValue]]); + [[/inline]]; } return @@ -218,7 +225,6 @@ private static string Collection_RemoveFreezableAt(McgResource resource, string OnFreezablePropertyChanged([[oldValue]], null); _collection.RemoveAt([[index]]); - [[onRemove]] [[/inline]]; } @@ -227,7 +233,7 @@ public static string Collection_CheckAllNotNullAndFirePropertyChanged(McgResourc { if (resource.CollectionType.IsFreezable) { - string onInsert = String.Empty; + string onInsert = null; if (resource.IsCollectionOfHandles) { @@ -242,6 +248,7 @@ public static string Collection_CheckAllNotNullAndFirePropertyChanged(McgResourc { throw new System.ArgumentException(SR.Collection_NoNull); } + OnFreezablePropertyChanged(/* oldValue = */ null, item); [[onInsert]] } @@ -255,22 +262,25 @@ public static string Collection_Add(McgResource resource, string type, string va { if (index != String.Empty) { - index = [[inline]][[index]] = [[/inline]]; } if (resource.CollectionType.IsFreezable) { - string onInsert = String.Empty; + string onInsert = null; if (resource.IsCollectionOfHandles) { - onInsert = [[inline]]OnInsert(newValue);[[/inline]]; + onInsert = [[inline]] + + OnInsert(newValue); + [[/inline]]; } return [[inline]] [[type]] newValue = [[value]]; + OnFreezablePropertyChanged(/* oldValue = */ null, newValue); [[index]]_collection.Add(newValue); [[onInsert]] @@ -295,35 +305,38 @@ public static string Collection_CheckNullInsert(McgResource resource, string val { throw new System.ArgumentException(SR.Collection_NoNull); } + [[/inline]]; } - else - return String.Empty; + + return null; } public static string Collection_SetValue(McgResource resource, string type, string index, string typedValue) { if (resource.CollectionType.IsFreezable) { - string onSet = String.Empty; + string onSet = null; if (resource.IsCollectionOfHandles) { - onSet = [[inline]]OnSet(oldValue, [[typedValue]]);[[/inline]]; + onSet = [[inline]] + + OnSet(oldValue, [[typedValue]]); + [[/inline]]; } return [[inline]] WritePreamble(); - if (!Object.ReferenceEquals(_collection[ [[index]] ], [[typedValue]])) + if (!Object.ReferenceEquals(_collection[index], [[typedValue]])) { + [[type]] oldValue = _collection[index]; - [[type]] oldValue = _collection[ [[index]] ]; OnFreezablePropertyChanged(oldValue, [[typedValue]]); - _collection[ [[index]] ] = [[typedValue]]; - + _collection[index] = [[typedValue]]; [[onSet]] } [[/inline]]; @@ -333,7 +346,7 @@ public static string Collection_SetValue(McgResource resource, string type, stri return [[inline]] WritePreamble(); - _collection[ [[index]] ] = [[typedValue]]; + _collection[index] = [[typedValue]]; [[/inline]]; } } @@ -406,7 +419,8 @@ public static string WriteCopyToCommon(McgResource resource) public static string WriteCollectionSummary(McgResource resource) { - if (!resource.IsCollection) return String.Empty; + if (!resource.IsCollection) + return null; String summary = String.Empty; @@ -435,7 +449,8 @@ A collection of [[resource.CollectionType.ManagedName]] objects. public static string WriteCollectionConstructors(McgResource resource) { - if (!resource.IsCollection) return String.Empty; + if (!resource.IsCollection) + return null; String type = resource.CollectionType.ManagedName; @@ -514,7 +529,8 @@ public [[resource.Name]](IEnumerable<[[type]]> collection) public static string WriteCollectionEvents(McgResource resource) { - if (!resource.CollectionType.IsFreezable) return String.Empty; + if (!resource.CollectionType.IsFreezable) + return null; if (resource.IsCollectionOfHandles) { @@ -522,6 +538,7 @@ public static string WriteCollectionEvents(McgResource resource) // owner can addref/release the items on its channel. return [[inline]] + internal event ItemInsertedHandler ItemInserted; internal event ItemRemovedHandler ItemRemoved; @@ -548,16 +565,14 @@ private void OnSet(object oldValue, object newValue) } [[/inline]]; } - else - { - return String.Empty; - } + + return null; } public static string FreezeCore(McgResource resource) { - if (!resource.IsCollection) return String.Empty; - if (!resource.CollectionType.IsFreezable) return String.Empty; + if (!resource.IsCollection || !resource.CollectionType.IsFreezable) + return null; return [[inline]] @@ -599,7 +614,8 @@ public static string CloneCollectionHelper(McgResource resource, string source, public static string CloneCollection(McgResource resource, string method, string argType, string source) { - if (!resource.IsCollection) return String.Empty; + if (!resource.IsCollection) + return null; String value; @@ -654,7 +670,8 @@ public static string CallAggregateMethod(McgResource resource, string method, st public static string WriteCollectionEnumerator(McgResource resource) { - if (!resource.IsCollection) return String.Empty; + if (!resource.IsCollection) + return null; String type = resource.CollectionType.ManagedName; @@ -790,7 +807,8 @@ public [[type]] Current public static string WriteCollectionMethods(McgResource resource) { - if (!resource.IsCollection) return String.Empty; + if (!resource.IsCollection) + return null; String type = resource.CollectionType.ManagedName; @@ -832,7 +850,7 @@ public static string WriteCollectionMethods(McgResource resource) [[/inline]]; } - String onInheritanceContextChangedCoreMethod = String.Empty; + String onInheritanceContextChangedCoreMethod = null; if (resource.CollectionType.IsFreezable) { onInheritanceContextChangedCoreMethod = @@ -906,7 +924,6 @@ public int IndexOf([[type]] value) public void Insert(int index, [[type]] value) { [[Collection_CheckNullInsert(resource, "value")]] - [[Collection_Insert(resource, type, "index", "value")]] [[UpdateResource(resource)]] @@ -939,7 +956,6 @@ public void RemoveAt(int index) WritePostscript(); } - /// /// Removes the element at the specified index without firing /// the public Changed event. @@ -956,7 +972,6 @@ internal void RemoveAtWithoutFiringPublicEvents(int index) // No WritePostScript to avoid firing the Changed event. } - /// /// Indexer for the collection /// @@ -971,7 +986,6 @@ public [[type]] this[int index] set { [[Collection_CheckNullInsert(resource, "value")]] - [[Collection_SetValue(resource, type, "index", "value")]] [[UpdateResource(resource)]] @@ -1200,7 +1214,6 @@ internal int AddWithoutFiringPublicEvents([[type]] value) return index; } - [[WriteCollectionEvents(resource)]] #endregion Private Helpers @@ -1212,7 +1225,8 @@ internal int AddWithoutFiringPublicEvents([[type]] value) public static string WriteCollectionFields(McgResource resource) { - if (!resource.IsCollection) return String.Empty; + if (!resource.IsCollection) + return null; return [[inline]] diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeParser.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeParser.cs index 16f12b95203..33d7bddd928 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeParser.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -202,7 +202,7 @@ private void ProcessLine(string line) { // Detect "[[" or "]]", whichever we're expecting int newIndex; - newIndex = line.IndexOf(InTag?"]]":"[[", _current.Column); + newIndex = line.IndexOf(InTag ? "]]" : "[[", _current.Column); // @@ -212,7 +212,7 @@ private void ProcessLine(string line) break; } - ProcessText(line.Substring(_current.Column, newIndex-_current.Column)); + ProcessText(line.Substring(_current.Column, newIndex - _current.Column)); if (!InTag) { @@ -271,7 +271,7 @@ private void ProcessTag(string tag) _inConditional = false; if (!_isStartOfConditional) { - _stringBuilder.Append(" : String.Empty)"); + _stringBuilder.Append(" : \"\")"); } } else // tag encountered inline - embedded source. diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeRuntime.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeRuntime.cs index 85ec34eb0f4..54b0ea84429 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeRuntime.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/tools/csp/CsPrimeRuntime.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -41,12 +41,14 @@ public sealed class CsPrimeRuntime /// public static string ConvertAndIndent(object o, int iLevel) { - // Convert to a string + // Append a magic string to avoid new line insertion + if (o is null) + return ""; + // Convert to a string string sText = o.ToString(); // Handle the empty case - if (sText.Length == 0) { return "";