Example #1
0
 /// <summary>
 /// Creates node with specified configuraiton data.
 /// </summary>
 /// <param name="data">The specified configuration data.</param>
 public DestinationNode(DestinationData data)
     : base()
 {
     this.destinationData = data;
     this.onFormatterNodeRemoved = new ConfigurationNodeChangedEventHandler(OnFormatterNodeRemoved);
     this.onFormatterNodeRenamed = new ConfigurationNodeChangedEventHandler(OnFormatterNodeRenamed);
     this.onSinkNodeRemoved = new ConfigurationNodeChangedEventHandler(OnSinkNodeRemoved);
     this.onSinkNodeRenamed = new ConfigurationNodeChangedEventHandler(OnSinkNodeRenamed);
 }
Example #2
0
 /// <summary>
 /// <para>Adds an <see cref="DestinationData"/> into the collection.</para>
 /// </summary>
 /// <param name="destinationData">
 /// <para>The <see cref="DestinationData"/> to add. The value can not be a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </param>
 /// <remarks>
 /// <para>If a reference already exists in the collection by <seealso cref="DestinationData.Name"/>, it will be replaced with the new reference.</para>
 /// </remarks>
 /// <exception cref="ArgumentNullException">
 /// <para><paramref name="destinationData"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 /// <exception cref="InvalidOperationException">
 /// <para><seealso cref="DestinationData.Name"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 public void Add(DestinationData destinationData)
 {
     if (destinationData == null)
     {
         throw new ArgumentNullException("configurationSection");
     }
     if (destinationData.Name == null)
     {
         throw new InvalidOperationException(SR.ExceptionDestinationDataName);
     }
     BaseAdd(destinationData.Name, destinationData);
 }
 /// <summary>
 /// <para>Adds an <see cref="DestinationData"/> into the collection.</para>
 /// </summary>
 /// <param name="destinationData">
 /// <para>The <see cref="DestinationData"/> to add. The value can not be a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </param>
 /// <remarks>
 /// <para>If a reference already exists in the collection by <seealso cref="DestinationData.Name"/>, it will be replaced with the new reference.</para>
 /// </remarks>
 /// <exception cref="ArgumentNullException">
 /// <para><paramref name="destinationData"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 /// <exception cref="InvalidOperationException">
 /// <para><seealso cref="DestinationData.Name"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 public void Add(DestinationData destinationData)
 {
     if (destinationData == null)
     {
         throw new ArgumentNullException("configurationSection");
     }
     if (destinationData.Name == null)
     {
         throw new InvalidOperationException(SR.ExceptionDestinationDataName);
     }
     BaseAdd(destinationData.Name, destinationData);
 }
 private CategoryNode CreateDefaultNode(string categoryName, string destinationName, string sinkNodeReference)
 {
     CategoryData data = new CategoryData(categoryName);
     DestinationData destination = new DestinationData(destinationName, sinkNodeReference, SR.DefaultFormatter);
     data.DestinationDataCollection.Add(destination);
     return new CategoryNode(data);
 }