public ConsoleApplication(CvContext ctx, IConfiguration cfg, cvParsers parsers, cvConfig cvConfiguration) { this.ctx = ctx; this.cfg = cfg; this.parsers = parsers; this.cvConfiguration = cvConfiguration; }
public ScrapeRunsTest(CvContext ctx, IConfiguration cfg, cvParsers parsers, cvConfig cvConfiguration) { this.ctx = ctx; this.cfg = cfg; this.parsers = parsers; this.cvConfiguration = cvConfiguration; }
protected CvContext GetSqlLiteContext() { var connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); var options = new DbContextOptionsBuilder <CvContext>().UseSqlite(connection).Options; var context = new CvContext(options); context.Database.EnsureCreated(); return(context); }
public FileWatcherConsole(CvContext ctx, IConfiguration cfg, ImportScrapeData importData, cvParsers cvParsers, cvConfig cvConfiguration) { this.ctx = ctx; this.cfg = cfg; this.importData = importData; this.cvParsers = cvParsers; this.cvConfiguration = cvConfiguration; }
public ScrapeFileImport(CvContext ctx, IConfiguration cfg, cvParsers parsers, ImportScrapeData importer, cvConfig cvConfiguration) { this.ctx = ctx; this.cfg = cfg; this.parsers = parsers; this.importer = importer; this.cvConfiguration = cvConfiguration; runtest = new ScrapeRunsTest(ctx, cfg, parsers, cvConfiguration); }
/// <summary> /// Get Cv included member,person from memberId /// </summary> /// <param name="ctx">Application ctx</param> /// <param name="memberId">filter for take cv</param> /// <returns>CvVO</returns> public CvVO FindCvByMemberId(CvContext ctx, int memberId) { CvVO model = new CvVO(); try { var query = (from cv in ctx.Cv join member in ctx.Member on cv.MemberId equals member.Id join person in ctx.Person on member.PersonId equals person.Id where member.Id == memberId select new { cv.Id, cv.MemberId, member.Username, member.PersonId, person.BirthDate, person.FirstName_el, person.LastName_el, person.FirstName_en, person.LastName_en }).Single(); model.Id = FillItemForDatabase.FillItem(query.Id); model.MemberId = FillItemForDatabase.FillItem(query.MemberId); model.Member = new MemberVO() { Id = model.MemberId, Username = FillItemForDatabase.FillItem(query.Username), PersonId = FillItemForDatabase.FillItem(query.PersonId) }; model.Member.Person = new PersonVO() { Id = model.Member.PersonId, BirthDate = FillItemForDatabase.FillItem(query.BirthDate), FirstName_el = FillItemForDatabase.FillItem(query.FirstName_el), LastName_el = FillItemForDatabase.FillItem(query.LastName_el), FirstName_en = FillItemForDatabase.FillItem(query.FirstName_en), LastName_en = FillItemForDatabase.FillItem(query.LastName_en) }; } catch { throw; } return(model); }
void Start() { //byte[] bytes = File.ReadAllBytes("/Users/akzeac/Downloads/IMG_7764.JPG"); //byte[] bytes = File.ReadAllBytes("/Users/akzeac/Downloads/IMG_0655.JPG"); byte[] bytes = File.ReadAllBytes("/Users/akzeac/Downloads/IMG_0669.JPG"); Texture2D texture = new Texture2D(1, 1); texture.LoadImage(bytes); CvContext cvContext = new CvContext(texture.width, texture.height); cvContext.SetImageDataFlipY(texture.GetRawTextureData(), 3); int numQrs = cvContext.DetectQrMarkers(); if (numQrs == 0) { return; } var qr = cvContext.GetDetectedQrCorners()[0]; DrawLine(texture, 0, 0, texture.width - 1, 0); DrawLine(texture, (int)qr.Corners[0].X, texture.height - 1 - (int)qr.Corners[0].Y, (int)qr.Corners[1].X, texture.height - 1 - (int)qr.Corners[1].Y, Color.blue); DrawLine(texture, (int)qr.Corners[1].X, texture.height - 1 - (int)qr.Corners[1].Y, (int)qr.Corners[2].X, texture.height - 1 - (int)qr.Corners[2].Y); DrawLine(texture, (int)qr.Corners[2].X, texture.height - 1 - (int)qr.Corners[2].Y, (int)qr.Corners[3].X, texture.height - 1 - (int)qr.Corners[3].Y); DrawLine(texture, (int)qr.Corners[3].X, texture.height - 1 - (int)qr.Corners[3].Y, (int)qr.Corners[0].X, texture.height - 1 - (int)qr.Corners[0].Y); var detectedMarker = new DetectedARMarker { Type = (byte)ARMarkerType.QrCode, Header = new Header(0, default, TfListener.FixedFrameId),
public CvVO GetCvByMemberId(int memberId) { CvVO model = new CvVO(); try { using (var ctx = new CvContext()) { model = new CvDA().FindCvByMemberId(ctx, memberId); if (model.Id != 0 && model.Member != null && model.MemberId != 0 && model.Member.Person != null && model.Member.PersonId != 0) { Task <List <AddressVO> > addrTask; using (var ctxAddr = new AddressContext()) { addrTask = Task.Run(() => new AddressDA().FindAddressesByPersonId(ctxAddr, model.Member.PersonId)); using (var ctxEmail = new EmailContext()) { Task <List <EmailVO> > emailTask = Task.Run(() => new EmailDA().FindEmailsByPersonId(ctxEmail, model.Member.PersonId)); using (var ctxPhone = new PhoneContext()) { Task <List <PhoneVO> > phoneTask = Task.Run(() => new PhoneDA().FindPhonesByPersonId(ctxPhone, model.Member.PersonId)); Task.WhenAll(phoneTask, addrTask, emailTask); model.Member.Person.Addresses = addrTask.Result; model.Member.Person.Emails = emailTask.Result; model.Member.Person.Phones = phoneTask.Result; } } } } } } catch (Exception ex) { throw ex; } return(model); }
public PersonalInformationsController(CvContext context) { _context = context; }
public ImportScrapeData(CvContext dbCtx, cvParsers parsers, cvConfig cvConfiguration) { this.ctx = dbCtx; this.parsers = parsers; this.cvConfiguration = cvConfiguration; }
/// <summary> /// ctor /// </summary> public ScrapeImportController(CvContext context) { _context = context; }
public ProjectsController(CvContext context) { _context = context; }
public CompanyRepository(CvContext cvContext) { _cvContext = cvContext; }
public SkillRepository(CvContext cvContext) { _cvContext = cvContext; }
public CvRepository(CvContext cvContext) { _cvContext = cvContext; }
/// <summary> /// ctor /// </summary> public ScrapeRunsController(CvContext context) { _context = context; }
public EducationsController(CvContext context) { _context = context; }
public CvEntriesRepository(CvContext cvContext) { _cvContext = cvContext; }
public UserReposistory(CvContext cvContext) { _cvContext = cvContext; }
public WorksController(CvContext context) { _context = context; }
public HomeController() { cvContext = new CvContext(); }