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

  • SEARCH
  • Home
  • 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 6593991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:45:12+00:00 2026-05-25T17:45:12+00:00

I am designing a set of generic interfaces in order to clarify the construction

  • 0

I am designing a set of generic interfaces in order to clarify the construction of some reports.

To achieve this I am using generics and I have to carry over three generic parameters between different fluent classes. Sometimes I have to pass four of them but it is all done by the framework and the idea behind is that, with enough attention, it is possible to have a whole interface without having to type any generics at all.

An example is

        t1.Schedule.ForSession(Session).
            WithName("TestName").
            Map.
            Args.FromResultsOfTask(t2).UsingDefaultMappings().
            And.
            WaitOnCompletionOfTask(t4);

Running FXCop produces an endless set of complaintsof this type:

Error, Certainty 85, for AvoidExcessiveParametersOnGenericTypes

I am using generics to create “type safe” (perhaps type aware is more correct) interfaces where mappings can be defined as in

...
Map.Args.From(myObject).
    Mapping(x=>x.MyProperty).To(y=>y.ArgsProperty).
...

What strategies can I adopt to reduce the use of generics and still achieve compile-safe custom mappings?

Has anyone successfully utilised generics (and can point me to a good set of examples) to implement a fluent 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-25T17:45:13+00:00Added an answer on May 25, 2026 at 5:45 pm

    It sounds to me like you should just suppress that FXCop warning for your code. If there are naturally three generic type parameters, then such is life. Document it carefully and it should be fine, IMO.

    Tools like FXCop are there to be helpful, not to become the ultimate arbiters of your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My team is designing a set of applications, some of them are using trees
I am designing a set-up wizard using MFC application controls... how do I move
Hey guys..I am designing a set-up wizard using CPropertySheet and CpropertyPage in MFC application...I
Designing code to handle transfers of objects called contractBundles. Have this in the models.py
I am designing a site for a new foundation, and I have set April
When designing a C API for configuring a library/utility, I have a co-worker who
When designing a form I have the option of putting a close button at
I'm new to designing OO systems. I have a simple Flash Cards app where
We are designing set of web services which will return XML string in response.
I am designing a set of 'service' layer objects (data objects and interface definitions)

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.