コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TemplateContext" /> class.
 /// </summary>
 /// <param name="TemplateType">TemplateType (required).</param>
 /// <param name="TemplateFileLocations">The template files (versioned).</param>
 /// <param name="Description">The template description.</param>
 /// <param name="OwnerInfo">OwnerInfo.</param>
 /// <param name="Id">Id.</param>
 /// <param name="TemplateId">The template context id.</param>
 public TemplateContext(TemplateTypeEnum?TemplateType = null, Dictionary <string, StreamLocation> TemplateFileLocations = null, string Description = null, OwnerInfo OwnerInfo = null, string Id = null, string TemplateId = null)
 {
     // to ensure "TemplateType" is required (not null)
     if (TemplateType == null)
     {
         throw new InvalidDataException("TemplateType is a required property for TemplateContext and cannot be null");
     }
     else
     {
         this.TemplateType = TemplateType;
     }
     this.TemplateFileLocations = TemplateFileLocations;
     this.Description           = Description;
     this.OwnerInfo             = OwnerInfo;
     this.Id         = Id;
     this.TemplateId = TemplateId;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TemplateContextRequest" /> class.
 /// </summary>
 /// <param name="TemplateType">TemplateType (required).</param>
 /// <param name="Description">Description.</param>
 /// <param name="OwnerInfo">OwnerInfo.</param>
 /// <param name="TemplateId">The template context id.</param>
 public TemplateContextRequest(TemplateTypeEnum?TemplateType = null, string Description = null, OwnerInfo OwnerInfo = null, string TemplateId = null)
 {
     // to ensure "TemplateType" is required (not null)
     if (TemplateType == null)
     {
         throw new InvalidDataException("TemplateType is a required property for TemplateContextRequest and cannot be null");
     }
     else
     {
         this.TemplateType = TemplateType;
     }
     this.Description = Description;
     this.OwnerInfo   = OwnerInfo;
     this.TemplateId  = TemplateId;
 }