コード例 #1
0
 /// <summary>
 /// Initialize a new instance of the <see cref="DistributorSettings"/> using the given default category and formatter.
 /// </summary>
 /// <param name="defaultCategory">The name of the default category to use.</param>
 /// <param name="defaultFormatter">The name of the default formatter to use.</param>
 public DistributorSettings(string defaultCategory, string defaultFormatter)
 {
     this.defaultCategory = defaultCategory;
     this.defaultFormatter = defaultFormatter;
     this.sinkDataCollection = new SinkDataCollection();
     this.categoryDataCollection = new CategoryDataCollection();
     this.formatters = new FormatterDataCollection();
     this.distributorServiceData = new MsmqDistributorServiceData();
 }
コード例 #2
0
 /// <summary>
 /// Initialize a new instance of the <see cref="DistributorSettings"/> using the given default category and formatter.
 /// </summary>
 /// <param name="defaultCategory">The name of the default category to use.</param>
 /// <param name="defaultFormatter">The name of the default formatter to use.</param>
 public DistributorSettings(string defaultCategory, string defaultFormatter)
 {
     this.defaultCategory        = defaultCategory;
     this.defaultFormatter       = defaultFormatter;
     this.sinkDataCollection     = new SinkDataCollection();
     this.categoryDataCollection = new CategoryDataCollection();
     this.formatters             = new FormatterDataCollection();
     this.distributorServiceData = new MsmqDistributorServiceData();
 }
        public void CategoriesDataTest()
        {
            CategoryDataCollection data = new CategoryDataCollection();
            CategoryData categoryData = new CategoryData();
            categoryData.Name = "Test";

            data.Add(categoryData);
            CategoryCollectionNode node = new CategoryCollectionNode(data);
            GeneratedApplicationNode.Nodes.Add(node);
            CategoryDataCollection nodeData = node.CategoryDataCollection;

            Assert.AreEqual(1, nodeData.Count);
            Assert.AreEqual(categoryData.Name, nodeData[categoryData.Name].Name);
        }
コード例 #4
0
 /// <summary>
 /// Creates node with specified configuration data.
 /// </summary>
 /// <param name="categoryDataCollection">The specified configuration data.</param>
 public CategoryCollectionNode(CategoryDataCollection categoryDataCollection)
     : base()
 {
     this.categoryDataCollection = categoryDataCollection;
 }