예제 #1
0
 protected virtual void InvokeMethod(Action <T> action)
 {
     if (HasOpenChannel)
     {
         action(m_channel.Client);
     }
     else
     {
         ServiceClientFactory.InvokeMethod <T>(action, CreateInstance);
     }
 }
예제 #2
0
 protected virtual TResult InvokeMethod <TResult> (Func <T, TResult> action)
 {
     return(HasOpenChannel ? action(m_channel.Client) : ServiceClientFactory.InvokeMethod <T, TResult>(action, CreateInstance));
 }
예제 #3
0
 protected virtual ServiceClientWrapper <T> CreateInstance()
 {
     return(ServiceClientFactory.CreateAndWrap <T>());
 }