Ejemplo n.º 1
0
        /// <summary>
        /// Checks if we should replicate this to other clients and sets our internal state accordingly.
        /// </summary>
        public void CheckIfShouldReplicate()
        {
            MasterAttribute     MasterAtr     = Member.GetCustomAttribute(typeof(MasterAttribute)) as MasterAttribute;
            MasterSyncAttribute MasterSyncAtr = Member.GetCustomAttribute(typeof(MasterSyncAttribute)) as MasterSyncAttribute;
            Node Node     = NodeRef.GetRef() as Node;
            bool IsMaster = MDStatics.GetPeerId() == Node.GetNetworkMaster();

            IsShouldReplicate = (IsMaster && MasterAtr == null && MasterSyncAtr == null) || (IsMaster == false && (MasterAtr != null || MasterSyncAtr != null));
        }
Ejemplo n.º 2
0
        private bool HasRPCModeSet(MemberInfo Member)
        {
            MasterAttribute     MasterAtr     = Member.GetCustomAttribute(typeof(MasterAttribute)) as MasterAttribute;
            MasterSyncAttribute MasterSyncAtr =
                Member.GetCustomAttribute(typeof(MasterSyncAttribute)) as MasterSyncAttribute;
            PuppetAttribute     PuppetAtr     = Member.GetCustomAttribute(typeof(PuppetAttribute)) as PuppetAttribute;
            PuppetSyncAttribute PuppetSyncAtr =
                Member.GetCustomAttribute(typeof(PuppetSyncAttribute)) as PuppetSyncAttribute;
            RemoteAttribute     RemoteAtr     = Member.GetCustomAttribute(typeof(RemoteAttribute)) as RemoteAttribute;
            RemoteSyncAttribute RemoteSyncAtr =
                Member.GetCustomAttribute(typeof(RemoteSyncAttribute)) as RemoteSyncAttribute;

            return(MasterAtr != null || MasterSyncAtr != null || PuppetAtr != null || PuppetSyncAtr != null ||
                   RemoteAtr != null || RemoteSyncAtr != null);
        }
Ejemplo n.º 3
0
        private bool HasRPCModeSet(MemberInfo Member)
        {
            MasterAttribute     MasterAtr     = MDReflectionCache.GetCustomAttribute <MasterAttribute>(Member) as MasterAttribute;
            MasterSyncAttribute MasterSyncAtr =
                MDReflectionCache.GetCustomAttribute <MasterSyncAttribute>(Member) as MasterSyncAttribute;
            PuppetAttribute     PuppetAtr     = MDReflectionCache.GetCustomAttribute <PuppetAttribute>(Member) as PuppetAttribute;
            PuppetSyncAttribute PuppetSyncAtr =
                MDReflectionCache.GetCustomAttribute <PuppetSyncAttribute>(Member) as PuppetSyncAttribute;
            RemoteAttribute     RemoteAtr     = MDReflectionCache.GetCustomAttribute <RemoteAttribute>(Member) as RemoteAttribute;
            RemoteSyncAttribute RemoteSyncAtr =
                MDReflectionCache.GetCustomAttribute <RemoteSyncAttribute>(Member) as RemoteSyncAttribute;

            return(MasterAtr != null || MasterSyncAtr != null || PuppetAtr != null || PuppetSyncAtr != null ||
                   RemoteAtr != null || RemoteSyncAtr != null);
        }