C# Class Microsoft.ResourceManagement.Client.DefaultClient

The DefaultClient is a thin wrapper over the the following clients: WsTransfer, WsTransferFactory, WsEnumeration , Alternate, STS It is intended to be useful only for common scenarios. For more advanced scenarios, please use the other clients.
Please note that you should call RefreshSchema before using the client for the first time, as otherwise the request and resource factories will use (incorrect) default information.
Inheritance: IDisposable
Datei anzeigen Open project: Predica/FimClient Class Usage Examples

Public Properties

Property Type Description
questionHandler QAGateQuestionsHandler

Public Methods

Method Description
Approve ( RmApproval approval, bool isApproved ) : void

Submits an approval response message for the pending approval using the default approval endpoint configuration name (ServiceMultipleTokenBinding_ResourceFactory).

Approve ( RmApproval approval, bool isApproved, EndpointAddress address ) : void

Submits an approval response message for the pending approval using the specified endpoint address and the default approval endpoint configuration name (ServiceMultipleTokenBinding_ResourceFactory). Use this overload e.g. if you need to specify explicitly a service principal name.

Approve ( RmApproval approval, bool isApproved, EndpointAddress address, string approvalConfiguration ) : void

Submits an approval response message for the pending approval using the specified endpoint address and the specified approval endpoint configuration name. Use this overload e.g. if you need to specify explicitly a service principal name.

Approve ( RmApproval approval, bool isApproved, string approvalConfiguration ) : void

Submits an approval response message for the pending approval using the specified approval endpoint configuration name.

Create ( RmResource newResource ) : RmReference

Creates the given resource and returns its ObjectId. This method does not set the ObjectId of newResource.

DefaultClient ( ) : System

Default constructor.

DefaultClient ( String wsTransferConfigurationName, String wsTransferFactoryConfigurationName, String wsEnumerationConfigurationName, String mexConfigurationName, String alternateClientConfigurationName ) : System

Constructor.

DefaultClient ( String wsTransferConfigurationName, String wsTransferEndpointAddress, String wsTransferFactoryConfigurationName, String wsTransferFactoryEndpointAddress, String wsEnumerationConfigurationName, String wsEnumerationEndpointAddress, String mexConfigurationName, String mexEndpointAddress, String alternateClientConfigurationName, String alternamteClientConfigurationAddress ) : System

Constructor.

DefaultClient ( string fimUrl, System.TimeSpan receiveTimeout = null, int maxReceivedMessageSize = null ) : System
Delete ( RmReference objectId ) : bool

Deletes the object with the given ObjectId.

Dispose ( ) : void

Dispose

Enumerate ( String filter ) : IEnumerable

Returns an enumerator that can traverse all objects matching the given filter.

Enumerate ( String filter, String attributes ) : IEnumerable

Returns an enumerator that can traverse all objects matching the given filter. Each object only contains the specified attributes.

Get ( RmReference objectId ) : RmResource

Retrieves the object with the given ObjectId

Get ( RmReference objectId, CultureInfo culture ) : RmResource

Retrieves the representation of an object with the given ObjectId in the given culture.

Get ( RmReference objectId, String attributes ) : RmResource

Retrieves the object and the specified attributes with the given ObjectId.

Put ( RmResourceChanges transaction ) : bool

Saves changes made to an object recorded by the transaction to the service.

Put ( RmResourceChanges transaction, bool useAlternateEndpoint ) : bool
Put ( RmResourceChanges transaction, bool useAlternateEndpoint, PutResponse &response, System.IdentityModel.Tokens.SecurityToken token, System.ServiceModel.Channels.ContextMessageProperty context ) : bool
RefreshSchema ( ) : XmlSchemaSet

Refreshes the metadata from the service.

ResetPassword ( String domainAndUserName ) : void

Protected Methods

Method Description
AskQAGateQuestions ( QAGateQuestionsHandler gateHandler ) : String>.Dictionary
Get ( RmReference objectId, CultureInfo culture, String attributes ) : RmResource

Private Methods

