You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Arguments/argument-types.md
+9-15Lines changed: 9 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,8 +83,7 @@ public class EnumTypeDescriptor :
83
83
IArgumentTypeDescriptor,
84
84
IAllowedValuesTypeDescriptor
85
85
{
86
-
publicboolCanSupport(Typetype) =>
87
-
type.IsEnum;
86
+
publicboolCanSupport(Typetype) =>type.IsEnum;
88
87
89
88
publicstringGetDisplayName(IArgumentargument) =>
90
89
argument.TypeInfo.UnderlyingType.Name;
@@ -96,7 +95,7 @@ public class EnumTypeDescriptor :
96
95
Enum.GetNames(argument.TypeInfo.UnderlyingType);
97
96
}
98
97
```
99
-
<sup><ahref='https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/EnumTypeDescriptor.cs#L6-L23'title='Snippet source file'>snippet source</a> | <ahref='#snippet-type_descriptors_enum'title='Start of snippet'>anchor</a></sup>
98
+
<sup><ahref='https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/EnumTypeDescriptor.cs#L8-L24'title='Snippet source file'>snippet source</a> | <ahref='#snippet-type_descriptors_enum'title='Start of snippet'>anchor</a></sup>
100
99
<!-- endSnippet -->
101
100
102
101
Use [DelegatedTypeDescriptor](https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/DelegatedTypeDescriptor.cs) just to override the display text or factory method for the type.
@@ -106,7 +105,7 @@ Use [DelegatedTypeDescriptor](https://github.com/bilal-fazlani/commanddotnet/blo
<sup><ahref='https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/ArgumentTypeDescriptors.cs#L21-L23'title='Snippet source file'>snippet source</a> | <ahref='#snippet-type_descriptors_string'title='Start of snippet'>anchor</a></sup>
108
+
<sup><ahref='https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/ArgumentTypeDescriptors.cs#L23-L25'title='Snippet source file'>snippet source</a> | <ahref='#snippet-type_descriptors_string'title='Start of snippet'>anchor</a></sup>
110
109
<!-- endSnippet -->
111
110
112
111
See [StringCtorTypeDescriptor](https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/StringCtorTypeDescriptor.cs) and [ComponentModelTypeDescriptor](https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/ComponentModelTypeDescriptor.cs) for examples to create your own.
@@ -116,24 +115,19 @@ See [StringCtorTypeDescriptor](https://github.com/bilal-fazlani/commanddotnet/bl
<sup><ahref='https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/ComponentModelTypeDescriptor.cs#L6-L27'title='Snippet source file'>snippetsource</a>|<ahref='#snippet-type_descriptors_type_convertor'title='Start of snippet'>anchor</a></sup>
132
+
<sup><ahref='https://github.com/bilal-fazlani/commanddotnet/blob/master/CommandDotNet/TypeDescriptors/ComponentModelTypeDescriptor.cs#L8-L24'title='Snippet source file'>snippetsource</a>|<ahref='#snippet-type_descriptors_type_convertor'title='Start of snippet'>anchor</a></sup>
0 commit comments