private static FieldCreationOptions FieldUrlOptionsToCreation(string title, FieldUrlOptions options) { FieldCreationOptions creationOptions = new FieldCreationOptions(FieldType.URL); creationOptions.ImportFromCommonFieldOptions(title, options); creationOptions.SetAttribute("Format", options.DisplayFormat.ToString()); return(creationOptions); }
public async Task <IField> AddUrlAsync(string title, FieldUrlOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } return(await AddFieldAsync(FieldUrlOptionsToCreation(title, options)).ConfigureAwait(false)); }
public IField AddUrl(string title, FieldUrlOptions options) { return(AddUrlAsync(title, options).GetAwaiter().GetResult()); }
public IField AddUrlBatch(Batch batch, string title, FieldUrlOptions options) { return(AddUrlBatchAsync(batch, title, options).GetAwaiter().GetResult()); }
public async Task <IField> AddUrlBatchAsync(string title, FieldUrlOptions options) { return(await AddUrlBatchAsync(PnPContext.CurrentBatch, title, options).ConfigureAwait(false)); }