diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/PackUriHelper.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/PackUriHelper.cs index 83c2eee57f6..b723f954a0d 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/PackUriHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/PackUriHelper.cs @@ -326,7 +326,7 @@ internal sealed class ValidatedPartUri : Uri, IComparable, IEq #region Internal Constructors internal ValidatedPartUri(string partUriString) - : this(partUriString, false /*isNormalized*/, true /*computeIsRelationship*/, false /*dummy value as we will compute it later*/) + : this(partUriString, isNormalized: false, computeIsRelationship: true, false /*dummy value as we will compute it later*/) { } @@ -335,7 +335,7 @@ internal ValidatedPartUri(string partUriString) //This will optimize the code and we will not have to parse the Uri to find out //if it is a relationship part uri internal ValidatedPartUri(string partUriString, bool isRelationshipUri) - : this(partUriString, false /*isNormalized*/, false /*computeIsRelationship*/, isRelationshipUri) + : this(partUriString, isNormalized: false, computeIsRelationship: false, isRelationshipUri) { } @@ -539,8 +539,8 @@ private ValidatedPartUri GetNormalizedPartUri() return this; else return new ValidatedPartUri(_normalizedPartUriString, - true /*isNormalized*/, - false /*computeIsRelationship*/, + isNormalized: true, + computeIsRelationship: false, IsRelationshipPartUri); } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/IO/Packaging/CompoundFile/DataSpaceManager.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/IO/Packaging/CompoundFile/DataSpaceManager.cs index 495fc5f1fbb..c0640178ea8 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/IO/Packaging/CompoundFile/DataSpaceManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/IO/Packaging/CompoundFile/DataSpaceManager.cs @@ -39,9 +39,9 @@ internal class DataSpaceManager private static readonly string DataSpaceVersionIdentifier = "Microsoft.Container.DataSpaces"; // Version Writer - 1.0, Reader - 1.0, Updater - 1.0 - private static readonly VersionPair DataSpaceCurrentWriterVersion = new VersionPair(1 /*major*/, 0 /*minor*/); - private static readonly VersionPair DataSpaceCurrentReaderVersion = new VersionPair(1 /*major*/, 0 /*minor*/); - private static readonly VersionPair DataSpaceCurrentUpdaterVersion = new VersionPair(1 /*major*/, 0 /*minor*/); + private static readonly VersionPair DataSpaceCurrentWriterVersion = new VersionPair(major: 1, minor: 0); + private static readonly VersionPair DataSpaceCurrentReaderVersion = new VersionPair(major: 1, minor: 0); + private static readonly VersionPair DataSpaceCurrentUpdaterVersion = new VersionPair(major: 1, minor: 0); // The version information we read from the file private FormatVersion _fileFormatVersion; diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyObject.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyObject.cs index 1923e998bbd..f13fdeb1f13 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyObject.cs @@ -388,7 +388,7 @@ private EffectiveValueEntry GetEffectiveValue( } else { - entry.SetCoercedValue(value, null, true /* skipBaseValueChecks */, entry.IsCoercedWithCurrentValue); + entry.SetCoercedValue(value, null, skipBaseValueChecks: true, entry.IsCoercedWithCurrentValue); } _effectiveValues[entryIndex.Index] = entry; @@ -414,7 +414,7 @@ public void SetValue(DependencyProperty dp, object value) PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, value, metadata, false /* coerceWithDeferredReference */, false /* coerceWithCurrentValue */, OperationType.Unknown, false /* isInternal */); + SetValueCommon(dp, value, metadata, coerceWithDeferredReference: false, coerceWithCurrentValue: false, OperationType.Unknown, isInternal: false); } /// @@ -440,7 +440,7 @@ public void SetCurrentValue(DependencyProperty dp, object value) PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, value, metadata, false /* coerceWithDeferredReference */, true /* coerceWithCurrentValue */, OperationType.Unknown, false /* isInternal */); + SetValueCommon(dp, value, metadata, coerceWithDeferredReference: false, coerceWithCurrentValue: true, OperationType.Unknown, isInternal: false); } /// @@ -482,7 +482,7 @@ internal void SetValueInternal(DependencyProperty dp, object value) PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, value, metadata, false /* coerceWithDeferredReference */, false /* coerceWithCurrentValue */, OperationType.Unknown, true /* isInternal */); + SetValueCommon(dp, value, metadata, coerceWithDeferredReference: false, coerceWithCurrentValue: false, OperationType.Unknown, isInternal: true); } /// @@ -502,7 +502,7 @@ internal void SetCurrentValueInternal(DependencyProperty dp, object value) PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, value, metadata, false /* coerceWithDeferredReference */, true /* coerceWithCurrentValue */, OperationType.Unknown, true /* isInternal */); + SetValueCommon(dp, value, metadata, coerceWithDeferredReference: false, coerceWithCurrentValue: true, OperationType.Unknown, isInternal: true); } /// @@ -514,7 +514,7 @@ internal void SetDeferredValue(DependencyProperty dp, DeferredReference deferred PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, deferredReference, metadata, true /* coerceWithDeferredReference */, false /* coerceWithCurrentValue */, OperationType.Unknown, false /* isInternal */); + SetValueCommon(dp, deferredReference, metadata, coerceWithDeferredReference: true, coerceWithCurrentValue: false, OperationType.Unknown, isInternal: false); } /// @@ -526,7 +526,7 @@ internal void SetCurrentDeferredValue(DependencyProperty dp, DeferredReference d PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, deferredReference, metadata, true /* coerceWithDeferredReference */, true /* coerceWithCurrentValue */, OperationType.Unknown, false /* isInternal */); + SetValueCommon(dp, deferredReference, metadata, coerceWithDeferredReference: true, coerceWithCurrentValue: true, OperationType.Unknown, isInternal: false); } /// @@ -538,7 +538,7 @@ internal void SetMutableDefaultValue(DependencyProperty dp, object value) PropertyMetadata metadata = SetupPropertyChange(dp); // Do standard property set - SetValueCommon(dp, value, metadata, false /* coerceWithDeferredReference */, false /* coerceWithCurrentValue */, OperationType.ChangeMutableDefaultValue, false /* isInternal */); + SetValueCommon(dp, value, metadata, coerceWithDeferredReference: false, coerceWithCurrentValue: false, OperationType.ChangeMutableDefaultValue, isInternal: false); } /// @@ -568,7 +568,7 @@ public void SetValue(DependencyPropertyKey key, object value) PropertyMetadata metadata = SetupPropertyChange(key, out dp); // Do standard property set - SetValueCommon(dp, value, metadata, false /* coerceWithDeferredReference */, false /* coerceWithCurrentValue */, OperationType.Unknown, false /* isInternal */); + SetValueCommon(dp, value, metadata, coerceWithDeferredReference: false, coerceWithCurrentValue: false, OperationType.Unknown, isInternal: false); } /// @@ -998,8 +998,8 @@ private void ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, Prop metadata, oldEntry, ref newEntry, - false /* coerceWithDeferredReference */, - false /* coerceWithCurrentValue */, + coerceWithDeferredReference: false, + coerceWithCurrentValue: false, OperationType.Unknown); } @@ -1091,8 +1091,8 @@ public void CoerceValue(DependencyProperty dp) metadata, new EffectiveValueEntry() /* oldEntry */, ref newEntry, - false /* coerceWithDeferredReference */, - false /* coerceWithCurrentValue */, + coerceWithDeferredReference: false, + coerceWithCurrentValue: false, OperationType.Unknown); } @@ -1188,8 +1188,8 @@ internal void InvalidateProperty(DependencyProperty dp, bool preserveCurrentValu dp.GetMetadata(DependencyObjectType), new EffectiveValueEntry() /* oldEntry */, ref newEntry, - false /* coerceWithDeferredReference */, - false /* coerceWithCurrentValue */, + coerceWithDeferredReference: false, + coerceWithCurrentValue: false, OperationType.Unknown); } @@ -1389,10 +1389,10 @@ internal UpdateResult UpdateEffectiveValue( ref oldValue, baseValue, controlValue, - null /*coerceValueCallback */, + coerceValueCallback: null, coerceWithDeferredReference, coerceWithCurrentValue, - false /*skipBaseValueChecks*/); + skipBaseValueChecks: false); // Make sure that the call out did not cause a change to entryIndex entryIndex = CheckEntryIndex(entryIndex, targetIndex); @@ -1414,11 +1414,11 @@ internal UpdateResult UpdateEffectiveValue( ref oldEntry, ref oldValue, baseValue, - null /* controlValue */, + controlValue: null, metadata.CoerceValueCallback, coerceWithDeferredReference, - false /* coerceWithCurrentValue */, - false /*skipBaseValueChecks*/); + coerceWithCurrentValue: false, + skipBaseValueChecks: false); // Make sure that the call out did not cause a change to entryIndex entryIndex = CheckEntryIndex(entryIndex, targetIndex); @@ -1448,11 +1448,11 @@ internal UpdateResult UpdateEffectiveValue( ref oldEntry, ref oldValue, newEntry.GetFlattenedEntry(RequestFlags.FullyResolved).Value, - null /*controlValue*/, + controlValue: null, dp.DesignerCoerceValueCallback, - false /*coerceWithDeferredReference*/, - false /*coerceWithCurrentValue*/, - true /*skipBaseValueChecks*/); + coerceWithDeferredReference: false, + coerceWithCurrentValue: false, + skipBaseValueChecks: true); // Make sure that the call out did not cause a change to entryIndex entryIndex = CheckEntryIndex(entryIndex, targetIndex); @@ -2134,7 +2134,7 @@ public object ReadLocalValue(DependencyProperty dp) EntryIndex entryIndex = LookupEntry(dp.GlobalIndex); // Call Forwarded - return ReadLocalValueEntry(entryIndex, dp, false /* allowDeferredReferences */); + return ReadLocalValueEntry(entryIndex, dp, allowDeferredReferences: false); } /// @@ -2197,7 +2197,7 @@ public LocalValueEnumerator GetLocalValueEnumerator() DependencyProperty dp = DependencyProperty.RegisteredPropertyList.List[_effectiveValues[i].PropertyIndex]; if (dp != null) { - object localValue = ReadLocalValueEntry(new EntryIndex(i), dp, false /* allowDeferredReferences */); + object localValue = ReadLocalValueEntry(new EntryIndex(i), dp, allowDeferredReferences: false); if (localValue != DependencyProperty.UnsetValue) { snapshot[count++] = new LocalValueEntry(dp, localValue); @@ -2623,7 +2623,7 @@ internal void OnInheritanceContextChanged(EventArgs args) DependencyProperty dp = DependencyProperty.RegisteredPropertyList.List[_effectiveValues[i].PropertyIndex]; if (dp != null) { - object localValue = ReadLocalValueEntry(new EntryIndex(i), dp, true /* allowDeferredReferences */); + object localValue = ReadLocalValueEntry(new EntryIndex(i), dp, allowDeferredReferences: true); if (localValue != DependencyProperty.UnsetValue) { DependencyObject inheritanceChild = localValue as DependencyObject; diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyProperty.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyProperty.cs index 0a10e8b830c..c2b807575b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/DependencyProperty.cs @@ -367,7 +367,7 @@ private static void ValidateMetadataDefaultValue( } ValidateDefaultValueCommon(defaultMetadata.DefaultValue, propertyType, - propertyName, validateValueCallback, /*checkThreadAffinity = */ true); + propertyName, validateValueCallback, checkThreadAffinity: true); } // Validate the given default value, used by PropertyMetadata.GetDefaultValue() diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Freezable.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Freezable.cs index 8e53634f261..fafc483bad2 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Freezable.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Freezable.cs @@ -68,7 +68,7 @@ public Freezable Clone() Freezable clone = CreateInstance(); clone.CloneCore(this); - Debug_VerifyCloneCommon(/* original = */ this, /* clone = */ clone, /* isDeepClone = */ true); + Debug_VerifyCloneCommon(original: this, clone: clone, isDeepClone: true); return clone; } @@ -93,7 +93,7 @@ public Freezable CloneCurrentValue() // Freezable implementers who override CloneCurrentValueCore must ensure that // on creation the copy is not frozen. Debug_VerifyCloneCommon checks for this, // among other things. - Debug_VerifyCloneCommon(/* original = */ this, /* clone = */ clone, /* isDeepClone = */ true); + Debug_VerifyCloneCommon(original: this, clone: clone, isDeepClone: true); return clone; } @@ -115,7 +115,7 @@ public Freezable GetAsFrozen() Freezable clone = CreateInstance(); clone.GetAsFrozenCore(this); - Debug_VerifyCloneCommon(/* original = */ this, /* clone = */ clone, /* isDeepClone = */ false); + Debug_VerifyCloneCommon(original: this, clone: clone, isDeepClone: false); clone.Freeze(); @@ -140,7 +140,7 @@ public Freezable GetCurrentValueAsFrozen() Freezable clone = CreateInstance(); clone.GetCurrentValueAsFrozenCore(this); - Debug_VerifyCloneCommon(/* original = */ this, /* clone = */ clone, /* isDeepClone = */ false); + Debug_VerifyCloneCommon(original: this, clone: clone, isDeepClone: false); clone.Freeze(); @@ -154,7 +154,7 @@ public bool CanFreeze { get { - return IsFrozenInternal || FreezeCore(/* isChecking = */ true); + return IsFrozenInternal || FreezeCore(isChecking: true); } } @@ -173,7 +173,7 @@ public void Freeze() throw new InvalidOperationException(SR.Freezable_CantFreeze); } - Freeze(/* isChecking = */ false); + Freeze(isChecking: false); } #endregion @@ -348,8 +348,8 @@ protected Freezable CreateInstance() protected virtual void CloneCore(Freezable sourceFreezable) { CloneCoreCommon(sourceFreezable, - /* useCurrentValue = */ false, - /* cloneFrozenValues = */ true); + useCurrentValue: false, + cloneFrozenValues: true); } /// @@ -370,8 +370,8 @@ protected virtual void CloneCore(Freezable sourceFreezable) protected virtual void CloneCurrentValueCore(Freezable sourceFreezable) { CloneCoreCommon(sourceFreezable, - /* useCurrentValue = */ true, - /* cloneFrozenValues = */ true); + useCurrentValue: true, + cloneFrozenValues: true); } /// @@ -396,8 +396,8 @@ protected virtual void CloneCurrentValueCore(Freezable sourceFreezable) protected virtual void GetAsFrozenCore(Freezable sourceFreezable) { CloneCoreCommon(sourceFreezable, - /* useCurrentValue = */ false, - /* cloneFrozenValues = */ false); + useCurrentValue: false, + cloneFrozenValues: false); } /// @@ -421,8 +421,8 @@ protected virtual void GetAsFrozenCore(Freezable sourceFreezable) protected virtual void GetCurrentValueAsFrozenCore(Freezable sourceFreezable) { CloneCoreCommon(sourceFreezable, - /* useCurrentValue = */ true, - /* cloneFrozenValues = */ false); + useCurrentValue: true, + cloneFrozenValues: false); } /// @@ -926,7 +926,7 @@ private void CloneCoreCommon(Freezable sourceFreezable, bool useCurrentValue, bo // If the local value has modifiers, ReadLocalValue will return the base // value, which is what we want. A modified default will return UnsetValue, // which will be ignored at the call to SetValue - sourceValue = sourceFreezable.ReadLocalValueEntry(entryIndex, dp, true /* allowDeferredReferences */); + sourceValue = sourceFreezable.ReadLocalValueEntry(entryIndex, dp, allowDeferredReferences: true); // For the useCurrentValue = false case we ignore any UnsetValues. if (sourceValue == DependencyProperty.UnsetValue) @@ -979,7 +979,7 @@ private void CloneCoreCommon(Freezable sourceFreezable, bool useCurrentValue, bo } sourceValue = valueAsFreezableClone; - Debug_VerifyCloneCommon(valueAsFreezable, valueAsFreezableClone, /*isDeepClone=*/ true); + Debug_VerifyCloneCommon(valueAsFreezable, valueAsFreezableClone, isDeepClone: true); } else // skip cloning frozen values { @@ -1001,7 +1001,7 @@ private void CloneCoreCommon(Freezable sourceFreezable, bool useCurrentValue, bo } sourceValue = valueAsFreezableClone; - Debug_VerifyCloneCommon(valueAsFreezable, valueAsFreezableClone, /*isDeepClone=*/ false); + Debug_VerifyCloneCommon(valueAsFreezable, valueAsFreezableClone, isDeepClone: false); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Markup/Primitives/MarkupObject.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Markup/Primitives/MarkupObject.cs index a3ca3e92e1c..d0e5621602b 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Markup/Primitives/MarkupObject.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Markup/Primitives/MarkupObject.cs @@ -42,7 +42,7 @@ internal MarkupObject() { } /// If the MarkupItem is in a dictionary, one of the properties of the item will have an IsKey set to true. /// This is the value for the dictionary key. /// - public virtual IEnumerable Properties { get { return GetProperties(true /*mapToConstructorArgs*/); } } + public virtual IEnumerable Properties { get { return GetProperties(mapToConstructorArgs: true); } } internal abstract IEnumerable GetProperties(bool mapToConstructorArgs); /// diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Matrix.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Matrix.cs index d0f483aaf64..e8c1a52203a 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Matrix.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Matrix.cs @@ -755,7 +755,7 @@ internal void MultiplyPoint(ref double x, ref double y) /// The angle to rotate specified in radians internal static Matrix CreateRotationRadians(double angle) { - return CreateRotationRadians(angle, /* centerX = */ 0, /* centerY = */ 0); + return CreateRotationRadians(angle, centerX: 0, centerY: 0); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/UncommonField.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/UncommonField.cs index e004eeab8e1..89757905d9c 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/UncommonField.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/UncommonField.cs @@ -109,7 +109,7 @@ public void ClearValue(DependencyObject instance) EntryIndex entryIndex = instance.LookupEntry(_globalIndex); - instance.UnsetEffectiveValue(entryIndex, null /* dp */, null /* metadata */); + instance.UnsetEffectiveValue(entryIndex, dp: null, metadata: null); } internal int GlobalIndex