Spaces
This commit is contained in:
parent
50a8c7508a
commit
e58952035f
@ -39,10 +39,10 @@ namespace FileManager
|
|||||||
{
|
{
|
||||||
var jObject = readFile();
|
var jObject = readFile();
|
||||||
if (jObject.ContainsKey(propertyName))
|
if (jObject.ContainsKey(propertyName))
|
||||||
stringCache[propertyName] = jObject[propertyName].Value<string>();
|
stringCache[propertyName] = jObject[propertyName].Value<string>();
|
||||||
else
|
else
|
||||||
stringCache[propertyName] = defaultValue;
|
stringCache[propertyName] = defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return stringCache[propertyName];
|
return stringCache[propertyName];
|
||||||
}
|
}
|
||||||
@ -53,9 +53,9 @@ namespace FileManager
|
|||||||
|
|
||||||
if (obj is null)
|
if (obj is null)
|
||||||
{
|
{
|
||||||
objectCache[propertyName] = defaultValue;
|
objectCache[propertyName] = defaultValue;
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
if (obj.GetType().IsAssignableTo(typeof(T))) return (T)obj;
|
if (obj.GetType().IsAssignableTo(typeof(T))) return (T)obj;
|
||||||
if (obj is JObject jObject) return jObject.ToObject<T>();
|
if (obj is JObject jObject) return jObject.ToObject<T>();
|
||||||
if (obj is JValue jValue)
|
if (obj is JValue jValue)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user