public PropertyBuilder(IFuncDictionary <Type, MemberInfo> propertyDataAttributeFuncDictionary, IFuncList <string, string> customPropertyDataFuncDictionary, IDictionary <string, string> csdlTypeDictionary) { _PropertyDataAttributeDictionary = propertyDataAttributeFuncDictionary; _CustomPropertyDataFuncs = customPropertyDataFuncDictionary; _CsdlTypeDictionary = csdlTypeDictionary; }
public EntityBuilder(ICsdlBuilder <PropertyInfo, CsdlProperty> propertyBuilder, ICsdlBuilder <PropertyInfo, CsdlEnumProperty> enumPropertyBuilder, IFuncDictionary <Type, MemberInfo> entityAttributeFuncDictionary, IFuncDictionary <Type, MemberInfo> propertyAttributeFuncDictionary, IFuncList <string> customPropertyFuncs ) { _PropertyBuilder = propertyBuilder; _EnumPropertyBuilder = enumPropertyBuilder; _EntityAttributeFuncDictionary = entityAttributeFuncDictionary; _PropertyAttributeFuncDictionary = propertyAttributeFuncDictionary; _CustomPropertyFuncs = customPropertyFuncs; }
public void DictionaryExtensions_AddFromCustomDictionary_FuncsNull_Test() { // Arrange var dictionary = new Dictionary <string, object>(); var entity = "Entity1"; var prop = "Prop1"; IFuncList <string, string> funcs = null; // Act dictionary.AddFromCustomDictionary(entity, prop, funcs); // Assert Assert.AreEqual(0, dictionary.Count); }
public CsdlBuilderFactory(IFuncDictionary <Type, MemberInfo> propertyDataAttributeDictionary, IFuncDictionary <Type, MemberInfo> entityAttributeDictionary, IFuncDictionary <Type, MemberInfo> propertyAttributeDictionary, IFuncList <string> customPropertyFuncs, IFuncList <string, string> customPropertyDataFuncs, IDictionary <string, string> csdlTypeDictionary ) { PropertyDataAttributeDictionary = propertyDataAttributeDictionary; EntityAttributeDictionary = entityAttributeDictionary; PropertyAttributeDictionary = propertyAttributeDictionary; CustomPropertyFuncs = customPropertyFuncs; CustomPropertyDataFuncs = customPropertyDataFuncs; CsdlTypeDictionary = csdlTypeDictionary; }
public RelatedEntityMappingNavigationPropertyBuilder(IFuncList <string, string> CustomPropertyDataFuncs) { _CustomPropertyDataFuncs = CustomPropertyDataFuncs; }
internal static void AddFromCustomDictionary(this IDictionary <string, object> dictionary, string entity, string property, IFuncList <string, string> customPropertyDataFuncs) { if (dictionary == null || string.IsNullOrWhiteSpace(entity) || string.IsNullOrWhiteSpace(property) || customPropertyDataFuncs == null || !customPropertyDataFuncs.Any()) { return; } foreach (var func in customPropertyDataFuncs) { var items = func(entity, property); if (items != null && items.Any()) { dictionary.AddRange(items); } } }
public CsdlBuilderFactory(IFuncList <string> customPropertyFuncs) { CustomPropertyFuncs = customPropertyFuncs; }