Method Description
HandleAuthNFault ( String stsEndpointAddress, System.ServiceModel.Channels.ContextMessageProperty responseContext ) : ContextualSecurityToken

Method Details

Approve() public method

Submits an approval response message for the pending approval using the default approval endpoint configuration name (ServiceMultipleTokenBinding_ResourceFactory).
public Approve ( RmApproval approval, bool isApproved ) : void
approval Microsoft.ResourceManagement.ObjectModel.ResourceTypes.RmApproval The approval object for which to submit an approval response.
isApproved bool True when to approve the approval. False to reject it.
return void

Approve() public method

Submits an approval response message for the pending approval using the specified endpoint address and the default approval endpoint configuration name (ServiceMultipleTokenBinding_ResourceFactory). Use this overload e.g. if you need to specify explicitly a service principal name.
public Approve ( RmApproval approval, bool isApproved, EndpointAddress address ) : void
approval Microsoft.ResourceManagement.ObjectModel.ResourceTypes.RmApproval The approval object for which to submit an approval response.
isApproved bool True when to approve the approval. False to reject it.
address System.ServiceModel.EndpointAddress
return void

Approve() public method

Submits an approval response message for the pending approval using the specified endpoint address and the specified approval endpoint configuration name. Use this overload e.g. if you need to specify explicitly a service principal name.
public Approve ( RmApproval approval, bool isApproved, EndpointAddress address, string approvalConfiguration ) : void
approval Microsoft.ResourceManagement.ObjectModel.ResourceTypes.RmApproval The approval object for which to submit an approval response.
isApproved bool True when to approve the approval. False to reject it.
address System.ServiceModel.EndpointAddress
approvalConfiguration string The approval endpoint.
return void

Approve() public method

Submits an approval response message for the pending approval using the specified approval endpoint configuration name.
public Approve ( RmApproval approval, bool isApproved, string approvalConfiguration ) : void
approval Microsoft.ResourceManagement.ObjectModel.ResourceTypes.RmApproval The approval object for which to submit an approval response.
isApproved bool True when to approve the approval. False to reject it.
approvalConfiguration string The approval endpoint configuration name.
return void

AskQAGateQuestions() protected method

protected AskQAGateQuestions ( QAGateQuestionsHandler gateHandler ) : String>.Dictionary
gateHandler QAGateQuestionsHandler
return String>.Dictionary

Create() public method

Creates the given resource and returns its ObjectId. This method does not set the ObjectId of newResource.
public Create ( RmResource newResource ) : RmReference
newResource Microsoft.ResourceManagement.ObjectModel.RmResource The resource to create.
return RmReference

DefaultClient() public method

Default constructor.
public DefaultClient ( ) : System
return System

DefaultClient() public method

Constructor.
public DefaultClient ( String wsTransferConfigurationName, String wsTransferFactoryConfigurationName, String wsEnumerationConfigurationName, String mexConfigurationName, String alternateClientConfigurationName ) : System
wsTransferConfigurationName String Name of the ws transfer endpoint configuration.
wsTransferFactoryConfigurationName String Name of the ws transfer factory endpoint configuration.
wsEnumerationConfigurationName String Name of the ws enumeration endpoint configuration.
mexConfigurationName String Name of the mex endpoint configuration.
alternateClientConfigurationName String
return System

DefaultClient() public method

Constructor.
public DefaultClient ( String wsTransferConfigurationName, String wsTransferEndpointAddress, String wsTransferFactoryConfigurationName, String wsTransferFactoryEndpointAddress, String wsEnumerationConfigurationName, String wsEnumerationEndpointAddress, String mexConfigurationName, String mexEndpointAddress, String alternateClientConfigurationName, String alternamteClientConfigurationAddress ) : System
wsTransferConfigurationName String Name of the ws transfer endpoint configuration.
wsTransferEndpointAddress String The ws transfer endpoint address.
wsTransferFactoryConfigurationName String Name of the ws transfer factory endpoint configuration.
wsTransferFactoryEndpointAddress String The ws transfer factory endpoint address.
wsEnumerationConfigurationName String Name of the ws enumeration endpoint configuration.
wsEnumerationEndpointAddress String The ws enumeration endpoint address.
mexConfigurationName String Name of the mex endpoint configuration.
mexEndpointAddress String The mex endpoint address.
alternateClientConfigurationName String
alternamteClientConfigurationAddress String
return System

