/// <summary> /// Initializes a new instance of the <see cref="WidgetDTO" /> class. /// </summary> /// <param name="widgetId">widgetId.</param> /// <param name="type">type.</param> /// <param name="name">name.</param> /// <param name="visibility">visibility (default to false).</param> /// <param name="label">label.</param> /// <param name="icon">icon.</param> /// <param name="labelcolor">labelcolor.</param> /// <param name="valuecolor">valuecolor.</param> /// <param name="mappings">mappings.</param> /// <param name="switchSupport">switchSupport (default to false).</param> /// <param name="sendFrequency">sendFrequency.</param> /// <param name="separator">separator.</param> /// <param name="refresh">refresh.</param> /// <param name="height">height.</param> /// <param name="minValue">minValue.</param> /// <param name="maxValue">maxValue.</param> /// <param name="step">step.</param> /// <param name="url">url.</param> /// <param name="encoding">encoding.</param> /// <param name="service">service.</param> /// <param name="period">period.</param> /// <param name="legend">legend (default to false).</param> /// <param name="state">state.</param> /// <param name="item">item.</param> /// <param name="linkedPage">linkedPage.</param> /// <param name="widgets">widgets.</param> public WidgetDTO(string widgetId = default(string), string type = default(string), string name = default(string), bool?visibility = false, string label = default(string), string icon = default(string), string labelcolor = default(string), string valuecolor = default(string), List <MappingDTO> mappings = default(List <MappingDTO>), bool?switchSupport = false, int?sendFrequency = default(int?), string separator = default(string), int?refresh = default(int?), int?height = default(int?), decimal?minValue = default(decimal?), decimal?maxValue = default(decimal?), decimal?step = default(decimal?), string url = default(string), string encoding = default(string), string service = default(string), string period = default(string), bool?legend = false, string state = default(string), EnrichedItemDTO item = default(EnrichedItemDTO), PageDTO linkedPage = default(PageDTO), List <WidgetDTO> widgets = default(List <WidgetDTO>)) { WidgetId = widgetId; Type = type; Name = name; // use default value if no "visibility" provided if (visibility == null) { Visibility = false; } else { Visibility = visibility; } Label = label; Icon = icon; Labelcolor = labelcolor; Valuecolor = valuecolor; Mappings = mappings; // use default value if no "switchSupport" provided if (switchSupport == null) { SwitchSupport = false; } else { SwitchSupport = switchSupport; } SendFrequency = sendFrequency; Separator = separator; Refresh = refresh; Height = height; MinValue = minValue; MaxValue = maxValue; Step = step; Url = url; Encoding = encoding; Service = service; Period = period; // use default value if no "legend" provided if (legend == null) { Legend = false; } else { Legend = legend; } State = state; Item = item; LinkedPage = linkedPage; Widgets = widgets; }
/// <summary> /// Initializes a new instance of the <see cref="SitemapDTO" /> class. /// </summary> /// <param name="name">name.</param> /// <param name="icon">icon.</param> /// <param name="label">label.</param> /// <param name="link">link.</param> /// <param name="homepage">homepage.</param> public SitemapDTO(string name = default(string), string icon = default(string), string label = default(string), string link = default(string), PageDTO homepage = default(PageDTO)) { Name = name; Icon = icon; Label = label; Link = link; Homepage = homepage; }