Esempio n. 1
0
        public static Schema.KRPC.Procedure ToProtobufMessage(this Procedure procedure)
        {
            var result = new Schema.KRPC.Procedure();

            result.Name = procedure.Name;
            result.Parameters.Add(procedure.Parameters.Select(ToProtobufMessage));
            result.HasReturnType = procedure.HasReturnType;
            result.ReturnType    = procedure.ReturnType;
            result.Attributes.Add(procedure.Attributes);
            result.Documentation = procedure.Documentation;
            return(result);
        }
Esempio n. 2
0
        public static Schema.KRPC.Procedure ToProtobufMessage(this Procedure procedure)
        {
            var result = new Schema.KRPC.Procedure();

            result.Name = procedure.Name;
            result.Parameters.Add(procedure.Parameters.Select(ToProtobufMessage));
            if (procedure.ReturnType != null)
            {
                result.ReturnType = procedure.ReturnType.ToProtobufMessage();
            }
            result.ReturnIsNullable = procedure.ReturnIsNullable;
            result.Documentation    = procedure.Documentation;
            return(result);
        }
Esempio n. 3
0
 public static Schema.KRPC.Procedure ToProtobufMessage (this Procedure procedure)
 {
     var result = new Schema.KRPC.Procedure ();
     result.Name = procedure.Name;
     result.Parameters.Add (procedure.Parameters.Select (ToProtobufMessage));
     result.HasReturnType = procedure.HasReturnType;
     result.ReturnType = procedure.ReturnType;
     result.Attributes.Add (procedure.Attributes);
     result.Documentation = procedure.Documentation;
     return result;
 }