ProvisionNode.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #region Apache License
  2. //
  3. // Licensed to the Apache Software Foundation (ASF) under one or more
  4. // contributor license agreements. See the NOTICE file distributed with
  5. // this work for additional information regarding copyright ownership.
  6. // The ASF licenses this file to you under the Apache License, Version 2.0
  7. // (the "License"); you may not use this file except in compliance with
  8. // the License. You may obtain a copy of the License at
  9. //
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. //
  12. // Unless required by applicable law or agreed to in writing, software
  13. // distributed under the License is distributed on an "AS IS" BASIS,
  14. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. // See the License for the specific language governing permissions and
  16. // limitations under the License.
  17. //
  18. #endregion
  19. using System;
  20. using System.Collections;
  21. namespace log4net.Repository.Hierarchy
  22. {
  23. /// <summary>
  24. /// Provision nodes are used where no logger instance has been specified
  25. /// </summary>
  26. /// <remarks>
  27. /// <para>
  28. /// <see cref="ProvisionNode"/> instances are used in the
  29. /// <see cref="Hierarchy" /> when there is no specified
  30. /// <see cref="Logger" /> for that node.
  31. /// </para>
  32. /// <para>
  33. /// A provision node holds a list of child loggers on behalf of
  34. /// a logger that does not exist.
  35. /// </para>
  36. /// </remarks>
  37. /// <author>Nicko Cadell</author>
  38. /// <author>Gert Driesen</author>
  39. internal sealed class ProvisionNode : ArrayList
  40. {
  41. /// <summary>
  42. /// Create a new provision node with child node
  43. /// </summary>
  44. /// <param name="log">A child logger to add to this node.</param>
  45. /// <remarks>
  46. /// <para>
  47. /// Initializes a new instance of the <see cref="ProvisionNode" /> class
  48. /// with the specified child logger.
  49. /// </para>
  50. /// </remarks>
  51. internal ProvisionNode(Logger log) : base()
  52. {
  53. this.Add(log);
  54. }
  55. }
  56. }