public static T Create <T>(ProtocolDriver driver) where T : Message, new() { return(new T { Driver = driver }); }
public static bool Send <T>(ProtocolDriver driver, Action <T> initMsg = null) where T : Message, new() { T _this = Create <T>(driver); if (initMsg != null) { initMsg(_this); } return(_this.Send()); }
public static new Response Send <T>(ProtocolDriver driver, Action <T> initMsg = null) where T : Request, new() { T _this = Create <T>(driver); if (initMsg != null) { initMsg(_this); } return(_this.Send()); }
public static ProtocolDriver Create(IMessageEventSink sink) { var _this = new ProtocolDriver(); return(_this.Initialize(sink) ? _this : null); }