2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00
This commit is contained in:
2020-06-18 02:27:48 +03:00
parent cca00ca97e
commit 8c2d616d62
18 changed files with 379 additions and 164 deletions

View File

@ -97,6 +97,10 @@ namespace Esyur.Data
{
return Structure.FromStructure((Structure)value, destinationType);
}
else if (destinationType.IsEnum)
{
return Enum.ToObject(destinationType, value);
}
else
{
return Convert.ChangeType(value, destinationType);

View File

@ -134,6 +134,16 @@ namespace Esyur.Data
// return dic.Keys.ToArray();
//}
public Structure Add(string key, object value)
{
if (dic.ContainsKey(key))
dic[key] = value;
else
dic.Add(key, value);
return this;
}
public object this[string index]
{
get