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