Guest User

Untitled

a guest
Jul 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // example 1: how we currently do it
  2.  
  3. public class ClassMap<T>
  4. {
  5. private List<PropertyPart> propertyParts = new List<PropertyPart>();
  6.  
  7. public PropertyPart Map(...)
  8. {
  9. var part = new PropertyPart(...);
  10.  
  11. propertyParts.Add(part);
  12.  
  13. return part;
  14. }
  15.  
  16. public ClassMapping GetMapping()
  17. {
  18. var mapping = new ClassMapping();
  19.  
  20. foreach (var propertyPart in propertyParts)
  21. {
  22. var propertyMapping = propertyPart.GetMapping();
  23.  
  24. mapping.AddProperty(propertyMapping);
  25. }
  26.  
  27. return mapping;
  28. }
  29. }
Add Comment
Please, Sign In to add comment