Пример #1
0
        /// <summary>
        /// Reflective helper method to create an instance of <see cref="ChildNode{TResource}" />;
        /// </summary>
        private IResourceNode CreateNodeInstance(RightType nodeType, IReadOnlyCollection <RelationshipProxy> relationshipsToNext,
                                                 IEnumerable <IRelationshipGroup> relationshipsFromPrev)
        {
            IRelationshipsFromPreviousLayer prev = CreateRelationshipsFromInstance(nodeType, relationshipsFromPrev);

            return((IResourceNode)ObjectFactory.CreateInstanceOfOpenType(typeof(ChildNode <>), nodeType, relationshipsToNext, prev));
        }
Пример #2
0
        /// <summary>
        /// Reflective helper method to create an instance of <see cref="ChildNode{TResource}"/>;
        /// </summary>
        private INode CreateNodeInstance(RightType nodeType, RelationshipProxy[] relationshipsToNext, IEnumerable <IRelationshipGroup> relationshipsFromPrev)
        {
            IRelationshipsFromPreviousLayer prev = CreateRelationshipsFromInstance(nodeType, relationshipsFromPrev);

            return((INode)TypeHelper.CreateInstanceOfOpenType(typeof(ChildNode <>), nodeType, relationshipsToNext, prev));
        }