예제 #1
0
        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);
        }
예제 #2
0
        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);
        }