Пример #1
0
        /// <summary>
        /// Clones this instance.
        /// </summary>
        /// <param name="areas">The areas to consider.</param>
        /// <returns>Returns a cloned instance.</returns>
        public override object Clone(params string[] areas)
        {
            IdentifiedDataItem item = base.Clone(areas) as IdentifiedDataItem;

            if (Id != null)
            {
                item.Id = IdentifiedDataItem.NewGuid();
            }
            return(item);
        }
Пример #2
0
        // ------------------------------------------
        // CONSTRUCTORS
        // ------------------------------------------

        #region Constructors

        /// <summary>
        /// Instantiates a new instance of the IdentifiedDataItem class.
        /// </summary>
        /// <param name="id">The ID to consider.</param>
        public IdentifiedDataItem(string id = null) : base()
        {
            Id = id?.Length == 0 ? IdentifiedDataItem.NewGuid() : id;
        }