// Token: 0x060014B2 RID: 5298 RVA: 0x00049894 File Offset: 0x00047A94
        public static string GetPolicyTipMessage(string locale, PolicyTipMessageConfigAction action, Dictionary <Tuple <string, PolicyTipMessageConfigAction>, string> tenantPolicyTipMessageConfigsDictionary)
        {
            if (tenantPolicyTipMessageConfigsDictionary == null || (string.IsNullOrEmpty(locale) && action != PolicyTipMessageConfigAction.Url))
            {
                return(null);
            }
            if (action == PolicyTipMessageConfigAction.Url)
            {
                locale = string.Empty;
            }
            string text = null;
            Tuple <string, PolicyTipMessageConfigAction> key = new Tuple <string, PolicyTipMessageConfigAction>(locale, action);

            tenantPolicyTipMessageConfigsDictionary.TryGetValue(key, out text);
            if (text == null)
            {
                int num = locale.IndexOf('-');
                if (num > 0)
                {
                    locale = locale.Substring(0, num);
                    text   = PerTenantPolicyTipMessageConfig.GetPolicyTipMessage(locale, action, tenantPolicyTipMessageConfigsDictionary);
                }
            }
            return(text);
        }
예제 #2
0
        internal static PolicyTipCustomizedStrings GetPolicyTipStrings(OrganizationId organizationId, string locale)
        {
            if (string.IsNullOrEmpty(locale))
            {
                throw new ArgumentNullException("locale");
            }
            if (organizationId == null)
            {
                throw new ArgumentNullException("organizationId");
            }
            PerTenantPolicyTipMessageConfig value = ADUtils.PerTenantPolicyTipMessageConfigCache.GetValue(organizationId);
            PolicyTipCustomizedStrings      policyTipCustomizedStrings = null;
            string policyTipMessage  = value.GetPolicyTipMessage(string.Empty, PolicyTipMessageConfigAction.Url);
            string policyTipMessage2 = value.GetPolicyTipMessage(locale, PolicyTipMessageConfigAction.NotifyOnly);
            string policyTipMessage3 = value.GetPolicyTipMessage(locale, PolicyTipMessageConfigAction.RejectOverride);
            string policyTipMessage4 = value.GetPolicyTipMessage(locale, PolicyTipMessageConfigAction.Reject);

            if (!string.IsNullOrEmpty(policyTipMessage) || !string.IsNullOrEmpty(policyTipMessage2) || !string.IsNullOrEmpty(policyTipMessage3) || !string.IsNullOrEmpty(policyTipMessage4))
            {
                policyTipCustomizedStrings = new PolicyTipCustomizedStrings();
                policyTipCustomizedStrings.ComplianceURL = policyTipMessage;
                policyTipCustomizedStrings.PolicyTipMessageNotifyString   = policyTipMessage2;
                policyTipCustomizedStrings.PolicyTipMessageOverrideString = policyTipMessage3;
                policyTipCustomizedStrings.PolicyTipMessageBlockString    = policyTipMessage4;
            }
            return(policyTipCustomizedStrings);
        }
 // Token: 0x060014B1 RID: 5297 RVA: 0x00049884 File Offset: 0x00047A84
 public string GetPolicyTipMessage(string locale, PolicyTipMessageConfigAction action)
 {
     return(PerTenantPolicyTipMessageConfig.GetPolicyTipMessage(locale, action, this.tenantPolicyTipMessageConfigsDictionary));
 }