コード例 #1
0
 protected override void OnLinkedTo(RuntimeHost runtimeHost, params object[] args)
 {
     if (args == null || args.Length == 0)
     {
         m_reg = SharedRegister.Create <T>(runtimeHost.Runtime);
     }
     else if (args.Length == 1 && args[0] is T value)
     {
         m_reg = SharedRegister.Create <T>(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 T.");
     }
 }
コード例 #2
0
 public E(ISharedRegister <S> counter)
 {
     this.counter = counter;
 }
コード例 #3
0
 public E(ISharedRegister <int> counter, TaskCompletionSource <bool> tcs)
 {
     this.Counter = counter;
     this.Tcs     = tcs;
 }
コード例 #4
0
 public E(ISharedRegister <T> counter)
 {
     this.Counter = counter;
 }