System.Xml.Serialization.CodeGenerator.TryGetVariable C# (CSharp) Method

TryGetVariable() private method

private TryGetVariable ( string name, object &variable ) : bool
name string
variable object
return bool
        internal bool TryGetVariable(string name, out object variable)
        {
            LocalBuilder loc;
            if (_currentScope != null && _currentScope.TryGetValue(name, out loc))
            {
                variable = loc;
                return true;
            }
            ArgBuilder arg;
            if (_argList != null && _argList.TryGetValue(name, out arg))
            {
                variable = arg;
                return true;
            }
            int val;
            if (Int32.TryParse(name, out val))
            {
                variable = val;
                return true;
            }
            variable = null;
            return false;
        }