Пример #1
0
        public NavInfo(
            NavInfoFactory factory,
            string libraryName,
            string referenceOwnerName = null,
            string namespaceName      = null,
            string className          = null,
            string memberName         = null
            )
        {
            _factory = factory;

            _libraryName        = libraryName;
            _referenceOwnerName = referenceOwnerName;
            _namespaceName      = namespaceName;
            _className          = className;
            _memberName         = memberName;

            _baseCanonicalNodes    = CreateNodes(expandDottedNames: true);
            _basePresentationNodes = CreateNodes(expandDottedNames: false);

            _symbolType =
                _basePresentationNodes.Length > 0
                    ? _basePresentationNodes[_basePresentationNodes.Length - 1].ListType
                    : 0;
        }
Пример #2
0
        protected AbstractLibraryService(
            Guid libraryId,
            __SymbolToolLanguage preferredLanguage,
            SymbolDisplayFormat typeDisplayFormat,
            SymbolDisplayFormat memberDisplayFormat)
        {
            this.LibraryId = libraryId;
            this.PreferredLanguage = preferredLanguage;
            this.TypeDisplayFormat = typeDisplayFormat;
            this.MemberDisplayFormat = memberDisplayFormat;

            this.NavInfoFactory = new NavInfoFactory(this);
        }
Пример #3
0
        /// <summary>
        /// Creates a new NavInfo object that implements <see cref="IVsNavInfo"/> and <see cref="IVsNavInfo2"/>.
        /// </summary>
        /// <param name="factory">The <see cref="NavInfoFactory"/> that created this NavInfo.</param>
        /// <param name="libraryName">The name of the library (project or assembly) to use for navigation.</param>
        /// <param name="referenceOwnerName">If this NavInfo is inside of an assembly or project reference, this is the name of the project
        /// that owns the reference. In general, this is only set when the NavInfo is constructed from the Class View window, where references
        /// are parented inside of projects.</param>
        /// <param name="namespaceName">The name of the namespace used for navigation.</param>
        /// <param name="className">The name of the class used for navigation (should be contained by <paramref name="namespaceName"/>).</param>
        /// <param name="memberName">The name of the member used for navigation (should be contained by <paramref name="memberName"/>).</param>
        public NavInfo(
            NavInfoFactory factory,
            string libraryName,
            string referenceOwnerName = null,
            string namespaceName = null,
            string className = null,
            string memberName = null)
        {
            _factory = factory;

            _libraryName = libraryName;
            _referenceOwnerName = referenceOwnerName;
            _namespaceName = namespaceName;
            _className = className;
            _memberName = memberName;

            _baseCanonicalNodes = CreateNodes(expandDottedNames: true);
            _basePresentationNodes = CreateNodes(expandDottedNames: false);

            _symbolType = _basePresentationNodes.Length > 0
                ? _basePresentationNodes[_basePresentationNodes.Length - 1].ListType
                : 0;
        }