-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. auto create tables 3. implement use mysqlconnector
- Loading branch information
Lewis Zou
committed
Nov 21, 2019
1 parent
06b4da8
commit f0dcfd3
Showing
21 changed files
with
986 additions
and
205 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
|
||
<Project> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Authors>zlzforever@163.com</Authors> | ||
<Title>Quartz.AspNetCore</Title> | ||
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile> | ||
<Company>zchejian</Company> | ||
<PackageProjectUrl>https://github.com/zlzforever/Quartz.AspNetCore</PackageProjectUrl> | ||
<Copyright>2019 zchejian</Copyright> | ||
<RepositoryUrl>https://github.com/zlzforever/Quartz.AspNetCore</RepositoryUrl> | ||
<PackageTags>Quartz, AspNetCore</PackageTags> | ||
<Description>A package to help you use Quartz.NET in Asp.Net core by DI easily</Description> | ||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||
<Version>1.0.3</Version> | ||
<FileVersion>1.0.3</FileVersion> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="LICENSE.txt" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
rm -rf src/Quartz.AspNetCore/bin/Release | ||
rm -rf src/Quartz.AspNetCore.MySqlConnector/bin/Release | ||
dotnet publish Quartz.AspNetCore.sln -c Release | ||
nuget push src/Quartz.AspNetCore/bin/Release/*.nupkg -source https://www.myget.org/F/zlzforever/api/v3/index.json | ||
nuget push src/Quartz.AspNetCore.MySqlConnector/bin/Release/*.nupkg -source https://www.myget.org/F/zlzforever/api/v3/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Quartz; | ||
|
||
namespace AspNetCoreSample | ||
{ | ||
public class SimpleJob : IJob | ||
{ | ||
public virtual Task Execute(IJobExecutionContext context) | ||
{ | ||
var jobKey = context.JobDetail.Key; | ||
Console.WriteLine($"SimpleJob says: {jobKey} executing at {DateTime.Now:r}"); | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Quartz.AspNetCore.MySqlConnector/MySqlConnectorDbMetadata.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using MySql.Data.MySqlClient; | ||
using Quartz.Impl.AdoJobStore.Common; | ||
|
||
namespace Quartz.AspNetCore.MySqlConnector | ||
{ | ||
public class MySqlConnectorDbMetadata : DbMetadata | ||
{ | ||
private readonly Type _parameterDbType; | ||
private readonly Type _connectionType; | ||
private readonly Type _commandType; | ||
private readonly Type _parameterType; | ||
private readonly Type _exceptionType; | ||
|
||
public MySqlConnectorDbMetadata() | ||
{ | ||
_parameterDbType = typeof(MySqlDbType); | ||
_connectionType = typeof(MySqlConnection); | ||
_commandType = typeof(MySqlCommand); | ||
_parameterType = typeof(MySqlParameter); | ||
_exceptionType = typeof(MySqlException); | ||
} | ||
|
||
public override string ProductName => "MySQL, MySQL provider"; | ||
public override string ParameterNamePrefix => "?"; | ||
public override Type ConnectionType => _connectionType; | ||
public override Type CommandType => _commandType; | ||
public override Type ParameterDbType => _parameterDbType; | ||
public override Type ParameterType => _parameterType; | ||
public override Type ExceptionType => _exceptionType; | ||
public override bool BindByName => true; | ||
} | ||
} |
Oops, something went wrong.