/// <summary> /// Initializes a new <see cref="ConfigSectionSessionScopeSettings"/> instance. /// </summary> /// <param name="ownerType">The type, who's name will be used to prefix setting variables with</param> /// <param name="variableSource">The variable source to obtain settings from.</param> public ConfigSectionSessionScopeSettings(Type ownerType, IVariableSource variableSource) : base() { string sessionFactoryObjectNameSettingsKey = UniqueKey.GetTypeScopedString(ownerType, "SessionFactoryObjectName"); string entityInterceptorObjectNameSettingsKey = UniqueKey.GetTypeScopedString(ownerType, "EntityInterceptorObjectName"); string singleSessionSettingsKey = UniqueKey.GetTypeScopedString(ownerType, "SingleSession"); string defaultFlushModeSettingsKey = UniqueKey.GetTypeScopedString(ownerType, "DefaultFlushMode"); VariableAccessor variables = new VariableAccessor(variableSource); this.sessionFactoryObjectName = variables.GetString(sessionFactoryObjectNameSettingsKey, DEFAULT_SESSION_FACTORY_OBJECT_NAME); this.entityInterceptorObjectName = variables.GetString(entityInterceptorObjectNameSettingsKey, null); this.SingleSession = variables.GetBoolean(singleSessionSettingsKey, this.SingleSession); this.DefaultFlushMode = (FlushMode)variables.GetEnum(defaultFlushModeSettingsKey, this.DefaultFlushMode); AssertUtils.ArgumentNotNull(sessionFactoryObjectName, "sessionFactoryObjectName"); // just to be sure }
public VariableNode(string name, VariableAccessor accessor) { this.Name = name; this.Accessor = accessor; }