Пример #1
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public DocumentLocation(Location location, Document document, DocumentPosition position, DalvikReferenceType referenceType, DalvikMethod method, TypeEntry typeEntry, MethodEntry methodEntry)
 {
     if (location == null)
         throw new ArgumentNullException("location");
     Location = location;
     Document = document;
     Position = position;
     ReferenceType = referenceType;
     Method = method;
     this.typeEntry = typeEntry;
     this.methodEntry = methodEntry;
 }
Пример #2
0
        /// <summary>
        /// Read mapfile from disk
        /// </summary>
        public MapFile(string path)
        {
            XDocument map;
            using (var fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                map = CompressedXml.Load(fileStream);
            }

            foreach (var element in map.Root.Elements("scope"))
            {
                scopes.Add(new ScopeEntry(element));
            }

            foreach (var type in map.Root.Elements("type"))
            {
                Add(new TypeEntry(type));
            }

            foreach (var element in map.Root.Elements("document"))
            {
                var doc = new Document(element);
                documents.Add(doc.Path, doc);
            }
        }
Пример #3
0
 internal static SourceCodePosition Create(Document document, DocumentPosition position)
 {
     return new SourceCodePosition(document, position);
 }
Пример #4
0
 public SourceCodePosition(Document document, DocumentPosition position)
 {
     Document = document;
     Position = position;
 }
Пример #5
0
 /// <summary>
 /// Gets a document with given path or create it.
 /// </summary>
 public Document GetOrCreateDocument(string path, bool create)
 {
     Document result;
     if (documents.TryGetValue(path, out result))
         return result;
     result = new Document(path);
     documents[path] = result;
     return result;
 }