Esempio n. 1
0
        public object Create(object parent, object context, XmlNode section)
        {
            WebControlsConfig config = new WebControlsConfig(parent as WebControlsConfig, context);

            if (section.Attributes == null && section.Attributes.Count == 0)
            {
                ThrowException("Lack of clientScriptsLocation attribute", section);
            }

            string clientLocation = AttValue("clientScriptsLocation", section, false);

            if (section.Attributes != null && section.Attributes.Count != 0)
            {
                HandlersUtil.ThrowException("Unrecognized attribute", section);
            }

            string error;

            config.SetClientScriptsLocation(clientLocation, out error);
            if (error != null)
            {
                HandlersUtil.ThrowException(error, section);
            }

            return(config);
        }
		public WebControlsConfig (WebControlsConfig parent, object context)
		{
			configFilePath = context as string;
			if (parent == null)
				return;
			
			scriptsVDir = parent.scriptsVDir;
			if (scriptsVDir != null)
				configFilePath = parent.configFilePath;
		}
Esempio n. 3
0
        public WebControlsConfig(WebControlsConfig parent, object context)
        {
            configFilePath = context as string;
            if (parent == null)
            {
                return;
            }

            scriptsVDir = parent.scriptsVDir;
            if (scriptsVDir != null)
            {
                configFilePath = parent.configFilePath;
            }
        }
		public object Create (object parent, object context, XmlNode section)
		{
			WebControlsConfig config = new WebControlsConfig (parent as WebControlsConfig, context);

			if (section.Attributes == null && section.Attributes.Count == 0)
				ThrowException ("Lack of clientScriptsLocation attribute", section);

			string clientLocation = AttValue ("clientScriptsLocation", section, false);
			if (section.Attributes != null && section.Attributes.Count != 0)
				HandlersUtil.ThrowException ("Unrecognized attribute", section);

			string error;
			config.SetClientScriptsLocation (clientLocation, out error);
			if (error != null)
				HandlersUtil.ThrowException (error, section);

			return config;
		}