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 8005659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:17:26+00:00 2026-06-04T17:17:26+00:00

For example I have the following class: public class PublishFacebookOpenGraphActionRequest { public FacebookOpenGraphActions Action

  • 0

For example I have the following class:

public class PublishFacebookOpenGraphActionRequest
{
    public FacebookOpenGraphActions Action { get; private set; }
    public FacebookOpenGraphObjects ObjectType { get; private set; }
    public Uri Url { get; private set; }
    public Uri Image { get; private set; }
}

And I would like to be able to generate something like this from the current set of properties:

public class PublishFacebookOpenGraphAction
{
    public FacebookOpenGraphActions Action { get; private set; }
    public FacebookOpenGraphObjects ObjectType { get; private set; }
    public Uri Url { get; private set; }
    public Uri Image { get; private set; }

    public PublishFacebookOpenGraphAction WithAction(FacebookOpenGraphActions action)
    {
        this.Action = action;
        return this;
    }

    public PublishFacebookOpenGraphAction WithObjectType(FacebookOpenGraphObjects objectType)
    {
        this.ObjectType = objectType;
        return this;
    }

    public PublishFacebookOpenGraphAction WithUrl(Uri url)
    {
        this.Url = url;
        return this;
    }

    public PublishFacebookOpenGraphAction WithImage(Uri image)
    {
        this.Image = image;
        return this;
    }
}
  • 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-06-04T17:17:27+00:00Added an answer on June 4, 2026 at 5:17 pm

    I do not have a conversion from all members of PublishFacebookOpenGraphActionRequest to a fluent interface.
    But maybe an half-automated generation of a fluent property-WithMember-pair is also a small step forward. This is possible with a ReSharper Live Template.

    I have an example:

    enter image description here

    You can create the following code with that Live Template:

    public FacebookOpenGraphActions Action { get; private set; }
    
    public PublishFacebookOpenGraphAction WithAction(FacebookOpenGraphActions action)
    {
        this.Action = action;
        return this;
    }
    

    by just typing fluentProp + ENTER and entering property name and its type.

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

Sidebar

Related Questions

I have the following code: class Person { public String Name { get; set;
I have the following class: public class ExternalClass { public string Name {get;set;} public
Let's have a following example: public class X { } public class Y {
Say suppose I have the following Java code. public class Example { public static
As a simplified example, I have the following data classes: public class Employee {
Take the following example, I have a class public class SomeItem { public string
I have the following example-class: public class MyClass<T> { public IList<T> GetAll() { return
I have the following class and extension class (for this example): public class Person<T>
I have the following class: public class Vertex() { private double xCoord; private double
I have the following class: public class Membership { public DateTime StartDate { get;

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.