示例#1
0
 public static void Init(RPCObject obj)
 {
     if (obj.DynamicId != 0 && Objects.ContainsKey(obj.DynamicId))
         throw new Exception("Given object was already initialized");
     ulong id = Next();
     obj.DynamicId = id;
     Objects.Add(id, obj);
 }
示例#2
0
        public static void Init(RPCObject obj)
        {
            if (obj.DynamicId != 0 && Objects.ContainsKey(obj.DynamicId))
            {
                throw new Exception("Given object was already initialized");
            }
            ulong id = Next();

            obj.DynamicId = id;
            Objects.Add(id, obj);
        }
示例#3
0
 public static void Release(RPCObject obj)
 {
     Logger.Debug("Releasing object {0}", obj.DynamicId);
     /*if (obj.Initialized)
     {
         if (obj.DynamicId == 0 || !Objects.ContainsKey(obj.DynamicId))
             throw new Exception("Given object was already released");
         Objects.Remove(obj.DynamicId);
     }
     else
     {
         Logger.Debug("RPCObject with ID={0} tried to release twice", obj.DynamicId);
     }*/
 }
示例#4
0
        public static void Release(RPCObject obj)
        {
            Logger.Debug("Releasing object {0}", obj.DynamicId);

            /*if (obj.Initialized)
             * {
             *  if (obj.DynamicId == 0 || !Objects.ContainsKey(obj.DynamicId))
             *      throw new Exception("Given object was already released");
             *  Objects.Remove(obj.DynamicId);
             * }
             * else
             * {
             *  Logger.Debug("RPCObject with ID={0} tried to release twice", obj.DynamicId);
             * }*/
        }