public OperationFormatter(OperationDescription od, bool isRpc, bool isEncoded) { Validate(od, isRpc, isEncoded); impl = BaseMessagesFormatter.Create(od); operation_name = od.Name; }
public OperationFormatter (OperationDescription od, bool isRpc, bool isEncoded) { Validate (od, isRpc, isEncoded); impl = BaseMessagesFormatter.Create (od); operation_name = od.Name; }
internal IDispatchMessageFormatter GetFormatter() { if (actual_formatter == null) { if (Formatter != null) { actual_formatter = Formatter; } else { actual_formatter = BaseMessagesFormatter.Create(Description); } } return(actual_formatter); }
void PopulateDispatchOperation(DispatchRuntime db, OperationDescription od) { string reqA = null, resA = null; foreach (MessageDescription m in od.Messages) { if (m.Direction == MessageDirection.Input) { reqA = m.Action; } else { resA = m.Action; } } DispatchOperation o = od.IsOneWay ? new DispatchOperation(db, od.Name, reqA) : new DispatchOperation(db, od.Name, reqA, resA); bool no_serialized_reply = od.IsOneWay; foreach (MessageDescription md in od.Messages) { if (md.Direction == MessageDirection.Input && md.Body.Parts.Count == 1 && md.Body.Parts [0].Type == typeof(Message)) { o.DeserializeRequest = false; } if (md.Direction == MessageDirection.Output && md.Body.ReturnValue != null) { if (md.Body.ReturnValue.Type == typeof(Message)) { o.SerializeReply = false; } else if (md.Body.ReturnValue.Type == typeof(void)) { no_serialized_reply = true; } } } // Setup Invoker o.Invoker = new DefaultOperationInvoker(od); // Setup Formater o.Formatter = BaseMessagesFormatter.Create(od); if (o.Action == "*" && (o.IsOneWay || o.ReplyAction == "*")) { //Signature : Message (Message) // : void (Message) //FIXME: void (IChannel) if (!o.DeserializeRequest && (!o.SerializeReply || no_serialized_reply)) // what is this double-ish check for? { db.UnhandledDispatchOperation = o; } } db.Operations.Add(o); }