public Array <byte> Get(T parameter) { using (var session = _sessions.Get()) { var composition = new Composition <T>(session.Store, parameter); using (var instructions = _instructions.Get(parameter)) { for (var i = 0u; i < instructions.Size; i++) { var instruction = instructions.Store[i]; var size = instruction.Get(parameter); composition = composition.Index + size >= composition.Output.Length ? new Composition <T>(composition.Output.Copy(in size), parameter, composition.Index) : composition; composition = new Composition <T>(composition.Output, parameter, composition.Index + instruction.Get(composition)); } var result = composition.Output.CopyInto(new byte[composition.Index], 0, composition.Index); composition.Output.Clear(composition.Index); return(result); } } }
public async Task <IActionResult> Index() { var viewModel = new GridViewModel(await _sessions.Get()); return(View(viewModel)); }
public IList <Session> Get() { return(_sessions.Get().ToList()); }