[Ikvm-commit] ikvm/reflect Type.cs,1.114,1.115
Brought to you by:
jfrijters
|
From: Jeroen F. <jfr...@us...> - 2016-07-01 06:20:40
|
Update of /cvsroot/ikvm/ikvm/reflect In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1034 Modified Files: Type.cs Log Message: Implemented Type.GetEnumName() in a way that is compatible with NETSTANDARD. Index: Type.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/reflect/Type.cs,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** Type.cs 1 Jul 2016 05:57:10 -0000 1.114 --- Type.cs 1 Jul 2016 06:20:37 -0000 1.115 *************** *** 543,547 **** } - #if !CORECLR public string GetEnumName(object value) { --- 543,546 ---- *************** *** 556,560 **** try { ! value = Convert.ChangeType(value, GetTypeCode(GetEnumUnderlyingType())); } catch (FormatException) --- 555,559 ---- try { ! value = Convert.ChangeType(value, __GetSystemType(GetTypeCode(GetEnumUnderlyingType()))); } catch (FormatException) *************** *** 579,583 **** return null; } - #endif public bool IsEnumDefined(object value) --- 578,581 ---- |