示例#1
0
 /// <summary>
 /// The method creates an instance of the SharedData class or returns the existing instance
 /// if it has already been created.
 /// </summary>
 /// <returns>Returns the SharedData object</returns>
 public static SingletonSharedData GetInstance()
 {
     lock (padlock)
     {
         if (instance == null)
         {
             instance = new SingletonSharedData();
         }
         return(instance);
     }
 }
示例#2
0
 public ServerClient()
 {
     sharedData = SingletonSharedData.GetInstance();
 }