コード例 #1
0
 public LogCommentEvent(LogCommentEvent other)
     : this()
 {
     if (other != null)
     {
         Id               = other.Id;
         EventLogId       = other.EventLogId;
         SourceEventLogId = other.SourceEventLogId;
         EventDate        = other.EventDate;
         Content          = other.Content;
     }
 }
コード例 #2
0
        public IOsbideEvent FromDict(Dictionary <string, object> values)
        {
            LogCommentEvent evt = new LogCommentEvent();

            if (values.ContainsKey("Id"))
            {
                evt.Id = (int)values["Id"];
            }
            if (values.ContainsKey("EventLogId"))
            {
                evt.EventLogId = (int)values["EventLogId"];
            }
            if (values.ContainsKey("EventLog"))
            {
                evt.EventLog = (EventLog)values["EventLog"];
            }
            if (values.ContainsKey("EventDate"))
            {
                evt.EventDate = (DateTime)values["EventDate"];
            }
            if (values.ContainsKey("SolutionName"))
            {
                evt.SolutionName = values["SolutionName"].ToString();
            }
            if (values.ContainsKey("Content"))
            {
                evt.Content = values["Content"].ToString();
            }
            if (values.ContainsKey("SourceEventLogId"))
            {
                evt.SourceEventLogId = (int)values["SourceEventLogId"];
            }
            if (values.ContainsKey("SourceEventLog"))
            {
                evt.SourceEventLog = (EventLog)values["SourceEventLog"];
            }
            return(evt);
        }