Esempio n. 1
0
        public static void Main()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <SocialNetworkDbContext, Configuration>());

            Importer.Create(Console.Out).Import();

            DataSearcher.Search(new SocialNetworkService());
        }
Esempio n. 2
0
        public FileReadProcessor(string filePath, SearchSettings settings)
        {
            _searchSettings = settings;
            _dataExtractor  = new DataExtractor();
            _searcher       = new DataSearcher(_searchSettings);

            ResultInSource = new List <SegmentData>();
            ResultInTarget = new List <SegmentData>();
        }
        public FileReadProcessor(string filePath, SearchSettings settings)
        {
            _filePath       = filePath;
            _searchSettings = settings;
            _dataExtractor  = new DataExtractor();
            _searcher       = new DataSearcher(_searchSettings);

            _resultSrc = new List <SegmentData>();
            _resultTrg = new List <SegmentData>();
        }
Esempio n. 4
0
        public static void Main()
        {
            var data = new SocialNetworkDbContext();

            XmlReader.ImportFriendshipDataFromXml(data);

            XmlReader.ImportPostsDataFromXml(data);

            var searcher = new SocialNetworkService();

            DataSearcher.Search(searcher);
        }
Esempio n. 5
0
        public static void Main()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <SocialNetworkEntities, Configuration>());

            var dbContext = new SocialNetworkEntities();

            dbContext.Database.CreateIfNotExists();

            var importer = new XmlImporter(dbContext);

            importer.Import();

            var service = new SocialNetworkService(dbContext);

            DataSearcher.Search(service);
        }
Esempio n. 6
0
        public static void Main()
        {
            // prepare table
            var db = new SocialNetworkContext();

            db.Database.Delete();
            db.Database.Create();

            //// task 6 - parsing data from xml
            var parser = new XmlParser(db);

            parser.ParseFriendShipData();
            parser.ParsePostData();

            // task 7 - linq requests to database implemented in MySearcher class
            MySearcher searcher = new MySearcher(db);

            DataSearcher.Search(searcher);
        }
Esempio n. 7
0
 protected override void OnInitialized()
 {
     base.OnInitialized();
     DataSearcher?.Add(this);
 }