CreateType() public static method

Creates a type topic on a specified type.
public static CreateType ( Type type ) : PublisherFilter
type System.Type
return PublisherFilter
Example #1
0
 /// <summary>
 /// Subscribes to the publisher of the specified type expression with the specified verbose level.
 /// </summary>
 /// <param name="typeExpression">An expression of the name of a type. Must include a * or ? to be considered an expression.</param>
 /// <param name="level">The level</param>
 public void SubscribeToType(string typeExpression, VerboseLevel level)
 {
     if (typeExpression == null)
     {
         throw new ArgumentNullException(nameof(typeExpression));
     }
     m_subscriber.Subscribe(PublisherFilter.CreateType(typeExpression), MessageAttributeFilter.Create(level), false);
 }
Example #2
0
 /// <summary>
 /// Ignore all messages of this verbose level.
 /// </summary>
 public void IgnoreType(Type type, VerboseLevel level)
 {
     if (type == null)
     {
         throw new ArgumentNullException(nameof(type));
     }
     m_subscriber.Subscribe(PublisherFilter.CreateType(type), MessageAttributeFilter.Create(level), true);
 }