コード例 #1
0
        public static string GetTenantDisplayNameForMatchmakerSubScoreTypeEnum(MatchmakerSubScoreTypeEnum enumType)
        {
            switch (enumType)
            {
            case MatchmakerSubScoreTypeEnum.Classification:
                return(MultiTenantHelpers.GetTenantNameForClassificationForMatchmaker(true));

            case MatchmakerSubScoreTypeEnum.TaxonomySystem:
                return(MultiTenantHelpers.GetTenantFieldDefinitionEnumForMatchmakerTaxonomy().ToType().GetFieldDefinitionLabelPluralized());

            default:
                return(MatchmakerSubScoreType.ToType(enumType).MatchmakerSubScoreTypeDisplayName);
            }
        }
コード例 #2
0
        public PartnerOrganizationMatchMakerScore(Project project,
                                                  Organization organization,
                                                  double partnerOrganizationFitnessScoreNumber,
                                                  List <string> scoreInsightMessages,
                                                  Dictionary <MatchmakerSubScoreTypeEnum,
                                                              MatchMakerScoreSubScoreInsight> scoreInsightDictionary)
        {
            Check.EnsureNotNull(project);
            Check.EnsureNotNull(project);
            ProjectOrganizationMatchmaker.CheckEnsureScoreInValidRange(partnerOrganizationFitnessScoreNumber);

            this.Project      = project;
            this.Organization = organization;
            this.PartnerOrganizationFitnessScoreNumber = partnerOrganizationFitnessScoreNumber;
            this.ScoreInsightMessages = scoreInsightMessages;
            var sortedScoreInsightDictionary = new Dictionary <MatchmakerSubScoreTypeEnum, MatchMakerScoreSubScoreInsight>();

            foreach (var keyItem in scoreInsightDictionary.Keys.OrderBy(x => MatchmakerSubScoreType.ToType(x).SortOrder))
            {
                sortedScoreInsightDictionary.Add(keyItem, scoreInsightDictionary.GetValueOrDefault(keyItem));
            }
            this.ScoreInsightDictionary = sortedScoreInsightDictionary;
        }