Beispiel #1
0
 /// <summary>
 ///     Creates a new node for the entity that is being traversed next in the graph.
 /// </summary>
 /// <param name="currentNode"> The node that the entity is being traversed from. </param>
 /// <param name="internalEntityEntry">
 ///     The internal entry tracking information about the entity being traversed to.
 /// </param>
 /// <param name="reachedVia"> The navigation property that is being traversed to reach the new node. </param>
 /// <returns> The newly created node. </returns>
 public virtual EntityEntryGraphNode CreateNode(
     [NotNull] EntityEntryGraphNode currentNode,
     [NotNull] InternalEntityEntry internalEntityEntry,
     [NotNull] INavigation reachedVia)
 => new EntityEntryGraphNode(
     Check.NotNull(internalEntityEntry, nameof(internalEntityEntry)),
     Check.NotNull(reachedVia, nameof(reachedVia)))
 {
     NodeState = Check.NotNull(currentNode, nameof(currentNode)).NodeState
 };
Beispiel #2
0
        /// <summary>
        ///     Creates a new node for the entity that is being traversed next in the graph.
        /// </summary>
        /// <param name="currentNode"> The node that the entity is being traversed from. </param>
        /// <param name="internalEntityEntry">
        ///     The internal entry tracking information about the entity being traversed to.
        /// </param>
        /// <param name="reachedVia"> The navigation property that is being traversed to reach the new node. </param>
        /// <returns> The newly created node. </returns>
        public virtual EntityEntryGraphNode CreateNode(
            [NotNull] EntityEntryGraphNode currentNode,
            [NotNull] InternalEntityEntry internalEntityEntry,
            [NotNull] INavigationBase reachedVia)
        {
            Check.NotNull(currentNode, nameof(currentNode));
            Check.NotNull(internalEntityEntry, nameof(internalEntityEntry));
            Check.NotNull(reachedVia, nameof(reachedVia));

            return(new EntityEntryGraphNode(
                       internalEntityEntry,
                       currentNode.Entry.GetInfrastructure(),
                       reachedVia));
        }
        /// <summary>
        ///     Creates a new node for the entity that is being traversed next in the graph.
        /// </summary>
        /// <param name="currentNode"> The node that the entity is being traversed from. </param>
        /// <param name="internalEntityEntry">
        ///     The internal entry tracking information about the entity being traversed to.
        /// </param>
        /// <param name="reachedVia"> The navigation property that is being traversed to reach the new node. </param>
        /// <returns> The newly created node. </returns>
        public override EntityEntryGraphNode CreateNode(
            EntityEntryGraphNode currentNode,
            InternalEntityEntry internalEntityEntry,
            INavigationBase reachedVia)
        {
            Check.NotNull(currentNode, nameof(currentNode));
            Check.NotNull(internalEntityEntry, nameof(internalEntityEntry));
            Check.NotNull(reachedVia, nameof(reachedVia));

            return(new EntityEntryGraphNode <TState>(
                       internalEntityEntry,
                       ((EntityEntryGraphNode <TState>)currentNode).NodeState,
                       currentNode.Entry.GetInfrastructure(),
                       reachedVia));
        }