Beispiel #1
0
 public ValueTask <OutgoingResponseFrame> DispatchAsync(IncomingRequestFrame request, Current current)
 {
     if (current.Operation.Equals("opOneway"))
     {
         if (!current.IsOneway)
         {
             // If called two-way, return exception to caller.
             throw new MyException();
         }
         return(new ValueTask <OutgoingResponseFrame>(OutgoingResponseFrame.WithVoidReturnValue(current)));
     }
     else if (current.Operation.Equals("opString"))
     {
         string s             = request.ReadArgs(current.Communicator, InputStream.IceReaderIntoString);
         var    responseFrame = OutgoingResponseFrame.WithReturnValue(current,
                                                                      compress: false,
                                                                      format: default,
Beispiel #2
0
 public async ValueTask <OutgoingResponseFrame> DispatchAsync(Ice.InputStream istr, Current current)
 {
     if (current.Operation.Equals("opOneway"))
     {
         if (!current.IsOneway)
         {
             // If called two-way, return exception to caller.
             throw new Test.MyException();
         }
         return(OutgoingResponseFrame.WithVoidReturnValue(current));
     }
     else if (current.Operation.Equals("opString"))
     {
         string s             = istr.ReadString();
         var    responseFrame = OutgoingResponseFrame.WithReturnValue(current, format: null,
                                                                      (s, s), (OutputStream ostr, (string ReturnValue, string s2)value) =>
         {
             ostr.WriteString(value.ReturnValue);
             ostr.WriteString(value.s2);
         });
Beispiel #3
0
 public ValueTask <OutgoingResponseFrame> DispatchAsync(IncomingRequestFrame request, Current current)
 {
     if (current.Operation.Equals("opOneway"))
     {
         if (!current.IsOneway)
         {
             // If called two-way, return exception to caller.
             throw new MyException();
         }
         return(new ValueTask <OutgoingResponseFrame>(OutgoingResponseFrame.WithVoidReturnValue(current)));
     }
     else if (current.Operation.Equals("opString"))
     {
         string s             = request.ReadParamList(current.Communicator, InputStream.IceReaderIntoString);
         var    responseFrame = OutgoingResponseFrame.WithReturnValue(current, format: null, (s, s),
                                                                      (OutputStream ostr, (string ReturnValue, string s2)value) =>
         {
             ostr.WriteString(value.ReturnValue);
             ostr.WriteString(value.s2);
         });