Exemplo n.º 1
0
        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);
                }
            }
        }
Exemplo n.º 2
0
 public static void ReleaseInstance()
 {
     Assert.IsNotNull(SingleInstance, "Instance was never created, or already released");
     SingleInstance.agentMap = null;
     SingleInstance          = null;
 }