コード例 #1
0
ファイル: DocumentLocation.cs プロジェクト: rfcclub/dot42
 /// <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
ファイル: MapFile.cs プロジェクト: Xtremrules/dot42
        /// <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
ファイル: MapFile.cs プロジェクト: Xtremrules/dot42
 /// <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;
 }