public static void InitializeSingleInstance(
            Config config,
            ILogProvider logProvider,
            IStoreProvider storeProvider,
            ITaskRunner taskRunner,
            TraceStoreConnection traceStoreConnection,
            IClusterQuery clusterQuery,
            CancellationToken token)
        {
            if (SingleInstance != null)
            {
                return;
            }

            lock (singleAccessLock)
            {
                if (SingleInstance == null)
                {
                    SingleInstance = new AgentDirectory(config, logProvider, storeProvider, taskRunner, traceStoreConnection, clusterQuery, token);
                }
            }
        }
 public static void ReleaseInstance()
 {
     Assert.IsNotNull(SingleInstance, "Instance was never created, or already released");
     SingleInstance.agentMap = null;
     SingleInstance          = null;
 }