/// <summary>
 /// Initializes a new instance of the <see cref="ShapeOrNull" /> class
 /// with the <see cref="Triangle" /> class
 /// </summary>
 /// <param name="actualInstance">An instance of Triangle.</param>
 public ShapeOrNull(Triangle actualInstance)
 {
     this.IsNullable     = true;
     this.SchemaType     = "oneOf";
     this.ActualInstance = actualInstance;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shape" /> class
 /// with the <see cref="Triangle" /> class
 /// </summary>
 /// <param name="actualInstance">An instance of Triangle.</param>
 public Shape(Triangle actualInstance)
 {
     this.IsNullable     = false;
     this.SchemaType     = "oneOf";
     this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
 }