Example #1
0
        internal ScriptElement GetElement(string scriptName, string flavor)
        {
            Debug.Assert(String.IsNullOrEmpty(scriptName) == false);

            ScriptElement scriptElement = null;

            if (String.IsNullOrEmpty(flavor) == false)
            {
                string flavorName = scriptName + "." + flavor;
                scriptElement = this[flavorName];
            }

            if (scriptElement == null)
            {
                scriptElement = this[scriptName];
            }

            if (scriptElement == null)
            {
                throw new ArgumentException("The referenced script named '" + scriptName + "' was not registered in configuration as a script.", "scriptName");
            }

            return(scriptElement);
        }
Example #2
0
 public void Add(ScriptElement script)
 {
     BaseAdd(script);
 }
Example #3
0
 public void Remove(ScriptElement script)
 {
     BaseRemove(GetElementKey(script));
 }
Example #4
0
 public void Remove(ScriptElement script)
 {
     BaseRemove(GetElementKey(script));
 }
Example #5
0
 public void Add(ScriptElement script)
 {
     BaseAdd(script);
 }