/// <summary> /// Initializes a new instance of the XmlApplicationContext class. /// </summary> public XmlApplicationContext(XmlApplicationContextArgs args) : base(args.Name, args.CaseSensitive, args.ParentContext) { _configurationLocations = args.ConfigurationLocations; _configurationResources = args.ConfigurationResources; if (args.Refresh) { bool hasLocations = args.ConfigurationLocations.Length > 0; bool hasResources = args.ConfigurationResources.Length > 0; if (!hasLocations && !hasResources) throw new ArgumentException("You must provide either or both Configuration Locations and/or Configuration Resources!"); if (hasLocations || hasResources) { Refresh(); } } }
public void Default_CaseSensitivity_isTrue() { XmlApplicationContextArgs args = new XmlApplicationContextArgs(string.Empty, null, null, null); Assert.True(args.CaseSensitive); }
public void Default_AutoRefresh_isTrue() { XmlApplicationContextArgs args = new XmlApplicationContextArgs(string.Empty, null, null, null); Assert.True(args.Refresh); }
public void Default_CaseSensitivity_isTrue() { XmlApplicationContextArgs args = new XmlApplicationContextArgs(string.Empty,null,null,null); Assert.True(args.CaseSensitive); }