File tree Expand file tree Collapse file tree
GameFrameX.Foundation.Options Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,65 +175,65 @@ private static string GetFriendlyTypeName(Type type)
175175 {
176176 if ( type == typeof ( string ) )
177177 {
178- return "字符串" ;
178+ return nameof ( String ) ;
179179 }
180180
181181 if ( type == typeof ( byte ) )
182182 {
183- return "字节" ;
183+ return nameof ( Byte ) ;
184184 }
185185
186186 if ( type == typeof ( short ) || type == typeof ( ushort ) )
187187 {
188- return "短整数" ;
188+ return nameof ( Int16 ) ;
189189 }
190190
191191 if ( type == typeof ( int ) || type == typeof ( uint ) )
192192 {
193- return "整数" ;
193+ return nameof ( Int32 ) ;
194194 }
195195
196196 if ( type == typeof ( bool ) )
197197 {
198- return "布尔值" ;
198+ return nameof ( Boolean ) ;
199199 }
200200
201201 if ( type == typeof ( double ) )
202202 {
203- return "浮点数" ;
203+ return nameof ( Double ) ;
204204 }
205205
206206 if ( type == typeof ( float ) )
207207 {
208- return "单精度浮点数" ;
208+ return nameof ( Single ) ;
209209 }
210210
211211 if ( type == typeof ( long ) || type == typeof ( ulong ) )
212212 {
213- return "长整数" ;
213+ return nameof ( Int64 ) ;
214214 }
215215
216216 if ( type == typeof ( DateTime ) )
217217 {
218- return "日期时间" ;
218+ return nameof ( DateTime ) ;
219219 }
220220
221221 if ( type . IsArray )
222222 {
223- return $ "{ GetFriendlyTypeName ( type . GetElementType ( ) ) } 数组 ";
223+ return $ "Array of { GetFriendlyTypeName ( type . GetElementType ( ) ) } ";
224224 }
225225
226226 if ( type . IsGenericType && type . GetGenericTypeDefinition ( ) == typeof ( List < > ) )
227227 {
228- return $ "{ GetFriendlyTypeName ( type . GetGenericArguments ( ) [ 0 ] ) } 列表 ";
228+ return $ "{ GetFriendlyTypeName ( type . GetGenericArguments ( ) [ 0 ] ) } list ";
229229 }
230230
231231 if ( type . IsGenericType && type . GetGenericTypeDefinition ( ) == typeof ( Nullable < > ) )
232232 {
233- return $ "可空 { GetFriendlyTypeName ( type . GetGenericArguments ( ) [ 0 ] ) } ";
233+ return $ "Nullable< { GetFriendlyTypeName ( type . GetGenericArguments ( ) [ 0 ] ) } > ";
234234 }
235235
236236 return type . Name ;
237237 }
238238 }
239- }
239+ }
You can’t perform that action at this time.
0 commit comments