40 references to Code
Microsoft.CodeAnalysis (2)
Diagnostic\DiagnosticInfo.cs (1)
438
switch (
Code
)
Diagnostic\DiagnosticWithInfo.cs (1)
71
get { return this.Info.
Code
; }
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder_Expressions.cs (2)
7450
if ((ErrorCode)diagnostic.
Code
== ErrorCode.ERR_RequiredMembersInvalid)
11623
if (diagnosticInfo.
Code
== (int)ErrorCode.ERR_InvalidDelegateType)
Binder\Binder_Operators.cs (1)
1097
var code = diagnostic is DiagnosticWithInfo { HasLazyInfo: true, LazyInfo.
Code
: var lazyCode } ? lazyCode : diagnostic.Code;
Binder\Binder_Symbols.cs (3)
2369
if (errorInfo != null && errorInfo.
Code
== (int)ErrorCode.ERR_CircularBase)
2731
if (diagInfo.
Code
== (int)ErrorCode.ERR_CycleInTypeForwarder)
2736
else if (diagInfo.
Code
== (int)ErrorCode.ERR_TypeForwardedToMultipleAssemblies)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
611
(ErrorCode)diagInfo.
Code
,
Errors\CSDiagnosticInfo.cs (1)
58
internal new ErrorCode Code => (ErrorCode)base.
Code
;
Errors\MessageProvider.cs (1)
125
diagnosticInfo.
Code
,
Errors\SyntaxDiagnosticInfo.cs (1)
56
return new SyntaxDiagnosticInfo(offset, this.Width, (ErrorCode)this.
Code
, this.Arguments);
Errors\XmlSyntaxDiagnosticInfo.cs (1)
40
string messagePrefix = this.MessageProvider.LoadMessage(this.
Code
, culture);
Parser\DocumentationCommentParser.cs (2)
796
SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(rawInfo.Offset, rawInfo.Width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.
Code
);
1041
SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.
Code
);
Parser\LanguageParser.cs (2)
1252
literalToken.GetDiagnostics().Contains(d => d.
Code
== (int)ErrorCode.ERR_NewlineInConst))
9329
!semicolonToken.GetDiagnostics().Contains(diagnosticInfo => (ErrorCode)diagnosticInfo.
Code
== ErrorCode.ERR_SemicolonExpected))
Parser\Lexer.cs (1)
3982
this.AddError(ErrorCode.WRN_ErrorOverride, info, info.
Code
);
Parser\SyntaxParser.cs (1)
1094
new SyntaxDiagnosticInfo(finalDiagnosticOffset, diagnostic.Width, (ErrorCode)diagnostic.
Code
, diagnostic.Arguments));
Symbols\EventSymbol.cs (1)
322
return (object?)info != null && info.
Code
is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\FieldSymbol.cs (1)
390
return (object)info != null && info.
Code
is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
148
if (fromSignature.DiagnosticInfo?.
Code
== (int)ErrorCode.ERR_BindToBogus && fromSignature.DiagnosticInfo.Arguments.AsSingleton() == (object)Signature)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
334
=> GetCompilerFeatureRequiredDiagnostic()?.
Code
== (int)ErrorCode.ERR_UnsupportedCompilerFeature || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
730
=> GetCompilerFeatureRequiredDiagnostic()?.
Code
== (int)ErrorCode.ERR_UnsupportedCompilerFeature || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2769
if (useSiteInfo.DiagnosticInfo is {
Code
: (int)ErrorCode.ERR_UnsupportedCompilerFeature } diag)
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
1271
return DeriveCompilerFeatureRequiredDiagnostic(decoder) is {
Code
: (int)ErrorCode.ERR_UnsupportedCompilerFeature } || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
738
return DeriveCompilerFeatureRequiredDiagnostic(GetDecoder(containingModule)) is {
Code
: (int)ErrorCode.ERR_UnsupportedCompilerFeature } || base.HasUnsupportedMetadata;
Symbols\MethodSymbol.cs (1)
1099
return (object)info != null && info.
Code
is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\ObsoleteAttributeHelpers.cs (1)
228
return (ErrorCode)diagnosticInfo.
Code
is
Symbols\ParameterSymbol.cs (1)
463
return info.DiagnosticInfo?.
Code
is (int)ErrorCode.ERR_BogusType or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\PropertySymbol.cs (1)
439
return (object)info != null && info.
Code
is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\Source\SourceAssemblySymbol.cs (1)
2220
if (useSiteInfo.DiagnosticInfo?.
Code
!= (int)ErrorCode.ERR_UnexpectedUnboundGenericName &&
Symbols\Symbol.cs (5)
1138
if (info.Severity == DiagnosticSeverity.Error && IsHighestPriorityUseSiteErrorCode(info.
Code
))
1195
if (info.
Code
== (int)ErrorCode.WRN_UnifyReferenceBldRev ||
1196
info.
Code
== (int)ErrorCode.WRN_UnifyReferenceMajMin ||
1197
info.
Code
== (int)ErrorCode.ERR_AssemblyMatchBadVersion)
1217
if (info.DiagnosticInfo?.
Code
== (int)ErrorCode.ERR_BogusType)
Symbols\TypeSymbol.cs (1)
529
return (object)info != null && info.
Code
is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BogusType;
Symbols\UnboundGenericType.cs (1)
120
: Hash.Combine(_name, _errorInfo.
Code
);
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (1)
78
(ErrorCode)oldSyntaxDiagnostic.
Code
,