Search

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Hoping to get back to the blogging soon

by Brent VanderMeide 31. August 2008 17:34

It's been awhile since I've posted anything, and that's primarilly due to taking on 3 simultaneous projects as the lead.   The largest project of the 3 is coming to closure.  I did post the first part of the 3 part article on creating a generic scope class at the technical articles blog here, http://blogs.codeimpressions.com/techarticles/post/2008/06/Creating-a-generics-based-scope-class.aspx.

Once I'm done with the Scope article, I think the next target topic will be distributed application development with an emphasis on cacheing.  This is up in the air right now, so if you have ideas or comments feel free to post a comment.

Cheers!

Tags:

Categories:

Comments

11/3/2008 5:50:29 PM #

 Brian Agnes

The whole point of using CallContext.LogicalSetData(…) instead of a singleton is to get a scope specific instance of your object.  Using a static stack totally defeats this purpose.  If I have a multithreaded app each thread tries to use same stack and creates a mess.  If you keep a “Parent” instance variable in the ActivityScope you can populate it with a LogicalGetData in the constructor and put it back with a LogicalSetData in the dispose. Depth could be calculated as parent==null ? 1 : parent.Depth() + 1.  And if parent==null then you are the top level. Etc…

Brian Agnes | Reply

11/9/2008 1:54:53 AM #

Brent VanderMeide

Smile Love the tertiary result value Smile

I made a comment about this earlier right after the show aired
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you need this capability now, goto the show link at http://www.dnrtv.com/default.aspx?showNum=114 and download the source files at the bottom of the page.

There is in fact a ScoperT.cs file if you browse the contents of the zip file. This class is thread-safe and instead of creating a stack to keep a heirarchy it uses each instance to keep track of their parent scope. As each scope disposes up the call stack, the scope puts the parent scope back on the thread context.

Brent VanderMeide | Reply

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading