Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
        public async Task <IActionResult> Index()
        {
            var viewModel = new GridViewModel(await _sessions.Get());

            return(View(viewModel));
        }
Esempio n. 3
0
 public IList <Session> Get()
 {
     return(_sessions.Get().ToList());
 }