AliasDomainAttribute.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. // .NET Compact Framework 1.0 has no support for reading assembly attributes
  20. #if !NETCF
  21. using System;
  22. namespace log4net.Config
  23. {
  24. /// <summary>
  25. /// Assembly level attribute that specifies a domain to alias to this assembly's repository.
  26. /// </summary>
  27. /// <remarks>
  28. /// <para>
  29. /// <b>AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute.</b>
  30. /// </para>
  31. /// <para>
  32. /// An assembly's logger repository is defined by its <see cref="DomainAttribute"/>,
  33. /// however this can be overridden by an assembly loaded before the target assembly.
  34. /// </para>
  35. /// <para>
  36. /// An assembly can alias another assembly's domain to its repository by
  37. /// specifying this attribute with the name of the target domain.
  38. /// </para>
  39. /// <para>
  40. /// This attribute can only be specified on the assembly and may be used
  41. /// as many times as necessary to alias all the required domains.
  42. /// </para>
  43. /// </remarks>
  44. /// <author>Nicko Cadell</author>
  45. /// <author>Gert Driesen</author>
  46. [AttributeUsage(AttributeTargets.Assembly,AllowMultiple=true)]
  47. [Serializable]
  48. [Obsolete("Use AliasRepositoryAttribute instead of AliasDomainAttribute")]
  49. public sealed class AliasDomainAttribute : AliasRepositoryAttribute
  50. {
  51. #region Public Instance Constructors
  52. /// <summary>
  53. /// Initializes a new instance of the <see cref="AliasDomainAttribute" /> class with
  54. /// the specified domain to alias to this assembly's repository.
  55. /// </summary>
  56. /// <param name="name">The domain to alias to this assemby's repository.</param>
  57. /// <remarks>
  58. /// <para>
  59. /// Obsolete. Use <see cref="AliasRepositoryAttribute"/> instead of <see cref="AliasDomainAttribute"/>.
  60. /// </para>
  61. /// </remarks>
  62. public AliasDomainAttribute(string name) : base(name)
  63. {
  64. }
  65. #endregion Public Instance Constructors
  66. }
  67. }
  68. #endif // !NETCF