コード例 #1
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="entrytype">Type of entry</param>
        /// <param name="entrydata">If applicable, semicolon separated list of strings/numbers relating to this entry (no spaces other than those required by the strings themselves).</param>
        /// <param name="timestamp">Time that this entry was created</param>
        /// <param name="_user0"></param>
        public SessionLogEntry(global::BackendModel.SessionLogEntryType entrytype, string entrydata, DateTime timestamp, global::BackendModel.User _user0)
        {
            this.EntryType = entrytype;

            if (string.IsNullOrEmpty(entrydata))
            {
                throw new ArgumentNullException(nameof(entrydata));
            }
            this.EntryData = entrydata;

            this.Timestamp = timestamp;

            if (_user0 == null)
            {
                throw new ArgumentNullException(nameof(_user0));
            }
            _user0.SessonLogEntries.Add(this);

            Init();
        }
コード例 #2
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="entrytype">Type of entry</param>
 /// <param name="entrydata">If applicable, semicolon separated list of strings/numbers relating to this entry (no spaces other than those required by the strings themselves).</param>
 /// <param name="timestamp">Time that this entry was created</param>
 /// <param name="_user0"></param>
 public static SessionLogEntry Create(global::BackendModel.SessionLogEntryType entrytype, string entrydata, DateTime timestamp, global::BackendModel.User _user0)
 {
     return(new SessionLogEntry(entrytype, entrydata, timestamp, _user0));
 }