ProvidesContextAttribute Class
Indicates the type member or parameter of some type, that should be used instead of all other ways
to get the value of that type. This annotation is useful when you have some "context" value evaluated
and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one.
Namespace:
RingSoft.DataEntryControls.Engine.AnnotationsAssembly: RingSoft.DataEntryControls.Engine (in RingSoft.DataEntryControls.Engine.dll)
Syntax
[AttributeUsageAttribute] public sealed class ProvidesContextAttribute : Attribute
<AttributeUsageAttribute> _ Public NotInheritable Class ProvidesContextAttribute _ Inherits Attribute
[AttributeUsageAttribute] public ref class ProvidesContextAttribute sealed : public Attribute
Examples
C#
class Foo { [ProvidesContext] IBarService _barService = ...; void ProcessNode(INode node) { DoSomething(node, node.GetGlobalServices().Bar); // ^ Warning: use value of '_barService' field } }