Ejemplo n.º 1
0
            /// <summary>
            /// Create a new dashboard builder.
            /// </summary>
            /// <param name="Name">The (multi-language) name of this dashboard.</param>
            /// <param name="Description">The (multi-language) description of this dashboard.</param>
            /// <param name="CreationDate">The timestamp of the publication of this dashboard.</param>
            /// <param name="Tags">An enumeration of multi-language tags and their relevance.</param>
            /// <param name="IsDisabled">Whether the dashboard is disabled.</param>
            /// <param name="DataSource">The source of all this data, e.g. an automatic importer.</param>
            public Builder(I18NString Name,
                           I18NString Description          = null,
                           DateTime?CreationDate           = null,
                           IEnumerable <TagRelevance> Tags = null,
                           Boolean?IsDisabled = false,
                           String DataSource  = "")

                : this(Dashboard_Id.Random(),
                       Name,
                       Description,
                       CreationDate,
                       Tags,
                       IsDisabled,
                       DataSource)

            {
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new Dashboard builder.
 /// </summary>
 /// <param name="Id">The unique identification of this dashboard.</param>
 /// <param name="Name">The (multi-language) name of this dashboard.</param>
 /// <param name="Description">The (multi-language) description of this dashboard.</param>
 /// <param name="CreationDate">The timestamp of the publication of this dashboard.</param>
 /// <param name="Tags">An enumeration of multi-language tags and their relevance.</param>
 /// <param name="IsDisabled">Whether the dashboard is disabled.</param>
 /// <param name="DataSource">The source of all this data, e.g. an automatic importer.</param>
 public Builder(Dashboard_Id Id,
                I18NString Name,
                I18NString Description          = null,
                DateTime?CreationDate           = null,
                IEnumerable <TagRelevance> Tags = null,
                Boolean?IsDisabled = false,
                String DataSource  = "")
 {
     this.Id           = Id;
     this.Name         = Name ?? throw new ArgumentNullException(nameof(Name), "The given name must not be null!");
     this.Description  = Description ?? I18NString.Empty;
     this.CreationDate = CreationDate ?? DateTime.Now;
     this.Tags         = Tags != null
                              ? new List <TagRelevance>(Tags)
                              : new List <TagRelevance>();
     this.IsDisabled = IsDisabled ?? false;
     this.DataSource = DataSource;
 }