예제 #1
0
        public async Task <IWeb> AddBatchAsync(Batch batch, WebOptions webOptions)
        {
            var newWeb = CreateNewAndAdd() as Web;

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

            return(await newWeb.AddBatchAsync(batch, additionalInfo).ConfigureAwait(false) as Web);
        }
예제 #2
0
        public async Task <IWeb> AddAsync(WebOptions webOptions)
        {
            if (webOptions == null)
            {
                throw new ArgumentNullException(nameof(webOptions));
            }

            var newWeb = CreateNewAndAdd() as Web;

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

            return(await newWeb.AddAsync(additionalInfo).ConfigureAwait(false) as Web);
        }
예제 #3
0
 public IWeb AddBatch(Batch batch, WebOptions webOptions)
 {
     return(AddBatchAsync(batch, webOptions).GetAwaiter().GetResult());
 }
예제 #4
0
 public async Task <IWeb> AddBatchAsync(WebOptions webOptions)
 {
     return(await AddBatchAsync(PnPContext.CurrentBatch, webOptions).ConfigureAwait(false));
 }
예제 #5
0
 public IWeb Add(WebOptions webOptions)
 {
     return(AddAsync(webOptions).GetAwaiter().GetResult());
 }