|
@@ -11,6 +11,7 @@ using System;
|
|
|
using System.Collections.Concurrent;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
|
+using System.Globalization;
|
|
|
using System.Linq;
|
|
|
using System.Reflection;
|
|
|
using System.Text;
|
|
@@ -72,7 +73,12 @@ public class BaseDataApplication : IScopeDependency
|
|
|
|
|
|
public Dictionary<string, dynamic> Build()
|
|
|
{
|
|
|
- return new Dictionary<string, dynamic>(_baseData);
|
|
|
+ var newDict = _baseData.ToDictionary(
|
|
|
+ entry => char.ToLower(entry.Key[0], CultureInfo.InvariantCulture) + entry.Key.Substring(1),
|
|
|
+ entry => entry.Value
|
|
|
+ );
|
|
|
+
|
|
|
+ return newDict;
|
|
|
}
|
|
|
|
|
|
public BaseDataApplication VoiceEvaluate()
|
|
@@ -145,10 +151,15 @@ public class BaseDataApplication : IScopeDependency
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public BaseDataApplication FileType(int ignoreKey)
|
|
|
+ public BaseDataApplication FileType(EFileType ignoreFileType = EFileType.None)
|
|
|
{
|
|
|
var items = EnumExts.GetDescriptions<EFileType>();
|
|
|
- _baseData.TryAdd("FileType", items.Where(m => m.Key != ignoreKey).ToList());
|
|
|
+ var filteredDictionary = items
|
|
|
+ .Where(kvp => (ignoreFileType & (EFileType)kvp.Key) == 0)
|
|
|
+ .ToDictionary(kvp => kvp.Key, kvp => kvp.Value)
|
|
|
+ .ToList();
|
|
|
+ _baseData.TryAdd("FileType", filteredDictionary);
|
|
|
+
|
|
|
return this;
|
|
|
}
|
|
|
|
|
@@ -157,4 +168,10 @@ public class BaseDataApplication : IScopeDependency
|
|
|
_baseData.TryAdd(name, items);
|
|
|
return this;
|
|
|
}
|
|
|
+
|
|
|
+ public BaseDataApplication SourceChannel()
|
|
|
+ {
|
|
|
+ Add(SysDicTypeConsts.SourceChannel);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
}
|