C# Spring context dictionary expression as a key

329 views Asked by At

Is there a way to use expression as a key in the Dictionary? The value of this expression would be a value from the other dictionary.

Im looking for something like

<object id="meta-naming-configurator" singleton="true"
              type="System.Collections.Generic.Dictionary&lt;string, string&gt;, mscorlib">
        <constructor-arg>
          <dictionary key-type="string" value-type="string">
            <entry key="assets" value="other_asset"/>
          </dictionary>
        </constructor-arg>
      </object>

<object id="table-matrics-key" 
              singleton="true"
              type="System.Collections.Generic.Dictionary&lt;string, ListString&gt;, mscorlib"
              depends-on="meta-naming-configurator">
        <constructor-arg>
          <dictionary key-type="string" value-type="ListString">
            <entry key="@(meta-naming-configurator)['assets']" value-ref="assets-tables-list"/>
          </dictionary>
        </constructor-arg>
      </object>

..but working.

Thanks

0

There are 0 answers