Esempio n. 1
0
 public static ContainerCount NewInstanceFromStream(string containerName, int usedCount = 0)
 {
     var result = new ContainerCount();
     result.ContainerName = containerName;
     result.UsedCount = usedCount;
     return result;
 }
Esempio n. 2
0
 public static ContainerCount NewInstanceByPrevContainerName(string prevContainerName, int usedCount = 0)
 {
     var result = new ContainerCount();
     result.ContainerName = ItemLocationModel.GetItemNextContainerName(prevContainerName);
     result.UsedCount = usedCount;
     return result;
 }
Esempio n. 3
0
        public static void WriteToStream(ContainerCount obj, Stream streamWriter)
        {
            BinaryWriter writer = new BinaryWriter(streamWriter);

            writer.Write(obj.ContainerName);
            writer.Write(obj.UsedCount);
        }
Esempio n. 4
0
        public static ContainerCount ReadFromStream(Stream streamReader)
        {
            BinaryReader reader = new BinaryReader(streamReader);

            ContainerCount result = new ContainerCount();
            result.ContainerName = reader.ReadString();
            result.UsedCount = reader.ReadInt32();
            return result;
        }