private bool CreateChannel()
        {
            LogLog.Debug(typeDescriptor, "Creating WCF Channel");
            bool ret = false;

            try
            {
                EndpointAddress             address = new EndpointAddress(this.URL);
                Binding                     binding = ChooseBinding();
                ChannelFactory <IWCFLogger> factory = new ChannelFactory <IWCFLogger>(binding, address);
                _LoggingService = factory.CreateChannel();
                ret             = true;
                LogLog.Debug(typeDescriptor, "WCF Channel Created Successfully");
            }
            catch (Exception ex)
            {
                LogLog.Error(typeDescriptor, "Error creating WCF Channel", ex);
            }
            return(ret);
        }
示例#2
0
 private bool CreateChannel()
 {
     LogLog.Debug(typeDescriptor, "Creating WCF Channel");
     bool ret = false;
     try
     {
         EndpointAddress address = new EndpointAddress(this.URL);
         Binding binding = ChooseBinding();
         ChannelFactory<IWCFLogger> factory = new ChannelFactory<IWCFLogger>(binding, address);
         _LoggingService = factory.CreateChannel();
         ret = true;
         LogLog.Debug(typeDescriptor, "WCF Channel Created Successfully");
     }
     catch (Exception ex)
     {
         LogLog.Error(typeDescriptor, "Error creating WCF Channel", ex);
     }
     return ret;
 }