Пример #1
0
        /// <summary>
        /// Instansiate a connected graph with initial nodes and relations
        /// </summary>
        /// <param name="neo4JClient"></param>
        /// <param name="nodes"></param>
        /// <param name="relations"></param>
        public SimGraph(Neo4jClient neo4JClient, IEnumerable <SimNode> nodes, IEnumerable <SimRelation> relations) : this(neo4JClient)
        {
            _nodes     = nodes.ToList();
            _relations = relations.ToList();

            // Subscribe to all nodes and relations
            _client.ChangeTracker.SubscribeToChangeStateEvent(_nodes);
            _client.ChangeTracker.SubscribeToChangeStateEvent(_relations);
        }
Пример #2
0
 public Neo4jRepository()
 {
     _client = new Neo4jClient("bolt://localhost:7687", "neo4j", "1234");
 }
Пример #3
0
 /// <summary>
 /// Instansiate a connected graph
 /// </summary>
 /// <param name="neo4JClient"></param>
 public SimGraph(Neo4jClient neo4JClient) : this()
 {
     _client = neo4JClient;
 }