コード例 #1
0
ファイル: ServiceLogDTO.cs プロジェクト: jh2mhs8/Rock-ChMS
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static ServiceLog ToModel(this ServiceLogDto value)
        {
            ServiceLog result = new ServiceLog();

            value.CopyToModel(result);
            return(result);
        }
コード例 #2
0
ファイル: ServiceLogService.cs プロジェクト: shelsonjava/Rock
 /// <summary>
 /// Copies the properties from another ServiceLog object to this ServiceLog object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this ServiceLog target, ServiceLog source)
 {
     target.LogDateTime = source.LogDateTime;
     target.Input       = source.Input;
     target.Type        = source.Type;
     target.Name        = source.Name;
     target.Result      = source.Result;
     target.Success     = source.Success;
     target.Id          = source.Id;
     target.Guid        = source.Guid;
 }
コード例 #3
0
 /// <summary>
 /// Clones this ServiceLog object to a new ServiceLog 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 ServiceLog Clone(this ServiceLog source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as ServiceLog);
     }
     else
     {
         var target = new ServiceLog();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
コード例 #4
0
 /// <summary>
 /// Copies the properties from another ServiceLog object to this ServiceLog object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this ServiceLog target, ServiceLog source)
 {
     target.Id                      = source.Id;
     target.Input                   = source.Input;
     target.LogDateTime             = source.LogDateTime;
     target.Name                    = source.Name;
     target.Result                  = source.Result;
     target.Success                 = source.Success;
     target.Type                    = source.Type;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
コード例 #5
0
ファイル: ServiceLogDTO.cs プロジェクト: jh2mhs8/Rock-ChMS
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="serviceLog"></param>
 public ServiceLogDto(ServiceLog serviceLog)
 {
     CopyFromModel(serviceLog);
 }
コード例 #6
0
ファイル: ServiceLogDTO.cs プロジェクト: jh2mhs8/Rock-ChMS
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static ServiceLogDto ToDto(this ServiceLog value)
 {
     return(new ServiceLogDto(value));
 }