Exploring ShadeTree Features, Part 2: Cache<KEY, VALUE>(lostechies.com)

submitted by schalkvanwykschalkvanwyk(1335) 3 years, 5 months ago

Or, as I like to call it: "That stupid dictionary thing we've all written a thousand times but were too lazy to component-ize for reuse" How many times have you written code like this in your C# 2.0-and-later life? Well, no more! Enter ShadeTree.Core.Cache! Nifty features: 1. Automatic cache miss value creation: When you attempt to get an item from the cache that's not there, if configured to do so, it'll new one up for you, add it, and return it. 2. Quiet Add: Call the Store method to add an item if it's not already added (otherwise, it'll do nothing) 3. Quiet Remove: Remove won't throw an error if the item isn't in the Cache 4. Each(): Handy lambda-friendly version of 'for each' 5. Exists(): Handy lambda-friendly version of TryGetValue

add a comment |category: |Views: 9

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story