提交 3b47a2f9 编写于 作者: T Tomas Matousek

Public API cleanup: replace fields with properties

上级 6b0f3c0b
......@@ -11,93 +11,93 @@ public static class CSharpFormattingOptions
internal const string WrappingFeatureName = "CSharp/Wrapping";
internal const string NewLineFormattingFeatureName = "CSharp/New Line";
public static readonly Option<bool> SpacingAfterMethodDeclarationName = new Option<bool>(SpacingFeatureName, "SpacingAfterMethodDeclarationName", defaultValue: false);
public static Option<bool> SpacingAfterMethodDeclarationName { get; } = new Option<bool>(SpacingFeatureName, "SpacingAfterMethodDeclarationName", defaultValue: false);
public static readonly Option<bool> SpaceWithinMethodDeclarationParenthesis = new Option<bool>(SpacingFeatureName, "SpaceWithinMethodDeclarationParenthesis", defaultValue: false);
public static Option<bool> SpaceWithinMethodDeclarationParenthesis { get; } = new Option<bool>(SpacingFeatureName, "SpaceWithinMethodDeclarationParenthesis", defaultValue: false);
public static readonly Option<bool> SpaceBetweenEmptyMethodDeclarationParentheses = new Option<bool>(SpacingFeatureName, "SpaceBetweenEmptyMethodDeclarationParentheses", defaultValue: false);
public static Option<bool> SpaceBetweenEmptyMethodDeclarationParentheses { get; } = new Option<bool>(SpacingFeatureName, "SpaceBetweenEmptyMethodDeclarationParentheses", defaultValue: false);
public static readonly Option<bool> SpaceAfterMethodCallName = new Option<bool>(SpacingFeatureName, "SpaceAfterMethodCallName", defaultValue: false);
public static Option<bool> SpaceAfterMethodCallName { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterMethodCallName", defaultValue: false);
public static readonly Option<bool> SpaceWithinMethodCallParentheses = new Option<bool>(SpacingFeatureName, "SpaceWithinMethodCallParentheses", defaultValue: false);
public static Option<bool> SpaceWithinMethodCallParentheses { get; } = new Option<bool>(SpacingFeatureName, "SpaceWithinMethodCallParentheses", defaultValue: false);
public static readonly Option<bool> SpaceBetweenEmptyMethodCallParentheses = new Option<bool>(SpacingFeatureName, "SpaceBetweenEmptyMethodCallParentheses", defaultValue: false);
public static Option<bool> SpaceBetweenEmptyMethodCallParentheses { get; } = new Option<bool>(SpacingFeatureName, "SpaceBetweenEmptyMethodCallParentheses", defaultValue: false);
public static readonly Option<bool> SpaceAfterControlFlowStatementKeyword = new Option<bool>(SpacingFeatureName, "SpaceAfterControlFlowStatementKeyword", defaultValue: true);
public static Option<bool> SpaceAfterControlFlowStatementKeyword { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterControlFlowStatementKeyword", defaultValue: true);
public static readonly Option<bool> SpaceWithinExpressionParentheses = new Option<bool>(SpacingFeatureName, "SpaceWithinExpressionParentheses", defaultValue: false);
public static Option<bool> SpaceWithinExpressionParentheses { get; } = new Option<bool>(SpacingFeatureName, "SpaceWithinExpressionParentheses", defaultValue: false);
public static readonly Option<bool> SpaceWithinCastParentheses = new Option<bool>(SpacingFeatureName, "SpaceWithinCastParentheses", defaultValue: false);
public static Option<bool> SpaceWithinCastParentheses { get; } = new Option<bool>(SpacingFeatureName, "SpaceWithinCastParentheses", defaultValue: false);
public static readonly Option<bool> SpaceWithinOtherParentheses = new Option<bool>(SpacingFeatureName, "SpaceWithinOtherParentheses", defaultValue: false);
public static Option<bool> SpaceWithinOtherParentheses { get; } = new Option<bool>(SpacingFeatureName, "SpaceWithinOtherParentheses", defaultValue: false);
public static readonly Option<bool> SpaceAfterCast = new Option<bool>(SpacingFeatureName, "SpaceAfterCast", defaultValue: false);
public static Option<bool> SpaceAfterCast { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterCast", defaultValue: false);
public static readonly Option<bool> SpacesIgnoreAroundVariableDeclaration = new Option<bool>(SpacingFeatureName, "SpacesIgnoreAroundVariableDeclaration", defaultValue: false);
public static Option<bool> SpacesIgnoreAroundVariableDeclaration { get; } = new Option<bool>(SpacingFeatureName, "SpacesIgnoreAroundVariableDeclaration", defaultValue: false);
public static readonly Option<bool> SpaceBeforeOpenSquareBracket = new Option<bool>(SpacingFeatureName, "SpaceBeforeOpenSquareBracket", defaultValue: false);
public static Option<bool> SpaceBeforeOpenSquareBracket { get; } = new Option<bool>(SpacingFeatureName, "SpaceBeforeOpenSquareBracket", defaultValue: false);
public static readonly Option<bool> SpaceBetweenEmptySquareBrackets = new Option<bool>(SpacingFeatureName, "SpaceBetweenEmptySquareBrackets", defaultValue: false);
public static Option<bool> SpaceBetweenEmptySquareBrackets { get; } = new Option<bool>(SpacingFeatureName, "SpaceBetweenEmptySquareBrackets", defaultValue: false);
public static readonly Option<bool> SpaceWithinSquareBrackets = new Option<bool>(SpacingFeatureName, "SpaceWithinSquareBrackets", defaultValue: false);
public static Option<bool> SpaceWithinSquareBrackets { get; } = new Option<bool>(SpacingFeatureName, "SpaceWithinSquareBrackets", defaultValue: false);
public static readonly Option<bool> SpaceAfterColonInBaseTypeDeclaration = new Option<bool>(SpacingFeatureName, "SpaceAfterColonInBaseTypeDeclaration", defaultValue: true);
public static Option<bool> SpaceAfterColonInBaseTypeDeclaration { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterColonInBaseTypeDeclaration", defaultValue: true);
public static readonly Option<bool> SpaceAfterComma = new Option<bool>(SpacingFeatureName, "SpaceAfterComma", defaultValue: true);
public static Option<bool> SpaceAfterComma { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterComma", defaultValue: true);
public static readonly Option<bool> SpaceAfterDot = new Option<bool>(SpacingFeatureName, "SpaceAfterDot", defaultValue: false);
public static Option<bool> SpaceAfterDot { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterDot", defaultValue: false);
public static readonly Option<bool> SpaceAfterSemicolonsInForStatement = new Option<bool>(SpacingFeatureName, "SpaceAfterSemicolonsInForStatement", defaultValue: true);
public static Option<bool> SpaceAfterSemicolonsInForStatement { get; } = new Option<bool>(SpacingFeatureName, "SpaceAfterSemicolonsInForStatement", defaultValue: true);
public static readonly Option<bool> SpaceBeforeColonInBaseTypeDeclaration = new Option<bool>(SpacingFeatureName, "SpaceBeforeColonInBaseTypeDeclaration", defaultValue: true);
public static Option<bool> SpaceBeforeColonInBaseTypeDeclaration { get; } = new Option<bool>(SpacingFeatureName, "SpaceBeforeColonInBaseTypeDeclaration", defaultValue: true);
public static readonly Option<bool> SpaceBeforeComma = new Option<bool>(SpacingFeatureName, "SpaceBeforeComma", defaultValue: false);
public static Option<bool> SpaceBeforeComma { get; } = new Option<bool>(SpacingFeatureName, "SpaceBeforeComma", defaultValue: false);
public static readonly Option<bool> SpaceBeforeDot = new Option<bool>(SpacingFeatureName, "SpaceBeforeDot", defaultValue: false);
public static Option<bool> SpaceBeforeDot { get; } = new Option<bool>(SpacingFeatureName, "SpaceBeforeDot", defaultValue: false);
public static readonly Option<bool> SpaceBeforeSemicolonsInForStatement = new Option<bool>(SpacingFeatureName, "SpaceBeforeSemicolonsInForStatement", defaultValue: false);
public static Option<bool> SpaceBeforeSemicolonsInForStatement { get; } = new Option<bool>(SpacingFeatureName, "SpaceBeforeSemicolonsInForStatement", defaultValue: false);
public static readonly Option<BinaryOperatorSpacingOptions> SpacingAroundBinaryOperator = new Option<BinaryOperatorSpacingOptions>(SpacingFeatureName, "SpacingAroundBinaryOperator", defaultValue: BinaryOperatorSpacingOptions.Single);
public static Option<BinaryOperatorSpacingOptions> SpacingAroundBinaryOperator { get; } = new Option<BinaryOperatorSpacingOptions>(SpacingFeatureName, "SpacingAroundBinaryOperator", defaultValue: BinaryOperatorSpacingOptions.Single);
public static readonly Option<bool> IndentBraces = new Option<bool>(IndentFeatureName, "OpenCloseBracesIndent", defaultValue: false);
public static Option<bool> IndentBraces { get; } = new Option<bool>(IndentFeatureName, "OpenCloseBracesIndent", defaultValue: false);
public static readonly Option<bool> IndentBlock = new Option<bool>(IndentFeatureName, "IndentBlock", defaultValue: true);
public static Option<bool> IndentBlock { get; } = new Option<bool>(IndentFeatureName, "IndentBlock", defaultValue: true);
public static readonly Option<bool> IndentSwitchSection = new Option<bool>(IndentFeatureName, "IndentSwitchSection", defaultValue: true);
public static Option<bool> IndentSwitchSection { get; } = new Option<bool>(IndentFeatureName, "IndentSwitchSection", defaultValue: true);
public static readonly Option<bool> IndentSwitchCaseSection = new Option<bool>(IndentFeatureName, "IndentSwitchCaseSection", defaultValue: true);
public static Option<bool> IndentSwitchCaseSection { get; } = new Option<bool>(IndentFeatureName, "IndentSwitchCaseSection", defaultValue: true);
public static readonly Option<LabelPositionOptions> LabelPositioning = new Option<LabelPositionOptions>(IndentFeatureName, "LabelPositioning", defaultValue: LabelPositionOptions.OneLess);
public static Option<LabelPositionOptions> LabelPositioning { get; } = new Option<LabelPositionOptions>(IndentFeatureName, "LabelPositioning", defaultValue: LabelPositionOptions.OneLess);
public static readonly Option<bool> WrappingPreserveSingleLine = new Option<bool>(WrappingFeatureName, "WrappingPreserveSingleLine", defaultValue: true);
public static Option<bool> WrappingPreserveSingleLine { get; } = new Option<bool>(WrappingFeatureName, "WrappingPreserveSingleLine", defaultValue: true);
public static readonly Option<bool> WrappingKeepStatementsOnSingleLine = new Option<bool>(WrappingFeatureName, "WrappingKeepStatementsOnSingleLine", defaultValue: true);
public static Option<bool> WrappingKeepStatementsOnSingleLine { get; } = new Option<bool>(WrappingFeatureName, "WrappingKeepStatementsOnSingleLine", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInTypes = new Option<bool>(NewLineFormattingFeatureName, "NewLinesBracesType", defaultValue: true);
public static Option<bool> NewLinesForBracesInTypes { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesBracesType", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInMethods = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInMethods", defaultValue: true);
public static Option<bool> NewLinesForBracesInMethods { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInMethods", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInAnonymousMethods = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInAnonymousMethods", defaultValue: true);
public static Option<bool> NewLinesForBracesInAnonymousMethods { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInAnonymousMethods", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInControlBlocks = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInControlBlocks", defaultValue: true);
public static Option<bool> NewLinesForBracesInControlBlocks { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInControlBlocks", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInAnonymousTypes = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInAnonymousTypes", defaultValue: true);
public static Option<bool> NewLinesForBracesInAnonymousTypes { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInAnonymousTypes", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInObjectCollectionArrayInitializers = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInObjectCollectionArrayInitializers", defaultValue: true);
public static Option<bool> NewLinesForBracesInObjectCollectionArrayInitializers { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInObjectCollectionArrayInitializers", defaultValue: true);
public static readonly Option<bool> NewLinesForBracesInLambdaExpressionBody = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInLambdaExpressionBody", defaultValue: true);
public static Option<bool> NewLinesForBracesInLambdaExpressionBody { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLinesForBracesInLambdaExpressionBody", defaultValue: true);
public static readonly Option<bool> NewLineForElse = new Option<bool>(NewLineFormattingFeatureName, "NewLineForElse", defaultValue: true);
public static Option<bool> NewLineForElse { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLineForElse", defaultValue: true);
public static readonly Option<bool> NewLineForCatch = new Option<bool>(NewLineFormattingFeatureName, "NewLineForCatch", defaultValue: true);
public static Option<bool> NewLineForCatch { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLineForCatch", defaultValue: true);
public static readonly Option<bool> NewLineForFinally = new Option<bool>(NewLineFormattingFeatureName, "NewLineForFinally", defaultValue: true);
public static Option<bool> NewLineForFinally { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLineForFinally", defaultValue: true);
public static readonly Option<bool> NewLineForMembersInObjectInit = new Option<bool>(NewLineFormattingFeatureName, "NewLineForMembersInObjectInit", defaultValue: true);
public static Option<bool> NewLineForMembersInObjectInit { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLineForMembersInObjectInit", defaultValue: true);
public static readonly Option<bool> NewLineForMembersInAnonymousTypes = new Option<bool>(NewLineFormattingFeatureName, "NewLineForMembersInAnonymousTypes", defaultValue: true);
public static Option<bool> NewLineForMembersInAnonymousTypes { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLineForMembersInAnonymousTypes", defaultValue: true);
public static readonly Option<bool> NewLineForClausesInQuery = new Option<bool>(NewLineFormattingFeatureName, "NewLineForClausesInQuery", defaultValue: true);
public static Option<bool> NewLineForClausesInQuery { get; } = new Option<bool>(NewLineFormattingFeatureName, "NewLineForClausesInQuery", defaultValue: true);
}
public enum LabelPositionOptions
......
......@@ -7,47 +7,47 @@ Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions
Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions.LeftMost = 0 -> Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions
Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions.NoIndent = 2 -> Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions
Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions.OneLess = 1 -> Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentBlock -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentBraces -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentSwitchCaseSection -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentSwitchSection -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.LabelPositioning -> Microsoft.CodeAnalysis.Options.Option<Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForCatch -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForClausesInQuery -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForElse -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForFinally -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForMembersInAnonymousTypes -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForMembersInObjectInit -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInAnonymousTypes -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInControlBlocks -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInLambdaExpressionBody -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInMethods -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInObjectCollectionArrayInitializers -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInTypes -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterCast -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterColonInBaseTypeDeclaration -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterComma -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterControlFlowStatementKeyword -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterDot -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterMethodCallName -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterSemicolonsInForStatement -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeColonInBaseTypeDeclaration -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeComma -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeDot -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeOpenSquareBracket -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeSemicolonsInForStatement -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBetweenEmptyMethodCallParentheses -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBetweenEmptyMethodDeclarationParentheses -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBetweenEmptySquareBrackets -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinCastParentheses -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinExpressionParentheses -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinMethodCallParentheses -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinMethodDeclarationParenthesis -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinOtherParentheses -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinSquareBrackets -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpacesIgnoreAroundVariableDeclaration -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpacingAfterMethodDeclarationName -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpacingAroundBinaryOperator -> Microsoft.CodeAnalysis.Options.Option<Microsoft.CodeAnalysis.CSharp.Formatting.BinaryOperatorSpacingOptions>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.WrappingKeepStatementsOnSingleLine -> Microsoft.CodeAnalysis.Options.Option<bool>
static readonly Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.WrappingPreserveSingleLine -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentBlock.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentBraces.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentSwitchCaseSection.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.IndentSwitchSection.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.LabelPositioning.get -> Microsoft.CodeAnalysis.Options.Option<Microsoft.CodeAnalysis.CSharp.Formatting.LabelPositionOptions>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForCatch.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForClausesInQuery.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForElse.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForFinally.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForMembersInAnonymousTypes.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLineForMembersInObjectInit.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInAnonymousTypes.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInControlBlocks.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInLambdaExpressionBody.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInMethods.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInObjectCollectionArrayInitializers.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.NewLinesForBracesInTypes.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterCast.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterColonInBaseTypeDeclaration.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterComma.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterControlFlowStatementKeyword.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterDot.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterMethodCallName.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceAfterSemicolonsInForStatement.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeColonInBaseTypeDeclaration.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeComma.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeDot.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeOpenSquareBracket.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBeforeSemicolonsInForStatement.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBetweenEmptyMethodCallParentheses.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBetweenEmptyMethodDeclarationParentheses.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceBetweenEmptySquareBrackets.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinCastParentheses.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinExpressionParentheses.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinMethodCallParentheses.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinMethodDeclarationParenthesis.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinOtherParentheses.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpaceWithinSquareBrackets.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpacesIgnoreAroundVariableDeclaration.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpacingAfterMethodDeclarationName.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.SpacingAroundBinaryOperator.get -> Microsoft.CodeAnalysis.Options.Option<Microsoft.CodeAnalysis.CSharp.Formatting.BinaryOperatorSpacingOptions>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.WrappingKeepStatementsOnSingleLine.get -> Microsoft.CodeAnalysis.Options.Option<bool>
static Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions.WrappingPreserveSingleLine.get -> Microsoft.CodeAnalysis.Options.Option<bool>
\ No newline at end of file
......@@ -21,7 +21,7 @@ public static class WellKnownFixAllProviders
/// <see cref="ApplyChangesOperation"/> present within the individual diagnostic fixes. Other types of
/// operations present within these fixes are ignored.
/// </remarks>
public static readonly FixAllProvider BatchFixer = BatchFixAllProvider.Instance;
public static FixAllProvider BatchFixer => BatchFixAllProvider.Instance;
/// <summary>
/// Default batch fix all provider for simplification fixers which only add Simplifier annotations to documents.
......@@ -30,6 +30,6 @@ public static class WellKnownFixAllProviders
/// This fixer supports fixes for the following fix all scopes:
/// <see cref="FixAllScope.Document"/>, <see cref="FixAllScope.Project"/> and <see cref="FixAllScope.Solution"/>.
/// </summary>
internal static readonly FixAllProvider BatchSimplificationFixer = BatchSimplificationFixAllProvider.Instance;
internal static FixAllProvider BatchSimplificationFixer => BatchSimplificationFixAllProvider.Instance;
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.CodeAnalysis.Text;
namespace Microsoft.CodeAnalysis.Editing
{
......@@ -215,21 +214,21 @@ private enum Modifiers
WriteOnly = 0x1000
}
public static readonly DeclarationModifiers None = default(DeclarationModifiers);
public static readonly DeclarationModifiers Static = new DeclarationModifiers(Modifiers.Static);
public static readonly DeclarationModifiers Abstract = new DeclarationModifiers(Modifiers.Abstract);
public static readonly DeclarationModifiers New = new DeclarationModifiers(Modifiers.New);
public static readonly DeclarationModifiers Unsafe = new DeclarationModifiers(Modifiers.Unsafe);
public static readonly DeclarationModifiers ReadOnly = new DeclarationModifiers(Modifiers.ReadOnly);
public static readonly DeclarationModifiers Virtual = new DeclarationModifiers(Modifiers.Virtual);
public static readonly DeclarationModifiers Override = new DeclarationModifiers(Modifiers.Override);
public static readonly DeclarationModifiers Sealed = new DeclarationModifiers(Modifiers.Sealed);
public static readonly DeclarationModifiers Const = new DeclarationModifiers(Modifiers.Const);
public static readonly DeclarationModifiers WithEvents = new DeclarationModifiers(Modifiers.WithEvents);
public static readonly DeclarationModifiers Partial = new DeclarationModifiers(Modifiers.Partial);
public static readonly DeclarationModifiers Async = new DeclarationModifiers(Modifiers.Async);
public static readonly DeclarationModifiers WriteOnly = new DeclarationModifiers(Modifiers.WriteOnly);
public static DeclarationModifiers None => default(DeclarationModifiers);
public static DeclarationModifiers Static => new DeclarationModifiers(Modifiers.Static);
public static DeclarationModifiers Abstract => new DeclarationModifiers(Modifiers.Abstract);
public static DeclarationModifiers New => new DeclarationModifiers(Modifiers.New);
public static DeclarationModifiers Unsafe => new DeclarationModifiers(Modifiers.Unsafe);
public static DeclarationModifiers ReadOnly => new DeclarationModifiers(Modifiers.ReadOnly);
public static DeclarationModifiers Virtual => new DeclarationModifiers(Modifiers.Virtual);
public static DeclarationModifiers Override => new DeclarationModifiers(Modifiers.Override);
public static DeclarationModifiers Sealed => new DeclarationModifiers(Modifiers.Sealed);
public static DeclarationModifiers Const => new DeclarationModifiers(Modifiers.Const);
public static DeclarationModifiers WithEvents => new DeclarationModifiers(Modifiers.WithEvents);
public static DeclarationModifiers Partial => new DeclarationModifiers(Modifiers.Partial);
public static DeclarationModifiers Async => new DeclarationModifiers(Modifiers.Async);
public static DeclarationModifiers WriteOnly => new DeclarationModifiers(Modifiers.WriteOnly);
public static DeclarationModifiers operator |(DeclarationModifiers left, DeclarationModifiers right)
{
......
......@@ -7,8 +7,6 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Formatting.Rules;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.LanguageServices;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Utilities;
......@@ -23,7 +21,7 @@ public static class Formatter
/// <summary>
/// The annotation used to mark portions of a syntax tree to be formatted.
/// </summary>
public static readonly SyntaxAnnotation Annotation = new SyntaxAnnotation();
public static SyntaxAnnotation Annotation { get; } = new SyntaxAnnotation();
/// <summary>
/// Gets the formatting rules that would be applied if left unspecified.
......
......@@ -10,19 +10,19 @@ public static class FormattingOptions
internal const string InternalTabFeatureName = "InternalTab";
internal const string FormattingFeatureName = "Formatting";
public static readonly PerLanguageOption<bool> UseTabs = new PerLanguageOption<bool>(TabFeatureName, "UseTab", defaultValue: false);
public static PerLanguageOption<bool> UseTabs { get; } = new PerLanguageOption<bool>(TabFeatureName, "UseTab", defaultValue: false);
public static readonly PerLanguageOption<int> TabSize = new PerLanguageOption<int>(TabFeatureName, "TabSize", defaultValue: 4);
public static PerLanguageOption<int> TabSize { get; } = new PerLanguageOption<int>(TabFeatureName, "TabSize", defaultValue: 4);
public static readonly PerLanguageOption<int> IndentationSize = new PerLanguageOption<int>(TabFeatureName, "IndentationSize", defaultValue: 4);
public static PerLanguageOption<int> IndentationSize { get; } = new PerLanguageOption<int>(TabFeatureName, "IndentationSize", defaultValue: 4);
public static readonly PerLanguageOption<IndentStyle> SmartIndent = new PerLanguageOption<IndentStyle>(TabFeatureName, "SmartIndent", defaultValue: IndentStyle.Smart);
public static PerLanguageOption<IndentStyle> SmartIndent { get; } = new PerLanguageOption<IndentStyle>(TabFeatureName, "SmartIndent", defaultValue: IndentStyle.Smart);
public static readonly PerLanguageOption<string> NewLine = new PerLanguageOption<string>(FormattingFeatureName, "NewLine", defaultValue: "\r\n");
public static PerLanguageOption<string> NewLine { get; } = new PerLanguageOption<string>(FormattingFeatureName, "NewLine", defaultValue: "\r\n");
internal static readonly PerLanguageOption<bool> DebugMode = new PerLanguageOption<bool>(FormattingFeatureName, "DebugMode", defaultValue: false);
internal static PerLanguageOption<bool> DebugMode { get; } = new PerLanguageOption<bool>(FormattingFeatureName, "DebugMode", defaultValue: false);
internal static readonly Option<bool> AllowDisjointSpanMerging = new Option<bool>(FormattingFeatureName, "ShouldUseFormattingSpanCollapse", defaultValue: false);
internal static Option<bool> AllowDisjointSpanMerging { get; } = new Option<bool>(FormattingFeatureName, "ShouldUseFormattingSpanCollapse", defaultValue: false);
public enum IndentStyle
{
......
......@@ -7,8 +7,8 @@ namespace Microsoft.CodeAnalysis.Options
{
public struct OptionKey : IEquatable<OptionKey>
{
public readonly IOption Option;
public readonly string Language;
public IOption Option { get; }
public string Language { get; }
public OptionKey(IOption option, string language = null)
{
......
......@@ -41,7 +41,7 @@ public Option(string feature, string name, T defaultValue = default(T))
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException("name");
throw new ArgumentException(nameof(name));
}
this.Feature = feature;
......
......@@ -42,7 +42,7 @@ public PerLanguageOption(string feature, string name, T defaultValue)
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException("name");
throw new ArgumentException(nameof(name));
}
this.Feature = feature;
......
......@@ -8,8 +8,8 @@ public static class RecommendationOptions
{
internal const string RecommendationsFeatureName = "Recommendations";
public static readonly PerLanguageOption<bool> HideAdvancedMembers = new PerLanguageOption<bool>(RecommendationsFeatureName, "HideAdvancedMembers", defaultValue: false);
public static PerLanguageOption<bool> HideAdvancedMembers { get; } = new PerLanguageOption<bool>(RecommendationsFeatureName, "HideAdvancedMembers", defaultValue: false);
public static readonly PerLanguageOption<bool> FilterOutOfScopeLocals = new PerLanguageOption<bool>(RecommendationsFeatureName, "FilterOutOfScopeLocals", defaultValue: true);
public static PerLanguageOption<bool> FilterOutOfScopeLocals { get; } = new PerLanguageOption<bool>(RecommendationsFeatureName, "FilterOutOfScopeLocals", defaultValue: true);
}
}
......@@ -8,9 +8,9 @@ public static class RenameOptions
{
internal const string RenameFeatureName = "Rename";
public static readonly Option<bool> RenameOverloads = new Option<bool>(RenameFeatureName, "RenameOverloads", defaultValue: false);
public static readonly Option<bool> RenameInStrings = new Option<bool>(RenameFeatureName, "RenameInStrings", defaultValue: false);
public static readonly Option<bool> RenameInComments = new Option<bool>(RenameFeatureName, "RenameInComments", defaultValue: false);
public static readonly Option<bool> PreviewChanges = new Option<bool>(RenameFeatureName, "PreviewChanges", defaultValue: false);
public static Option<bool> RenameOverloads { get; } = new Option<bool>(RenameFeatureName, "RenameOverloads", defaultValue: false);
public static Option<bool> RenameInStrings { get; } = new Option<bool>(RenameFeatureName, "RenameInStrings", defaultValue: false);
public static Option<bool> RenameInComments { get; } = new Option<bool>(RenameFeatureName, "RenameInComments", defaultValue: false);
public static Option<bool> PreviewChanges { get; } = new Option<bool>(RenameFeatureName, "PreviewChanges", defaultValue: false);
}
}
......@@ -7,7 +7,7 @@ namespace Microsoft.CodeAnalysis.Simplification
/// <summary>
/// This Object contains the options that needs to be drilled down to the Simplification Engine
/// </summary>
public class SimplificationOptions
public static class SimplificationOptions
{
internal const string NonPerLanguageFeatureName = "Simplification";
internal const string PerLanguageFeatureName = "SimplificationPerLanguage";
......@@ -16,47 +16,47 @@ public class SimplificationOptions
/// This option tells the simplification engine if the Qualified Name should be replaced by Alias
/// if the user had initially not used the Alias
/// </summary>
public static readonly Option<bool> PreferAliasToQualification = new Option<bool>(NonPerLanguageFeatureName, "PreferAliasToQualification", true);
public static Option<bool> PreferAliasToQualification { get; } = new Option<bool>(NonPerLanguageFeatureName, "PreferAliasToQualification", true);
/// <summary>
/// This option influences the name reduction of members of a module in VB. If set to true, the
/// name reducer will e.g. reduce Namespace.Module.Member to Namespace.Member.
/// </summary>
public static readonly Option<bool> PreferOmittingModuleNamesInQualification = new Option<bool>(NonPerLanguageFeatureName, "PreferOmittingModuleNamesInQualification", true);
public static Option<bool> PreferOmittingModuleNamesInQualification { get; } = new Option<bool>(NonPerLanguageFeatureName, "PreferOmittingModuleNamesInQualification", true);
/// <summary>
/// This option says that if we should simplify the Generic Name which has the type argument inferred
/// </summary>
public static readonly Option<bool> PreferImplicitTypeInference = new Option<bool>(NonPerLanguageFeatureName, "PreferImplicitTypeInference", true);
public static Option<bool> PreferImplicitTypeInference { get; } = new Option<bool>(NonPerLanguageFeatureName, "PreferImplicitTypeInference", true);
/// <summary>
/// This option says if we should simplify the Explicit Type in Local Declarations
/// </summary>
public static readonly Option<bool> PreferImplicitTypeInLocalDeclaration = new Option<bool>(NonPerLanguageFeatureName, "PreferImplicitTypeInLocalDeclaration", false);
public static Option<bool> PreferImplicitTypeInLocalDeclaration { get; } = new Option<bool>(NonPerLanguageFeatureName, "PreferImplicitTypeInLocalDeclaration", false);
/// <summary>
/// This option says if we should simplify to NonGeneric Name rather than GenericName
/// </summary>
public static readonly Option<bool> AllowSimplificationToGenericType = new Option<bool>(NonPerLanguageFeatureName, "AllowSimplificationToGenericType", false);
public static Option<bool> AllowSimplificationToGenericType { get; } = new Option<bool>(NonPerLanguageFeatureName, "AllowSimplificationToGenericType", false);
/// <summary>
/// This option says if we should simplify from Derived types to Base types in Static Member Accesses
/// </summary>
public static readonly Option<bool> AllowSimplificationToBaseType = new Option<bool>(NonPerLanguageFeatureName, "AllowSimplificationToBaseType", true);
public static Option<bool> AllowSimplificationToBaseType { get; } = new Option<bool>(NonPerLanguageFeatureName, "AllowSimplificationToBaseType", true);
/// <summary>
/// This option says if we should simplify away the this. or Me. in member access expression
/// </summary>
public static readonly PerLanguageOption<bool> QualifyMemberAccessWithThisOrMe = new PerLanguageOption<bool>(PerLanguageFeatureName, "QualifyMemberAccessWithThisOrMe", defaultValue: false);
public static PerLanguageOption<bool> QualifyMemberAccessWithThisOrMe { get; } = new PerLanguageOption<bool>(PerLanguageFeatureName, "QualifyMemberAccessWithThisOrMe", defaultValue: false);
/// <summary>
/// This option says if we should prefer keyword for Intrinsic Predefined Types in Declarations
/// </summary>
public static readonly PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInDeclaration = new PerLanguageOption<bool>(PerLanguageFeatureName, "PreferIntrinsicPredefinedTypeKeywordInDeclaration", defaultValue: true);
public static PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInDeclaration { get; } = new PerLanguageOption<bool>(PerLanguageFeatureName, "PreferIntrinsicPredefinedTypeKeywordInDeclaration", defaultValue: true);
/// <summary>
/// This option says if we should prefer keyword for Intrinsic Predefined Types in Member Access Expression
/// </summary>
public static readonly PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInMemberAccess = new PerLanguageOption<bool>(PerLanguageFeatureName, "PreferIntrinsicPredefinedTypeKeywordInMemberAccess", defaultValue: true);
public static PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInMemberAccess { get; } = new PerLanguageOption<bool>(PerLanguageFeatureName, "PreferIntrinsicPredefinedTypeKeywordInMemberAccess", defaultValue: true);
}
}
......@@ -34,13 +34,13 @@ public static partial class Simplifier
/// The annotation the reducer uses to identify sub trees to be reduced.
/// The Expand operations add this annotation to nodes so that the Reduce operations later find them.
/// </summary>
public static readonly SyntaxAnnotation Annotation = new SyntaxAnnotation();
public static SyntaxAnnotation Annotation { get; } = new SyntaxAnnotation();
/// <summary>
/// This is the annotation used by the simplifier and expander to identify Predefined type and preserving
/// them from over simplification
/// </summary>
public static readonly SyntaxAnnotation SpecialTypeAnnotation = new SyntaxAnnotation();
public static SyntaxAnnotation SpecialTypeAnnotation { get; } = new SyntaxAnnotation();
/// <summary>
/// Expand qualifying parts of the specified subtree, annotating the parts using the <see cref="Annotation" /> annotation.
......
......@@ -11,6 +11,8 @@ namespace Microsoft.CodeAnalysis
/// </summary>
public struct VersionStamp : IEquatable<VersionStamp>, IObjectWritable
{
public static VersionStamp Default => default(VersionStamp);
private const int GlobalVersionMarker = -1;
private const int InitialGlobalVersion = 10000;
......@@ -233,8 +235,6 @@ private static int GetNextGlobalVersion()
return globalVersion;
}
public static readonly VersionStamp Default = default(VersionStamp);
/// <summary>
/// True if this VersionStamp is newer than the specified one.
/// </summary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册