Exemple #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (BaseProfile == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BaseProfile");
     }
     if (Canvas == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Canvas");
     }
     if (Webgl == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Webgl");
     }
     if (Timezone == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Timezone");
     }
     if (Geolocation == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Geolocation");
     }
     if (Proxy == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Proxy");
     }
     if (WebRtc == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "WebRtc");
     }
     if (Fonts == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Fonts");
     }
     if (Plugins == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Plugins");
     }
     if (Screen == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Screen");
     }
     if (StartPage == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "StartPage");
     }
     if (Extensions == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Extensions");
     }
     if (Notes == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Notes");
     }
     if (Launcher == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Launcher");
     }
     if (Status == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Status");
     }
     if (BaseProfile != null)
     {
         BaseProfile.Validate();
     }
     if (Webgl != null)
     {
         Webgl.Validate();
     }
     if (Timezone != null)
     {
         Timezone.Validate();
     }
     if (Geolocation != null)
     {
         Geolocation.Validate();
     }
     if (Proxy != null)
     {
         Proxy.Validate();
     }
     if (WebRtc != null)
     {
         WebRtc.Validate();
     }
     if (Fonts != null)
     {
         Fonts.Validate();
     }
     if (Plugins != null)
     {
         Plugins.Validate();
     }
     if (Screen != null)
     {
         Screen.Validate();
     }
     if (Status != null)
     {
         Status.Validate();
     }
 }
Exemple #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Canvas == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Canvas");
     }
     if (Webgl == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Webgl");
     }
     if (Timezone == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Timezone");
     }
     if (Geolocation == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Geolocation");
     }
     if (Proxy == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Proxy");
     }
     if (WebRtc == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "WebRtc");
     }
     if (Fonts == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Fonts");
     }
     if (Plugins == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Plugins");
     }
     if (Screen == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Screen");
     }
     if (StartPage == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "StartPage");
     }
     if (Webgl != null)
     {
         Webgl.Validate();
     }
     if (Timezone != null)
     {
         Timezone.Validate();
     }
     if (Geolocation != null)
     {
         Geolocation.Validate();
     }
     if (Proxy != null)
     {
         Proxy.Validate();
     }
     if (WebRtc != null)
     {
         WebRtc.Validate();
     }
     if (Fonts != null)
     {
         Fonts.Validate();
     }
     if (Plugins != null)
     {
         Plugins.Validate();
     }
     if (Screen != null)
     {
         Screen.Validate();
     }
 }