/// <summary> /// Parse the OrRestriction structure. /// </summary> /// <param name="s">A stream containing the OrRestriction structure</param> public override void Parse(Stream s) { base.Parse(s); this.RestrictType = (RestrictTypeEnum)ReadByte(); if (countWide == CountWideEnum.twoBytes) { this.RestrictCount = ReadUshort(); } else { this.RestrictCount = ReadUint(); } List<RestrictionType> tempRestricts = new List<RestrictionType>(); for (int length = 0; length < (int)RestrictCount; length++) { RestrictionType tempRestriction = new RestrictionType(); tempRestriction.Parse(s); tempRestricts.Add(tempRestriction); } this.Restricts = tempRestricts.ToArray(); }
/// <summary> /// Parse the GetMatchesRequest structure. /// </summary> /// <param name="s">An stream containing GetMatchesRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.Reserved = ReadUint(); this.HasState = ReadBoolean(); if (this.HasState) { STAT stat = new STAT(); stat.Parse(s); this.State = stat; } this.HasMinimalIds = ReadBoolean(); if (this.HasMinimalIds) { this.MinimalIdCount = ReadUint(); List<MinimalEntryID> me = new List<MinimalEntryID>(); for (int i = 0; i < this.MinimalIdCount; i++) { MinimalEntryID mEntryId = new MinimalEntryID(); mEntryId.Parse(s); me.Add(mEntryId); } this.MinimalIds = me.ToArray(); } this.InterfaceOptionFlags = ReadUint(); this.HasFilter = ReadBoolean(); if (this.HasFilter) { RestrictionType restriction = new RestrictionType(); restriction.Parse(s); this.Filter = restriction; } this.HasPropertyName = ReadBoolean(); if (this.HasPropertyName) { this.PropertyNameGuid = ReadGuid(); this.PropertyNameId = ReadUint(); } this.RowCount = ReadUint(); this.HasColumns = ReadBoolean(); if (this.HasColumns) { LargePropertyTagArray largePTA = new LargePropertyTagArray(); largePTA.Parse(s); this.Columns = largePTA; } this.AuxiliaryBufferSize = ReadUint(); if (this.AuxiliaryBufferSize > 0) { this.AuxiliaryBuffer = new ExtendedBuffer(); this.AuxiliaryBuffer.Parse(s); } else { this.AuxiliaryBuffer = null; } }