/// <summary> /// Public constructor with required data /// </summary> /// <param name="_weight"></param> /// <param name="_article"></param> /// <param name="_tag"></param> public ArticleTag(double _weight, WebApi.EF.Models.Article _article, WebApi.EF.Models.Tag _tag) { Weight = _weight; if (_article == null) { throw new ArgumentNullException(nameof(_article)); } Article = _article; if (_tag == null) { throw new ArgumentNullException(nameof(_tag)); } Tag = _tag; Init(); }
/// <summary> /// Public constructor with required data /// </summary> /// <param name="_openednumber"></param> /// <param name="_time"></param> /// <param name="_article"></param> /// <param name="_searchingquery"></param> public OpenedArticle(DateTime _time, WebApi.EF.Models.Article _article, WebApi.EF.Models.SearchingQuery _searchingquery, int _openednumber = 0) { OpenedNumber = _openednumber; Time = _time; if (_article == null) { throw new ArgumentNullException(nameof(_article)); } Article = _article; if (_searchingquery == null) { throw new ArgumentNullException(nameof(_searchingquery)); } SearchingQuery = _searchingquery; Init(); }
/// <summary> /// Static create function (for use in LINQ queries, etc.) /// </summary> /// <param name="_weight"></param> /// <param name="_article"></param> /// <param name="_tag"></param> public static ArticleTag Create(double _weight, WebApi.EF.Models.Article _article, WebApi.EF.Models.Tag _tag) { return(new ArticleTag(_weight, _article, _tag)); }
/// <summary> /// Static create function (for use in LINQ queries, etc.) /// </summary> /// <param name="_openednumber"></param> /// <param name="_time"></param> /// <param name="_article"></param> /// <param name="_searchingquery"></param> public static OpenedArticle Create(DateTime _time, WebApi.EF.Models.Article _article, WebApi.EF.Models.SearchingQuery _searchingquery, int _openednumber = 0) { return(new OpenedArticle(_time, _article, _searchingquery, _openednumber)); }