public void Init(SyncObjectFactory.SyncObjectActivator info, SyncComponent sync, SyncDirection direction, ulong id) { TypeInfo = info; SyncDirection = direction; SyncComponent = sync; SyncObjectID = id; }
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)); } }
public bool StopReplication(EndpointId endpoint) { lock (this) if (!m_replicationPoints.Remove(endpoint)) { return(false); } SyncComponent.DestroyObjectOn(this, endpoint); return(true); }
public bool StartReplication(EndpointId endpoint) { lock (this) if (!m_replicationPoints.Add(endpoint)) { return(false); } SyncComponent.AllocateObjectOn(this, endpoint); return(true); }
protected void MarkDirty() { lock (this) { if (m_isQueued) { return; } m_isQueued = true; } SyncComponent?.QueueUpdate(this); }