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)); }