@@ -21,19 +21,19 @@ public static class Entities
21
21
public static ( EntityMetadata Metadata , string Scope ) ToEntityMetadata ( Type entityType )
22
22
=> ( entityType . GetCustomAttribute < KubernetesEntityAttribute > ( ) ,
23
23
entityType . GetCustomAttribute < EntityScopeAttribute > ( ) ) switch
24
- {
25
- ( null , _ ) => throw new ArgumentException ( "The given type is not a valid Kubernetes entity." ) ,
26
- ( { } attr , var scope ) => ( new (
27
- Defaulted ( attr . Kind , entityType . Name ) ,
28
- Defaulted ( attr . ApiVersion , "v1" ) ,
29
- attr . Group ,
30
- attr . PluralName ) ,
31
- scope switch
32
- {
33
- null => Enum . GetName ( typeof ( EntityScope ) , EntityScope . Namespaced ) ?? "namespaced" ,
34
- _ => Enum . GetName ( typeof ( EntityScope ) , scope . Scope ) ?? "namespaced" ,
35
- } ) ,
36
- } ;
24
+ {
25
+ ( null , _ ) => throw new ArgumentException ( "The given type is not a valid Kubernetes entity." ) ,
26
+ ( { } attr , var scope ) => ( new (
27
+ Defaulted ( attr . Kind , entityType . Name ) ,
28
+ Defaulted ( attr . ApiVersion , "v1" ) ,
29
+ attr . Group ,
30
+ attr . PluralName ) ,
31
+ scope switch
32
+ {
33
+ null => Enum . GetName ( typeof ( EntityScope ) , EntityScope . Namespaced ) ?? "namespaced" ,
34
+ _ => Enum . GetName ( typeof ( EntityScope ) , scope . Scope ) ?? "namespaced" ,
35
+ } ) ,
36
+ } ;
37
37
38
38
private static string Defaulted ( string value , string defaultValue ) =>
39
39
string . IsNullOrWhiteSpace ( value ) ? defaultValue : value ;
0 commit comments