ChangeToken.OnChange 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.
Overloads
OnChange(Func<IChangeToken>, Action) |
Registers the |
OnChange<TState>(Func<IChangeToken>, Action<TState>, TState) |
Registers the |
OnChange(Func<IChangeToken>, Action)
- Source:
- ChangeToken.cs
- Source:
- ChangeToken.cs
- Source:
- ChangeToken.cs
- Source:
- ChangeToken.cs
Registers the changeTokenConsumer
action to be called whenever the token produced changes.
public:
static IDisposable ^ OnChange(Func<Microsoft::Extensions::Primitives::IChangeToken ^> ^ changeTokenProducer, Action ^ changeTokenConsumer);
public static IDisposable OnChange (Func<Microsoft.Extensions.Primitives.IChangeToken> changeTokenProducer, Action changeTokenConsumer);
public static IDisposable OnChange (Func<Microsoft.Extensions.Primitives.IChangeToken?> changeTokenProducer, Action changeTokenConsumer);
static member OnChange : Func<Microsoft.Extensions.Primitives.IChangeToken> * Action -> IDisposable
Public Shared Function OnChange (changeTokenProducer As Func(Of IChangeToken), changeTokenConsumer As Action) As IDisposable
Parameters
- changeTokenProducer
- Func<IChangeToken>
Produces the change token.
- changeTokenConsumer
- Action
Action called when the token changes.
Returns
Applies to
OnChange<TState>(Func<IChangeToken>, Action<TState>, TState)
- Source:
- ChangeToken.cs
- Source:
- ChangeToken.cs
- Source:
- ChangeToken.cs
- Source:
- ChangeToken.cs
Registers the changeTokenConsumer
action to be called whenever the token produced changes.
public:
generic <typename TState>
static IDisposable ^ OnChange(Func<Microsoft::Extensions::Primitives::IChangeToken ^> ^ changeTokenProducer, Action<TState> ^ changeTokenConsumer, TState state);
public static IDisposable OnChange<TState> (Func<Microsoft.Extensions.Primitives.IChangeToken> changeTokenProducer, Action<TState> changeTokenConsumer, TState state);
public static IDisposable OnChange<TState> (Func<Microsoft.Extensions.Primitives.IChangeToken?> changeTokenProducer, Action<TState> changeTokenConsumer, TState state);
static member OnChange : Func<Microsoft.Extensions.Primitives.IChangeToken> * Action<'State> * 'State -> IDisposable
Public Shared Function OnChange(Of TState) (changeTokenProducer As Func(Of IChangeToken), changeTokenConsumer As Action(Of TState), state As TState) As IDisposable
Type Parameters
- TState
The type of the state for the changeTokenConsumer
action.
Parameters
- changeTokenProducer
- Func<IChangeToken>
Produces the change token.
- changeTokenConsumer
- Action<TState>
Action called when the token changes.
- state
- TState
state for the consumer.
Returns
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기