IFixingRequired.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 for objects that require fixing.
  24. /// </summary>
  25. /// <remarks>
  26. /// <para>
  27. /// Interface that indicates that the object requires fixing before it
  28. /// can be taken outside the context of the appender's
  29. /// <see cref="log4net.Appender.IAppender.DoAppend"/> method.
  30. /// </para>
  31. /// <para>
  32. /// When objects that implement this interface are stored
  33. /// in the context properties maps <see cref="log4net.GlobalContext"/>
  34. /// <see cref="log4net.GlobalContext.Properties"/> and <see cref="log4net.ThreadContext"/>
  35. /// <see cref="log4net.ThreadContext.Properties"/> are fixed
  36. /// (see <see cref="LoggingEvent.Fix"/>) the <see cref="GetFixedObject"/>
  37. /// method will be called.
  38. /// </para>
  39. /// </remarks>
  40. /// <author>Nicko Cadell</author>
  41. public interface IFixingRequired
  42. {
  43. /// <summary>
  44. /// Get a portable version of this object
  45. /// </summary>
  46. /// <returns>the portable instance of this object</returns>
  47. /// <remarks>
  48. /// <para>
  49. /// Get a portable instance object that represents the current
  50. /// state of this object. The portable object can be stored
  51. /// and logged from any thread with identical results.
  52. /// </para>
  53. /// </remarks>
  54. object GetFixedObject();
  55. }
  56. }