/// <summary>
 /// Copies the properties from another BinaryFileData object to this BinaryFileData object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this BinaryFileData target, BinaryFileData source)
 {
     target.Id                      = source.Id;
     target.Content                 = source.Content;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
예제 #2
0
 /// <summary>
 /// Clones this BinaryFileData object to a new BinaryFileData 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 BinaryFileData Clone(this BinaryFileData source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as BinaryFileData);
     }
     else
     {
         var target = new BinaryFileData();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
예제 #3
0
 /// <summary>
 /// Copies the properties from another BinaryFileData object to this BinaryFileData object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this BinaryFileData target, BinaryFileData source)
 {
     target.Content = source.Content;
     target.Id      = source.Id;
     target.Guid    = source.Guid;
 }