views:

28

answers:

0

For WCF I need to specify that the known type for any IEnumerable<T> is T[]. Is there any way that this is possible using the configuration section? Something like the following, though I know it doesn't work just like this:

  <system.runtime.serialization>
    <dataContractSerializer>
      <declaredTypes>
        <add type="System.IEnumerable<MyClass>, myassembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <knownType type="MyClass[], myassembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        </add>
      </declaredTypes>
    </dataContractSerializer>
  </system.runtime.serialization>