IContextRuleMonitorService.RegisterContextRuleAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new Context rule that is monitored and requests that a ContextRuleStateChanged event be raised when the rule changes state, such as becoming active.
public:
System::Threading::Tasks::ValueTask RegisterContextRuleAsync(Microsoft::VisualStudio::RpcContracts::ContextRuleMonitor::ContextRuleMetadata ^ ruleMetadata, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.ValueTask RegisterContextRuleAsync (Microsoft.VisualStudio.RpcContracts.ContextRuleMonitor.ContextRuleMetadata ruleMetadata, System.Threading.CancellationToken cancellationToken);
abstract member RegisterContextRuleAsync : Microsoft.VisualStudio.RpcContracts.ContextRuleMonitor.ContextRuleMetadata * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function RegisterContextRuleAsync (ruleMetadata As ContextRuleMetadata, cancellationToken As CancellationToken) As ValueTask
Parameters
- ruleMetadata
- ContextRuleMetadata
The data object representing the context rule to monitor.
- cancellationToken
- CancellationToken
A cancellation token to cancel the in-progress invocation.
Returns
A ValueTask representing the asynchronous operation.