Example #1
0
            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);
            }
Example #2
0
            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);
            }
Example #3
0
 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.");
     }
 }
Example #4
0
 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;
 }
Example #6
0
 public E(ISharedCounter counter, TaskCompletionSource <bool> tcs)
 {
     this.counter = counter;
     this.tcs     = tcs;
 }
Example #7
0
            void EntryInit()
            {
                counter = (this.ReceivedEvent as E).counter;

                counter.Add(5);
            }
Example #8
0
 void InitOnEntry()
 {
     this.Counter = (this.ReceivedEvent as E).Counter;
     this.Counter.Add(5);
 }