Class AsyncOrganizationServiceExtensions
Extension methods relating to IAsyncOrgService
public static class AsyncOrganizationServiceExtensions
- Inheritance
-
AsyncOrganizationServiceExtensions
- Inherited Members
Methods
FetchAllAsync(IAsyncOrgService, string, CancellationToken)
Pages through records until options.MaxResults is reached.
public static Task<List<Entity>> FetchAllAsync(this IAsyncOrgService svc, string query, CancellationToken cancellationToken = default)
Parameters
svc
IAsyncOrgServicequery
stringcancellationToken
CancellationToken
Returns
FetchAllAsync<T>(IAsyncOrgService, string, CancellationToken)
Pages through records until options.MaxResults is reached.
public static Task<List<T>> FetchAllAsync<T>(this IAsyncOrgService svc, string query, CancellationToken cancellationToken = default) where T : Entity
Parameters
svc
IAsyncOrgServicequery
stringcancellationToken
CancellationToken
Returns
Type Parameters
T
FetchPageAsync<T>(IAsyncOrgService, string, CancellationToken)
public static Task<EntityPage<T>> FetchPageAsync<T>(this IAsyncOrgService svc, string fetchXml, CancellationToken cancellationToken = default) where T : Entity
Parameters
svc
IAsyncOrgServicefetchXml
stringcancellationToken
CancellationToken
Returns
- Task<EntityPage<T>>
Type Parameters
T
RetrieveAllAsync(IAsyncOrgService, QueryExpression, CancellationToken)
Pages through records until options.MaxResults is reached.
public static Task<List<Entity>> RetrieveAllAsync(this IAsyncOrgService svc, QueryExpression query, CancellationToken cancellationToken = default)
Parameters
svc
IAsyncOrgServicequery
QueryExpressioncancellationToken
CancellationToken
Returns
RetrieveAllAsync<T>(IAsyncOrgService, QueryExpression, CancellationToken)
Pages through records until options.MaxResults is reached.
public static Task<List<T>> RetrieveAllAsync<T>(this IAsyncOrgService svc, QueryExpression query, CancellationToken cancellationToken = default) where T : Entity
Parameters
svc
IAsyncOrgServicequery
QueryExpressioncancellationToken
CancellationToken
Returns
Type Parameters
T
RetrieveAsync(IAsyncOrgService, EntityReference, ColumnSet)
Retrieve by either a reference to a primary or alternate key of an entity.
public static Task<Entity> RetrieveAsync(this IAsyncOrgService svc, EntityReference entity, ColumnSet columnSet)
Parameters
svc
IAsyncOrgServiceentity
EntityReferencecolumnSet
ColumnSet
Returns
RetrieveAsync<T>(IAsyncOrgService, EntityReference, ColumnSet)
Retrieve by either a reference to a primary or alternate key of an entity.
public static Task<T> RetrieveAsync<T>(this IAsyncOrgService svc, EntityReference entity, ColumnSet columnSet) where T : Entity
Parameters
svc
IAsyncOrgServiceentity
EntityReferencecolumnSet
ColumnSet
Returns
- Task<T>
Type Parameters
T
RetrievePageAsync<T>(IAsyncOrgService, QueryExpression, CancellationToken)
Pages through records until options.MaxResults is reached.
public static Task<EntityPage<T>> RetrievePageAsync<T>(this IAsyncOrgService svc, QueryExpression query, CancellationToken cancellationToken = default) where T : Entity
Parameters
svc
IAsyncOrgServicequery
QueryExpressioncancellationToken
CancellationToken
Returns
- Task<EntityPage<T>>
Type Parameters
T
ToAsyncOrgService(IOrganizationService)
Generates a wrapper for the given org service that uses Task.Run.
public static IAsyncOrgService ToAsyncOrgService(IOrganizationService svc)