예제 #1
0
        /// <inheritdoc />
        public override CdmObject Copy(ResolveOptions resOpt = null, CdmObject host = null)
        {
            if (resOpt == null)
            {
                resOpt = new ResolveOptions(this, this.Ctx.Corpus.DefaultResolutionDirectives);
            }

            CdmEntityAttributeDefinition copy;

            if (host == null)
            {
                copy = new CdmEntityAttributeDefinition(this.Ctx, this.Name);
            }
            else
            {
                copy      = host as CdmEntityAttributeDefinition;
                copy.Ctx  = this.Ctx;
                copy.Name = this.Name;
            }

            copy.Entity = (CdmEntityReference)this.Entity.Copy(resOpt);

            this.CopyAtt(resOpt, copy);
            return(copy);
        }
        public override CdmObject Copy(ResolveOptions resOpt = null)
        {
            if (resOpt == null)
            {
                resOpt = new ResolveOptions(this);
            }

            CdmEntityAttributeDefinition copy = new CdmEntityAttributeDefinition(this.Ctx, this.Name)
            {
                Entity = (CdmEntityReference)this.Entity.Copy(resOpt)
            };
            this.CopyAtt(resOpt, copy);
            return copy;
        }