Ineligible(IDiagnostic)
Creates a classification indicating that the method cannot be cached because of this parameter, with a custom error diagnostic.
Declaration
public static CacheParameterClassification Ineligible(IDiagnostic diagnostic)Parameters
| Type | Name | Description |
|---|---|---|
| IDiagnostic | diagnostic | The error diagnostic to report. Must have Error severity. |
Returns
| Type | Description |
|---|---|
| CacheParameterClassification | A classification that will cause a compile-time error with the specified diagnostic. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown when the diagnostic does not have Error severity. |
Ineligible()
Creates a classification indicating that the method cannot be cached because of this parameter, with a default error diagnostic.
Declaration
public static CacheParameterClassification Ineligible()Returns
| Type | Description |
|---|---|
| CacheParameterClassification | A classification that will cause a compile-time error with a standard diagnostic message. |