/// <summary> /// Initializes a new instance of the <see cref="FileItemManager" /> class. /// </summary> /// <param name="vs">The vs.</param> /// <param name="name">The name.</param> /// <param name="file">The file.</param> internal FileItemManager(VisualStudioServices vs, string name, FileCodeModel file) { VS = vs; Name = name; /* var fullpath = _doc.Path + _doc.Name; * var str = File.ReadAllText(fullpath).Replace("\r", ""); * _docLength =str.Length; //Document interface doesnt support EndPoint used for length determining by TextDocument*/ /* if (_doc == null) throw new NullReferenceException("_doc cannot be null"); * * var textDoc = (TextDocument)_doc.Object();*/ // _docLength = textDoc.EndPoint.AbsoluteCharOffset; Root = new ElementNode(file.CodeElements, this); }
/// <summary> /// Initialize manager. /// </summary> /// <param name="project"><see cref="Project" /> that will be watched after Hooking.</param> /// <param name="vs">Visual studio services.</param> public ProjectManager(Project project, VisualStudioServices vs) { Name = project.Name; _project = project; _vs = vs; }