File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed
Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -118,23 +118,12 @@ public Handle? MetadataHandle
118118
119119 if ( propertyInfo != null )
120120 {
121- var value = propertyInfo . GetValue ( symbol ) ;
122-
123- if ( value is MethodDefinitionHandle )
124- {
125- return ( MethodDefinitionHandle ) value ;
126- }
127- else if ( value is TypeDefinitionHandle )
128- {
129- return ( TypeDefinitionHandle ) value ;
130- }
131- else if ( value is PropertyDefinitionHandle )
132- {
133- return ( PropertyDefinitionHandle ) value ;
134- }
135- else if ( value is FieldDefinitionHandle )
121+ switch ( propertyInfo . GetValue ( symbol ) )
136122 {
137- return ( FieldDefinitionHandle ) value ;
123+ case MethodDefinitionHandle md : return md ;
124+ case TypeDefinitionHandle td : return td ;
125+ case PropertyDefinitionHandle pd : return pd ;
126+ case FieldDefinitionHandle fd : return fd ;
138127 }
139128 }
140129
You can’t perform that action at this time.
0 commit comments