void EntryInit() { counter = (this.ReceivedEvent as E).counter; counter.Add(-4); counter.Decrement(); var v = counter.Exchange(100); counter.Add(-5); counter.Add(v - 100); }
void InitOnEntry() { this.Counter = (this.ReceivedEvent as E).Counter; this.Counter.Add(-4); this.Counter.Decrement(); var v = this.Counter.Exchange(100); this.Counter.Add(-5); this.Counter.Add(v - 100); }
protected override void OnLinkedTo(RuntimeHost runtimeHost, params object[] args) { if (args == null || args.Length == 0) { m_counter = SharedCounter.Create(runtimeHost.Runtime); } else if (args.Length == 1 && args[0] is int value) { m_counter = SharedCounter.Create(runtimeHost.Runtime, value); } else { throw new ArgumentOutOfRangeException(nameof(args), "The value needs to translate in null, empty or the array that has just one element as int."); } }
public E(ISharedDictionary <int, string> dictionary, ISharedCounter counter, TaskCompletionSource <bool> tcs) { this.dictionary = dictionary; this.counter = counter; this.tcs = tcs; }
public E(ISharedCounter counter) { this.counter = counter; }
public E(ISharedCounter counter, TaskCompletionSource <bool> tcs) { this.counter = counter; this.tcs = tcs; }
void EntryInit() { counter = (this.ReceivedEvent as E).counter; counter.Add(5); }
void InitOnEntry() { this.Counter = (this.ReceivedEvent as E).Counter; this.Counter.Add(5); }