Beispiel #1
0
 internal string Serialize()
 {
     return(CSVSerializer.Serialize(Prefix,
                                    this.CallId,
                                    this.IsSuccess? 1 : 0,
                                    CSVSerializer.EscapeString(this.ExceptionMessage),
                                    CSVSerializer.EscapeString(this.FullExceptionString)));
 }
Beispiel #2
0
 public string Serialize()
 {
     return(CSVSerializer.Serialize(Prefix,
                                    CallId,
                                    Id,
                                    CSVSerializer.EscapeString(TypeName),
                                    CSVSerializer.EscapeString(AssemblyName)));
 }
Beispiel #3
0
        public static DisposeInstanceRequest Deserialize(string message)
        {
            var result  = new DisposeInstanceRequest();
            var parsers = new Queue <Action <string> >(
                new Action <string>[]
            {
                s => result.CallId     = long.Parse(s),
                s => result.InstanceId = long.Parse(s)
            });

            CSVSerializer.Deserialize(Prefix, message, parsers);

            return(result);
        }
Beispiel #4
0
        public static InitInstanceResult Deserialize(string message)
        {
            var result = new InitInstanceResult();

            var parsers = new Queue <Action <string> >(
                new Action <string>[] {
                s => result.CallId              = long.Parse(s),
                s => result.IsSuccess           = s == "1",
                s => result.ExceptionMessage    = s,
                s => result.FullExceptionString = s
            });

            CSVSerializer.Deserialize(Prefix, message, parsers);
            return(result);
        }
Beispiel #5
0
        internal static InitInstanceRequest Deserialize(string initMessage)
        {
            var result = new InitInstanceRequest();

            var parsers = new Queue <Action <string> >(
                new Action <string>[] {
                s => result.CallId       = long.Parse(s),
                s => result.Id           = long.Parse(s),
                s => result.TypeName     = s,
                s => result.AssemblyName = s
            });

            CSVSerializer.Deserialize(Prefix, initMessage, parsers);
            return(result);
        }
Beispiel #6
0
 public string Serialize()
 {
     return(CSVSerializer.Serialize(Prefix, CallId, InstanceId));
 }