Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 16th, 2012  |  syntax: None  |  size: 0.85 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Thread Monitor class in c#
  2. if (Id == "")
  3. {
  4.     System.Threading.Monitor.Enter(this);
  5.     try
  6.     {
  7.         if (Request.AcceptTypes == null)
  8.         {
  9.             queue.Enqueue(Request.QueryString["sessionid"].Value);
  10.  
  11.             string que = "";
  12.  
  13.             que = queue.Dequeue();
  14.             TypeController.session_id = que;
  15.             langStr = SessionDatabase.Language;
  16.             filter = new AllThingzFilter(SessionDatabase, parameters, langStr);
  17.             TypeController.session_id = "";
  18.  
  19.             filter.Execute();
  20.             Request.Clear();
  21.  
  22.             return filter.XML;
  23.         }
  24.         else
  25.         {
  26.             TypeController.session_id = "";
  27.             filter = new AllThingzFilter(SessionDatabase, parameters, langStr);
  28.  
  29.             filter.Execute();
  30.         }
  31.     }
  32.     finally
  33.     {
  34.         System.Threading.Monitor.Exit(this);
  35.     }
  36. }