DefaultClient() public method

public DefaultClient ( string fimUrl, System.TimeSpan receiveTimeout = null, int maxReceivedMessageSize = null ) : System
fimUrl string
receiveTimeout System.TimeSpan
maxReceivedMessageSize int
return System

Delete() public method

Deletes the object with the given ObjectId.
public Delete ( RmReference objectId ) : bool
objectId RmReference The ObjectId of the object to delete.
return bool

Dispose() public method

Dispose
public Dispose ( ) : void
return void

Enumerate() public method

Returns an enumerator that can traverse all objects matching the given filter.
public Enumerate ( String filter ) : IEnumerable
filter String The XPath filter of which objects to select.
return IEnumerable

Enumerate() public method

Returns an enumerator that can traverse all objects matching the given filter. Each object only contains the specified attributes.
public Enumerate ( String filter, String attributes ) : IEnumerable
filter String The XPath filter of which objects to select.
attributes String A list of attribute names to include in returned objects.
return IEnumerable

Get() public method

Retrieves the object with the given ObjectId
System.ServiceModel.FaultException thrown when failures occur.
public Get ( RmReference objectId ) : RmResource
objectId RmReference The ObjectId of the requested object.
return Microsoft.ResourceManagement.ObjectModel.RmResource

Get() public method

Retrieves the representation of an object with the given ObjectId in the given culture.
public Get ( RmReference objectId, CultureInfo culture ) : RmResource
objectId RmReference The ObjectId of the requested object.
culture System.Globalization.CultureInfo The requested culture representation of the object.
return Microsoft.ResourceManagement.ObjectModel.RmResource

Get() protected method

protected Get ( RmReference objectId, CultureInfo culture, String attributes ) : RmResource
objectId RmReference
culture System.Globalization.CultureInfo
attributes String
return Microsoft.ResourceManagement.ObjectModel.RmResource

Get() public method

Retrieves the object and the specified attributes with the given ObjectId.
public Get ( RmReference objectId, String attributes ) : RmResource
objectId RmReference The ObjectId of the requested object.
attributes String The list of attributes on the object to return.
return Microsoft.ResourceManagement.ObjectModel.RmResource

Put() public method

Saves changes made to an object recorded by the transaction to the service.
public Put ( RmResourceChanges transaction ) : bool
transaction Microsoft.ResourceManagement.ObjectModel.RmResourceChanges The transaction object which recorded changes made to a Resource object.
return bool

Put() public method

public Put ( RmResourceChanges transaction, bool useAlternateEndpoint ) : bool
transaction Microsoft.ResourceManagement.ObjectModel.RmResourceChanges
useAlternateEndpoint bool
return bool

Put() public method

public Put ( RmResourceChanges transaction, bool useAlternateEndpoint, PutResponse &response, System.IdentityModel.Tokens.SecurityToken token, System.ServiceModel.Channels.ContextMessageProperty context ) : bool
transaction Microsoft.ResourceManagement.ObjectModel.RmResourceChanges
useAlternateEndpoint bool
response Microsoft.ResourceManagement.Client.WsTransfer.PutResponse
token System.IdentityModel.Tokens.SecurityToken
context System.ServiceModel.Channels.ContextMessageProperty
return bool

RefreshSchema() public method

Refreshes the metadata from the service.
public RefreshSchema ( ) : XmlSchemaSet
return System.Xml.Schema.XmlSchemaSet

ResetPassword() public method

public ResetPassword ( String domainAndUserName ) : void
domainAndUserName String
return void

Property Details

questionHandler public_oe property

public QAGateQuestionsHandler questionHandler
return QAGateQuestionsHandler