Nanook.QueenBee.Parser.PakFormat.AddNonDebugQbKey C# (CSharp) Method

AddNonDebugQbKey() public method

Add the non debug item to the user defined list if it's not already there
public AddNonDebugQbKey ( QbKey qbKey, string qbFilename, QbFile qbfile ) : string
qbKey QbKey
qbFilename string
qbfile QbFile
return string
        public string AddNonDebugQbKey(QbKey qbKey, string qbFilename, QbFile qbfile)
        {
            //check that it's not already in the real debug file
            if (qbKey.HasText)
            {
                string t = string.Empty;
                if (qbfile != null)
                    t = qbfile.LookupDebugName(qbKey.Crc, false);

                //it's in the debug file
                if (t.Length != 0)
                {
                    if (t != qbKey.Text)
                        return t;
                }
                else
                {
                    //check that it's not in the user debug file
                    if ( GetNonDebugQbKey(qbKey.Crc, qbFilename) == null)
                    {
                        if (_qbKeys == null)
                            _qbKeys = new List<NonDebugQbKey>();
                        _qbKeys.Add(new NonDebugQbKey(qbKey, qbFilename));
                    }
                }
            }
            return string.Empty;
        }