ResourceManagementClientDeleteResources Method (IEnumerableString) |
Deletes the specified resources from the resource management service as a single composite operation
Namespace:
Lithnet.ResourceManagement.Client
Assembly:
Lithnet.ResourceManagement.Client (in Lithnet.ResourceManagement.Client.dll) Version: 1.0.6435.24467
Syntaxpublic void DeleteResources(
IEnumerable<string> resourceIDs
)
Public Sub DeleteResources (
resourceIDs As IEnumerable(Of String)
)
public:
void DeleteResources(
IEnumerable<String^>^ resourceIDs
)
Parameters
- resourceIDs
- Type: System.Collections.GenericIEnumerableString
A collection of object IDs in string format to delete to delete
Remarks
Note that when using this method, the objects are passed to the Resource Management Service in a single request. In the Request History in the portal, this will appear as a single request, and the individual object IDs that were deleted will not be visible.
Examples
The following example deletes a set of objects using a list of known GUIDs represented in string format
public void DeleteResourcesByGuidString()
{
ResourceManagementClient client = new ResourceManagementClient();
List<string> objectsToDelete = new List<string>();
objectsToDelete.Add("71fa5e6b-3f79-4e62-83fe-e6c695edf918");
objectsToDelete.Add("d2fbed50-caa1-4721-ba77-d0ed51c7fdf7");
objectsToDelete.Add("adf184ba-aa6d-4691-aea6-55aeee57ea7a");
try
{
client.DeleteResources(objectsToDelete);
}
catch (Exception)
{
throw;
}
}
See Also