Пример #1
0
 public void GenerateCSharpSignature(DataTypes types, LrpStream stream)
 {
     if (this.Direction == ParameterDirection.InOut)
     {
         stream.Write("ref ");
     }
     else if (this.Direction == ParameterDirection.Out)
     {
         stream.Write("out ");
     }
     stream.Write("{0} {1}", types.ToCSharpFullName(this.Type), this.Name);
 }
Пример #2
0
 public void GenerateCSharpSignatureReader(LrpStream stream, DataTypes types)
 {
     var typeFullname = types.ToCSharpFullName(this.Type);
     stream.Write("{0} {1}", typeFullname, this.Name);
 }
Пример #3
0
 public void GenerateCSharpServerRequest(DataTypes types, LrpStream stream)
 {
     var type = this.Type;
     stream.BeginLine();
     stream.Write("var arg{0} = ", this.Id);
     if (this.Direction == ParameterDirection.In || this.Direction == ParameterDirection.InOut)
     {
         stream.Write("buffer.Read{0}();", this.Type.Suffix);
     }
     else if (this.Direction == ParameterDirection.Out)
     {
         if (type == EmbeddedDataTypes.LocalPointer)
         {
             stream.Write("Lptr.Zero;");
         }
         else if (type == EmbeddedDataTypes.RemotePointer)
         {
             stream.Write("Rptr.Zero;");
         }
         else
         {
             stream.Write("default({0});", types.ToCSharpFullName(this.Type));
         }
     }
     stream.EndLine();
 }