IOptionHandler.cs 2.1 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. namespace log4net.Core
  21. {
  22. /// <summary>
  23. /// Interface used to delay activate a configured object.
  24. /// </summary>
  25. /// <remarks>
  26. /// <para>
  27. /// This allows an object to defer activation of its options until all
  28. /// options have been set. This is required for components which have
  29. /// related options that remain ambiguous until all are set.
  30. /// </para>
  31. /// <para>
  32. /// If a component implements this interface then the <see cref="ActivateOptions"/> method
  33. /// must be called by the container after its all the configured properties have been set
  34. /// and before the component can be used.
  35. /// </para>
  36. /// </remarks>
  37. /// <author>Nicko Cadell</author>
  38. public interface IOptionHandler
  39. {
  40. /// <summary>
  41. /// Activate the options that were previously set with calls to properties.
  42. /// </summary>
  43. /// <remarks>
  44. /// <para>
  45. /// This allows an object to defer activation of its options until all
  46. /// options have been set. This is required for components which have
  47. /// related options that remain ambiguous until all are set.
  48. /// </para>
  49. /// <para>
  50. /// If a component implements this interface then this method must be called
  51. /// after its properties have been set before the component can be used.
  52. /// </para>
  53. /// </remarks>
  54. void ActivateOptions();
  55. }
  56. }