123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace SMBLibrary.RPC
- {
- public class NDRConformantArray<T> : List<T>, INDRStructure where T : INDRStructure, new()
- {
-
-
-
-
- public void Read(NDRParser parser)
- {
- parser.BeginStructure();
- uint maxCount = parser.ReadUInt32();
- for (int index = 0; index < maxCount; index++)
- {
- T entry = new T();
- entry.Read(parser);
- this.Add(entry);
- }
- parser.EndStructure();
- }
- public void Write(NDRWriter writer)
- {
- writer.BeginStructure();
- uint maxCount = (uint)this.Count;
- writer.WriteUInt32(maxCount);
- for (int index = 0; index < this.Count; index++)
- {
- this[index].Write(writer);
- }
- writer.EndStructure();
- }
- }
- }
|