1 | #Region "Microsoft.VisualBasic::385ffdef41fb6212ddac1c00320e8c91, Microsoft.VisualBasic.Core\CommandLine\Reflection\Attributes\Grouping.vb" |
2 | |
3 | ' Author: |
4 | ' |
5 | ' asuka (amethyst.asuka@gcmodeller.org) |
6 | ' xie (genetics@smrucc.org) |
7 | ' xieguigang (xie.guigang@live.com) |
8 | ' |
9 | ' Copyright (c) 2018 GPL3 Licensed |
10 | ' |
11 | ' |
12 | ' GNU GENERAL PUBLIC LICENSE (GPL3) |
13 | ' |
14 | ' |
15 | ' This program is free software: you can redistribute it and/or modify |
16 | ' it under the terms of the GNU General Public License as published by |
17 | ' the Free Software Foundation, either version 3 of the License, or |
18 | ' (at your option) any later version. |
19 | ' |
20 | ' This program is distributed in the hope that it will be useful, |
21 | ' but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | ' GNU General Public License for more details. |
24 | ' |
25 | ' You should have received a copy of the GNU General Public License |
26 | ' along with this program. If not, see <http://www.gnu.org/licenses/>. |
27 | |
28 | |
29 | |
30 | ' /********************************************************************************/ |
31 | |
32 | ' Summaries: |
33 | |
34 | ' Class GroupAttribute |
35 | ' |
36 | ' Constructor: (+2 Overloads) Sub New |
37 | ' |
38 | ' Class GroupingDefineAttribute |
39 | ' |
40 | ' Properties: Description |
41 | ' |
42 | ' Constructor: (+2 Overloads) Sub New |
43 | ' |
44 | ' |
45 | ' /********************************************************************************/ |
46 | |
47 | #End Region |
48 | |
49 | Namespace CommandLine.Reflection |
50 | |
51 | ''' <summary> |
52 | ''' 应用于方法之上的,标注当前的这个方法的功能分组 |
53 | ''' </summary> |
54 | ''' |
55 | <AttributeUsage(AttributeTargets.Method, AllowMultiple:=True, Inherited:=True)> |
56 | Public Class GroupAttribute : Inherits CLIToken |
57 | |
58 | Public Sub New(name As String) |
59 | MyBase.New(name) |
60 | End Sub |
61 | |
62 | Public Sub New(name As System.Enum) |
63 | MyBase.New(name.Description) |
64 | End Sub |
65 | End Class |
66 | |
67 | ''' <summary> |
68 | ''' 应用于命令行类型容器之上的,用于功能分组的详细描述信息 |
69 | ''' </summary> |
70 | ''' |
71 | <AttributeUsage(AttributeTargets.Class, AllowMultiple:=True, Inherited:=True)> |
72 | Public Class GroupingDefineAttribute : Inherits GroupAttribute |
73 | |
74 | ''' <summary> |
75 | ''' 当前的这一功能分组的详细描述信息 |
76 | ''' </summary> |
77 | ''' <returns></returns> |
78 | Public Property Description As String |
79 | |
80 | Public Sub New(name As String) |
81 | MyBase.New(name) |
82 | End Sub |
83 | |
84 | Public Sub New(name As System.Enum) |
85 | MyBase.New(name) |
86 | End Sub |
87 | End Class |
88 | End Namespace |