GSF.Diagnostics.PublisherFilter.CreateType C# (CSharp) Method

CreateType() public static method

Creates a topic from the specified list
public static CreateType ( string name ) : PublisherFilter
name string
return PublisherFilter
        public static PublisherFilter CreateType(string name)
        {
            if (name == null)
                throw new ArgumentNullException(nameof(name));
            if (string.IsNullOrWhiteSpace(name))
                throw new ArgumentNullException(nameof(name), "Cannot be null or whitespace");
            if (name != name.Trim())
                throw new ArgumentException("Names cannot begin or end with whitespace characters: " + name, nameof(name));

            return new PublisherFilter(FilterType.Type, name);
        }

Same methods

PublisherFilter::CreateType ( Type type ) : PublisherFilter

Usage Example

Ejemplo n.º 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);
 }
All Usage Examples Of GSF.Diagnostics.PublisherFilter::CreateType