private ContentDetail GetDetail(object val) { ContentDetail detail; if (val is ContentDetail) detail = (ContentDetail)val; else detail = ContentDetail.New(EnclosingItem, null, val); if(detail.Name == null || !detail.Name.StartsWith(this.Name)) detail.Name = this.Name; detail.EnclosingItem = this.EnclosingItem; detail.EnclosingCollection = this; return detail; }
private ContentDetail GetDetail(object val) { ContentDetail detail; if (val is ContentDetail) { detail = (ContentDetail)val; } else { detail = ContentDetail.New(EnclosingItem, null, val); } detail.Name = this.Name; detail.EnclosingItem = this.EnclosingItem; detail.EnclosingCollection = this; return(detail); }