public static WebCreationParameters Create(string name, NewWebParameters parameters) { if (name == null) { throw new ArgumentNullException("name"); } if (parameters == null) { throw new ArgumentNullException("parameters"); } var created = new WebCreationParameters { Name = name, Title = parameters.Title, Description = parameters.Description, Template = parameters.Template, Language = parameters.Language, Locale = parameters.Locale, CollationLocale = parameters.CollationLocale, }; if (parameters.UniquePermissions.IsPresent) { created.UniquePermissions = parameters.UniquePermissions; } if (parameters.Anonymous.IsPresent) { created.Anonymous = parameters.Anonymous; } if (parameters.Presence.IsPresent) { created.Presence = parameters.Presence; } return(created); }
public static WebCreationParameters Create(string name, NewWebParameters parameters) { if (name == null) throw new ArgumentNullException("name"); if (parameters == null) throw new ArgumentNullException("parameters"); var created = new WebCreationParameters { Name = name, Title = parameters.Title, Description = parameters.Description, Template = parameters.Template, Language = parameters.Language, Locale = parameters.Locale, CollationLocale = parameters.CollationLocale, }; if (parameters.UniquePermissions.IsPresent) created.UniquePermissions = parameters.UniquePermissions; if (parameters.Anonymous.IsPresent) created.Anonymous = parameters.Anonymous; if (parameters.Presence.IsPresent) created.Presence = parameters.Presence; return created; }