ObtainChannel() private method

Obtains an actual channel based on the activity IActivityMonitor.Topic (null when . This is called on the monitor's thread.
private ObtainChannel ( string topic ) : IChannel
topic string The topic. Used as the key to find an actual Channel that must handle the log events.
return IChannel
Example #1
0
 IChannel EnsureChannel(bool callOnClientMinimalFilterChanged = true)
 {
     if (_version != _curVersion)
     {
         _channel = null;
         do
         {
             _curVersion = _version;
             if (_channel != null)
             {
                 _channel.CancelPreHandleLock();
             }
             // The Topic can be changed only in the
             // activity (and we are here inside the activity),
             // we can safely call the property when needed.
             // When ObtainChannel returns null, it means that the GrandOutput has been disposed.
             _channel = _central.ObtainChannel(_monitorSource.Topic);
             if (_channel == null)
             {
                 CheckFilter(callOnClientMinimalFilterChanged, LogFilter.Undefined);
                 return(null);
             }
         }while(_version != _curVersion);
         CheckFilter(callOnClientMinimalFilterChanged, _channel.MinimalFilter);
     }
     else
     {
         _channel.PreHandleLock();
     }
     return(_channel);
 }