Exemplo n.º 1
0
 public void Init(SyncObjectFactory.SyncObjectActivator info, SyncComponent sync, SyncDirection direction, ulong id)
 {
     TypeInfo      = info;
     SyncDirection = direction;
     SyncComponent = sync;
     SyncObjectID  = id;
 }
Exemplo n.º 2
0
 public static SyncByReference CreateSyncByReference(Type type, SyncComponent component, SyncDirection direction, ulong id)
 {
     using (Lock.AcquireSharedUsing())
     {
         var info = ActivatorsByType[type];
         return(info.Activator.Invoke(info, component, direction, id));
     }
 }
Exemplo n.º 3
0
 public bool StopReplication(EndpointId endpoint)
 {
     lock (this)
         if (!m_replicationPoints.Remove(endpoint))
         {
             return(false);
         }
     SyncComponent.DestroyObjectOn(this, endpoint);
     return(true);
 }
Exemplo n.º 4
0
 public bool StartReplication(EndpointId endpoint)
 {
     lock (this)
         if (!m_replicationPoints.Add(endpoint))
         {
             return(false);
         }
     SyncComponent.AllocateObjectOn(this, endpoint);
     return(true);
 }
Exemplo n.º 5
0
 protected void MarkDirty()
 {
     lock (this)
     {
         if (m_isQueued)
         {
             return;
         }
         m_isQueued = true;
     }
     SyncComponent?.QueueUpdate(this);
 }