Nanook.QueenBee.Parser.PakEditor.addDebugFilename C# (CSharp) Method

addDebugFilename() private method

private addDebugFilename ( string debugFileContents, PakDbgQbKey>.Dictionary qbKeyFilenames, uint dbgQbKey ) : void
debugFileContents string
qbKeyFilenames PakDbgQbKey>.Dictionary
dbgQbKey uint
return void
        private void addDebugFilename(string debugFileContents, Dictionary<uint, PakDbgQbKey> qbKeyFilenames, uint dbgQbKey)
        {
            if (debugFileContents == null)
                return;

            string[] d = debugFileContents.Replace("\r", "").Split(new char[] { '\n' });

            bool b = false;
            int pos = 10;
            uint qbKey;
            foreach (string s in d)
            {
                if (b)
                {
                    if (s.Trim().Length > 2)
                    {
                        if (s[pos] == ' ')
                        {
                            if (s.IndexOf(':') == -1)
                            {
                                qbKey = uint.Parse(s.Substring(2, pos - 2), System.Globalization.NumberStyles.HexNumber);
                                qbKeyFilenames.Add(qbKey, new PakDbgQbKey(qbKey, dbgQbKey, s.Substring(pos + 1).Trim()));
                            }
                            return;
                        }
                        else
                            throw new ApplicationException(string.Format("Bad Entry in checksum in debug file, char[{0}] id not a space", pos.ToString()));
                    }
                }
                else
                {
                    if (s == "[Checksums]")
                        b = true;
                }
            }
        }