internal IAsyncResult BeginDelete(string entityName, Guid id, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <int> .Begin("Delete", callback, asyncState, cancellationToken, createContext : () => new OrganizationWebProxyClientContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.Channel.BeginDelete(entityName, id, _callback, _state), endOperation : (_asynResult) => { base.Channel.EndDelete(_asynResult); return(0); }, cancelOperation : (_asyncResult) => base.Abort());
internal IAsyncResult BeginExecute(DiscoveryRequest request, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <DiscoveryResponse> .Begin("Execute", callback, asyncState, cancellationToken, createContext : () => new DiscoveryServiceContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.ServiceChannel.Channel.BeginExecute(request, _callback, _state), endOperation : (_asynResult) => base.ServiceChannel.Channel.EndExecute(_asynResult), cancelOperation : (_asyncResult) => base.ServiceChannel.Abort());
internal IAsyncResult BeginRetrieveMultiple(QueryBase query, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <EntityCollection> .Begin("RetrieveMultiple", callback, asyncState, cancellationToken, createContext : () => new OrganizationWebProxyClientContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.Channel.BeginRetrieveMultiple(query, _callback, _state), endOperation : (_asynResult) => base.Channel.EndRetrieveMultiple(_asynResult), cancelOperation : (_asyncResult) => base.Abort());
internal IAsyncResult BeginCreate(Entity entity, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <Guid> .Begin("Create", callback, asyncState, cancellationToken, createContext : () => new OrganizationWebProxyClientContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.Channel.BeginCreate(entity, _callback, _state), endOperation : (_asynResult) => base.Channel.EndCreate(_asynResult), cancelOperation : (_asyncResult) => base.Abort());
internal IAsyncResult BeginRetrieve(string entityName, Guid id, ColumnSet columnSet, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <Entity> .Begin("Retrieve", callback, asyncState, cancellationToken, createContext : () => new OrganizationWebProxyClientContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.Channel.BeginRetrieve(entityName, id, columnSet, _callback, _state), endOperation : (_asynResult) => base.Channel.EndRetrieve(_asynResult), cancelOperation : (_asyncResult) => base.Abort());
internal IAsyncResult BeginDisassociate(string entityName, Guid entityId, Relationship relationship, EntityReferenceCollection relatedEntities, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <int> .Begin("Disassociate", callback, asyncState, cancellationToken, createContext : () => new OrganizationWebProxyClientContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.Channel.BeginDisassociate(entityName, entityId, relationship, relatedEntities, _callback, _state), endOperation : (_asynResult) => { base.Channel.EndDisassociate(_asynResult); return(0); }, cancelOperation : (_asyncResult) => base.Abort());
internal IAsyncResult BeginUpdate(Entity entity, AsyncCallback callback, object asyncState, CancellationToken cancellationToken) => AsyncCallOperation <int> .Begin("Update", callback, asyncState, cancellationToken, createContext : () => new OrganizationServiceContextInitializer(this), tryBegin : TryRun, tryEnd : TryRun, beginOperation : (_callback, _state) => base.ServiceChannel.Channel.BeginUpdate(entity, _callback, _state), endOperation : (_asynResult) => { base.ServiceChannel.Channel.EndUpdate(_asynResult); return(0); }, cancelOperation : (_asyncResult) => base.ServiceChannel.Abort());