Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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;
 }