Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 618857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:35:32+00:00 2026-05-13T18:35:32+00:00

I saw in a projekt many interfaces which just wrapped a generic class. An

  • 0

I saw in a projekt many interfaces which just wrapped a generic class.

An example:

public interface IAssertionViewModelMapper : IMapper<Assertion, AssertionViewModel>
{}

public interface ISearchPageViewModelMapper : IMapper<IList<Tag>, SearchPageViewModel>
{}

Could someone explain why they did this ? I mean I can just straight implement the IMapper interface.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:35:33+00:00Added an answer on May 13, 2026 at 6:35 pm

    Microsoft Code Analysis (a.k.a. FxCop) contains a rule against doing this. However, creating a new interface like this has a few advantages:

    1. The new name can describe the intent of the interface better (however, aliasing in C# can do the same).
    2. This saves you a few minutes when new methods are needed on that interface, because you already defined it.
    3. It can make your code base more consistent when most interfaces that derive from IMapper<T, TViewModel> actually define new methods. It’s easy to spot the interfaces, even if they don’t define new members.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw this C# using statement in a code example: using StringFormat=System.Drawing.StringFormat; What's that
I saw a java function that looked something like this- public static<T> foo() {...}
I saw this posting which explained how to get BC3 working as the diff
I saw that there's many, many thread about this on the web, also in
In my project I have a class that is inherited by many other classes.
i just saw an excellent feature on textmate , search in project, you just
I just saw a really cool WPF twitter client that I think is developed
I saw code in a project which looks like this: <script src='http://toolbar.wibiya.com/toolbarLoader.php?toolbarId=22800' type='text/javascript'></script> I
I'm just starting with .NET data storage and I'm confused by so many different
I'm pretty sure I saw somewhere in a popular Git project the branches had

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.