Ejemplo n.º 1
0
 private static Uri GetOwaBaseUrl(HelpProvider.OwaHelpExperience appExp)
 {
     if (appExp != HelpProvider.OwaHelpExperience.Light)
     {
         return(HelpProvider.baseOwaPremiumUrl);
     }
     return(HelpProvider.baseOwaLightUrl);
 }
Ejemplo n.º 2
0
        public static Uri ConstructHelpRenderingUrl(int lcid, HelpProvider.OwaHelpExperience owaExp, string helpId, HelpProvider.RenderingMode mode, string optionalServerParams, OrganizationProperties organizationProperties)
        {
            Uri    owaBaseUrl      = HelpProvider.GetOwaBaseUrl(owaExp);
            string owaAppQualifier = HelpProvider.GetOwaAppQualifier(owaExp);
            string text            = optionalServerParams;

            if (!string.IsNullOrEmpty(text) && !text.StartsWith("&"))
            {
                text = "&" + text;
            }
            string text2 = HelpProvider.OwaLightNamespace;

            if (owaExp != HelpProvider.OwaHelpExperience.Light)
            {
                if (organizationProperties == null || string.IsNullOrEmpty(organizationProperties.ServicePlan))
                {
                    text2 = HelpProvider.OwaPremiumNamespace;
                }
                else if (organizationProperties.ServicePlan.StartsWith(HelpProvider.OwaMsoProfessionalServicePlanPrefix, StringComparison.InvariantCultureIgnoreCase))
                {
                    text2 = (HelpProvider.IsGallatin() ? HelpProvider.OwaMsoProfessionalGallatinNamespace : HelpProvider.OwaMsoProfessionalNamespace);
                }
                else
                {
                    text2 = (HelpProvider.IsGallatin() ? HelpProvider.OwaMsoEnterpriseGallatinNamespace : HelpProvider.OwaMsoEnterpriseNamespace);
                }
            }
            else
            {
                text = string.Empty;
            }
            string text3 = string.Empty;

            if (helpId != null)
            {
                text3 = "&helpid=" + owaAppQualifier + (helpId.Equals(string.Empty) ? "{0}" : helpId);
            }
            string text4 = "15";
            int    num   = HelpProvider.applicationVersion.IndexOf('.');

            if (num > 0)
            {
                text4 = HelpProvider.applicationVersion.Substring(0, num);
            }
            string uriString = string.Format("{0}?p1={1}&clid={2}&ver={3}&v={4}&mode={5}{6}{7}", new object[]
            {
                owaBaseUrl.ToString(),
                text2,
                lcid.ToString(),
                text4,
                HelpProvider.applicationVersion,
                HelpProvider.officeRedirModes[(int)mode],
                text3,
                text
            });

            return(new Uri(uriString));
        }
Ejemplo n.º 3
0
        public static Uri GetProductFeedbackUrl(HelpProvider.OwaHelpExperience owaExp)
        {
            switch (owaExp)
            {
            case HelpProvider.OwaHelpExperience.Light:
                return(HelpProvider.owaLightFeedbackUrl);

            case HelpProvider.OwaHelpExperience.Premium:
                return(HelpProvider.owaPremiumFeedbackUrl);

            default:
                throw new InvalidOperationException("owaExp is not a valid OwaHelpExperience enum. Check caller of Initialize how we get this value.");
            }
        }
Ejemplo n.º 4
0
        private static string GetOwaAppQualifier(HelpProvider.OwaHelpExperience appExp)
        {
            switch (appExp)
            {
            case HelpProvider.OwaHelpExperience.Light:
                return("ms.exch.owal.");

            case HelpProvider.OwaHelpExperience.Premium:
                return("ms.exch.owap.");

            case HelpProvider.OwaHelpExperience.Options:
                return("ms.exch.owao.");

            default:
                throw new ArgumentOutOfRangeException("appExp");
            }
        }
Ejemplo n.º 5
0
 private static Uri UrlConstructHelperOwa(string contentId, HelpProvider.OwaHelpExperience owaExp, params string[] queryParams)
 {
     return(HelpProvider.ConstructFinalHelpUrl(HelpProvider.GetOwaBaseUrl(owaExp), contentId, HelpProvider.GetUserHelpLanguage(), queryParams));
 }