public NameValueCollection ToProps()
 {
     return(new NameValueCollection
     {
         ["quartz.scheduler.instanceName"] = InstanceName,
         ["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
         ["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.StdAdoDelegate,Quartz",
         ["quartz.jobStore.tablePrefix"] = TablePrefix,
         ["quartz.jobStore.dataSource"] = DataSource,
         ["quartz.dataSource.default.connectionString"] = ConnectionString,
         ["quartz.dataSource.default.provider"] = Provider.ToDescription(),
         ["quartz.serializer.type"] = SerializerType.ToDescription()
     });
 }
        /// <summary>
        /// 获取任务调度服务所需的属性
        /// </summary>
        /// <returns></returns>
        public NameValueCollection GetQuartzProps()
        {
            var quartzProps     = new NameValueCollection();
            var quartzDbOptions = _dbOptions.Modules.FirstOrDefault(m => m.Name.EqualsIgnoreCase("quartz"));

            if (quartzDbOptions != null)
            {
                quartzProps["quartz.scheduler.instanceName"]              = InstanceName;
                quartzProps["quartz.jobStore.type"]                       = "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz";
                quartzProps["quartz.jobStore.driverDelegateType"]         = "Quartz.Impl.AdoJobStore.StdAdoDelegate,Quartz";
                quartzProps["quartz.jobStore.tablePrefix"]                = TablePrefix;
                quartzProps["quartz.jobStore.dataSource"]                 = "default";
                quartzProps["quartz.dataSource.default.connectionString"] = quartzDbOptions.ConnectionString;
                quartzProps["quartz.dataSource.default.provider"]         = Provider.IsNull() ? GetProvider(_dbOptions.Dialect) : Provider;
                quartzProps["quartz.serializer.type"]                     = SerializerType.ToDescription();
            }

            return(quartzProps);
        }