Exemple #1
0
 public ProcessBridgeClient(IBaseClient simpleClient, string remoteLoggerName, LogSeverity minSeverity, LogSeverity maxSeverity, string contextFilter, bool initialStatus, bool debugEnabled)
     : base(minSeverity, maxSeverity, contextFilter, initialStatus, debugEnabled)
 {
     this.simpleClient = simpleClient;
     try
     {
         if (simpleClient.Operational)
         {
             loggerObject = simpleClient.CreateProxy <ILogBridge>(remoteLoggerName);
             active       = true;
         }
     }
     catch (Exception ex)
     {
         LogEnvironment.LogEvent($"Failed to initialize remote-logger ({remoteLoggerName}@{simpleClient.UniqueName}): {ex.Message}", LogSeverity.Error);
     }
 }
 /// <summary>
 /// Initializes a new instance of the ProcessBridgeClient class
 /// </summary>
 /// <param name="consumer">the proxy-consumer that provides access to the monitored service</param>
 /// <param name="serviceName">the name of the bridge service object</param>
 public ProcessBridgeClient(IBidirectionalClient consumer, string serviceName)
 {
     bridge             = consumer.CreateProxy <ILogBridge>(serviceName);
     bridge.LogMessage += LogMessage;
 }