public ICreateEntityRequest FillCreateEntityGaps(ICreateEntityRequest userRequest)
        {
            IEntitySource newSource = this.EntitySourceMerger.FillEntitySourceGaps(userRequest.EntitySource);

            ISessionConfig mergedSessionConfig = this.SessionConfigMerger.FillSessionConfigGaps(userRequest.SessionSettings);

            ChangeEntitiesParameters newRequest = new ChangeEntitiesParameters(userRequest.EntityID, userRequest.FieldsRawValuesByName, userRequest.ParametersRawValuesByName, newSource, mergedSessionConfig);

            return(newRequest);
        }
        public async Task <ScCreateEntityResponse> CreateEntityAsync(ICreateEntityRequest request, CancellationToken cancelToken = default(CancellationToken))
        {
            ICreateEntityRequest requestCopy = request.DeepCopyCreateEntityRequest();

            //await this.GetPublicKeyAsync(cancelToken);

            ICreateEntityRequest autocompletedRequest = this.requestMerger.FillCreateEntityGaps(requestCopy);

            var urlBuilder = new GetEntitiesUrlBuilder <ICreateEntityRequest>(this.restGrammar, this.sscGrammar);
            var taskFlow   = new CreateEntityTask <ICreateEntityRequest>(urlBuilder, this.httpClient);

            return(await RestApiCallFlow.LoadRequestFromNetworkFlow(autocompletedRequest, taskFlow, cancelToken));
        }
예제 #3
0
 public async Task <ScCreateEntityResponse> CreateEntityAsync(ICreateEntityRequest request, CancellationToken cancelToken = default(CancellationToken))
 {
     return(await this.InvokeNoThrow(this.workerSession.CreateEntityAsync(request, cancelToken)));
 }