Пример #1
0
 /// <summary>
 /// Creates an Organization.svc/Web <see cref="Uri"/> instance based on the specified location
 /// </summary>
 /// <param name="location">The scheme, host, port # (if applicable), and organization representing location of Organization.svc</param>
 /// <returns>A new instance of <see cref="Uri"/> for the Organization.svc/Web</returns>
 /// <remarks>
 /// EXAMPLES: https://hostname:5555/organization, https://organization.hostname:5555, https://hostname/organization, https://organization.hostname
 /// The organization name, if detected in the <see cref="Uri"/> path, is preserved in the resulting <see cref="Uri"/>
 /// The Organization.svc/Web endpoint path is not necessary as this will be appended to all <see cref="Uri"/>'s based on the type specified
 /// </remarks>
 public static Uri CreateOrganizationWebServiceUri(string location)
 {
     return(XrmServiceUriFactory.CreateServiceUri(location, XrmServiceType.OrganizationWeb));
 }
Пример #2
0
        /// <summary>
        /// Creates an Organization.svc/Web <see cref="Uri"/> instance targeting CRM Online for the specified organization/region pair
        /// </summary>
        /// <param name="organizationName">The organization name</param>
        /// <param name="region">The region where the organization is located</param>
        /// <returns>A new instance of <see cref="Uri"/> for the Organization.svc/Web</returns>
        public static Uri CreateOnlineOrganizationWebServiceUri(string organizationName, CrmOnlineRegion region = CrmOnlineRegion.NA)
        {
            string location = XrmServiceUriFactory.CreateOnlineOrganizationServiceLocation(organizationName, region);

            return(XrmServiceUriFactory.CreateOrganizationWebServiceUri(location));
        }
Пример #3
0
 /// <summary>
 /// Creates a Discovery.svc <see cref="Uri"/> instance based on the specified location
 /// </summary>
 /// <param name="location">The scheme, host, and port # (if applicable) representing location of Discovery.svc</param>
 /// <returns>A new instance of <see cref="Uri"/> for the Discovery.svc</returns>
 /// <remarks>
 /// EXAMPLES: https://hostname:5555, https://hostname
 /// The Discovery.svc endpoint path is not necessary as this will be appended
 /// </remarks>
 public static Uri CreateDiscoveryServiceUri(string location)
 {
     return(XrmServiceUriFactory.CreateServiceUri(location, XrmServiceType.Discovery));
 }