您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ModelNameAttribute.cs 568B

123456789101112131415161718
  1. using System;
  2. namespace CacheControl_test.Areas.HelpPage.ModelDescriptions
  3. {
  4. /// <summary>
  5. /// Use this attribute to change the name of the <see cref="ModelDescription"/> generated for a type.
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)]
  8. public sealed class ModelNameAttribute : Attribute
  9. {
  10. public ModelNameAttribute(string name)
  11. {
  12. Name = name;
  13. }
  14. public string Name { get; private set; }
  15. }
  16. }