コード例 #1
0
        public async Task WhenAsync(MergePatchUserRoleMvoDto c)
        {
            var idObj         = UserRoleMvoProxyUtils.ToIdString((c as IMergePatchUserRoleMvo).UserRoleId);
            var uriParameters = new UserRoleMvoUriParameters();

            uriParameters.Id = idObj;

            var req  = new UserRoleMvoPatchRequest(uriParameters, (MergePatchUserRoleMvoDto)c);
            var resp = await _ramlClient.UserRoleMvo.Patch(req);

            UserRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
コード例 #2
0
        public async virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new UserRoleMvosCountGetQuery();

            q.Filter = UserRoleMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new UserRoleMvosCountGetRequest();

            req.Query = q;
            var resp = await _ramlClient.UserRoleMvosCount.Get(req);

            UserRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(long.Parse(await resp.RawContent.ReadAsStringAsync()));
        }
コード例 #3
0
        public async Task <IUserRoleMvoStateEvent> GetStateEventAsync(UserRoleId userRoleId, long version)
        {
            var idObj         = UserRoleMvoProxyUtils.ToIdString(userRoleId);
            var uriParameters = new UserRoleMvoStateEventUriParameters();

            uriParameters.Id      = idObj;
            uriParameters.Version = version.ToString();

            var req  = new UserRoleMvoStateEventGetRequest(uriParameters);
            var resp = await _ramlClient.UserRoleMvoStateEvent.Get(req);

            UserRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
コード例 #4
0
        public async Task <IUserRoleMvoState> GetAsync(UserRoleId userRoleId)
        {
            IUserRoleMvoState state = null;
            var idObj         = UserRoleMvoProxyUtils.ToIdString(userRoleId);
            var uriParameters = new UserRoleMvoUriParameters();

            uriParameters.Id = idObj;

            var req = new UserRoleMvoGetRequest(uriParameters);

            var resp = await _ramlClient.UserRoleMvo.Get(req);

            UserRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
            state = resp.Content;
            return(state);
        }
コード例 #5
0
        public async Task <IEnumerable <IUserRoleMvoState> > GetAsync(ICriterion filter, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue, IList <string> fields = null)
        {
            IEnumerable <IUserRoleMvoState> states = null;
            var q = new UserRoleMvosGetQuery();

            q.FirstResult = firstResult;
            q.MaxResults  = maxResults;
            q.Sort        = UserRoleMvoProxyUtils.GetOrdersQueryValueString(orders);
            q.Fields      = UserRoleMvoProxyUtils.GetReturnedFieldsQueryValueString(fields, QueryFieldValueSeparator);
            q.Filter      = UserRoleMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new UserRoleMvosGetRequest();

            req.Query = q;
            var resp = await _ramlClient.UserRoleMvos.Get(req);

            UserRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
            states = resp.Content;
            return(states);
        }
コード例 #6
0
        public async Task WhenAsync(DeleteUserRoleMvoDto c)
        {
            var idObj         = UserRoleMvoProxyUtils.ToIdString((c as IDeleteUserRoleMvo).UserRoleId);
            var uriParameters = new UserRoleMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new UserRoleMvoDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new UserRoleMvoDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.UserRoleMvo.Delete(req);

            UserRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }