コード例 #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);
                }
            }
        }