Suppresses warnings reported by the ObservableAttribute aspect when it encounters unsupported code constructs in the target member or type.
Implements
Namespace: Metalama.Patterns.Observability
Assembly: Metalama.Patterns.Observability.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field)]
public sealed class SuppressObservabilityWarningsAttribute : Attribute, IHierarchicalOptionsProviderRemarks
The ObservableAttribute aspect reports LAMA51** warnings when it encounters code patterns
that it cannot analyze, such as calls to non-constant methods. This attribute suppresses these warnings for
the target declaration and its children.
Alternatively, warnings can be suppressed using the standard #pragma warning disable directive.
Warning: Suppressing warnings does not change the generated code. Dependencies that triggered the warnings will still not be tracked. Use this attribute only when you are certain that the untracked dependencies will not affect observable state.
Constructors
| Name | Description |
|---|---|
| SuppressObservabilityWarningsAttribute(bool) | Initializes a new instance of the SuppressObservabilityWarningsAttribute class. |