コード例 #1
0
 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;
 }
コード例 #2
0
        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);
        }