GetExtensionProviderNamespace() public static method

Gets the extension provider namespace from the resource id.
public static GetExtensionProviderNamespace ( string resourceId ) : string
resourceId string The resource id.
return string
        /// <summary>
        /// Determines the API version.
        /// </summary>
        /// <param name="context">The azure profile.</param>
        /// <param name="resourceId">The resource Id.</param>
        /// <param name="cancellationToken">The cancellation token</param>
        /// <param name="pre">When specified, indicates if pre-release API versions should be considered.</param>
        internal static Task <string> DetermineApiVersion(IAzureContext context, string resourceId, CancellationToken cancellationToken, bool?pre = null, Dictionary <string, string> cmdletHeaderValues = null)
        {
            var providerNamespace = ResourceIdUtility.GetExtensionProviderNamespace(resourceId)
                                    ?? ResourceIdUtility.GetProviderNamespace(resourceId);

            var resourceType = ResourceIdUtility.GetExtensionResourceType(resourceId: resourceId, includeProviderNamespace: false)
                               ?? ResourceIdUtility.GetResourceType(resourceId: resourceId, includeProviderNamespace: false);

            return(DetermineApiVersion(context: context, providerNamespace: providerNamespace, resourceType: resourceType, cancellationToken: cancellationToken, pre: pre, cmdletHeaderValues: cmdletHeaderValues));
        }
        /// <summary>
        /// Determines the API version.
        /// </summary>
        /// <param name="profile">The azure profile.</param>
        /// <param name="resourceId">The resource Id.</param>
        /// <param name="cancellationToken">The cancellation token</param>
        /// <param name="pre">When specified, indicates if pre-release API versions should be considered.</param>
        internal static Task <string> DetermineApiVersion(AzureProfile profile, string resourceId, CancellationToken cancellationToken, bool?pre = null)
        {
            var providerNamespace = ResourceIdUtility.GetExtensionProviderNamespace(resourceId)
                                    ?? ResourceIdUtility.GetProviderNamespace(resourceId);

            var resourceType = ResourceIdUtility.GetExtensionResourceType(resourceId: resourceId, includeProviderNamespace: false)
                               ?? ResourceIdUtility.GetResourceType(resourceId: resourceId, includeProviderNamespace: false);

            return(ApiVersionHelper.DetermineApiVersion(profile: profile, providerNamespace: providerNamespace, resourceType: resourceType, cancellationToken: cancellationToken, pre: pre));
        }