Example #1
0
        public object Clone(IEntity child, bool forceCloneLazyChildren)
        {
            if (base.IsDisposed)
            {
                throw new ObjectDisposedException("EntityLiksList");
            }
            child.Require("child").NotNull();
            var child2 = child as IEntityList;

            if (child2 == null)
            {
                throw new InvalidOperationException(string.Format("Child '{0}' is not IEntityList", child.GetType().FullName));
            }
            EntityLinksList <TEntity> result = null;

            result = new EntityLinksList <TEntity>(new Collections.NotifyCollectionChangedObserverRegisterEnumerable <TEntity>(this, f => (f is IDisposableState && ((IDisposableState)f).IsDisposed) ? (TEntity)f : (TEntity)((ICloneable)f).Clone()), _linkInfo, _childFromModelCreator, child2, UIContext, ParentUidSetter, SourceContext, TypeManager);
            CloneControls(result);
            ((IConnectedEntity)result).Connect(((IConnectedEntity)this).SourceContext);
            return(result);
        }
Example #2
0
 /// <summary>
 /// Construtor padrĂ£o.
 /// </summary>
 /// <param name="linkList"></param>
 public CopyFromControl(EntityLinksList <TEntity> linkList)
 {
     _linkList = linkList;
 }