예제 #1
0
        private static SymbolId GetSpanSymbolId(CodexSymbol symbol)
        {
            SymbolId symbolId;

            if (symbol.ExtensionData == null)
            {
                symbolId             = SymbolId.CreateFromId(symbol.UniqueId);
                symbol.ExtensionData = symbolId;
            }
            else
            {
                symbolId = (SymbolId)symbol.ExtensionData;
            }

            return(symbolId);
        }
예제 #2
0
        public static CodexSymbol Read(string line)
        {
            string[] parts = line.Split(',');

            var symbol = new CodexSymbol()
            {
                UniqueId  = parts[0],
                ShortName = parts[1],
                ContainerQualifiedName = parts[2],
                DisplayName            = parts[3],
                Kind        = parts[4],
                Attributes  = parts[5],
                SymbolDepth = int.Parse(parts[6]),
            };

            symbol.Project.Read(parts[7]);

            return(symbol);
        }
예제 #3
0
        public void Load()
        {
            using (var reader = new StreamReader(Path.Combine(m_directory, "classifications.txt")))
            {
                CodexClassification classification;
                while ((classification = CodexClassification.Read(reader)) != null)
                {
                    Classifications.Add(classification);
                }
            }

            using (var reader = new StreamReader(Path.Combine(m_directory, "referencekinds.txt")))
            {
                CodexRefKind refKind;
                while ((refKind = CodexRefKind.Read(reader)) != null)
                {
                    ReferenceKinds.Add(refKind);
                }
            }

            ReadLinesFromFile("symbols.txt", line =>
            {
                var symbol = CodexSymbol.Read(line);
                Symbols.Add(symbol);
            });

            ReadLinesFromFile("projects.txt", line =>
            {
                var project   = CodexProject.ReadEntry(line);
                project.Store = this;
                Projects.Add(project);
            });

            ReadLinesFromFile("files.txt", line =>
            {
                var file   = CodexFile.ReadEntry(line);
                file.Store = this;
                Files.Add(file);
            });
        }