This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
/
Copy pathCmdletHelpAttribute.cs
72 lines (60 loc) · 2.57 KB
/
CmdletHelpAttribute.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
namespace PnP.PowerShell.CmdletHelpAttributes
{
/// <summary>
/// Specify the attribute on a cmdlet class in order specify out in the help files and documentation
/// </summary>
[AttributeUsage(AttributeTargets.Class,
AllowMultiple = false)]
public sealed class CmdletHelpAttribute : Attribute
{
[Obsolete("Is not used. Use DetailedDescription instead.")]
public string Details { get; set; }
/// <summary>
/// Generic description of the cmdlet
/// </summary>
public string Description { get; set; }
/// <summary>
/// If this cmdlet is only functional for a specific version of SharePoint, specify the version here.
/// </summary>
public CmdletSupportedPlatform SupportedPlatform { get; set; }
/// <summary>
/// The detailed description of the cmdlet
/// </summary>
public string DetailedDescription { get; set; }
public string Copyright { get; set; }
public string Version { get; set; }
/// <summary>
/// The type of the object it returns. If specified this information will be listed in the help
/// </summary>
public Type OutputType { get; set; }
/// <summary>
/// A description describing what will be returned
/// </summary>
public string OutputTypeDescription { get; set; }
/// <summary>
/// A link to docs.microsoft.com, MSDN etc. to provide more information about the object which is returned
/// </summary>
public string OutputTypeLink { get; set; }
/// <summary>
/// The cmdlet category. This is required parameter in order to add the parameter to the correct subcategory of cmdlets.
/// </summary>
public CmdletHelpCategory Category { get; set; }
public CmdletHelpAttribute(string description)
{
Description = description;
SupportedPlatform = CmdletSupportedPlatform.All;
}
public CmdletHelpAttribute(string description, CmdletSupportedPlatform supportedPlatform = CmdletSupportedPlatform.All)
{
Description = description;
SupportedPlatform = supportedPlatform;
}
public CmdletHelpAttribute(string description, string detailedDescription, CmdletSupportedPlatform supportedPlatform = CmdletSupportedPlatform.All)
{
Description = description;
DetailedDescription = detailedDescription;
SupportedPlatform = supportedPlatform;
}
}
}