예제 #1
0
        public static void RemoveForClientIfIncomplete(IMyEventProxy obj)
        {
            MyReplicationServer replicationServer = GetReplicationServer();

            if (replicationServer != null)
            {
                replicationServer.RemoveForClientIfIncomplete(obj);
            }
        }
예제 #2
0
        public static void ReplicateImmediatelly(IMyEventProxy proxy, IMyEventProxy dependency = null)
        {
            var server = GetReplicationServer();

            if (server != null)
            {
                Debug.Assert(proxy != null, "Proxy cannot be null");
                server.ForceReplicable(proxy, dependency);
            }
        }
예제 #3
0
        public static void RefreshChild(IMyEventProxy proxy)
        {
            var server = GetReplicationServer();

            if (server != null)
            {
                Debug.Assert(proxy != null, "Proxy cannot be null");
                server.RefreshChildren(proxy);
            }
        }
예제 #4
0
        public static void ReplicateImmediatelly(IMyEventProxy proxy, EndpointId clientEndpoint)
        {
            var server = GetReplicationServer();

            if (server != null && clientEndpoint.Value != Sync.MyId)
            {
                Debug.Assert(proxy != null, "Proxy cannot be null");
                server.ForceReplicable(proxy, clientEndpoint);
            }
        }
예제 #5
0
        public static void ForceClientRefresh(IMyEventProxy obj)
        {
            var server = GetReplicationServer();

            if (server != null)
            {
                Debug.Assert(obj != null, "Proxy cannot be null");
                server.ForceClientRefresh(obj);
            }
        }
예제 #6
0
        public static void RemoveForClientIfIncomplete(IMyEventProxy obj)
        {
            var server = GetReplicationServer();

            if (server != null)
            {
                Debug.Assert(obj != null, "Proxy cannot be null");
                server.RemoveForClientIfIncomplete(obj);
            }
        }
예제 #7
0
        public static void ForceBothOrNone(IMyEventProxy obj, IMyEventProxy obj2)
        {
            var server = GetReplicationServer();

            if (server != null)
            {
                Debug.Assert(obj != null, "Proxy cannot be null");
                Debug.Assert(obj2 != null, "Proxy2 cannot be null");
                server.ForceBothOrNone(obj, obj2);
            }
        }
        public void ForceClientRefresh(IMyEventProxy objA)
        {
            if (objA == null)
            {
                Debug.Fail("Replicable A not found!");
                return;
            }

            foreach (var client in m_clientStates)
            {
                IMyReplicable replicableA = GetProxyTarget(objA) as IMyReplicable;

                if (client.Value.Replicables.ContainsKey(replicableA))
                {
                    RemoveForClient(replicableA, client.Key, client.Value, true);
                    ForceReplicable(replicableA, client.Key);
                }
            }
        }
예제 #9
0
 public IMyProxyTarget GetProxyTarget(IMyEventProxy proxy)
 {
     return m_proxyToTarget[proxy];
 }
예제 #10
0
 public void RefreshChildren(IMyEventProxy proxy)
 {
     IMyReplicable replicable = GetProxyTarget(proxy) as IMyReplicable;
     Debug.Assert(replicable != null, "Proxy does not point to replicable!");
     RefreshChildren(replicable);
 }
예제 #11
0
 public IMyProxyTarget GetProxyTarget(IMyEventProxy proxy)
 {
     return(m_proxyToTarget.GetValueOrDefault(proxy));
 }
예제 #12
0
 protected override void OnHook()
 {
     m_proxy = Instance;
 }
 protected override void OnHook()
 {
     base.OnHook();
     RegisterAsserts(); // The code is not ready for this (tons of asserts raised)
     m_proxy = Instance;
 }
 public void ForceBothOrNone(IMyEventProxy objA, IMyEventProxy objB)
 {
     ForceBothOrNone(GetProxyTarget(objA) as IMyReplicable, GetProxyTarget(objB) as IMyReplicable);
 }
예제 #15
0
 public IMyProxyTarget GetProxyTarget(IMyEventProxy proxy)
 {
     return(m_proxyToTarget[proxy]);
 }
 public void ForceReplicable(IMyEventProxy proxy, IMyEventProxy dependency)
 {
     IMyReplicable replicable = GetProxyTarget(proxy) as IMyReplicable;
     IMyReplicable dep = dependency != null ? GetProxyTarget(dependency) as IMyReplicable : null;
     Debug.Assert(replicable != null, "Proxy does not point to replicable!");
     ForceReplicable(replicable, dep);
 }
 public void ForceReplicable(IMyEventProxy proxy, EndpointId clientEndpoint)
 {
     IMyReplicable replicable = GetProxyTarget(proxy) as IMyReplicable;
     Debug.Assert(replicable != null, "Proxy does not point to replicable!");
     ForceReplicable(replicable, clientEndpoint);
 }
        public void RemoveForClientIfIncomplete(IMyEventProxy objA)
        {
            if (objA == null)
            {
                Debug.Fail("Replicable A not found!");
                return;
            }

            foreach (var client in m_clientStates)
            {
                IMyReplicable replicableA = GetProxyTarget(objA) as IMyReplicable;
                if (client.Value.IsReplicablePending(replicableA))
                {
                    RemoveForClient(replicableA, client.Key, client.Value, true);
                }              
            }
        }
 public IMyProxyTarget GetProxyTarget(IMyEventProxy proxy)
 {
     return m_proxyToTarget.GetValueOrDefault(proxy);
 }