title: ResolutionContext creation customization in Automapper
body: <p>guys.</p>
  <p>Maybe someone has the same problem.</p>
  <p>I have some cached variables in the <code>MemoryCache</code> (standard non-distributed in-memory implementation of <code>Microsoft.Extensions.Caching.Memory.IMemoryCache</code>). So, I also have mappings I use for Response/DTO creation. Some of them use variables from <code>MemoryCache</code>. But now I must always pass it through</p>
  <pre><code>opts =&gt; 
  {
     opts.Items.Add(variableName1, variableValue1);
     opts.Items.Add(variableName2, variableValue2);
     ... 
  }
  </code></pre>
  <p>or I need to pass each time <code>MemoryCache</code> the same way.</p>
  <p>Is it possible to set up a global configuration of <code>ResolutionContext</code> which allows me to pass all variables from <code>MemoryCache</code> I need in the time of the <code>ResolutionContext</code> creation? Unfortunately, <code>BeforeMap</code> isn't a solution - It has no DI mechanism for <code>IMemoryCache</code> resolving. And as I know It can be only one in the mapping structure - Automapper skips all <code>BeforeMap</code> after the first one.</p>
  <p>Thank you.</p>