/// <summary>
 /// Initializes a new instance of the <see cref="ModelRef" /> class.
 /// </summary>
 /// <param name="Type">Type (required).</param>
 /// <param name="Links">Links.</param>
 /// <param name="Name">The name of the ref..</param>
 /// <param name="Target">Target.</param>
 public ModelRef(string Type = default(string), RefLinks Links = default(RefLinks), string Name = default(string), Commit Target = default(Commit))
 {
     // to ensure "Type" is required (not null)
     if (Type == null)
     {
         throw new InvalidDataException("Type is a required property for ModelRef and cannot be null");
     }
     else
     {
         this.Type = Type;
     }
     this.Links  = Links;
     this.Name   = Name;
     this.Target = Target;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Tag" /> class.
 /// </summary>
 /// <param name="Type">Type (required).</param>
 /// <param name="Links">Links.</param>
 /// <param name="Name">The name of the ref..</param>
 /// <param name="Target">Target.</param>
 /// <param name="Message">The message associated with the tag, if available..</param>
 /// <param name="Date">The date that the tag was created, if available.</param>
 /// <param name="Tagger">Tagger.</param>
 public Tag(string Type = default(string), RefLinks Links = default(RefLinks), string Name = default(string), Commit Target = default(Commit), string Message = default(string), DateTime?Date = default(DateTime?), Author Tagger = default(Author))
 {
     // to ensure "Type" is required (not null)
     if (Type == null)
     {
         throw new InvalidDataException("Type is a required property for Tag and cannot be null");
     }
     else
     {
         this.Type = Type;
     }
     this.Links   = Links;
     this.Name    = Name;
     this.Target  = Target;
     this.Message = Message;
     this.Date    = Date;
     this.Tagger  = Tagger;
 }