Esempio n. 1
0
        public static Variable Intern(Machine machine, string ns, string name)
        {
            if (string.IsNullOrEmpty(ns))
                throw new InvalidOperationException("Variable has no namespace");

            Variable variable = machine.GetVariable(ns, name);

            if (variable != null)
                return variable;

            variable = new Variable(ns, name);

            machine.SetVariable(variable);

            return variable;
        }