Exemplo n.º 1
0
        public static Property Deserialise(System.IO.Stream stream)
        {
            Property property = new Property();

            property.PropertyDefinitionID = IPCHelper.ReadGuid(stream);
            property.PropertyID           = IPCHelper.ReadString(stream);
            byte nullItem = IPCHelper.ReadByte(stream);

            if (nullItem == 1)
            {
                property.Value = new PropertyValue()
                {
                    Value = IPCHelper.ReadString(stream)
                };
            }
            int valueCount = IPCHelper.ReadInt32(stream);

            for (int valueIndex = 0; valueIndex < valueCount; valueIndex++)
            {
                PropertyValue value = new PropertyValue();
                value.PropertyValueID = IPCHelper.ReadString(stream);
                value.Value           = IPCHelper.ReadString(stream);
                if (property.Values == null)
                {
                    property.Values = new List <PropertyValue>();
                }
                property.Values.Add(value);
            }
            return(property);
        }
Exemplo n.º 2
0
        public static ObjectTypes Deserialise(Stream stream)
        {
            ObjectTypes result = new ObjectTypes();
            int         count  = IPCHelper.ReadInt32(stream);

            if (count > 0)
            {
                for (int index = 0; index < count; index++)
                {
                    ObjectType objectType = ObjectType.Deserialise(stream);
                    result.AddObjectType(objectType);
                }
                result._ObjectTypeList.Sort(ObjectType.Compare);
            }
            return(result);
        }
Exemplo n.º 3
0
        public static ObjectType Deserialise(Stream stream)
        {
            ObjectType result = new ObjectType();

            result.Path         = IPCHelper.ReadString(stream);
            result.ObjectTypeID = IPCHelper.ReadInt32(stream);
            int count = IPCHelper.ReadInt32(stream);

            if (count > 0)
            {
                for (int index = 0; index < count; index++)
                {
                    int item = IPCHelper.ReadInt32(stream);
                    result.Instances.Add(item);
                }
            }
            return(result);
        }
Exemplo n.º 4
0
        public static Object Deserialise(Stream stream)
        {
            Object result = new Object();

            result.ObjectDefinitionID = IPCHelper.ReadGuid(stream);
            result.ObjectID           = IPCHelper.ReadString(stream);
            result.InstanceID         = IPCHelper.ReadString(stream);
            int count = IPCHelper.ReadInt32(stream);

            if (count > 0)
            {
                for (int index = 0; index < count; index++)
                {
                    Property property = Property.Deserialise(stream);
                    result.Properties.Add(property);
                }
            }
            return(result);
        }
Exemplo n.º 5
0
        public List <Client> GetClients()
        {
            List <Client> result  = null;
            IPCRequest    request = new IPCRequest();

            request.Method = "GetClients";
            SendRequest(request);
            if (_ResponseBytes.Length > 0)
            {
                result = new List <Client>();
                MemoryStream stream = new MemoryStream(_ResponseBytes);
                int          count  = IPCHelper.ReadInt32(stream);
                if (count > 0)
                {
                    for (int index = 0; index < count; index++)
                    {
                        result.Add(Client.Deserialise(stream));
                    }
                }
            }
            return(result);
        }
Exemplo n.º 6
0
 public int ReadInt32()
 {
     return(IPCHelper.ReadInt32(_Payload));
 }