Beispiel #1
0
        /// <summary>
        /// Identitifies the status of an API for all of the targets.
        /// </summary>
        private MemberInfo ProcessMemberInfo(IApiCatalogLookup catalog, IEnumerable <FrameworkName> targets, MemberInfo member)
        {
            member.IsSupportedAcrossTargets = IsSupportedAcrossTargets(catalog, member.MemberDocId, targets, out var targetStatus);
            member.TargetStatus             = targetStatus;
            member.RecommendedChanges       = _recommendations.GetRecommendedChanges(member.MemberDocId);
            member.SourceCompatibleChange   = _recommendations.GetSourceCompatibleChanges(member.MemberDocId);

            return(member);
        }
        public ApiInformation(string docId, IApiCatalogLookup catalog, IApiRecommendations recommendations)
        {
            if (string.IsNullOrWhiteSpace(docId))
            {
                throw new ArgumentNullException(nameof(docId));
            }

            Definition = catalog.GetApiDefinition(docId);

            Supported = catalog.GetSupportedVersions(docId);

            AdditionalInformation   = recommendations.GetNotes(docId);
            SourceCompatibleChanges = recommendations.GetSourceCompatibleChanges(docId);
            RecommendedChanges      = recommendations.GetRecommendedChanges(docId);
            Component = recommendations.GetComponent(docId);
        }
        public ApiInformation(string docId, IApiCatalogLookup catalog, IApiRecommendations recommendations)
        {
            if (string.IsNullOrWhiteSpace(docId))
            {
                throw new ArgumentNullException("docId");
            }

            Definition = catalog.GetApiDefinition(docId);

            Supported = catalog.GetSupportedVersions(docId);

            AdditionalInformation = recommendations.GetNotes(docId);
            SourceCompatibleChanges = recommendations.GetSourceCompatibleChanges(docId);
            RecommendedChanges = recommendations.GetRecommendedChanges(docId);
            Component = recommendations.GetComponent(docId);
        }