Ejemplo n.º 1
0
        public static void AddScript(AddBehavior behavior = AddBehavior.Ignore, params string[] paths)
        {
            CheckSetUp();

            foreach (var path in paths)
            {
                AddScript(path, behavior);
            }
        }
Ejemplo n.º 2
0
        private static void AddScript(string path, AddBehavior behavior)
        {
            if (_scriptList.ContainsKey(path))
            {
                switch (behavior)
                {
                case AddBehavior.Ignore:
                    return;

                case AddBehavior.Overwrite:
                    _scriptList.Remove(path);
                    _AddScriptToDict(path);
                    break;

                case AddBehavior.ThrowException:
                    throw new Exception("Script with path \"" + path + "\" already added");

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            _AddScriptToDict(path);
        }
Ejemplo n.º 3
0
 public static void LoadAllScripts(AddBehavior existsAlready  = AddBehavior.Ignore,
                                   LoadBehavior alreadyLoaded = LoadBehavior.Reload)
 {
     CheckSetUp();
     _LoadScripts(_scriptList.Keys, alreadyLoaded);
 }