tags:

views:

88

answers:

1

I have two classes as below.

public class Destination
{
   public Destination()
   {
      _StringCollection = new List<String>();
   }
   private ICollection<String> _StringCollection;
   public IEnumerable<String> StringCollection
   {
     get
     {
       return _StringCollection.AsEnumerable<String>();
     }
   }

   public void AddString(string str)
   {
      _StringCollection.Add(str);
   }
 }

 public class Source
 {
    public List<String> StringCollection { get; set; }
 }

I would like to map that for each member of source call AddString(member) on Destination.

I thought that maybe I could do something with a custom resolver but can't seem to figure out how.

+1  A: 

No, you can't redirect to a specific method. You can expose as an ICollection, but that's it.

Jimmy Bogard
Thank you for clarifying.
YonahW

related questions