public virtual async Task <IWSMessage> ProcessAsync(CancellationToken cancellationToken = default(CancellationToken)) { while (cancellationToken.IsCancellationRequested == false) { var frame = await ReadOperations.ReadFrame(cancellationToken); if (Stopwatch.IsRunning) { Stopwatch.Restart(); } switch (frame.Code) { case WSConsts.CodePong: Pulser.Push(frame, false); continue; case WSConsts.CodePing: await SendPingBack(frame, cancellationToken); continue; case WSConsts.CodeClose: case WSConsts.CodeContentText: case WSConsts.CodeContentBinary: return(await ToMessage(frame, cancellationToken)); } } return(default);
public override void Read(Chunk chunk) { int chunkId = chunk.Id; if (!ReadOperations.ContainsKey(chunkId)) { ReadOperation readOperation = new ReadOperation(); ReadOperations.Add(chunkId, readOperation); readOperation.Run(chunk, Directory); //FLogger.Log(LogType.Message, "ChunkReader: Reading " + chunk.FileName); //IOMessages.CurrentState = "Reading " + chunk.FileName; } }
public Task <Child> GetUserChildAsync(int id) { return(ReadOperations.GetWithChildrenAsync <Child>(_asyncConnection, id)); }
public Task <List <Child> > GetAllUserChildrenAsync() { return(ReadOperations.GetAllWithChildrenAsync <Child>(_asyncConnection)); }
// Obter todas as categorias public List <Category> GetCategories() { return(ReadOperations.GetAllWithChildren <Category>(sqliteconnection)); }
// Obter detalhes da categoria public Category GetCategoryDetail(int categoryId) { return(ReadOperations.GetWithChildren <Category>(sqliteconnection, categoryId)); }
// Obter todos os produtos public List <Product> GetProductList() { // using SQLite Extensions to solve relations return(ReadOperations.GetAllWithChildren <Product>(sqliteconnection)); }
// Obter detalhes do produto public Product GetProductDetail(int id) { return(ReadOperations.GetWithChildren <Product>(sqliteconnection, id)); }
public List <User> GetUsersAsync() { //return db.Table<Question>().ToListAsync(); return(ReadOperations.GetAllWithChildren <User>(db)); }
public List <Department> GetAllDepartment() { return(ReadOperations.GetAllWithChildren <Department>(connection, recursive: true).ToList()); }
private async Task UpdateDebtsAsync() { var debts = await ReadOperations.GetAllWithChildrenAsync <Debt>(_databaseConnection.Database); Content = new ObservableCollection <Debt>(debts); }
public Task <Milestone> GetMilestoneByIdAsync(int id) { return(ReadOperations.GetWithChildrenAsync <Milestone>(_asyncConnection, id)); }
public Task <List <Milestone> > GetAllMilestonesAsync() { return(ReadOperations.GetAllWithChildrenAsync <Milestone>(_asyncConnection)); }
public Task <Vaccine> GetVaccineAsync(int id) { return(ReadOperations.GetWithChildrenAsync <Vaccine>(_asyncConnection, id)); }
public Task <List <Vaccine> > GetAllVaccinesAsync() { return(ReadOperations.GetAllWithChildrenAsync <Vaccine>(_asyncConnection)); }