public static T Patch <T>(this IPomonaClient client, T target, Action <T> updateAction, Action <IRequestOptions <T> > options = null)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }
            var patchForm = (T)client.TypeMapper.CreatePatchForm(typeof(T), target);

            updateAction(patchForm);

            var requestOptions = new RequestOptions <T>();

            if (options != null)
            {
                options(requestOptions);
            }

            return((T)client.Patch(patchForm, requestOptions));
        }
Example #2
0
 public TSubResource Patch <TSubResource>(TSubResource resource,
                                          Action <TSubResource> patchAction,
                                          Action <IRequestOptions <TSubResource> > options) where TSubResource : class, TResource
 {
     return(Client.Patch(resource, patchAction, options));
 }