public ScriptTypeViewModel(string typeName, IEnumerable<ScriptEntry2> scriptEntries, ScriptAssemblyViewModel parent)
        {
            if (typeName == null)
                throw new ArgumentNullException("typeName");

            if (scriptEntries == null)
                throw new ArgumentNullException("scriptEntries");

            if (parent == null)
                throw new ArgumentNullException("parent");

            Parent = parent;
            this.typeName = typeName;

            Methods = scriptEntries.Select(item => new ScriptMethodViewModel(item, this));
        }
Beispiel #2
0
        private void AddScriptAssembly(ScriptAssembly scriptAssembly)
        {
            ScriptAssemblyViewModel vm = null;

            if (scriptAssembly.Assembly == null)
            {
                if (orphanScriptsAssembly == null)
                {
                    orphanScriptsAssembly = new ScriptAssemblyViewModel(scriptAssembly, this);
                    scriptAssemblies.Add(orphanScriptsAssembly);
                }
                vm = orphanScriptsAssembly;
            }
            else
            {
                vm = new ScriptAssemblyViewModel(scriptAssembly, this);
                scriptAssemblies.Add(vm);
            }

            vm.UpdateScripts();
        }
Beispiel #3
0
        public ScriptTypeViewModel(string typeName, IEnumerable <ScriptEntry2> scriptEntries, ScriptAssemblyViewModel parent)
        {
            if (typeName == null)
            {
                throw new ArgumentNullException("typeName");
            }

            if (scriptEntries == null)
            {
                throw new ArgumentNullException("scriptEntries");
            }

            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }

            Parent        = parent;
            this.typeName = typeName;

            Methods = scriptEntries.Select(item => new ScriptMethodViewModel(item, this));
        }
Beispiel #4
0
        private void AddScriptAssembly(ScriptAssembly scriptAssembly)
        {
            ScriptAssemblyViewModel vm = null;

            if (scriptAssembly.Assembly == null)
            {
                if (orphanScriptsAssembly == null)
                {
                    orphanScriptsAssembly = new ScriptAssemblyViewModel(scriptAssembly, this);
                    scriptAssemblies.Add(orphanScriptsAssembly);
                }
                vm = orphanScriptsAssembly;
            }
            else
            {
                vm = new ScriptAssemblyViewModel(scriptAssembly, this);
                scriptAssemblies.Add(vm);
            }

            vm.UpdateScripts();
        }
Beispiel #5
0
        private void RemoveScriptAssembly(ScriptAssembly scriptAssembly)
        {
            ScriptAssemblyViewModel foundViewModel = scriptAssemblies.Single(item => string.Compare(item.Url, scriptAssembly.Url, true) == 0);

            scriptAssemblies.Remove(foundViewModel);
        }