|
|
|
@ -3,12 +3,14 @@ |
|
|
|
// Copyright(c) 2020 SimonG. All Rights Reserved. |
|
|
|
// Copyright(c) 2020 SimonG. All Rights Reserved. |
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System; |
|
|
|
|
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using GBase.DataHandling.Cache.Factories; |
|
|
|
using GBase.DataHandling.Cache.Factories; |
|
|
|
using GBase.DataHandling.Factories; |
|
|
|
using GBase.DataHandling.Factories; |
|
|
|
|
|
|
|
using GBase.Helpers; |
|
|
|
using GBase.Interfaces.DataHandling; |
|
|
|
using GBase.Interfaces.DataHandling; |
|
|
|
using GBase.Interfaces.DataHandling.Xml; |
|
|
|
using GBase.Interfaces.DataHandling.Xml; |
|
|
|
using GBase.Interfaces.DataHandling.Xml.Cache; |
|
|
|
using GBase.Interfaces.DataHandling.Xml.Cache; |
|
|
|
@ -97,8 +99,14 @@ namespace GBase.DataHandling |
|
|
|
if (value == null) |
|
|
|
if (value == null) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string valueString; |
|
|
|
|
|
|
|
if (typeof(TProperty) != typeof(string) && value is IEnumerable enumerable) |
|
|
|
|
|
|
|
valueString = enumerable.ToGBaseString(); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
valueString = value.ToString(); |
|
|
|
|
|
|
|
|
|
|
|
await _cache.SetValue<T, TProperty>(propertyName, value, _overwrite); |
|
|
|
await _cache.SetValue<T, TProperty>(propertyName, value, _overwrite); |
|
|
|
await _xmlDataWriter.Write<T, TProperty>(propertyName, value.ToString(), _overwrite); |
|
|
|
await _xmlDataWriter.Write<T, TProperty>(propertyName, valueString, _overwrite); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
|