IrcShark.Extensions.Scripting.Msl.MslScriptEngine.GetActivePropertyStack C# (CSharp) Method

GetActivePropertyStack() private method

private GetActivePropertyStack ( ) : Stack
return Stack
        private Stack<string> GetActivePropertyStack()
        {
            Stack<string> propertyStack = null;
            if (ScriptContext.CurrentContext.Globals.ContainsKey("msl.propertys"))
            {
                propertyStack = ScriptContext.CurrentContext.Globals["msl.propertys"] as Stack<string>;
            }

            if (propertyStack == null)
            {
                propertyStack = new Stack<string>();
                ScriptContext.CurrentContext.Globals.Add("msl.propertys", propertyStack);
            }

            return propertyStack;
        }