/// <summary> /// Copies the properties from another ContentChannel object to this ContentChannel object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this ContentChannel target, ContentChannel source) { target.Id = source.Id; target.ChannelUrl = source.ChannelUrl; target.ChildItemsManuallyOrdered = source.ChildItemsManuallyOrdered; target.ContentChannelTypeId = source.ContentChannelTypeId; target.ContentControlType = source.ContentControlType; target.Description = source.Description; target.EnableRss = source.EnableRss; target.ForeignGuid = source.ForeignGuid; target.ForeignKey = source.ForeignKey; target.IconCssClass = source.IconCssClass; target.IsIndexEnabled = source.IsIndexEnabled; target.IsTaggingEnabled = source.IsTaggingEnabled; target.ItemsManuallyOrdered = source.ItemsManuallyOrdered; target.ItemTagCategoryId = source.ItemTagCategoryId; target.ItemUrl = source.ItemUrl; target.Name = source.Name; target.RequiresApproval = source.RequiresApproval; target.RootImageDirectory = source.RootImageDirectory; target.TimeToLive = source.TimeToLive; 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> /// Deletes the specified item. /// </summary> /// <param name="item">The item.</param> public override bool Delete(ContentChannel item) { string message; if (!CanDelete(item, out message)) { return(false); } return(base.Delete(item)); }
/// <summary> /// Clones this ContentChannel object to a new ContentChannel 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 ContentChannel Clone(this ContentChannel source, bool deepCopy) { if (deepCopy) { return(source.Clone() as ContentChannel); } else { var target = new ContentChannel(); target.CopyPropertiesFrom(source); return(target); } }