title: Should I use a static or instance class in this specific case?
body: <p>I have read the posts regarding when to use static classes and when it is recommended to use instance classes. However, I have the impression my example below somewhat falls in between:</p>
  
  <ul>
  <li>No class instances are needed, stored state is shared among members within the AppDomain. </li>
  <li>State should be accessible from different class instances within the AppDomain.</li>
  <li>No abstractions or overrides are ever needed.</li>
  </ul>
  
  <p>So, my question is: Should I go ahead and use it as static or is it better to use a singleton concept?</p>
  
  <pre><code>public static class SubscriptionManager
  {
      private static Dictionary&lt;string, string&gt; Repository { get; set; }
  
      static SubscriptionManager()
      {
          Repository = new Dictionary&lt;string, string&gt;();
      }
  
      public static void Subscribe(string key, string value)
      {
          if (Repository.ContainsKey(key))
              Repository[key] = value;
          else
              Repository.Add(key, value);
      }
  
      public static void Unsubscribe(string key, string value)
      {
          if (Repository.ContainsKey(key))
              Repository.Remove(key);
      }
  
      public static string GetSubscription(string key)
      {
          if (Repository.ContainsKey(key))
              return Repository[key];
          else
              return "";
      }
  }
  </code></pre>