コード例 #1
0
ファイル: PerformanceCounters.cs プロジェクト: udbeeq5566/ESB
        /// <summary>
        /// Processes the type of for each asynchronous operation.
        /// </summary>
        /// <param name="processor">The processor.</param>
        private static void ProcessForEachAsyncOperationType(AsyncOperationTypeProcessor processor)
        {
            if (ConfigurationManager.AppSettings["ApplicationName"] == null)
            {
                throw new Exception("NotConfiguredApplicationName");
            }

            ProcessForEachAsyncOperationType(ConfigurationManager.AppSettings["ApplicationName"], processor);
        }
コード例 #2
0
ファイル: PerformanceCounters.cs プロジェクト: udbeeq5566/ESB
 /// <summary>
 /// Processes the type of for each asynchronous operation.
 /// </summary>
 /// <param name="applicationName">Name of the application.</param>
 /// <param name="processor">The processor.</param>
 private static void ProcessForEachAsyncOperationType(string applicationName, AsyncOperationTypeProcessor processor)
 {
     MyDbConnection myConn;
     try
     {
         myConn = new MyDbConnection(applicationName);
     }
     catch
     {
         throw new AsyncServiceException(string.Format("未配置注册表数据库连接参数【{0}】,请确认已经在注册表中配置了该参数并拥有权限读取注册表!", applicationName));
     }
     //初始化Map1的数据库链接
     Mysoft.Map.Extensions.Initializer.UnSafeInit(myConn.GetConnectionString());
 }