wrapper class for holding VM information
コード例 #1
0
        public VelocimacroProxy get(string vmName, string namespace_Renamed)
        {
            VelocimacroProxy result;

            if (this.UsingNamespaces(namespace_Renamed))
            {
                Hashtable @namespace = this.GetNamespace(namespace_Renamed, false);
                if (@namespace != null)
                {
                    VelocimacroManager.MacroEntry macroEntry = (VelocimacroManager.MacroEntry)@namespace[vmName];
                    if (macroEntry != null)
                    {
                        result = macroEntry.CreateVelocimacro(namespace_Renamed);
                        return(result);
                    }
                }
            }
            VelocimacroManager.MacroEntry macroEntry2 = (VelocimacroManager.MacroEntry) this.GetNamespace(VelocimacroManager.GLOBAL_NAMESPACE)[vmName];
            if (macroEntry2 != null)
            {
                result = macroEntry2.CreateVelocimacro(namespace_Renamed);
            }
            else
            {
                result = null;
            }
            return(result);
        }
コード例 #2
0
        public string GetLibraryName(string vmName, string ns)
        {
            string result;

            if (this.UsingNamespaces(ns))
            {
                Hashtable @namespace = this.GetNamespace(ns, false);
                if (@namespace != null)
                {
                    VelocimacroManager.MacroEntry macroEntry = (VelocimacroManager.MacroEntry)@namespace[vmName];
                    if (macroEntry != null)
                    {
                        result = null;
                        return(result);
                    }
                }
            }
            VelocimacroManager.MacroEntry macroEntry2 = (VelocimacroManager.MacroEntry) this.GetNamespace(VelocimacroManager.GLOBAL_NAMESPACE)[vmName];
            if (macroEntry2 != null)
            {
                result = macroEntry2.SourceTemplate;
            }
            else
            {
                result = null;
            }
            return(result);
        }
コード例 #3
0
        public bool AddVM(string vmName, string macroBody, string[] argArray, string ns)
        {
            VelocimacroManager.MacroEntry macroEntry = new VelocimacroManager.MacroEntry(this, this, vmName, macroBody, argArray, ns);
            macroEntry.FromLibrary = this.registerFromLib;
            bool flag = true;

            if (this.registerFromLib)
            {
                SupportClass.PutElement(this.libraryMap, ns, ns);
            }
            else
            {
                flag = this.libraryMap.ContainsKey(ns);
            }
            bool result;

            if (!flag && this.UsingNamespaces(ns))
            {
                Hashtable @namespace = this.GetNamespace(ns, true);
                SupportClass.PutElement(@namespace, vmName, macroEntry);
                result = true;
            }
            else
            {
                VelocimacroManager.MacroEntry macroEntry2 = (VelocimacroManager.MacroEntry) this.GetNamespace(VelocimacroManager.GLOBAL_NAMESPACE)[vmName];
                if (macroEntry2 != null)
                {
                    macroEntry.FromLibrary = macroEntry2.FromLibrary;
                }
                SupportClass.PutElement(this.GetNamespace(VelocimacroManager.GLOBAL_NAMESPACE), vmName, macroEntry);
                result = true;
            }
            return(result);
        }