Sunday, March 27, 2011

System.Runtime.Caching Namespace for Caching-II

In this Blog Post we are going to see how we can use this API in .NET Applications.

image

Here I am going create my own CacheLib class with the following   Add, Get, Remove methods as shown above.

First Let me create a C# class file called  CacheLib.cs  in which  I am going to implement all the CURD methods for the Cache object. to do let us create ObjectCache Cache = MemoryCache.Default . (Memory Cache) Then we Add Get, Add, Remove Methods.

Add any object to Cache:

Here  I am created the Generic Add method.

image

Get or Retrieve Cached Item from Cache Object: Generic get method

image

Remove or Delete from Cache:

image

User Defined class to store in Cache.

image

the following Code snippet shows how to add and retrieve data from Cache object .

image

Nandri(Thanks)

Sreenivasa Ragavan

Wednesday, March 23, 2011

System.Runtime.Caching Namespace for Caching

Today I happened to come across System.Runtime.Caching  new API in .NET Framework  4.0 this System.Runtime.Caching namespace contains types that let you implement caching in NET Framework applications. The good thing about this API is we can use this API same as  ASP.NET Out Caching functionality but without a dependency on the System.Web assembly.

When I Reference System.Runtime.Caching  assembly in my project it was showing not available then after looking project properties I found out this Namespace NOT part of the .NET 4 client profile, it is only in the full .NET 4 Framework.  then I changed my project to Full .NET Framework as shown below.

image

Next Post we will see how we can use this API to Cache.

Nandri(Thanks)

Sreenivasaragavan

Wednesday, March 16, 2011

IE 9 Released

Point your Old browser to the following URL and see More Beautiful WEBWe Exchange Bytes

image

http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-9/worldwide-languages

Nandri(Thanks)

SreenivasaRagavan

Going Full Screen Mode in Silverlight

In Silverlight Application using App.Current.Host.Content  IsFullScreen property we can go Full Screen mode.

First get the App.Current.Host.Content value and change to True if IsFullScreen is False.

image

image

when you click Full Screen Button here is the button click  event handler code.

image

Here is the FullScreenChanged Event Handler.

image

 

Nandri(Thanks)

SreenivasaRagavan

Thursday, March 10, 2011

Visual Studio 2010 SP-1 Released

 

MS Released SP-1 for VS.NET 2010.

image

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en

I downloaded and Installed it went without  any  ERROR.

image

Nandri(Thanks)

Sreenivasaragavan

Tuesday, March 1, 2011

Debugger.Break Method().

This method lives inside System.Diagnostics Namespace. This method Signals a breakpoint to an attached debugger.

image

This is really useful when we debugging .NET Windows Service.   In your Program  add the following line of code wherever you want to break into debug mode:
System.Diagnostics.Debugger.Break()

Nandri(Thanks)

Sreenivasaragavan