/// <summary> /// Parse the StringItem structure. /// </summary> /// <param name="s">An stream containing StringItem structure.</param> public override void Parse(Stream s) { base.Parse(s); this.Count = new CompactUnsigned64bitInteger(); this.Count = this.Count.TryParse(s); this.Content = ReadString(System.Text.Encoding.Unicode, "", (int)Count.GetUint(Count)); }
/// <summary> /// Parse the StringItem structure. /// </summary> /// <param name="s">An stream containing StringItem structure.</param> public override void Parse(Stream s) { base.Parse(s); this.Length = new CompactUnsigned64bitInteger(); this.Length = this.Length.TryParse(s); this.Content = ReadBytes((int)Length.GetUint(Length)); }
/// <summary> /// Parse the FsshttpbSubRequests structure. /// </summary> /// <param name="s">An stream containing FsshttpbSubRequests structure.</param> public override void Parse(Stream s) { base.Parse(s); this.SubRequestStart = new bit32StreamObjectHeaderStart(); this.SubRequestStart.Parse(s); this.RequestID = new CompactUnsigned64bitInteger(); this.RequestID = this.RequestID.TryParse(s); this.RequestType = new CompactUnsigned64bitInteger(); this.RequestType = this.RequestType.TryParse(s); this.Priority = new CompactUnsigned64bitInteger(); this.Priority = this.Priority.TryParse(s); if (ContainsStreamObjectHeader(0x83)) { this.TargetPartitionId = new TargetPartitionId(); this.TargetPartitionId.Parse(s); } switch (RequestType.GetUint(RequestType)) { case 0x01: this.SubRequestData = new QueryAccessRequest(); break; case 0x02: this.SubRequestData = new QueryChangesRequest(); ((QueryChangesRequest)this.SubRequestData).Parse(s); break; case 0x05: this.SubRequestData = new PutChangesRequest(); ((PutChangesRequest)this.SubRequestData).Parse(s); break; case 0x0B: this.SubRequestData = new AllocateExtendedGUIDRangeRequest(); ((AllocateExtendedGUIDRangeRequest)this.SubRequestData).Parse(s); break; default: throw new Exception("The RequestType is not right."); } this.SubRequestEnd = new bit16StreamObjectHeaderEnd(); this.SubRequestEnd.Parse(s); }