Пример #1
0
 public static double ReadDoubleField(NetworkObjectField class62_0)
 {
     if (class62_0.isNetworkObject)
     {
         throw new Exception("Attempted to access data in a struct field.");
     }
     return(BitConverter.ToDouble(class62_0.byte_0, 0));
 }
Пример #2
0
 public static byte ReadByteField(NetworkObjectField class62_0)
 {
     if (class62_0.isNetworkObject)
     {
         throw new Exception("Attempted to access data in a struct field.");
     }
     return(class62_0.byte_0[0]);
 }
Пример #3
0
 public static ushort ReadUShortField(NetworkObjectField class62_0)
 {
     if (class62_0.isNetworkObject)
     {
         throw new Exception("Attempted to access data in a struct field.");
     }
     return(BitConverter.ToUInt16(class62_0.byte_0, 0));
 }
Пример #4
0
 public static bool smethod_10(NetworkObjectField class62_0)
 {
     if (class62_0.isNetworkObject)
     {
         throw new Exception("Attempted to access data in a struct field.");
     }
     return(class62_0.byte_0[0] != 0);
 }
Пример #5
0
        public static string ReadStringField(NetworkObjectField class62_0)
        {
            if (class62_0.isNetworkObject)
            {
                throw new Exception("Attempted to access data in a struct field.");
            }
            ASCIIEncoding encoding = new ASCIIEncoding();

            return(encoding.GetString(class62_0.byte_0));
        }
Пример #6
0
 public override void FromNetworkObject(NetworkObject class63_0)
 {
     using (var stream = new MemoryStream(NetworkObjectField.smethod_1(class63_0.GetField(0))))
     {
         using (var reader = new BinaryReader(stream))
         {
             this.Read(reader);
         }
     }
 }
Пример #7
0
 public void AddField(int int_0, NetworkObjectField class62_0)
 {
     if (this.dictionary_0.ContainsKey(int_0))
     {
         this.dictionary_0.Remove(int_0);
         this.dictionary_0.Add(int_0, class62_0);
     }
     else
     {
         this.dictionary_0.Add(int_0, class62_0);
     }
 }
Пример #8
0
        public override NetworkObject ToNetworkObject()
        {
            using (var stream = new MemoryStream())
            {
                using (var writer = new BinaryWriter(stream))
                {
                    this.Write(writer);

                    NetworkObject class2 = new NetworkObject();
                    class2.AddField(0, NetworkObjectField.CreateByteArrayField(stream.ToArray()));
                    return(class2);
                }
            }
        }