Exemple #1
0
        public Air(AirConfiguration config)
        {
            _configuration = config;
            _services = new List<IService>();
            _nodeDefsByName = new Dictionary<string, NodeDef>();
            _edgeDefsByName = new Dictionary<string, EdgeDef>();
            _propertyDefsByName = new Dictionary<string, PropertyDef>();
            _nodes = new List<Node>();

            Workers = CreateWorkers();
        }
Exemple #2
0
        public static void TestCase2()
        {
            var config = new AirConfiguration()
            {
            };

            using (var air = new Altitude.Air.Air(config))
            {
                air.Connect();

                NodeDef personNodeDef = air.CreateNodeDef("Person");

                DateTime startTime = DateTime.Now;
                TimeSpan timeSpan = TimeSpan.FromSeconds(10);
                while (DateTime.Now < startTime + timeSpan)
                {
                    // altitude.CreateNodes();
                }

                Console.WriteLine(string.Format("{0} nodes created in {1} milliseconds", air.GetNodes().Count, timeSpan.TotalMilliseconds));
            }
        }