GetResourceTypeOrName() 개인적인 정적인 메소드

Gets either a resource type or resource Id based on the value of the getResourceName parameter.
private static GetResourceTypeOrName ( string resourceId, bool getResourceName, bool includeProviderNamespace = true, bool useLastSegment = false ) : string
resourceId string The resource Id.
getResourceName bool When set to true returns a resource name, otherwise a resource type.
includeProviderNamespace bool Indicates if the provider namespace should be included in the resource name.
useLastSegment bool Seek the last segment instead of the first match.
리턴 string
 /// <summary>
 /// Gets either a resource type or resource Id based on the value of the <see cref="getResourceName"/> parameter.
 /// </summary>
 /// <param name="resourceId">The resource Id.</param>
 /// <param name="getResourceName">When set to true returns a resource name, otherwise a resource type.</param>
 /// <param name="includeProviderNamespace">Indicates if the provider namespace should be included in the resource name.</param>
 private static string GetExtensionResourceTypeOrName(string resourceId, bool getResourceName, bool includeProviderNamespace = true)
 {
     return(ResourceIdUtility.IsExtensionResourceId(resourceId)
         ? ResourceIdUtility.GetResourceTypeOrName(resourceId: resourceId, getResourceName: getResourceName, includeProviderNamespace: includeProviderNamespace, useLastSegment: true)
         : null);
 }
 /// <summary>
 /// Gets a resource name
 /// </summary>
 /// <param name="resourceId">The resource Id.</param>
 public static string GetResourceName(string resourceId)
 {
     return(ResourceIdUtility.GetResourceTypeOrName(resourceId: resourceId, getResourceName: true));
 }
 /// <summary>
 /// Gets the deployment name
 /// </summary>
 /// <param name="resourceId">The resource Id.</param>
 public static string GetDeploymentName(string resourceId)
 {
     return(ResourceIdUtility.GetResourceTypeOrName(resourceId: resourceId, getResourceName: true, useLastSegment: true));
 }
 /// <summary>
 /// Gets a resource type
 /// </summary>
 /// <param name="resourceId">The resource Id.</param>
 /// <param name="includeProviderNamespace">Indicates if the provider namespace should be included in the resource name.</param>
 public static string GetResourceType(string resourceId, bool includeProviderNamespace = true)
 {
     return(ResourceIdUtility.GetResourceTypeOrName(resourceId: resourceId, includeProviderNamespace: includeProviderNamespace, getResourceName: false));
 }