internal override CdmObjectReferenceBase CopyRefObject(ResolveOptions resOpt, dynamic refTo, bool simpleReference, CdmObjectReferenceBase host = null) { CdmTraitReference copy; if (host == null) { copy = new CdmTraitReference(this.Ctx, refTo, simpleReference, this.Arguments?.Count > 0); } else { copy = host.CopyToHost(this.Ctx, refTo, simpleReference); copy.Arguments.Clear(); } if (!simpleReference) { copy.ResolvedArguments = this.ResolvedArguments; } foreach (var arg in this.Arguments) { copy.Arguments.Add(arg); } return(copy); }
internal override CdmObjectReferenceBase CopyRefObject(ResolveOptions resOpt, dynamic refTo, bool simpleReference, CdmObjectReferenceBase host = null) { if (host == null) return new CdmAttributeContextReference(this.Ctx, refTo); else return host.CopyToHost(this.Ctx, refTo, simpleReference); }
internal override CdmObjectReferenceBase CopyRefObject(ResolveOptions resOpt, dynamic refTo, bool simpleReference, CdmObjectReferenceBase host = null) { if (host == null) { return(new CdmDataTypeReference(this.Ctx, refTo, simpleReference)); } else { return(host.CopyToHost(this.Ctx, refTo, simpleReference)); } }
internal override CdmObjectReferenceBase CopyRefObject(ResolveOptions resOpt, dynamic refTo, bool simpleReference, CdmObjectReferenceBase host = null) { if (host == null) { // for inline attribute group definition, the owner information is lost here when a ref object created // updating it here if (this.ExplicitReference != null && this.ExplicitReference.ObjectType == CdmObjectType.AttributeGroupDef && this.ExplicitReference.Owner == null) { this.ExplicitReference.Owner = this.Owner; } return(new CdmAttributeGroupReference(this.Ctx, refTo, simpleReference)); } else { return(host.CopyToHost(this.Ctx, refTo, simpleReference)); } }