How I can create instance for per-request lifescope with cookie's data as parameter?
For example:
container.Register<ISampleRepository>(() =>
new SampleRepository(
container.GetInstance<ApplicationDbContext>(),
request.Cookie["Token"]));
As NightOwl888 stated in his comment:
Cookies are runtime data that are user specific (and already tied to the request). Dependency Injection is something that happens 1 time at application startup for all users in the composition root. It makes absolutely no sense to have a user's cookie as an input to your application configuration. Perhaps it would be better if you describe what it is you are trying to achieve with your cookie.
The problem you are having with the right way to solve this is described fully in this blog post.