Skip to content

Commit

Permalink
Corrected field decorations to static readonly to avoid IDE0036 err
Browse files Browse the repository at this point in the history
  • Loading branch information
jburnett committed Aug 23, 2024
1 parent a35fe29 commit d32b47b
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ trim_trailing_whitespace = true
file_header_template = Copyright (c) Microsoft Corporation.\nLicensed under the MIT License.

# Naming rules
dotnet_diagnostic.IDE0036.severity = none

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/Collections/ControlPropertiesCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.Collections;

public class ControlPropertiesCollection : NamedItemsCollection<ControlProperty>
{
private readonly static Func<ControlProperty, string> _keySelector = v => v.Name;
private static readonly Func<ControlProperty, string> _keySelector = v => v.Name;

public ControlPropertiesCollection() : base(_keySelector)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/Collections/CustomPropertiesCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.Collections;

public class CustomPropertiesCollection : NamedItemsCollection<CustomProperty>
{
private readonly static Func<CustomProperty, string> _keySelector = v => v.Name;
private static readonly Func<CustomProperty, string> _keySelector = v => v.Name;

public CustomPropertiesCollection() : base(_keySelector)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.Collections;

public class CustomPropertyParametersCollection : NamedItemsCollection<CustomPropertyParameter>
{
private readonly static Func<CustomPropertyParameter, string> _keySelector = v => v.Name;
private static readonly Func<CustomPropertyParameter, string> _keySelector = v => v.Name;

public CustomPropertyParametersCollection() : base(_keySelector)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/Extensions/YamlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.Extensions;

public static class YamlExtensions
{
static internal readonly char[] LineTerminators = new char[] { '\r', '\n', '\x85', '\x2028', '\x2029' };
internal static readonly char[] LineTerminators = new char[] { '\r', '\n', '\x85', '\x2028', '\x2029' };

public static ScalarStyle DetermineScalarStyleForProperty(this string? property)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/PaYaml/Models/NamedObjectMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.PaYaml.Models;
public class NamedObjectMapping<TValue> : NamedObjectMappingBase<string, TValue, NamedObject<TValue>>, INamedObjectCollection<TValue>
where TValue : notnull
{
private readonly static StringComparer DefaultComparer = StringComparer.Ordinal;
private static readonly StringComparer DefaultComparer = StringComparer.Ordinal;

public NamedObjectMapping()
: this(DefaultComparer)
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/PaYaml/Models/NamedObjectSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.PaYaml.Models;
public class NamedObjectSequence<TValue> : NamedObjectSequenceBase<string, TValue, NamedObject<TValue>>, INamedObjectCollection<TValue>
where TValue : notnull
{
private readonly static StringComparer DefaultComparer = StringComparer.Ordinal;
private static readonly StringComparer DefaultComparer = StringComparer.Ordinal;

public NamedObjectSequence()
: this(DefaultComparer)
Expand Down

0 comments on commit d32b47b

Please sign in to comment.