Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Instantiate public objects
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
srudin  
View profile  
 More options Apr 13 2012, 11:28 am
From: srudin <goo...@sandrorudin.net>
Date: Fri, 13 Apr 2012 08:28:20 -0700 (PDT)
Local: Fri, Apr 13 2012 11:28 am
Subject: Instantiate public objects
I was using a customized 2.6.1 version and have now updated to the
2.6.3 NuGet package. The reason for using a customized version was
that I wanted to instantiate internal classes and not only public
classes - I have posted this request as well as the required code
changes a long time ago. I was quite disappointed to see that this
change has not been introduced into the 2.6.3 version so I would like
to ask if this was on purpose or if my request got lost somehow?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy D. Miller  
View profile  
 More options Apr 13 2012, 11:36 am
From: "Jeremy D. Miller" <jeremydmil...@yahoo.com>
Date: Fri, 13 Apr 2012 08:36:55 -0700 (PDT)
Local: Fri, Apr 13 2012 11:36 am
Subject: Re: [sm-users] Instantiate public objects

If you really want to, you can always get around the issue by using this:
 http://msdn.microsoft.com/en-us/library/system.runtime.compilerservic...

I don't see the pull request anywhere in GitHub, but regardless, my very long
standing policy has been against using anything but public types and public
constructors.  Mostly because of the performance issue, partly because of how
much architectural work it would take to make that change, and my feeling that
it adds no real value.  I'm not particularly a believer in paranoid scoping.

That being said, SM itself is extensible.  You could just use your own Instance
subclass that can build internal classes thru reflection if you want.

 Jeremy D. Miller
The Shade Tree Developer
jeremydmil...@yahoo.com

________________________________
From: srudin <goo...@sandrorudin.net>
To: structuremap-users <structuremap-users@googlegroups.com>
Sent: Fri, April 13, 2012 10:28:23 AM
Subject: [sm-users] Instantiate public objects

I was using a customized 2.6.1 version and have now updated to the
2.6.3 NuGet package. The reason for using a customized version was
that I wanted to instantiate internal classes and not only public
classes - I have posted this request as well as the required code
changes a long time ago. I was quite disappointed to see that this
change has not been introduced into the 2.6.3 version so I would like
to ask if this was on purpose or if my request got lost somehow?

--
You received this message because you are subscribed to the Google Groups
"structuremap-users" group.
To post to this group, send email to structuremap-users@googlegroups.com.
To unsubscribe from this group, send email to
structuremap-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/structuremap-users?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
srudin  
View profile  
 More options Apr 14 2012, 6:56 am
From: srudin <goo...@sandrorudin.net>
Date: Sat, 14 Apr 2012 03:56:05 -0700 (PDT)
Local: Sat, Apr 14 2012 6:56 am
Subject: Re: Instantiate public objects
Ok, I see. My point is that is that this distinction has nothing to do
with paranoia but simply with the fact that internal classes are
treated differently. Take FxCop for example - there are rules that are
validated differently whether the class is internal or public (like a
method/parameter/constant etc. never used on an internal class is
obsolete what cannot be said for a public class). This is just one
example of a number of similar points that make me believe that it
does make a difference whether you implement something internal or
public besides wanting to hide anything (which is useless because of
refelction anyway). So my opinion is still that it would make sense to
include internals in the SM functionality.

But I take your hint about the InternalsVisibleToAttribute. I will try
this out and probably this will already be enough to do the job as I
wish.

Kind regards
Sandro

On 13 Apr., 17:36, "Jeremy D. Miller" <jeremydmil...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
srudin  
View profile  
 More options Apr 16 2012, 6:04 am
From: srudin <goo...@sandrorudin.net>
Date: Mon, 16 Apr 2012 03:04:38 -0700 (PDT)
Local: Mon, Apr 16 2012 6:04 am
Subject: Re: Instantiate public objects
Hm, I tried with the following attribute:

[assembly:
InternalsVisibleTo("StructureMap,PublicKey=00240000048000009400000006020000 002400005253413100040000010001008d9a2a76e43cd9b1b1944b1f3b489a046b33f0bcd75 5b25cc5d3ed7b18ded38240d6db7578cd986c72d3feb4f94a7ab26fcfa41e3e4f41cf2c029f ba91159db05c44d63f0b2bfac24353a07f4a1230dd3d4240340adafa2275277fa083c759580 62cd0e60016701db6af7ae718efdf1e802a840595b49c290964255b3c60c494",
AllInternalsVisible = true)]

Unfortunately the error does not disappear - am I missing something?

On 14 Apr., 12:56, srudin <goo...@sandrorudin.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »