Click or drag to resize

ResourceManagementClient Class

The main class used to create, update, delete, and search for objects in the resource management service
Inheritance Hierarchy
System.Object
  Lithnet.ResourceManagement.Client.ResourceManagementClient

Namespace:  Lithnet.ResourceManagement.Client
Assembly:  Lithnet.ResourceManagement.Client (in Lithnet.ResourceManagement.Client.dll) Version: 1.0.6435.24467
Syntax
public class ResourceManagementClient

The ResourceManagementClient type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleResourceManagementClient()
Initializes a new instance of the ResourceManagementClient class
Public methodCode exampleResourceManagementClient(NetworkCredential)
Initializes a new instance of the ResourceManagementClient class
Public methodResourceManagementClient(String)
Initializes a new instance of the ResourceManagementClient class
Public methodResourceManagementClient(String, NetworkCredential)
Initializes a new instance of the ResourceManagementClient class
Public methodResourceManagementClient(Uri, NetworkCredential, String, Boolean)
Initializes a new instance of the ResourceManagementClient class
Top
Methods
  NameDescription
Public methodApprove
Approves or rejects a pending request
Public methodCode exampleCreateResource
Creates a template of a new object that can be used to save to the resource management service at a later stage
Public methodCode exampleCreateResourceTemplateForUpdate
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
Public methodCode exampleDeleteResource(UniqueIdentifier)
Deletes the specified resource from the resource management service
Public methodCode exampleDeleteResource(Guid)
Deletes the specified resource from the resource management service
Public methodCode exampleDeleteResource(String)
Deletes the specified resource from the resource management service
Public methodCode exampleDeleteResource(ResourceObject)
Deletes the specified resource from the resource management service
Public methodCode exampleDeleteResources(IEnumerable<UniqueIdentifier>)
Deletes the specified resources from the resource management service as a single composite operation
Public methodCode exampleDeleteResources(IEnumerable<Guid>)
Deletes the specified resources from the resource management service as a single composite operation
Public methodCode exampleDeleteResources(IEnumerable<String>)
Deletes the specified resources from the resource management service as a single composite operation
Public methodCode exampleDeleteResources(IEnumerable<ResourceObject>)
Deletes the specified resources from the resource management service as a single composite operation
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetApprovals(ApprovalStatus)
Returns approval requests of the specified type for the currently connected user
Public methodGetApprovals(ApprovalStatus, UniqueIdentifier)
Returns approval requests of the specified type for the specified user
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetResource(UniqueIdentifier)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(Guid)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(String)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(UniqueIdentifier, Boolean)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(UniqueIdentifier, IEnumerable<String>)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(UniqueIdentifier, CultureInfo)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(Guid, IEnumerable<String>)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(Guid, CultureInfo)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(String, Boolean)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(String, IEnumerable<String>)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(String, CultureInfo)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(UniqueIdentifier, IEnumerable<String>, Boolean)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodCode exampleGetResource(UniqueIdentifier, IEnumerable<String>, CultureInfo)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(UniqueIdentifier, CultureInfo, Boolean)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodGetResource(Guid, IEnumerable<String>, CultureInfo)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodCode exampleGetResource(String, IEnumerable<String>, Boolean)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(String, IEnumerable<String>, CultureInfo)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(String, CultureInfo, Boolean)
Gets a resource from the resource management service, retrieving all attributes for the resource
Public methodCode exampleGetResource(UniqueIdentifier, IEnumerable<String>, CultureInfo, Boolean)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodGetResource(String, IEnumerable<String>, CultureInfo, Boolean)
Gets a resource from the resource management service, retrieving only a specified set of attributes for the resource
Public methodCode exampleGetResourceByKey(String, Dictionary<String, Object>)
Gets a resource from the resource management service using a set of unique attribute and value combinations, retrieving all attributes for the resource
Public methodCode exampleGetResourceByKey(String, Dictionary<String, Object>, IEnumerable<String>)
Gets a resource from the resource management service using a set of unique attribute and value combinations, retrieving the specified attributes for the resource
Public methodCode exampleGetResourceByKey(String, String, Object)
Gets a resource from the resource management service using a unique attribute and value combination, retrieving all attributes for the resource
Public methodCode exampleGetResourceByKey(String, Dictionary<String, Object>, IEnumerable<String>, CultureInfo)
Gets a resource from the resource management service using a set of unique attribute and value combinations, retrieving the specified attributes for the resource
Public methodCode exampleGetResourceByKey(String, String, Object, IEnumerable<String>)
Gets a resource from the resource management service using a unique attribute and value combination, retrieving the specified attributes for the resource
Public methodCode exampleGetResourceByKey(String, String, Object, CultureInfo)
Gets a resource from the resource management service using a unique attribute and value combination, retrieving all attributes for the resource
Public methodCode exampleGetResourceByKey(String, String, Object, IEnumerable<String>, CultureInfo)
Gets a resource from the resource management service using a unique attribute and value combination, retrieving the specified attributes for the resource
Public methodGetResourceCount
Gets the number of resources that match a specified criteria
Public methodGetResources(String)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the default page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResources(String, IEnumerable<String>)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the default page size, and retrieving the specified attributes
Public methodGetResources(String, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the default page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResources(String, Int32)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResources(String, IEnumerable<String>, IEnumerable<SortingAttribute>)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, IEnumerable<String>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the default page size, and retrieving the specified attributes
Public methodGetResources(String, Int32, IEnumerable<String>)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, IEnumerable<String>, String, Boolean)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, Int32, IEnumerable<String>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResources(String, Int32, IEnumerable<String>, String, Boolean)
Uses the specified XPath filter to find matching objects in the resource management service, synchronously, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, IEnumerable<String>)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, Int32)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, IEnumerable<String>, IEnumerable<SortingAttribute>)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, IEnumerable<String>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, IEnumerable<String>, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, CultureInfo, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, Int32, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, IEnumerable<String>, IEnumerable<SortingAttribute>, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, IEnumerable<String>, CultureInfo, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the default page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, IEnumerable<String>, String, Boolean)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, CultureInfo, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size WARNING: Due to the way that the resource management client processes unconstrained XPath queries, this function can cause excessive load on the underlying database. If the object type or attributes are known, use the overload of this function that supports specifying the attributes to get
Public methodGetResourcesAsync(String, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, IEnumerable<String>, String, Boolean, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, CultureInfo, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, String, Boolean)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesAsync(String, Int32, IEnumerable<String>, String, Boolean, CancellationTokenSource)
Uses the specified XPath filter to find matching objects in the resource management service, retrieving all results asynchronously on a separate thread, using the specified page size, and retrieving the specified attributes
Public methodGetResourcesPaged(String, Int32)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetResourcesPaged(String, Int32, IEnumerable<String>)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetResourcesPaged(String, Int32, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetResourcesPaged(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetResourcesPaged(String, Int32, IEnumerable<String>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetResourcesPaged(String, Int32, IEnumerable<String>, IEnumerable<SortingAttribute>, CultureInfo)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetResourcesPaged(String, Int32, IEnumerable<String>, String, Boolean)
Uses the specified XPath filter to find matching objects in the resource management service, using a SearchResultPager to navigate through the result set
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRefreshSchema
Reloads the schema from the Resource Management Service
Public methodSaveResource(ResourceObject)
Saves the specified resource in the resource management service
Public methodSaveResource(ResourceObject, CultureInfo)
Saves the specified resource in the resource management service
Public methodSaveResources(ResourceObject[])
Saves the specified resources in the resource management service. Updates and Adds are committed as a single composite operation.
Public methodSaveResources(IEnumerable<ResourceObject>)
Saves the specified resources in the resource management service. Updates and Adds are committed as a single composite operation.
Public methodSaveResourcesParallel(IEnumerable<ResourceObject>)
Saves the specified resources in the resource management service. Each update is performed on its own thread
Public methodSaveResourcesParallel(IEnumerable<ResourceObject>, Int32)
Saves the specified resources in the resource management service. Each update is performed on its own thread
Public methodSaveResourcesParallel(IEnumerable<ResourceObject>, Int32, CultureInfo)
Saves the specified resources in the resource management service. Each update is performed on its own thread
Public methodToString (Inherited from Object.)
Top
Examples
Using the Resource Management Client
using System;
using Lithnet.ResourceManagement.Client;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create an instance of the resource management defaultCredentialClient
            ResourceManagementClient client = new ResourceManagementClient();

            // Get the resource with the account name 'testuser'
            ResourceObject resource = client.GetResourceByKey("Person", "AccountName", "testuser");

            // Write the object to the console
            Console.WriteLine(resource.ToString());

            // Get a single attribute
            Console.WriteLine(resource.Attributes["AccountName"].StringValue);

            // Change an attribute
            resource.Attributes["AccountName"].SetValue("NewUsername");

            // Save the resource to the fim service
            resource.Save();

            // Create a new object
            ResourceObject newResource = client.CreateResource("Person");
            newResource.Attributes["AccountName"].SetValue("MyNewAccount");
            newResource.Attributes["Domain"].SetValue("FIM-DEV1");

            // Save the new object to the fim service
            newResource.Save();

            // Search for the newly created object by anchor
            ResourceObject foundObject = client.GetResourceByKey("Person", "AccountName", "MyNewAccount");

            // Delete the object
            client.DeleteResource(foundObject);

            // Print the values of the object
            Console.WriteLine(foundObject.ToString());

            // Search for all Sets
            foreach (ResourceObject result in client.GetResources("/Set"))
            {
                Console.WriteLine(result.ToString());
            }
        }
    }
}
Thread Safety
Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
See Also