/// <summary>Creates an <see cref="OutgoingResponseFrame"/> for operation ice_ids.</summary> /// <param name="current">Holds decoded header data and other information about the current request.</param> /// <param name="returnValue">The return value to write into the new frame.</param> /// <returns>A new <see cref="OutgoingResponseFrame"/>.</returns> public static OutgoingResponseFrame IceIds(Current current, IEnumerable <string> returnValue) => OutgoingResponseFrame.WithReturnValue( current, compress: false, format: default, returnValue, (ostr, returnValue) => ostr.WriteSequence(returnValue, OutputStream.IceWriterFromString));
/// <summary>Creates an <see cref="OutgoingResponseFrame"/> for operation ice_isA.</summary> /// <param name="current">Holds decoded header data and other information about the current request.</param> /// <param name="returnValue">The return value to write into the new frame.</param> /// <returns>A new <see cref="OutgoingResponseFrame"/>.</returns> public static OutgoingResponseFrame IceIsA(Current current, bool returnValue) => OutgoingResponseFrame.WithReturnValue( current, compress: false, format: default, returnValue, OutputStream.IceWriterFromBool);
public ValueTask <OutgoingResponseFrame> DispatchAsync(IncomingRequestFrame request, Current current) { var ae = new AlsoEmpty(); var responseFrame = OutgoingResponseFrame.WithReturnValue(current, compress: false, format: default,
public ValueTask <OutgoingResponseFrame> DispatchAsync(IncomingRequestFrame request, Current current) { var ae = new Test.AlsoEmpty(); var responseFrame = OutgoingResponseFrame.WithReturnValue(current, format: null, ae, (OutputStream ostr, Test.AlsoEmpty ae) => ostr.WriteClass(ae)); return(new ValueTask <OutgoingResponseFrame>(responseFrame)); }
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,
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); });
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); });