Skip to content

Support for abstract classes #8

Closed

Description

@kkuepper

One feature that is missing is support for abstract classes.
I think code says more than 1000 words:

public abstract class Request {
public string Message { get; set; }
}

public class GetCustomerRequest : Request {
public Guid CustomerId { get; set; }
}

public class GetDepartmentRequest : Request {
public Guid DepartmentId { get; set; }
}

var request = Slapper.AutoMapper.Map<Request>(dictionary);

I implemented support for this for my current project, but I am not sure if that is the direction you want to take. Anyway you can find my code here: kkuepper@7434a71

Activity

  1. randyburden commented on Dec 2, 2013

    @randyburden
    Member

    @towa Can you create one or more unit tests to cover this new functionality and to demonstrate how it would be used? I think I understand what you are going for but an example would make it more clear for me.

    Also I think the feature you've added could be used for interfaces as well so you may want to rename the interface IAbstractTypeActivator to something more generic such as an ITypeActivator> or something similar.

    FYI, if you wrap your code samples in triple backticks, then you can add the < and > signs.

  2. odelvalle commented on Jun 12, 2016

    @odelvalle
    Member

    Pull Request #38, TypeActivator inlcuded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions