Ejemplo n.º 1
0
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static WorkflowLog ToModel(this WorkflowLogDto value)
        {
            WorkflowLog result = new WorkflowLog();

            value.CopyToModel(result);
            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Copies the properties from another WorkflowLog object to this WorkflowLog object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this WorkflowLog target, WorkflowLog source)
 {
     target.WorkflowId  = source.WorkflowId;
     target.LogDateTime = source.LogDateTime;
     target.LogText     = source.LogText;
     target.Id          = source.Id;
     target.Guid        = source.Guid;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Adds a <see cref="Rock.Model.WorkflowLog"/> entry.
        /// </summary>
        /// <param name="logEntry">A <see cref="System.String"/>containing the log entry.</param>
        public virtual void AddLogEntry(string logEntry)
        {
            var workflowLog = new WorkflowLog();

            workflowLog.LogDateTime = DateTime.Now;
            workflowLog.LogText     = logEntry;

            this.LogEntries.Add(workflowLog);
        }
 /// <summary>
 /// Copies the properties from another WorkflowLog object to this WorkflowLog object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this WorkflowLog target, WorkflowLog source)
 {
     target.Id                      = source.Id;
     target.LogDateTime             = source.LogDateTime;
     target.LogText                 = source.LogText;
     target.WorkflowId              = source.WorkflowId;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
 /// <summary>
 /// Clones this WorkflowLog object to a new WorkflowLog object
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="deepCopy">if set to <c>true</c> a deep copy is made. If false, only the basic entity properties are copied.</param>
 /// <returns></returns>
 public static WorkflowLog Clone(this WorkflowLog source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as WorkflowLog);
     }
     else
     {
         var target = new WorkflowLog();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="workflowLog"></param>
 public WorkflowLogDto(WorkflowLog workflowLog)
 {
     CopyFromModel(workflowLog);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static WorkflowLogDto ToDto(this WorkflowLog value)
 {
     return(new WorkflowLogDto(value));
 }