Support additional types in WriteObjectValue (#719)
This commit is contained in:
Родитель
0bacd527e6
Коммит
1059add972
|
@ -63,15 +63,24 @@ namespace Azure.Core
|
|||
case float f:
|
||||
writer.WriteNumberValue(f);
|
||||
break;
|
||||
case long l:
|
||||
writer.WriteNumberValue(l);
|
||||
break;
|
||||
case string s:
|
||||
writer.WriteStringValue(s);
|
||||
break;
|
||||
case bool b:
|
||||
writer.WriteBooleanValue(b);
|
||||
break;
|
||||
case Guid g:
|
||||
writer.WriteStringValue(g);
|
||||
break;
|
||||
case DateTimeOffset dateTimeOffset:
|
||||
writer.WriteStringValue(dateTimeOffset,"S");
|
||||
break;
|
||||
case DateTime dateTime:
|
||||
writer.WriteStringValue(dateTime, "S");
|
||||
break;
|
||||
case IEnumerable<KeyValuePair<string, object>> enumerable:
|
||||
writer.WriteStartObject();
|
||||
foreach (KeyValuePair<string, object> pair in enumerable)
|
||||
|
|
Загрузка…
Ссылка в новой задаче