public void RegisterField(FieldInfo field) { var member = ReflectionHelper.GetMember(field); if (mType.GetRegisteredMember(member) == null) { mType.RegisterMember(member); } }
protected virtual void ApplyBaseRulesToType(IEngineConfigurationProviderLoaderContext context, IEngineConfigurationType type) { IEnumerable<IEngineConfigurationTypeMember> membersToApply = GetAllTypeHierarchyMembers(context.Configuration, type); foreach (var existingMemberConfig in membersToApply) { IEngineConfigurationTypeMember currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); if (currentMemberConfig == null) { type.RegisterMember(existingMemberConfig.Member); currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); currentMemberConfig.SetDatasources(existingMemberConfig.GetDatasources()); } } }
protected virtual void ApplyBaseRulesToType(IEngineConfigurationProviderLoaderContext context, IEngineConfigurationType type) { IEnumerable <IEngineConfigurationTypeMember> membersToApply = GetAllTypeHierarchyMembers(context.Configuration, type); foreach (var existingMemberConfig in membersToApply) { IEngineConfigurationTypeMember currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); if (currentMemberConfig == null) { type.RegisterMember(existingMemberConfig.Member); currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); currentMemberConfig.SetDatasources(existingMemberConfig.GetDatasources()); } } }
private void ApplyToType(IEngineConfigurationType type) { // Create the dependency stack IEnumerable<IEngineConfigurationTypeMember> membersToApply = GetAllTypeHierarchyMembers(mConfiguration, type); foreach (var existingMemberConfig in membersToApply) { IEngineConfigurationTypeMember currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); if (currentMemberConfig == null) { type.RegisterMember(existingMemberConfig.Member); currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); currentMemberConfig.SetDatasources(existingMemberConfig.GetDatasources()); } } }
private void ApplyToType(IEngineConfigurationType type) { // Create the dependency stack IEnumerable <IEngineConfigurationTypeMember> membersToApply = GetAllTypeHierarchyMembers(mConfiguration, type); foreach (var existingMemberConfig in membersToApply) { IEngineConfigurationTypeMember currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); if (currentMemberConfig == null) { type.RegisterMember(existingMemberConfig.Member); currentMemberConfig = type.GetRegisteredMember(existingMemberConfig.Member); currentMemberConfig.SetDatasources(existingMemberConfig.GetDatasources()); } } }
private void ApplyToType(IEngineConfigurationType type) { var typeProviders = mConfigurationProvider.GetConfigurationTypes().Where(x => x.GetConfigurationType() == type.RegisteredType); foreach (var typeProvider in typeProviders) { foreach (var member in typeProvider.GetConfigurationMembers()) { EngineTypeMember typeMember = member.GetConfigurationMember(); if (type.GetRegisteredMember(typeMember) == null) { type.RegisterMember(typeMember); } } } }
private void ApplyToType(IEngineConfigurationType type) { var typeProviders = mConfigurationProvider.GetConfigurationTypes() .Where(x => x.GetConfigurationType() == type.RegisteredType); foreach (var typeProvider in typeProviders) { foreach (var memberProvider in typeProvider.GetConfigurationMembers()) { EngineTypeMember typeMember = memberProvider.GetConfigurationMember(); // Get the member var configuredMember = type.GetRegisteredMember(typeMember); // Set the action on that member if a datasource has been set explicitly for this member var datasources = memberProvider.GetDatasources(); if (datasources.Count() > 0) { configuredMember.SetDatasources(datasources); } } } }
public void MethodWithLiteralArgument_ExposedInConfiguration() { IEngineConfigurationTypeMember member = mEngineConfigurationType.GetRegisteredMember(mSingleArgMethod); Assert.NotNull(member); }