public Task <TAzureResource> GetResourceAsync <TAzureResource>(string resourceId, bool throwIfNotExists = false) where TAzureResource : AzureResource { var bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; var resource = Activator.CreateInstance(typeof(TAzureResource), bindingFlags, null, new object[] { resourceId }, CultureInfo.InvariantCulture) as TAzureResource; return(AzureResource.InitializeAsync(resource, this, throwIfNotExists)); }
public Task <AzureResourceGroup> GetResourceGroupAsync(Guid subscriptionId, string resourceGroupName, bool throwIfNotExists = false) => AzureResource.InitializeAsync(new AzureResourceGroup(subscriptionId, resourceGroupName), this, throwIfNotExists);
public Task <AzureResource> GetResourceAsync(string resourceId, bool throwIfNotExists = false) => AzureResource.InitializeAsync(new AzureResource(resourceId), this, throwIfNotExists);
public Task <AzureSubscription> GetSubscriptionAsync(Guid subscriptionId, bool throwIfNotExists = false) => AzureResource.InitializeAsync(new AzureSubscription(subscriptionId), this, throwIfNotExists);