ResourceManagementClientCreateResourceTemplateForUpdate Method |
Creates a template of an existing object that can be used to save to the resource management service at a later stage.
As this is an empty template, there is no. validation performed on value changes. It is recommended to use
and perform the update against the real object
Namespace:
Lithnet.ResourceManagement.Client
Assembly:
Lithnet.ResourceManagement.Client (in Lithnet.ResourceManagement.Client.dll) Version: 1.0.6435.24467
Syntaxpublic ResourceObject CreateResourceTemplateForUpdate(
string objectType,
UniqueIdentifier id
)
Public Function CreateResourceTemplateForUpdate (
objectType As String,
id As UniqueIdentifier
) As ResourceObject
public:
ResourceObject^ CreateResourceTemplateForUpdate(
String^ objectType,
UniqueIdentifier^ id
)
Parameters
- objectType
- Type: SystemString
The type of object to create the template for - id
- Type: UniqueIdentifier
The ID of the object to update
Return Value
Type:
ResourceObjectAn empty template of an existing object that can be updated in the resource management service when saved
Examples
The following example shows how to create a blank template of an object used to update the Resource Management Service
public void CreateResource()
{
ResourceManagementClient client = new ResourceManagementClient();
UniqueIdentifier knownID = new UniqueIdentifier("5f491363-4d59-42f9-8f6c-8fd92cd1fb92");
ResourceObject resource = client.CreateResourceTemplateForUpdate("Person", knownID);
resource.Attributes["DisplayName"].SetValue("Test User 3");
try
{
resource.Save();
}
catch (Exception)
{
throw;
}
}
See Also