/// <summary> /// Copies the properties from another SystemCommunication object to this SystemCommunication object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this SystemCommunication target, SystemCommunication source) { target.Id = source.Id; target.Bcc = source.Bcc; target.Body = source.Body; target.CategoryId = source.CategoryId; target.Cc = source.Cc; target.CssInliningEnabled = source.CssInliningEnabled; target.ForeignGuid = source.ForeignGuid; target.ForeignKey = source.ForeignKey; target.From = source.From; target.FromName = source.FromName; target.IsActive = source.IsActive; target.IsSystem = source.IsSystem; target.LavaFieldsJson = source.LavaFieldsJson; target.PushData = source.PushData; target.PushImageBinaryFileId = source.PushImageBinaryFileId; target.PushMessage = source.PushMessage; target.PushOpenAction = source.PushOpenAction; target.PushOpenMessage = source.PushOpenMessage; target.PushSound = source.PushSound; target.PushTitle = source.PushTitle; target.SMSFromDefinedValueId = source.SMSFromDefinedValueId; target.SMSMessage = source.SMSMessage; target.Subject = source.Subject; target.Title = source.Title; target.To = source.To; 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 SystemCommunication object to a new SystemCommunication 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 SystemCommunication Clone(this SystemCommunication source, bool deepCopy) { if (deepCopy) { return(source.Clone() as SystemCommunication); } else { var target = new SystemCommunication(); target.CopyPropertiesFrom(source); return(target); } }