Skip to content

Instantly share code, notes, and snippets.

@toburger
Created March 21, 2013 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toburger/5212796 to your computer and use it in GitHub Desktop.
Save toburger/5212796 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Intranet
{
public class GlobalContainer
{
public static SmgIntranetContainer Instance
{
get
{
if (!HttpContext.Current.Items.Contains("SmgIntranetContainer"))
{
HttpContext.Current.Items.Add("SmgIntranetContainer", new SmgIntranetContainer());
}
return HttpContext.Current.Items["SmgIntranetContainer"] as SmgIntranetContainer;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment