public override void Participate(IGrainLifecycle lifecycle) { base.Participate(lifecycle); lifecycle.Subscribe(this.GetType().FullName, GrainLifecycleStage.Activate, (cancel) => { return(Task.CompletedTask); }); }
public virtual void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe <LogConsistentGrain <TView> >(GrainLifecycleStage.SetupState, OnSetupState, OnDeactivateState); if (this is ILogConsistencyProtocolParticipant) { lifecycle.Subscribe <LogConsistentGrain <TView> >(GrainLifecycleStage.Activate - 1, PreActivate); lifecycle.Subscribe <LogConsistentGrain <TView> >(GrainLifecycleStage.Activate + 1, PostActivate); } }
public override void Participate(IGrainLifecycle lifecycle) { base.Participate(lifecycle); lifecycle.Subscribe(GrainLifecycleStage.SetupState, OnSetupState); if (this is ILogConsistencyProtocolParticipant) { lifecycle.Subscribe(GrainLifecycleStage.Activate - 1, PreActivate); lifecycle.Subscribe(GrainLifecycleStage.Activate + 1, PostActivate); } }
public override void Participate(IGrainLifecycle lifecycle) { base.Participate(lifecycle); lifecycle.Subscribe(this.GetType().FullName, GrainLifecycleStage.SetupState, token => { Console.WriteLine("Setup State"); return(Task.CompletedTask); }); lifecycle.Subscribe(this.GetType().FullName, GrainLifecycleStage.Activate, token => { Console.WriteLine("Activate State"); return(Task.CompletedTask); }); lifecycle.Subscribe(this.GetType().FullName, GrainLifecycleStage.First, token => { Console.WriteLine("First State"); return(Task.CompletedTask); }); lifecycle.Subscribe(this.GetType().FullName, GrainLifecycleStage.Last, token => { Console.WriteLine("Last State"); return(Task.CompletedTask); }); }
public static IDisposable Subscribe(this IGrainLifecycle observable, GrainLifecycleStage stage, ILifecycleObserver observer) { return(observable.Subscribe((int)stage, observer)); }
public void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe <TransactionalState <TState> >(GrainLifecycleStage.SetupState, OnSetupState); }
public void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe(GrainLifecycleStage.SetupState, OnSetupState); }
public void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe(OptionFormattingUtilities.Name <TableExampleStorage <TState> >(this.Name), GrainLifecycleStage.SetupState, LoadState); }
public void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe(this.GetType().FullName, GrainLifecycleStage.SetupState, OnSetupState); }
public void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe <TransactionalState <TState> >(GrainLifecycleStage.SetupState, (ct) => OnSetupState(ct, SetupResourceFactory)); }
public override void Participate(IGrainLifecycle lifecycle) { base.Participate(lifecycle); }
public override void Participate(IGrainLifecycle lifecycle) { Console.WriteLine("Participate"); base.Participate(lifecycle); }
public void Participate(IGrainLifecycle lifecycle) { lifecycle.Subscribe <FaultInjectionTransactionalState <TState> >(GrainLifecycleStage.SetupState, (ct) => this.txState.OnSetupState(ct, this.SetupResourceFactory)); }
public void Participate(IGrainLifecycle lifecycle) => base.Participate <NonFaultTolerantWorkflowIndexedState <TGrainState, TWrappedState> >(lifecycle);
public void Participate(IGrainLifecycle lifecycle) => base.Participate <TransactionalIndexedState <TGrainState> >(lifecycle);
public void Participate <TSubclass>(IGrainLifecycle lifecycle) { lifecycle.Subscribe <TSubclass>(GrainLifecycleStage.SetupState, _ => OnSetupStateAsync()); lifecycle.Subscribe <TSubclass>(GrainLifecycleStage.Activate, ct => OnActivateAsync(ct), ct => OnDeactivateAsync(ct)); }