Mapping to an internal type with AutoMapper for Silverlight -


How can I configure my application so that I can map properties in internal type and / or Silverlight 5? For example, I have the following types:

  internal square SomeInfo {public string value {get; Set; }}   

Mapper with this kind of destination on Mapper Dynamic attempts to call and I get the following error on runtime:

Security transparent method 'dynamic class.setValue (System.Object, System.Object)' security type of security ' Failed to use Acme.SomeInfo '.

I have tried to use the first class immediately, then change the scope of the square for the public as well as an internal setter for the property along with the example dynamic-mark. I also marked the class with the [safety safar] attribute. All these tests resulted in the same error message.

The only way I have been successful in achieving this last time is that it is a problem of public sector and public, because this is a problem because I am developing a class library which is used by other developers. Will be used and the "internal" scope will be used, there is a deliberate strategy to hide the implementation details, as well as to ensure that the use of the code is only According to the guidance, there is no public setter concept with DDD and CQRS.)

He said, what can I do to make it so that working with automated internal types and / or properties Could it?

(Note: Class Library is built for SL5 and used in client applications, which is configured to run with the applet trust-out-browser.) < / Div>

This is more than a silverlight limit - it does not allow reflection on private / protected / internal members of external assemblies, See:

Simply enter - Automapers can not access your assembly Sector Use of internal members.

Comments