Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Drawing" /> class.
 /// </summary>
 /// <param name="mainShape">mainShape</param>
 /// <param name="shapeOrNull">shapeOrNull</param>
 /// <param name="nullableShape">nullableShape</param>
 /// <param name="shapes">shapes</param>
 public Drawing(Shape mainShape = default, ShapeOrNull shapeOrNull = default, NullableShape nullableShape = default, List <Shape> shapes = default)
 {
     MainShape     = mainShape;
     ShapeOrNull   = shapeOrNull;
     NullableShape = nullableShape;
     Shapes        = shapes;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Drawing" /> class.
 /// </summary>
 /// <param name="mainShape">mainShape.</param>
 /// <param name="shapeOrNull">shapeOrNull.</param>
 /// <param name="nullableShape">nullableShape.</param>
 /// <param name="shapes">shapes.</param>
 public Drawing(Shape mainShape = default, ShapeOrNull shapeOrNull = default, NullableShape nullableShape = default, List <Shape> shapes = default) : base()
 {
     this.MainShape     = mainShape;
     this.ShapeOrNull   = shapeOrNull;
     this.NullableShape = nullableShape;
     this.Shapes        = shapes;
 }
Esempio n. 3
0
 /// <summary>
 /// To convert a JSON string into an object
 /// </summary>
 /// <param name="reader">JSON reader</param>
 /// <param name="objectType">Object type</param>
 /// <param name="existingValue">Existing value</param>
 /// <param name="serializer">JSON Serializer</param>
 /// <returns>The object converted from the JSON string</returns>
 public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 {
     if (reader.TokenType != JsonToken.Null)
     {
         return(NullableShape.FromJson(JObject.Load(reader).ToString(Formatting.None)));
     }
     return(null);
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Drawing" /> class.
 /// </summary>
 /// <param name="mainShape">mainShape.</param>
 /// <param name="shapeOrNull">shapeOrNull.</param>
 /// <param name="nullableShape">nullableShape.</param>
 /// <param name="shapes">shapes.</param>
 public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List <Shape> shapes = default(List <Shape>)) : base()
 {
     this._MainShape     = mainShape;
     this._ShapeOrNull   = shapeOrNull;
     this._NullableShape = nullableShape;
     this._Shapes        = shapes;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Drawing" /> class.
 /// </summary>
 /// <param name="mainShape">mainShape.</param>
 /// <param name="shapeOrNull">shapeOrNull.</param>
 /// <param name="nullableShape">nullableShape.</param>
 /// <param name="shapes">shapes.</param>
 public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List <Shape> shapes = default(List <Shape>)) : base()
 {
     this._MainShape = mainShape;
     if (this.MainShape != null)
     {
         this._flagMainShape = true;
     }
     this._ShapeOrNull = shapeOrNull;
     if (this.ShapeOrNull != null)
     {
         this._flagShapeOrNull = true;
     }
     this._NullableShape = nullableShape;
     if (this.NullableShape != null)
     {
         this._flagNullableShape = true;
     }
     this._Shapes = shapes;
     if (this.Shapes != null)
     {
         this._flagShapes = true;
     }
 }