14 instantiations of OperationStatus
Microsoft.CodeAnalysis.Features (14)
ExtractMethod\MethodExtractor.Analyzer.cs (4)
334: new OperationStatus(succeeded: true, 347: new OperationStatus(succeeded: true, 371return new OperationStatus(succeeded: true, string.Format(FeaturesResources.Asynchronous_method_cannot_have_ref_out_parameters_colon_bracket_0_bracket, string.Join(", ", names))); 1023return new OperationStatus(succeeded: true, string.Format(FeaturesResources.Assigning_to_readonly_fields_must_be_done_in_a_constructor_colon_bracket_0_bracket, string.Join(", ", names)));
ExtractMethod\MethodExtractor.cs (1)
267return new OperationStatus(succeeded: true,
ExtractMethod\OperationStatus.cs (1)
45=> new(succeeded: false, Reasons);
ExtractMethod\OperationStatus_Statics.cs (8)
11public static readonly OperationStatus SucceededStatus = new(succeeded: true, reason: null); 12public static readonly OperationStatus FailedWithUnknownReason = new(succeeded: false, reason: FeaturesResources.Unknown_error_occurred); 13public static readonly OperationStatus OverlapsHiddenPosition = new(succeeded: false, FeaturesResources.generated_code_is_overlapping_with_hidden_portion_of_the_code); 14public static readonly OperationStatus NoValidLocationToInsertMethodCall = new(succeeded: false, FeaturesResources.No_valid_location_to_insert_method_call); 16public static readonly OperationStatus NoActiveStatement = new(succeeded: false, FeaturesResources.The_selection_contains_no_active_statement); 17public static readonly OperationStatus ErrorOrUnknownType = new(succeeded: true, FeaturesResources.The_selection_contains_an_error_or_unknown_type); 18public static readonly OperationStatus UnsafeAddressTaken = new(succeeded: true, FeaturesResources.The_address_of_a_variable_is_used_inside_the_selected_code); 19public static readonly OperationStatus LocalFunctionCallWithoutDeclaration = new(succeeded: false, FeaturesResources.The_selection_contains_a_local_function_call_without_its_declaration);
56 references to OperationStatus
Microsoft.CodeAnalysis.Features (56)
ExtractMethod\ExtractMethodResult.cs (2)
40public static ExtractMethodResult Fail(OperationStatus status) 44OperationStatus status,
ExtractMethod\MethodExtractor.Analyzer.cs (18)
161var operationStatus = GetOperationStatus( 315private OperationStatus GetOperationStatus( 324var readonlyFieldStatus = CheckReadOnlyFields(model, symbolMap); 333? OperationStatus.SucceededStatus 339var unsafeAddressStatus = unsafeAddressTakenUsed 340? OperationStatus.UnsafeAddressTaken 341: OperationStatus.SucceededStatus; 343var asyncRefOutParameterStatus = CheckAsyncMethodRefOutParameters(parameters); 345var variableMapStatus = failedVariables.Count == 0 346? OperationStatus.SucceededStatus 352var localFunctionStatus = (containsAnyLocalFunctionCallNotWithinSpan && !LocalFunction) 353? OperationStatus.LocalFunctionCallWithoutDeclaration 354: OperationStatus.SucceededStatus; 363private OperationStatus CheckAsyncMethodRefOutParameters(IList<VariableInfo> parameters) 374return OperationStatus.SucceededStatus; 1002private OperationStatus CheckReadOnlyFields(SemanticModel semanticModel, Dictionary<ISymbol, List<SyntaxToken>> symbolMap) 1005return OperationStatus.SucceededStatus; 1025return OperationStatus.SucceededStatus;
ExtractMethod\MethodExtractor.AnalyzerResult.cs (2)
30OperationStatus status) 62public OperationStatus Status { get; } = status;
ExtractMethod\MethodExtractor.cs (14)
52public ExtractMethodResult ExtractMethod(OperationStatus initialStatus, CancellationToken cancellationToken) 64if (!CanAddTo(originalSemanticDocument.Document, insertionPointNode, out var canAddStatus)) 113bool CanAddTo(Document document, SyntaxNode insertionPointNode, out OperationStatus status) 121status = OperationStatus.NoValidLocationToInsertMethodCall; 136status = OperationStatus.OverlapsHiddenPosition; 140status = OperationStatus.SucceededStatus; 204private OperationStatus CheckVariableTypes( 205OperationStatus status, 228private OperationStatus TryCheckVariableType( 232OperationStatus status) 248private OperationStatus CheckType( 255return OperationStatus.SucceededStatus; 258return OperationStatus.ErrorOrUnknownType; 274return OperationStatus.SucceededStatus;
ExtractMethod\OperationStatus.cs (4)
28public OperationStatus With(bool succeeded, string reason) 36public OperationStatus With(OperationStatus operationStatus) 44public OperationStatus MakeFail()
ExtractMethod\OperationStatus_Statics.cs (9)
11public static readonly OperationStatus SucceededStatus = new(succeeded: true, reason: null); 12public static readonly OperationStatus FailedWithUnknownReason = new(succeeded: false, reason: FeaturesResources.Unknown_error_occurred); 13public static readonly OperationStatus OverlapsHiddenPosition = new(succeeded: false, FeaturesResources.generated_code_is_overlapping_with_hidden_portion_of_the_code); 14public static readonly OperationStatus NoValidLocationToInsertMethodCall = new(succeeded: false, FeaturesResources.No_valid_location_to_insert_method_call); 16public static readonly OperationStatus NoActiveStatement = new(succeeded: false, FeaturesResources.The_selection_contains_no_active_statement); 17public static readonly OperationStatus ErrorOrUnknownType = new(succeeded: true, FeaturesResources.The_selection_contains_an_error_or_unknown_type); 18public static readonly OperationStatus UnsafeAddressTaken = new(succeeded: true, FeaturesResources.The_address_of_a_variable_is_used_inside_the_selected_code); 19public static readonly OperationStatus LocalFunctionCallWithoutDeclaration = new(succeeded: false, FeaturesResources.The_selection_contains_a_local_function_call_without_its_declaration); 24public static OperationStatus<T> Create<T>(OperationStatus status, T data)
ExtractMethod\OperationStatus`1.cs (3)
12internal sealed class OperationStatus<T>(OperationStatus status, T data) 14public OperationStatus Status { get; } = status; 17public OperationStatus<T> With(OperationStatus status)
ExtractMethod\SelectionValidator.cs (4)
33public abstract Task<(TSelectionResult, OperationStatus)> GetValidSelectionAsync(CancellationToken cancellationToken); 182public OperationStatus Status { get; set; } 198public SelectionInfo WithStatus(Func<OperationStatus, OperationStatus> statusGetter)