protected override void DeserializePayload(BEReader reader)
 {
     Flags       = (DeviceFlags)reader.ReadUInt32();
     DeviceType  = (DeviceType)reader.ReadUInt16();
     Name        = reader.ReadUInt16PrefixedString();
     HardwareId  = Guid.Parse(reader.ReadUInt16PrefixedString());
     LastError   = reader.ReadUInt32();
     Certificate = CryptoExtensions
                   .DeserializeCertificateAsn(reader.ReadUInt16PrefixedBlob());
 }
 public override void Deserialize(BEReader reader)
 {
     TextSessionId     = reader.ReadUInt64();
     TextBufferVersion = reader.ReadUInt32();
     TextOptions       = (TextOption)reader.ReadUInt32();
     InputScope        = (TextInputScope)reader.ReadUInt32();
     MaxTextLength     = reader.ReadUInt32();
     Locale            = reader.ReadUInt16PrefixedString();
     Prompt            = reader.ReadUInt16PrefixedString();
 }
Ejemplo n.º 3
0
 public override void Deserialize(BEReader reader)
 {
     TextSessionId     = reader.ReadUInt64();
     TextBufferVersion = reader.ReadUInt32();
     Result            = (TextResult)reader.ReadUInt16();
     Text = reader.ReadUInt16PrefixedString();
 }
 void ISerializable.Deserialize(BEReader reader)
 {
     LiveTVProvider = reader.ReadUInt32();
     MajorVersion   = reader.ReadUInt32();
     MinorVersion   = reader.ReadUInt32();
     BuildNumber    = reader.ReadUInt32();
     Locale         = reader.ReadUInt16PrefixedString();
 }
        public override void Deserialize(BEReader reader)
        {
            State = new MediaState();

            State.TitleId         = reader.ReadUInt32();
            State.AumId           = reader.ReadUInt16PrefixedString();
            State.AssetId         = reader.ReadUInt16PrefixedString();
            State.MediaType       = (MediaType)reader.ReadUInt16();
            State.SoundLevel      = (MediaSoundLevel)reader.ReadUInt16();
            State.EnabledCommands = (MediaControlCommands)reader.ReadUInt32();
            State.PlaybackStatus  = (MediaPlaybackStatus)reader.ReadUInt16();
            State.PlaybackRate    = reader.ReadSingle();
            State.Position        = TimeSpan.FromTicks((long)reader.ReadUInt64());
            State.MediaStart      = TimeSpan.FromTicks((long)reader.ReadUInt64());
            State.MediaEnd        = TimeSpan.FromTicks((long)reader.ReadUInt64());
            State.MinimumSeek     = TimeSpan.FromTicks((long)reader.ReadUInt64());
            State.MaximumSeek     = TimeSpan.FromTicks((long)reader.ReadUInt64());

            State.Metadata = new ReadOnlyDictionary <string, string>(
                reader.ReadUInt16PrefixedArray <MediaMetadata>()
                .ToDictionary(entry => entry.Name, entry => entry.Value));
        }
 public override void Deserialize(BEReader reader)
 {
     TextSessionId       = reader.ReadUInt32();
     BaseVersion         = reader.ReadUInt32();
     SubmittedVersion    = reader.ReadUInt32();
     TotalTextBytelength = reader.ReadUInt32();
     SelectionStart      = reader.ReadInt32();
     SelectionLength     = reader.ReadInt32();
     Flags = reader.ReadUInt16();
     TextChunkByteStart = reader.ReadUInt32();
     TextChunk          = reader.ReadUInt16PrefixedString();
     Delta = reader.ReadUInt16PrefixedArray <TextDelta>();
 }
        void ISerializable.Deserialize(BEReader reader)
        {
            TitleId = reader.ReadUInt32();

            ushort titleDisposition = reader.ReadUInt16();

            HasFocus      = (titleDisposition & 0x8000) == 0x8000;
            TitleLocation = (ActiveTitleLocation)(titleDisposition & 0x7FFF);

            ProductId = new Guid(reader.ReadBytes(16));
            SandboxId = new Guid(reader.ReadBytes(16));

            AumId = reader.ReadUInt16PrefixedString();
        }
Ejemplo n.º 8
0
        public void TestInvalidUInt16PrefixedString()
        {
            byte[] data = new byte[]
            {
                0x00, 0x8, // string length
                // ABCDZYXW
                0x41, 0x42, 0x43, 0x44,
                0x5A, 0x59, 0x58, 0x57
            };
            BEReader reader = new BEReader(data);

            Assert.Throws <System.IO.EndOfStreamException>(
                () => { reader.ReadUInt16PrefixedString(); });
        }
Ejemplo n.º 9
0
        public void TestUInt16PrefixedString()
        {
            byte[] data = new byte[]
            {
                0x00, 0x8, // string length
                // ABCDZYXW
                0x41, 0x42, 0x43, 0x44,
                0x5A, 0x59, 0x58, 0x57,
                // null terminator
                0x00
            };
            BEReader reader = new BEReader(data);
            string   result = reader.ReadUInt16PrefixedString();

            Assert.Equal("ABCDZYXW", result);
        }
Ejemplo n.º 10
0
 public void Deserialize(BEReader reader)
 {
     Host    = reader.ReadUInt16PrefixedString();
     Service = reader.ReadUInt16PrefixedString();
 }
Ejemplo n.º 11
0
 public override void Deserialize(BEReader reader)
 {
     Json = reader.ReadUInt16PrefixedString();
 }
Ejemplo n.º 12
0
 public void Deserialize(BEReader reader)
 {
     Offset        = reader.ReadUInt32();
     DeleteCount   = reader.ReadUInt32();
     InsertContent = reader.ReadUInt16PrefixedString();
 }
 public void Deserialize(BEReader reader)
 {
     Name  = reader.ReadUInt16PrefixedString();
     Value = reader.ReadUInt16PrefixedString();
 }
 protected override void DeserializePayload(BEReader reader)
 {
     LiveId = reader.ReadUInt16PrefixedString();
 }