public static IHost AddEndpoint(this IHost me, Action <IEndpoint> action) { var end = new _Endpoint(); action(end); (me as _Host).ServiceHost.AddServiceEndpoint(end.ServiceEndpoint); return(me); }
public static IProxy <TContract> AddEndpoint <TContract>(this IProxy <TContract> me, Action <IEndpoint> action) { var end = new _Endpoint(); action(end); var pro = (me as _Proxy <TContract>); pro.SetEndpoint(end.ServiceEndpoint); return(me); }