Beispiel #1
0
 private void Serialize(IByteWriterBase writer, IList <IDebugItem> items)
 {
     writer.Write(items.Count);
     // ReSharper disable ForCanBeConvertedToForeach
     for (var i = 0; i < items.Count; i++)
     {
         writer.Write(items[i].FetchResultsList().Count);
         for (var j = 0; j < items[i].FetchResultsList().Count; j++)
         {
             var itemResult = items[i].FetchResultsList()[j];
             writer.Write((int)itemResult.Type);
             writer.Write(itemResult.Label);
             writer.Write(itemResult.Variable);
             writer.Write(itemResult.Value);
             writer.Write(itemResult.GroupName);
             writer.Write(itemResult.GroupIndex);
             writer.Write(itemResult.MoreLink);
         }
     }
     // ReSharper restore ForCanBeConvertedToForeach
 }
        public override void Write(IByteWriterBase writer)
        {
            IDataListTranslator translator = new DataListTranslatorFactory().FetchTranslator(DataListFormat.CreateFormat(GlobalConstants._BINARY));

            writer.Write(DatalistID);

            byte[] datalistData = null;
            if(Datalist != null)
            {
                ErrorResultTO tmpErrors;
                DataListTranslatedPayloadTO dataListTranslatedPayloadTO = translator.ConvertFrom(Datalist, out tmpErrors);
                datalistData = dataListTranslatedPayloadTO.FetchAsByteArray();
            }

            __IByteWriterBaseExtensions.Write(writer, datalistData);
            __IByteWriterBaseExtensions.Write(writer, Errors.ToByteArray());
        }
        public override void Write(IByteWriterBase writer)
        {
            IDataListTranslator translator = new DataListTranslatorFactory().FetchTranslator(DataListFormat.CreateFormat(GlobalConstants._BINARY));

            writer.Write(DatalistID);

            byte[] datalistData = null;
            if (Datalist != null)
            {
                ErrorResultTO tmpErrors;
                DataListTranslatedPayloadTO dataListTranslatedPayloadTO = translator.ConvertFrom(Datalist, out tmpErrors);
                datalistData = dataListTranslatedPayloadTO.FetchAsByteArray();
            }

            __IByteWriterBaseExtensions.Write(writer, datalistData);
            __IByteWriterBaseExtensions.Write(writer, Errors.ToByteArray());
        }
 public override void Write(IByteWriterBase writer)
 {
     writer.Write(DatalistID);
     __IByteWriterBaseExtensions.Write(writer, Errors.ToByteArray());
 }
 public void Write(IByteWriterBase writer)
 {
     writer.Write(CallbackID);
     writer.Write((int) MessageType);
 }
        private void Serialize(IByteWriterBase writer, IList<IDebugItem> items)
        {

            writer.Write(items.Count);
            // ReSharper disable ForCanBeConvertedToForeach
            for(var i = 0; i < items.Count; i++)
            {
                writer.Write(items[i].FetchResultsList().Count);
                for(var j = 0; j < items[i].FetchResultsList().Count; j++)
                {
                    var itemResult = items[i].FetchResultsList()[j];
                    writer.Write((int)itemResult.Type);
                    writer.Write(itemResult.Label);
                    writer.Write(itemResult.Variable);
                    writer.Write(itemResult.Value);
                    writer.Write(itemResult.GroupName);
                    writer.Write(itemResult.GroupIndex);
                    writer.Write(itemResult.MoreLink);
                }
            }
            // ReSharper restore ForCanBeConvertedToForeach
        }
        public void Write(IByteWriterBase writer)
        {
            writer.Write(WorkspaceID);
            writer.Write(ID);
            writer.Write(ParentID);
            writer.Write((int)StateType);
            writer.Write(DisplayName);
            writer.Write(Name);
            writer.Write((int)ActivityType);
            writer.Write(Version);
            writer.Write(IsSimulation);
            writer.Write(HasError);
            writer.Write(ErrorMessage);
            writer.Write(Server);
            writer.Write(ServerID);
            writer.Write(OriginatingResourceID);
            writer.Write(OriginalInstanceID);
            writer.Write(StartTime);
            writer.Write(EndTime);
            writer.Write(NumberOfSteps);
            writer.Write((int)ExecutionOrigin);
            writer.Write(ExecutionOriginDescription);
            writer.Write(ExecutingUser);
            writer.Write(EnvironmentID);
            writer.Write(SessionID);

            Serialize(writer, Inputs);
            Serialize(writer, Outputs);
        }
 public override void Write(IByteWriterBase writer)
 {
     writer.Write(ID);
     writer.Write(OnlyIfNotPersisted);
 }
Beispiel #9
0
        public void Write(IByteWriterBase writer)
        {
            writer.Write(WorkspaceID);
            writer.Write(ID);
            writer.Write(ParentID);
            writer.Write((int)StateType);
            writer.Write(DisplayName);
            writer.Write(Name);
            writer.Write((int)ActivityType);
            writer.Write(Version);
            writer.Write(IsSimulation);
            writer.Write(HasError);
            writer.Write(ErrorMessage);
            writer.Write(Server);
            writer.Write(ServerID);
            writer.Write(OriginatingResourceID);
            writer.Write(OriginalInstanceID);
            writer.Write(StartTime);
            writer.Write(EndTime);
            writer.Write(NumberOfSteps);
            writer.Write((int)ExecutionOrigin);
            writer.Write(ExecutionOriginDescription);
            writer.Write(ExecutingUser);
            writer.Write(EnvironmentID);
            writer.Write(SessionID);

            Serialize(writer, Inputs);
            Serialize(writer, Outputs);
        }
 public override void Write(IByteWriterBase writer)
 {
     writer.Write(ID);
     writer.Write(OnlyIfNotPersisted);
 }
 public override void Write(IByteWriterBase writer)
 {
     writer.Write(Result);
     __IByteWriterBaseExtensions.Write(writer, Errors.ToByteArray());
 }
 public void Write(IByteWriterBase writer)
 {
     writer.Write(CallbackID);
     writer.Write((int)MessageType);
 }
 public override void Write(IByteWriterBase writer)
 {
     writer.Write(Result);
 }
 public override void Write(IByteWriterBase writer)
 {
     writer.Write(Result);
 }