public async Task <IUserCustomAction> AddBatchAsync(Batch batch, AddUserCustomActionOptions options)
        {
            if (null == options)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var newUserCustomAction = CreateNewAndAdd() as UserCustomAction;

            // Add the field options as arguments for the add method
            var additionalInfo = new Dictionary <string, object>()
            {
                { UserCustomAction.AddUserCustomActionOptionsAdditionalInformationKey, options }
            };

            return(await newUserCustomAction.AddBatchAsync(batch, additionalInfo).ConfigureAwait(false) as UserCustomAction);
        }
 public IUserCustomAction AddBatch(AddUserCustomActionOptions options)
 {
     return(AddBatchAsync(options).GetAwaiter().GetResult());
 }
 public async Task <IUserCustomAction> AddBatchAsync(AddUserCustomActionOptions options)
 {
     return(await AddBatchAsync(PnPContext.CurrentBatch, options).ConfigureAwait(false));
 }