public void WriteToBms1Stream(IBms1Writer writer)
        {
            writer.WriteBlock(Bms1BlockTypeId, () =>
                {
                    writer.WriteString(InterfaceName);
                    writer.WriteInt16(InterfaceVersion);
                    writer.WriteString(ApplicationName);

                    ApplicationVersion.WriteToBms1Stream(writer);

                    writer.WriteString(ApplicationInstance);
                });
        }
 public void WriteToBms1Stream(IBms1Writer writer)
 {
     writer.WriteBlock(Bms1BlockTypeId, () => { });
 }
 public override void WriteToBms1Stream(IBms1Writer writer)
 {
     writer.WriteBlock(Bms1BlockTypeId, () =>
         {
             Version.WriteToBms1Stream(writer);
             writer.WriteString(AdditionaInfo); // not sent before V.2
         });
 }
 /// <summary>
 /// Here we demonstrate how to stream a member class of a closed library.
 /// The extension method writes System.Version to a BMS1 stream.
 /// </summary>
 public static void WriteToBms1Stream(this Version version, IBms1Writer writer)
 {
     if (version == null)
     {
         writer.WriteBlock(null);
     }
     else
     {
         writer.WriteBlock(() =>
             {
                 writer.WriteInt32(version.Major);
                 writer.WriteInt32(version.Minor);
                 writer.WriteInt32(version.Build);
                 writer.WriteInt32(version.Revision);
             });
     }
 }
 public override void WriteToBms1Stream(IBms1Writer writer)
 {
     writer.WriteBlock(Bms1BlockTypeId, () =>
     {
         writer.WriteString(Version);
         writer.WriteEnum(CpuType);
         // Intentionally, we do not write AdditionalInfo. This simulates an older sender and a newer receiver;
     });
 }