Class AsyncOrganizationServiceExtensions
Extension methods relating to IAsyncOrgService
Inheritance
System.Object
AsyncOrganizationServiceExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Hsl.Xrm.Sdk.Core.dll
Syntax
public static class AsyncOrganizationServiceExtensions
Methods
FetchAllAsync(IAsyncOrgService, String, CancellationToken)
Pages through records until options.MaxResults is reached.
Declaration
public static Task<List<Entity>> FetchAllAsync(this IAsyncOrgService svc, string query, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
System.String |
query |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Xrm.Sdk.Entity>> |
|
FetchAllAsync<T>(IAsyncOrgService, String, CancellationToken)
Pages through records until options.MaxResults is reached.
Declaration
public static Task<List<T>> FetchAllAsync<T>(this IAsyncOrgService svc, string query, CancellationToken cancellationToken = default(CancellationToken))
where T : Entity
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
System.String |
query |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<T>> |
|
Type Parameters
FetchPageAsync<T>(IAsyncOrgService, String, CancellationToken)
Declaration
public static Task<EntityPage<T>> FetchPageAsync<T>(this IAsyncOrgService svc, string fetchXml, CancellationToken cancellationToken = default(CancellationToken))
where T : Entity
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
System.String |
fetchXml |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<EntityPage<T>> |
|
Type Parameters
RetrieveAllAsync(IAsyncOrgService, QueryExpression, CancellationToken)
Pages through records until options.MaxResults is reached.
Declaration
public static Task<List<Entity>> RetrieveAllAsync(this IAsyncOrgService svc, QueryExpression query, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
Microsoft.Xrm.Sdk.Query.QueryExpression |
query |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Xrm.Sdk.Entity>> |
|
RetrieveAllAsync<T>(IAsyncOrgService, QueryExpression, CancellationToken)
Pages through records until options.MaxResults is reached.
Declaration
public static Task<List<T>> RetrieveAllAsync<T>(this IAsyncOrgService svc, QueryExpression query, CancellationToken cancellationToken = default(CancellationToken))
where T : Entity
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
Microsoft.Xrm.Sdk.Query.QueryExpression |
query |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<T>> |
|
Type Parameters
RetrieveAsync(IAsyncOrgService, EntityReference, ColumnSet)
Retrieve by either a reference to a primary or alternate key of an entity.
Declaration
public static Task<Entity> RetrieveAsync(this IAsyncOrgService svc, EntityReference entity, ColumnSet columnSet)
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
Microsoft.Xrm.Sdk.EntityReference |
entity |
|
Microsoft.Xrm.Sdk.Query.ColumnSet |
columnSet |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Microsoft.Xrm.Sdk.Entity> |
|
RetrieveAsync<T>(IAsyncOrgService, EntityReference, ColumnSet)
Retrieve by either a reference to a primary or alternate key of an entity.
Declaration
public static Task<T> RetrieveAsync<T>(this IAsyncOrgService svc, EntityReference entity, ColumnSet columnSet)
where T : Entity
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
Microsoft.Xrm.Sdk.EntityReference |
entity |
|
Microsoft.Xrm.Sdk.Query.ColumnSet |
columnSet |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
RetrievePageAsync<T>(IAsyncOrgService, QueryExpression, CancellationToken)
Pages through records until options.MaxResults is reached.
Declaration
public static Task<EntityPage<T>> RetrievePageAsync<T>(this IAsyncOrgService svc, QueryExpression query, CancellationToken cancellationToken = default(CancellationToken))
where T : Entity
Parameters
Type |
Name |
Description |
IAsyncOrgService |
svc |
|
Microsoft.Xrm.Sdk.Query.QueryExpression |
query |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<EntityPage<T>> |
|
Type Parameters
ToAsyncOrgService(IOrganizationService)
Generates a wrapper for the given org service that uses Task.Run.
Declaration
public static IAsyncOrgService ToAsyncOrgService(IOrganizationService svc)
Parameters
Type |
Name |
Description |
Microsoft.Xrm.Sdk.IOrganizationService |
svc |
|
Returns