예제 #1
0
        public void RaiseIfNoPublicEnvironmentInGetPublicEnvironment()
        {
            ValueEnvironment parent      = new ValueEnvironment();
            ValueEnvironment environment = new ValueEnvironment(parent);

            environment.GetPublicEnvironment();
        }
예제 #2
0
        public void GetPublicEnvironment()
        {
            ValueEnvironment parent      = new ValueEnvironment(ValueEnvironmentType.Public);
            ValueEnvironment environment = new ValueEnvironment(parent);

            Assert.AreEqual(parent, environment.GetPublicEnvironment());
            Assert.AreEqual(parent, parent.GetPublicEnvironment());
        }
예제 #3
0
        public override void Execute(Machine machine, ValueEnvironment environment)
        {
            ValueEnvironment pubenv = environment.GetPublicEnvironment();

            foreach (string name in this.names)
            {
                if (pubenv.GetValue(name) == null)
                {
                    pubenv.SetEnvironmentValue(name, null);
                }
            }
        }