125 references to RudeEditKind
Microsoft.CodeAnalysis.CSharp.Features (1)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
2520
var
rudeEditKind = newSymbol switch
Microsoft.CodeAnalysis.Features (124)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (23)
411
internal abstract bool HasUnsupportedOperation(IEnumerable<SyntaxNode> newNodes, [NotNullWhen(true)] out SyntaxNode? unsupportedNode, out
RudeEditKind
rudeEdit);
415
if (HasUnsupportedOperation(body.GetDescendantNodes(IsNotLambda), out var unsupportedNode, out
var
rudeEdit))
597
return DocumentAnalysisResults.SyntaxErrors(newDocument.Id, filePath, [new RudeEditDiagnostic(
RudeEditKind
.ExperimentalFeaturesEnabled, default)], syntaxError: null, analysisStopwatch.Elapsed, hasChanges);
606
return DocumentAnalysisResults.SyntaxErrors(newDocument.Id, filePath, [new RudeEditDiagnostic(
RudeEditKind
.NotSupportedByRuntime, default)], syntaxError: null, analysisStopwatch.Elapsed, hasChanges);
706
? new RudeEditDiagnostic(
RudeEditKind
.SourceFileTooBig, span: default, arguments: [newDocument.FilePath])
707
: new RudeEditDiagnostic(
RudeEditKind
.InternalError, span: default, arguments: [newDocument.FilePath, e.ToString()]);
1100
diagnosticContext.Report(
RudeEditKind
.ChangingNameOrSignatureOfActiveMember, cancellationToken);
1108
diagnosticContext.Report(
RudeEditKind
.UpdateMightNotHaveAnyEffect, cancellationToken);
1202
diagnostics.Add(new RudeEditDiagnostic(isNonLeaf ?
RudeEditKind
.ActiveStatementUpdate :
RudeEditKind
.PartiallyExecutedActiveStatementUpdate, newSpan));
1227
diagnostics.Add(new RudeEditDiagnostic(
RudeEditKind
.ActiveStatementLambdaRemoved, newSpan, oldLambda,
1238
new RudeEditDiagnostic(isNonLeaf ?
RudeEditKind
.DeleteActiveStatement :
RudeEditKind
.PartiallyExecutedActiveStatementDelete,
1296
diagnosticContext.Report(
RudeEditKind
.MemberBodyTooBig, cancellationToken, arguments: [newMember.Name]);
1300
diagnosticContext.Report(
RudeEditKind
.MemberBodyInternalError, cancellationToken, arguments: [newMember.Name, e.ToString()]);
1342
RudeEditKind
.UpdateAroundActiveStatement,
1542
diagnosticContext.Report(
RudeEditKind
.UpdatingStateMachineMethodAroundActiveStatement, cancellationToken, arguments: []);
1548
diagnosticContext.Report(
RudeEditKind
.ChangingFromAsynchronousToSynchronous, cancellationToken);
1554
diagnosticContext.Report(
RudeEditKind
.ModifiersUpdate, cancellationToken);
1788
RudeEditKind
.TypeUpdateAroundActiveStatement,
1797
RudeEditKind
.UpdateAroundActiveStatement,
1806
RudeEditKind
.InsertAroundActiveStatement,
1815
RudeEditKind
.DeleteAroundActiveStatement,
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (93)
57
void AddRudeEdit(
RudeEditKind
kind, string resourceName, DiagnosticSeverity severity = DiagnosticSeverity.Error)
67
AddRudeEdit(
RudeEditKind
.InsertAroundActiveStatement, nameof(FeaturesResources.Adding_0_around_an_active_statement_requires_restarting_the_application));
68
AddRudeEdit(
RudeEditKind
.DeleteAroundActiveStatement, nameof(FeaturesResources.Deleting_0_around_an_active_statement_requires_restarting_the_application));
69
AddRudeEdit(
RudeEditKind
.DeleteActiveStatement, nameof(FeaturesResources.Removing_0_that_contains_an_active_statement_requires_restarting_the_application));
70
AddRudeEdit(
RudeEditKind
.UpdateAroundActiveStatement, nameof(FeaturesResources.Updating_a_0_around_an_active_statement_requires_restarting_the_application));
71
AddRudeEdit(
RudeEditKind
.UpdateExceptionHandlerOfActiveTry, nameof(FeaturesResources.Modifying_a_catch_finally_handler_with_an_active_statement_in_the_try_block_requires_restarting_the_application));
72
AddRudeEdit(
RudeEditKind
.UpdateTryOrCatchWithActiveFinally, nameof(FeaturesResources.Modifying_a_try_catch_finally_statement_when_the_finally_block_is_active_requires_restarting_the_application));
73
AddRudeEdit(
RudeEditKind
.UpdateCatchHandlerAroundActiveStatement, nameof(FeaturesResources.Modifying_a_catch_handler_around_an_active_statement_requires_restarting_the_application));
74
AddRudeEdit(
RudeEditKind
.Update, nameof(FeaturesResources.Updating_0_requires_restarting_the_application));
75
AddRudeEdit(
RudeEditKind
.ModifiersUpdate, nameof(FeaturesResources.Updating_the_modifiers_of_0_requires_restarting_the_application));
76
AddRudeEdit(
RudeEditKind
.VarianceUpdate, nameof(FeaturesResources.Updating_the_variance_of_0_requires_restarting_the_application));
77
AddRudeEdit(
RudeEditKind
.TypeUpdate, nameof(FeaturesResources.Updating_the_type_of_0_requires_restarting_the_application));
78
AddRudeEdit(
RudeEditKind
.InitializerUpdate, nameof(FeaturesResources.Updating_the_initializer_of_0_requires_restarting_the_application));
79
AddRudeEdit(
RudeEditKind
.FixedSizeFieldUpdate, nameof(FeaturesResources.Updating_the_size_of_a_0_requires_restarting_the_application));
80
AddRudeEdit(
RudeEditKind
.EnumUnderlyingTypeUpdate, nameof(FeaturesResources.Updating_the_underlying_type_of_0_requires_restarting_the_application));
81
AddRudeEdit(
RudeEditKind
.BaseTypeOrInterfaceUpdate, nameof(FeaturesResources.Updating_the_base_class_and_or_base_interface_s_of_0_requires_restarting_the_application));
82
AddRudeEdit(
RudeEditKind
.TypeKindUpdate, nameof(FeaturesResources.Updating_the_kind_of_a_type_requires_restarting_the_application));
83
AddRudeEdit(
RudeEditKind
.AccessorKindUpdate, nameof(FeaturesResources.Updating_the_kind_of_a_property_event_accessor_requires_restarting_the_application));
84
AddRudeEdit(
RudeEditKind
.DeclareAliasUpdate, nameof(FeaturesResources.Updating_the_alias_of_Declare_statement_requires_restarting_the_application));
85
AddRudeEdit(
RudeEditKind
.DeclareLibraryUpdate, nameof(FeaturesResources.Updating_the_library_name_of_Declare_statement_requires_restarting_the_application));
86
AddRudeEdit(
RudeEditKind
.FieldKindUpdate, nameof(FeaturesResources.Changing_a_field_to_an_event_or_vice_versa_requires_restarting_the_application));
87
AddRudeEdit(
RudeEditKind
.Renamed, nameof(FeaturesResources.Renaming_0_requires_restarting_the_application));
88
AddRudeEdit(
RudeEditKind
.Insert, nameof(FeaturesResources.Adding_0_requires_restarting_the_application));
89
AddRudeEdit(
RudeEditKind
.InsertVirtual, nameof(FeaturesResources.Adding_an_abstract_0_or_overriding_an_inherited_0_requires_restarting_the_application));
90
AddRudeEdit(
RudeEditKind
.InsertOverridable, nameof(FeaturesResources.Adding_a_MustOverride_0_or_overriding_an_inherited_0_requires_restarting_the_application));
91
AddRudeEdit(
RudeEditKind
.InsertExtern, nameof(FeaturesResources.Adding_an_extern_0_requires_restarting_the_application));
92
AddRudeEdit(
RudeEditKind
.InsertDllImport, nameof(FeaturesResources.Adding_an_imported_method_requires_restarting_the_application));
93
AddRudeEdit(
RudeEditKind
.InsertOperator, nameof(FeaturesResources.Adding_a_user_defined_0_requires_restarting_the_application));
94
AddRudeEdit(
RudeEditKind
.InsertOrMoveStructMember, nameof(FeaturesResources.Adding_or_moving_0_of_1_requires_restarting_the_application));
95
AddRudeEdit(
RudeEditKind
.InsertOrMoveTypeWithLayoutMember, nameof(FeaturesResources.Adding_or_moving_0_of_1_with_explicit_or_sequential_layout_requires_restarting_the_application));
96
AddRudeEdit(
RudeEditKind
.Move, nameof(FeaturesResources.Moving_0_requires_restarting_the_application));
97
AddRudeEdit(
RudeEditKind
.Delete, nameof(FeaturesResources.Deleting_0_requires_restarting_the_application));
98
AddRudeEdit(
RudeEditKind
.GenericMethodUpdate, nameof(FeaturesResources.Modifying_a_generic_method_requires_restarting_the_application));
99
AddRudeEdit(
RudeEditKind
.GenericTypeUpdate, nameof(FeaturesResources.Modifying_a_method_inside_the_context_of_a_generic_type_requires_restarting_the_application));
100
AddRudeEdit(
RudeEditKind
.InsertConstructorToTypeWithInitializersWithLambdas, nameof(FeaturesResources.Adding_a_constructor_to_a_type_with_a_field_or_property_initializer_that_contains_an_anonymous_function_requires_restarting_the_application));
101
AddRudeEdit(
RudeEditKind
.RenamingCapturedVariable, nameof(FeaturesResources.Renaming_a_captured_variable_from_0_to_1_requires_restarting_the_application));
102
AddRudeEdit(
RudeEditKind
.StackAllocUpdate, nameof(FeaturesResources.Modifying_0_which_contains_the_stackalloc_operator_requires_restarting_the_application));
103
AddRudeEdit(
RudeEditKind
.ExperimentalFeaturesEnabled, nameof(FeaturesResources.Modifying_source_with_experimental_language_features_enabled_requires_restarting_the_application));
104
AddRudeEdit(
RudeEditKind
.AwaitStatementUpdate, nameof(FeaturesResources.Updating_a_complex_statement_containing_an_await_expression_requires_restarting_the_application));
105
AddRudeEdit(
RudeEditKind
.ChangingAccessibility, nameof(FeaturesResources.Changing_visibility_of_0_requires_restarting_the_application));
106
AddRudeEdit(
RudeEditKind
.ChangingCapturedVariableType, nameof(FeaturesResources.Changing_the_type_of_a_captured_variable_0_previously_of_type_1_requires_restarting_the_application));
107
AddRudeEdit(
RudeEditKind
.ChangingCapturedVariableScope, nameof(FeaturesResources.Changing_the_declaration_scope_of_a_captured_variable_0_requires_restarting_the_application));
108
AddRudeEdit(
RudeEditKind
.ChangingLambdaParameters, nameof(FeaturesResources.Changing_the_parameters_of_0_requires_restarting_the_application));
109
AddRudeEdit(
RudeEditKind
.ChangingLambdaReturnType, nameof(FeaturesResources.Changing_the_return_type_of_0_requires_restarting_the_application));
110
AddRudeEdit(
RudeEditKind
.ChangingQueryLambdaType, nameof(FeaturesResources.Changing_the_signature_of_0_requires_restarting_the_application));
111
AddRudeEdit(
RudeEditKind
.ActiveStatementUpdate, nameof(FeaturesResources.Updating_an_active_statement_requires_restarting_the_application));
112
AddRudeEdit(
RudeEditKind
.ActiveStatementLambdaRemoved, nameof(FeaturesResources.Removing_0_that_contains_an_active_statement_requires_restarting_the_application));
113
AddRudeEdit(
RudeEditKind
.PartiallyExecutedActiveStatementUpdate, nameof(FeaturesResources.Updating_an_active_statement_requires_restarting_the_application));
114
AddRudeEdit(
RudeEditKind
.PartiallyExecutedActiveStatementDelete, nameof(FeaturesResources.Removing_0_that_contains_an_active_statement_requires_restarting_the_application));
115
AddRudeEdit(
RudeEditKind
.InsertFile, nameof(FeaturesResources.Adding_a_new_file_requires_restarting_the_application));
116
AddRudeEdit(
RudeEditKind
.UpdatingStateMachineMethodAroundActiveStatement, nameof(FeaturesResources.Updating_async_or_iterator_modifier_around_an_active_statement_requires_restarting_the_application));
117
AddRudeEdit(
RudeEditKind
.UpdatingStateMachineMethodMissingAttribute, nameof(FeaturesResources.Attribute_0_is_missing_Updating_an_async_method_or_an_iterator_requires_restarting_the_application));
118
AddRudeEdit(
RudeEditKind
.SwitchBetweenLambdaAndLocalFunction, nameof(FeaturesResources.Switching_between_lambda_and_local_function_requires_restarting_the_application));
119
AddRudeEdit(
RudeEditKind
.InsertMethodWithExplicitInterfaceSpecifier, nameof(FeaturesResources.Adding_a_method_with_an_explicit_interface_specifier_requires_restarting_the_application));
120
AddRudeEdit(
RudeEditKind
.InsertIntoInterface, nameof(FeaturesResources.Adding_0_into_an_interface_requires_restarting_the_application));
121
AddRudeEdit(
RudeEditKind
.InsertLocalFunctionIntoInterfaceMethod, nameof(FeaturesResources.Adding_0_into_an_interface_method_requires_restarting_the_application));
122
AddRudeEdit(
RudeEditKind
.InternalError, nameof(FeaturesResources.Modifying_source_file_0_requires_restarting_the_application_due_to_internal_error_1));
123
AddRudeEdit(
RudeEditKind
.ChangingFromAsynchronousToSynchronous, nameof(FeaturesResources.Changing_0_from_asynchronous_to_synchronous_requires_restarting_the_application));
124
AddRudeEdit(
RudeEditKind
.ChangingStateMachineShape, nameof(FeaturesResources.Changing_0_to_1_requires_restarting_the_application_because_it_changes_the_shape_of_the_state_machine));
125
AddRudeEdit(
RudeEditKind
.ComplexQueryExpression, nameof(FeaturesResources.Modifying_0_which_contains_an_Aggregate_Group_By_or_Join_query_clauses_requires_restarting_the_application));
126
AddRudeEdit(
RudeEditKind
.MemberBodyInternalError, nameof(FeaturesResources.Modifying_body_of_0_requires_restarting_the_application_due_to_internal_error_1));
127
AddRudeEdit(
RudeEditKind
.MemberBodyTooBig, nameof(FeaturesResources.Modifying_body_of_0_requires_restarting_the_application_because_the_body_has_too_many_statements));
128
AddRudeEdit(
RudeEditKind
.SourceFileTooBig, nameof(FeaturesResources.Modifying_source_file_0_requires_restarting_the_application_because_the_file_is_too_big));
129
AddRudeEdit(
RudeEditKind
.NotSupportedByRuntime, nameof(FeaturesResources.Applying_source_changes_while_the_application_is_running_is_not_supported_by_the_runtime));
130
AddRudeEdit(
RudeEditKind
.MakeMethodAsyncNotSupportedByRuntime, nameof(FeaturesResources.Making_a_method_asynchronous_requires_restarting_the_application_because_it_is_not_supported_by_the_runtime));
131
AddRudeEdit(
RudeEditKind
.MakeMethodIteratorNotSupportedByRuntime, nameof(FeaturesResources.Making_a_method_an_iterator_requires_restarting_the_application_because_it_is_not_supported_by_the_runtime));
132
AddRudeEdit(
RudeEditKind
.InsertNotSupportedByRuntime, nameof(FeaturesResources.Adding_0_requires_restarting_the_application));
133
AddRudeEdit(
RudeEditKind
.ChangingAttributesNotSupportedByRuntime, nameof(FeaturesResources.Updating_the_attributes_of_0_requires_restarting_the_application_because_it_is_not_supported_by_the_runtime));
134
AddRudeEdit(
RudeEditKind
.ChangingReloadableTypeNotSupportedByRuntime, nameof(FeaturesResources.Updating_reloadable_type_marked_by_0_attribute_or_its_member_requires_restarting_the_application_because_it_is_not_supported_by_the_runtime));
135
AddRudeEdit(
RudeEditKind
.ChangingParameterTypes, nameof(FeaturesResources.Changing_parameter_types_of_0_requires_restarting_the_application));
136
AddRudeEdit(
RudeEditKind
.ChangingTypeParameters, nameof(FeaturesResources.Changing_type_parameters_of_0_requires_restarting_the_application));
137
AddRudeEdit(
RudeEditKind
.ChangingConstraints, nameof(FeaturesResources.Changing_constraints_of_0_requires_restarting_the_application));
138
AddRudeEdit(
RudeEditKind
.ChangeImplicitMainReturnType, nameof(FeaturesResources.An_update_that_causes_the_return_type_of_implicit_main_to_change_requires_restarting_the_application));
139
AddRudeEdit(
RudeEditKind
.RenamingNotSupportedByRuntime, nameof(FeaturesResources.Renaming_0_requires_restarting_the_application_because_it_is_not_supported_by_the_runtime));
140
AddRudeEdit(
RudeEditKind
.ChangingNonCustomAttribute, nameof(FeaturesResources.Changing_pseudo_custom_attribute_0_of_1_requires_restarting_th_application));
141
AddRudeEdit(
RudeEditKind
.ChangingNamespace, nameof(FeaturesResources.Changing_the_containing_namespace_of_0_from_1_to_2_requires_restarting_th_application));
142
AddRudeEdit(
RudeEditKind
.ChangingSignatureNotSupportedByRuntime, nameof(FeaturesResources.Changing_the_signature_of_0_requires_restarting_the_application_because_it_is_not_supported_by_the_runtime));
143
AddRudeEdit(
RudeEditKind
.DeleteNotSupportedByRuntime, nameof(FeaturesResources.Deleting_0_requires_restarting_the_application_because_is_not_supported_by_the_runtime));
144
AddRudeEdit(
RudeEditKind
.UpdatingStateMachineMethodNotSupportedByRuntime, nameof(FeaturesResources.Updating_async_or_iterator_requires_restarting_the_application_because_is_not_supported_by_the_runtime));
145
AddRudeEdit(
RudeEditKind
.UpdatingGenericNotSupportedByRuntime, nameof(FeaturesResources.Updating_0_within_generic_type_or_method_requires_restarting_the_application_because_is_not_supported_by_the_runtime));
146
AddRudeEdit(
RudeEditKind
.CapturingPrimaryConstructorParameter, nameof(FeaturesResources.Capturing_primary_constructor_parameter_0_that_hasn_t_been_captured_before_requires_restarting_the_application));
147
AddRudeEdit(
RudeEditKind
.NotCapturingPrimaryConstructorParameter, nameof(FeaturesResources.Ceasing_to_capture_primary_constructor_parameter_0_of_1_requires_restarting_the_application));
148
AddRudeEdit(
RudeEditKind
.ChangingAttribute, nameof(FeaturesResources.Changing_attribute_0_requires_restarting_the_application));
149
AddRudeEdit(
RudeEditKind
.ChangingNameOrSignatureOfActiveMember, nameof(FeaturesResources.Changing_name_or_signature_of_0_that_contains_an_active_statement_requires_restarting_the_application));
150
AddRudeEdit(
RudeEditKind
.UpdateMightNotHaveAnyEffect, nameof(FeaturesResources.Changing_0_might_not_have_any_effect_until_the_application_is_restarted), DiagnosticSeverity.Warning);
151
AddRudeEdit(
RudeEditKind
.TypeUpdateAroundActiveStatement, nameof(FeaturesResources.Updating_a_0_around_an_active_statement_requires_restarting_the_application));
152
AddRudeEdit(
RudeEditKind
.InsertOrMoveComInterfaceMember, nameof(FeaturesResources.Adding_or_moving_0_of_a_COM_interface_requires_restarting_the_application));
155
AddRudeEdit(
RudeEditKind
.HandlesClauseUpdate, nameof(FeaturesResources.Updating_the_Handles_clause_of_0_requires_restarting_the_application));
156
AddRudeEdit(
RudeEditKind
.ImplementsClauseUpdate, nameof(FeaturesResources.Updating_the_Implements_clause_of_a_0_requires_restarting_the_application));
157
AddRudeEdit(
RudeEditKind
.InsertHandlesClause, nameof(FeaturesResources.Adding_0_with_the_Handles_clause_requires_restarting_the_application));
158
AddRudeEdit(
RudeEditKind
.UpdateStaticLocal, nameof(FeaturesResources.Modifying_0_which_contains_a_static_variable_requires_restarting_the_application));
179
internal static DiagnosticDescriptor GetDescriptor(
RudeEditKind
kind)
207
private static int GetDescriptorIndex(
RudeEditKind
kind)
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (1)
103
var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(
RudeEditKind
.InternalError);
EditAndContinue\RudeEditDiagnostic.cs (5)
17
public readonly
RudeEditKind
Kind;
28
internal RudeEditDiagnostic(
RudeEditKind
kind, TextSpan span, ushort syntaxKind, string?[] arguments)
36
internal RudeEditDiagnostic(
RudeEditKind
kind, TextSpan span, SyntaxNode? node = null, string?[]? arguments = null)
50
internal static DiagnosticSeverity GetSeverity(this
RudeEditKind
kind)
53
internal static bool IsBlocking(this
RudeEditKind
kind)
EditAndContinue\TraceLog.cs (2)
79
EnumType.RudeEditKind => (
RudeEditKind
)Int32,
93
public static implicit operator Arg(
RudeEditKind
value) => new((int)value, s_RudeEditKind);