Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling a private constructor using Albedo #95

Open
SeanFarrow opened this issue Jul 28, 2016 · 7 comments
Open

Calling a private constructor using Albedo #95

SeanFarrow opened this issue Jul 28, 2016 · 7 comments

Comments

@SeanFarrow
Copy link

Hi,

What is the easiest way of calling a constructor with parameters using Albedo?
calling methods doesn't seem to be covered in the read me.
Help appreciated as always.
Cheers
Sean.

@ploeh
Copy link
Collaborator

ploeh commented Jul 31, 2016

If you know that you want to call a constructor, then I think using ConstructorInfo.Invoke would be the easiest way.

The purpose of Albedo is to provide a common abstraction over Reflection, enabling you to treat e.g. fields and properties alike. If you don't need the abstraction, the standard Reflection API is probably easier.

I feel that I'm misunderstanding the question, however, but I can't quite figure out what the real question is... Can you elaborate?

@SeanFarrow
Copy link
Author

Hi Mark,

That’s what I’m doing currently!
I just wondered whether albedo offered a way of doing it, it wasn’t a trick question!
Cheers
Sean.

From: Mark Seemann [mailto:[email protected]]
Sent: 31 July 2016 23:03
To: ploeh/Albedo [email protected]
Cc: Sean Farrow [email protected]; Author [email protected]
Subject: Re: [ploeh/Albedo] Calling a private constructor using Albedo (#95)

If you know that you want to call a constructor, then I think using ConstructorInfo.Invoke would be the easiest way.

The purpose of Albedo is to provide a common abstraction over Reflection, enabling you to treat e.g. fields and properties alike. If you don't need the abstraction, the standard Reflection API is probably easier.

I feel that I'm misunderstanding the question, however, but I can't quite figure out what the real question is... Can you elaborate?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ploeh/Albedo/issues/95#issuecomment-236459463, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fu4KVAV5Q3bc4Jd9QwXZrgZ2tZ86ks5qbRuNgaJpZM4JXTwW.

@ploeh
Copy link
Collaborator

ploeh commented Aug 5, 2016

The answer, in this case, is no. Do you have any other concerns, or can we close the issue?

@SeanFarrow
Copy link
Author

Ok, you can close this, it would be a nice to have though!

From: Mark Seemann [mailto:[email protected]]
Sent: 06 August 2016 00:29
To: ploeh/Albedo [email protected]
Cc: Sean Farrow [email protected]; Author [email protected]
Subject: Re: [ploeh/Albedo] Calling a private constructor using Albedo (#95)

The answer, in this case, is no. Do you have any other concerns, or can we close the issue?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ploeh/Albedo/issues/95#issuecomment-237988683, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fop8kSHP16VVfyv-bwQNCUxXm_xmks5qc8cegaJpZM4JXTwW.

@ploeh
Copy link
Collaborator

ploeh commented Aug 6, 2016

it would be a nice to have though!

I'm still not sure I understand what it is that you'd like to have... 😳

@SeanFarrow
Copy link
Author

The ability to visit and call constructors.

From: Mark Seemann [mailto:[email protected]]
Sent: 06 August 2016 11:23
To: ploeh/Albedo [email protected]
Cc: Sean Farrow [email protected]; Author [email protected]
Subject: Re: [ploeh/Albedo] Calling a private constructor using Albedo (#95)

it would be a nice to have though!

I'm still not sure I understand what it is that you'd like to have... 😳


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ploeh/Albedo/issues/95#issuecomment-238016789, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fqSqc1QR9aiLTHX70iLMa9La9cw6ks5qdGCBgaJpZM4JXTwW.

@ploeh
Copy link
Collaborator

ploeh commented Aug 6, 2016

You can already visit constructors...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants