Initial commit
This commit is contained in:
Коммит
583a910d92
|
@ -0,0 +1,236 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Microsoft Azure ApplicationInsights config file
|
||||
ApplicationInsights.config
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,2 @@
|
|||
#### 0.0.1 March 05 2016 ####
|
||||
Support for Akka 1.0.6
|
|
@ -0,0 +1,39 @@
|
|||
@echo off
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
SETLOCAL
|
||||
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
|
||||
|
||||
IF EXIST %CACHED_NUGET% goto copynuget
|
||||
echo Downloading latest version of NuGet.exe...
|
||||
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
|
||||
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
|
||||
|
||||
:copynuget
|
||||
IF EXIST src\.nuget\nuget.exe goto restore
|
||||
md src\.nuget
|
||||
copy %CACHED_NUGET% src\.nuget\nuget.exe > nul
|
||||
|
||||
:restore
|
||||
|
||||
src\.nuget\NuGet.exe update -self
|
||||
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
src\.nuget\NuGet.exe update -self
|
||||
|
||||
src\.nuget\NuGet.exe install FAKE -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages -ExcludeVersion -Version 4.16.1
|
||||
|
||||
src\.nuget\NuGet.exe install xunit.runner.console -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages\FAKE -ExcludeVersion -Version 2.0.0
|
||||
|
||||
if not exist src\packages\SourceLink.Fake\tools\SourceLink.fsx (
|
||||
src\.nuget\nuget.exe install SourceLink.Fake -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages -ExcludeVersion
|
||||
)
|
||||
rem cls
|
||||
|
||||
set encoding=utf-8
|
||||
src\packages\FAKE\tools\FAKE.exe build.fsx %*
|
||||
|
||||
popd
|
|
@ -0,0 +1,356 @@
|
|||
#I @"src/packages/FAKE/tools"
|
||||
#r "FakeLib.dll"
|
||||
#r "System.Xml.Linq"
|
||||
|
||||
open System
|
||||
open System.IO
|
||||
open System.Text
|
||||
open Fake
|
||||
open Fake.FileUtils
|
||||
open Fake.MSTest
|
||||
open Fake.TaskRunnerHelper
|
||||
open Fake.ProcessHelper
|
||||
|
||||
cd __SOURCE_DIRECTORY__
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Information about the project for Nuget and Assembly info files
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
let product = "Akka.NET"
|
||||
let authors = [ "Akka.NET Team" ]
|
||||
let copyright = "Copyright © 2013-2016 Akka.NET Team"
|
||||
let company = "Akka.NET Team"
|
||||
let description = "Akka.NET is a port of the popular Java/Scala framework Akka to .NET"
|
||||
let tags = ["akka";"actors";"actor";"model";"Akka";"concurrency"]
|
||||
let configuration = "Release"
|
||||
let toolDir = "tools"
|
||||
let CloudCopyDir = toolDir @@ "CloudCopy"
|
||||
let AzCopyDir = toolDir @@ "AzCopy"
|
||||
|
||||
// Read release notes and version
|
||||
|
||||
let parsedRelease =
|
||||
File.ReadLines "RELEASE_NOTES.md"
|
||||
|> ReleaseNotesHelper.parseReleaseNotes
|
||||
|
||||
let envBuildNumber = System.Environment.GetEnvironmentVariable("BUILD_NUMBER")
|
||||
let buildNumber = if String.IsNullOrWhiteSpace(envBuildNumber) then "0" else envBuildNumber
|
||||
|
||||
let version = parsedRelease.AssemblyVersion + "." + buildNumber
|
||||
let preReleaseVersion = version + "-beta"
|
||||
|
||||
let isUnstableDocs = hasBuildParam "unstable"
|
||||
let isPreRelease = hasBuildParam "nugetprerelease"
|
||||
let release = if isPreRelease then ReleaseNotesHelper.ReleaseNotes.New(version, version + "-beta", parsedRelease.Notes) else parsedRelease
|
||||
|
||||
printfn "Assembly version: %s\nNuget version; %s\n" release.AssemblyVersion release.NugetVersion
|
||||
//--------------------------------------------------------------------------------
|
||||
// Directories
|
||||
|
||||
let binDir = "bin"
|
||||
let testOutput = FullName "TestResults"
|
||||
let perfOutput = FullName "PerfResults"
|
||||
|
||||
let nugetDir = binDir @@ "nuget"
|
||||
let workingDir = binDir @@ "build"
|
||||
let libDir = workingDir @@ @"lib\net45\"
|
||||
let nugetExe = FullName @"src\.nuget\NuGet.exe"
|
||||
let docDir = "bin" @@ "doc"
|
||||
|
||||
open Fake.RestorePackageHelper
|
||||
Target "RestorePackages" (fun _ ->
|
||||
"./src/Akka.Quartz.Actor.sln"
|
||||
|> RestoreMSSolutionPackages (fun p ->
|
||||
{ p with
|
||||
OutputPath = "./src/packages"
|
||||
Retries = 4 })
|
||||
)
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Clean build results
|
||||
|
||||
Target "Clean" <| fun _ ->
|
||||
DeleteDir binDir
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Generate AssemblyInfo files with the version for release notes
|
||||
|
||||
open AssemblyInfoFile
|
||||
|
||||
Target "AssemblyInfo" <| fun _ ->
|
||||
CreateCSharpAssemblyInfoWithConfig "src/SharedAssemblyInfo.cs" [
|
||||
Attribute.Company company
|
||||
Attribute.Copyright copyright
|
||||
Attribute.Trademark ""
|
||||
Attribute.Version version
|
||||
Attribute.FileVersion version ] <| AssemblyInfoFileConfig(false)
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Build the solution
|
||||
|
||||
Target "Build" <| fun _ ->
|
||||
|
||||
!!"src/Akka.Quartz.Actor.sln"
|
||||
|> MSBuildRelease "" "Rebuild"
|
||||
|> ignore
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Copy the build output to bin directory
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
Target "CopyOutput" <| fun _ ->
|
||||
|
||||
let copyOutput project =
|
||||
let src = "src" @@ project @@ @"bin/Release/"
|
||||
let dst = binDir @@ project
|
||||
CopyDir dst src allFiles
|
||||
[ "Akka.Quartz.Actor"]
|
||||
|> List.iter copyOutput
|
||||
|
||||
Target "BuildRelease" DoNothing
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Tests targets
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Clean test output
|
||||
|
||||
Target "CleanTests" <| fun _ ->
|
||||
DeleteDir testOutput
|
||||
//--------------------------------------------------------------------------------
|
||||
// Run tests
|
||||
|
||||
open Fake.Testing
|
||||
Target "RunTests" <| fun _ ->
|
||||
let quartzTestAssemblies = !! "src/**/bin/Release/Akka.Quartz.Actor.Tests.dll" ++ "src/**/bin/Release/Akka.Quartz.Actor.Tests.dll"
|
||||
|
||||
mkdir testOutput
|
||||
let xunitToolPath = findToolInSubPath "xunit.console.exe" "src/packages/xunit.runner.console*/tools"
|
||||
|
||||
printfn "Using XUnit runner: %s" xunitToolPath
|
||||
xUnit2
|
||||
(fun p -> { p with XmlOutputPath = Some (testOutput + @"\XUnitTestResults.xml"); HtmlOutputPath = Some (testOutput + @"\XUnitTestResults.HTML"); ToolPath = xunitToolPath; TimeOut = System.TimeSpan.FromMinutes 30.0; Parallel = ParallelMode.NoParallelization })
|
||||
quartzTestAssemblies
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Nuget targets
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Clean nuget directory
|
||||
|
||||
Target "CleanNuget" <| fun _ ->
|
||||
CleanDir nugetDir
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Pack nuget for all projects
|
||||
// Publish to nuget.org if nugetkey is specified
|
||||
|
||||
let createNugetPackages _ =
|
||||
let removeDir dir =
|
||||
let del _ =
|
||||
DeleteDir dir
|
||||
not (directoryExists dir)
|
||||
runWithRetries del 3 |> ignore
|
||||
|
||||
ensureDirectory nugetDir
|
||||
for nuspec in !! "src/**/*.nuspec" do
|
||||
printfn "Creating nuget packages for %s" nuspec
|
||||
|
||||
CleanDir workingDir
|
||||
|
||||
let project = Path.GetFileNameWithoutExtension nuspec
|
||||
let projectDir = Path.GetDirectoryName nuspec
|
||||
let projectFile = (!! (projectDir @@ project + ".*sproj")) |> Seq.head
|
||||
let releaseDir = projectDir @@ @"bin\Release"
|
||||
let packages = projectDir @@ "packages.config"
|
||||
let packageDependencies = if (fileExists packages) then (getDependencies packages) else []
|
||||
|
||||
let pack outputDir symbolPackage =
|
||||
NuGetHelper.NuGet
|
||||
(fun p ->
|
||||
{ p with
|
||||
Description = description
|
||||
Authors = authors
|
||||
Copyright = copyright
|
||||
Project = project
|
||||
Properties = ["Configuration", "Release"]
|
||||
ReleaseNotes = release.Notes |> String.concat "\n"
|
||||
Version = release.NugetVersion
|
||||
Tags = tags |> String.concat " "
|
||||
OutputPath = outputDir
|
||||
WorkingDir = workingDir
|
||||
SymbolPackage = symbolPackage
|
||||
Dependencies = packageDependencies })
|
||||
nuspec
|
||||
|
||||
// Copy dll, pdb and xml to libdir = workingDir/lib/net45/
|
||||
ensureDirectory libDir
|
||||
!! (releaseDir @@ project + ".dll")
|
||||
++ (releaseDir @@ project + ".pdb")
|
||||
++ (releaseDir @@ project + ".xml")
|
||||
++ (releaseDir @@ project + ".ExternalAnnotations.xml")
|
||||
|> CopyFiles libDir
|
||||
|
||||
// Copy all src-files (.cs and .fs files) to workingDir/src
|
||||
let nugetSrcDir = workingDir @@ @"src/"
|
||||
// CreateDir nugetSrcDir
|
||||
|
||||
let isCs = hasExt ".cs"
|
||||
let isFs = hasExt ".fs"
|
||||
let isAssemblyInfo f = (filename f).Contains("AssemblyInfo")
|
||||
let isSrc f = (isCs f || isFs f) && not (isAssemblyInfo f)
|
||||
CopyDir nugetSrcDir projectDir isSrc
|
||||
|
||||
//Remove workingDir/src/obj and workingDir/src/bin
|
||||
removeDir (nugetSrcDir @@ "obj")
|
||||
removeDir (nugetSrcDir @@ "bin")
|
||||
|
||||
// Create both normal nuget package and symbols nuget package.
|
||||
// Uses the files we copied to workingDir and outputs to nugetdir
|
||||
pack nugetDir NugetSymbolPackage.Nuspec
|
||||
|
||||
removeDir workingDir
|
||||
|
||||
let publishNugetPackages _ =
|
||||
let rec publishPackage url accessKey trialsLeft packageFile =
|
||||
let tracing = enableProcessTracing
|
||||
enableProcessTracing <- false
|
||||
let args p =
|
||||
match p with
|
||||
| (pack, key, "") -> sprintf "push \"%s\" %s" pack key
|
||||
| (pack, key, url) -> sprintf "push \"%s\" %s -source %s" pack key url
|
||||
|
||||
tracefn "Pushing %s Attempts left: %d" (FullName packageFile) trialsLeft
|
||||
try
|
||||
let result = ExecProcess (fun info ->
|
||||
info.FileName <- nugetExe
|
||||
info.WorkingDirectory <- (Path.GetDirectoryName (FullName packageFile))
|
||||
info.Arguments <- args (packageFile, accessKey,url)) (System.TimeSpan.FromMinutes 1.0)
|
||||
enableProcessTracing <- tracing
|
||||
if result <> 0 then failwithf "Error during NuGet symbol push. %s %s" nugetExe (args (packageFile, "key omitted",url))
|
||||
with exn ->
|
||||
if (trialsLeft > 0) then (publishPackage url accessKey (trialsLeft-1) packageFile)
|
||||
else raise exn
|
||||
let shouldPushNugetPackages = hasBuildParam "nugetkey"
|
||||
let shouldPushSymbolsPackages = (hasBuildParam "symbolspublishurl") && (hasBuildParam "symbolskey")
|
||||
|
||||
if (shouldPushNugetPackages || shouldPushSymbolsPackages) then
|
||||
printfn "Pushing nuget packages"
|
||||
if shouldPushNugetPackages then
|
||||
let normalPackages=
|
||||
!! (nugetDir @@ "*.nupkg")
|
||||
-- (nugetDir @@ "*.symbols.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
|
||||
for package in normalPackages do
|
||||
try
|
||||
publishPackage (getBuildParamOrDefault "nugetpublishurl" "") (getBuildParam "nugetkey") 3 package
|
||||
with exn ->
|
||||
printfn "%s" exn.Message
|
||||
|
||||
if shouldPushSymbolsPackages then
|
||||
let symbolPackages= !! (nugetDir @@ "*.symbols.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
|
||||
for package in symbolPackages do
|
||||
try
|
||||
publishPackage (getBuildParam "symbolspublishurl") (getBuildParam "symbolskey") 3 package
|
||||
with exn ->
|
||||
printfn "%s" exn.Message
|
||||
|
||||
|
||||
Target "Nuget" <| fun _ ->
|
||||
createNugetPackages()
|
||||
publishNugetPackages()
|
||||
|
||||
Target "CreateNuget" <| fun _ ->
|
||||
createNugetPackages()
|
||||
|
||||
Target "PublishNuget" <| fun _ ->
|
||||
publishNugetPackages()
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Help
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
Target "Help" <| fun _ ->
|
||||
List.iter printfn [
|
||||
"usage:"
|
||||
"build [target]"
|
||||
""
|
||||
" Targets for building:"
|
||||
" * Build Builds"
|
||||
" * Nuget Create and optionally publish nugets packages"
|
||||
" * RunTests Runs tests"
|
||||
" * All Builds, run tests, creates and optionally publish nuget packages"
|
||||
""
|
||||
" Other Targets"
|
||||
" * Help Display this help"
|
||||
" * HelpNuget Display help about creating and pushing nuget packages"
|
||||
""]
|
||||
|
||||
Target "HelpNuget" <| fun _ ->
|
||||
List.iter printfn [
|
||||
"usage: "
|
||||
"build Nuget [nugetkey=<key> [nugetpublishurl=<url>]] "
|
||||
" [symbolskey=<key> symbolspublishurl=<url>] "
|
||||
" [nugetprerelease=<prefix>]"
|
||||
""
|
||||
"Arguments for Nuget target:"
|
||||
" nugetprerelease=<prefix> Creates a pre-release package."
|
||||
" The version will be version-prefix<date>"
|
||||
" Example: nugetprerelease=dev =>"
|
||||
" 0.6.3-dev1408191917"
|
||||
""
|
||||
"In order to publish a nuget package, keys must be specified."
|
||||
"If a key is not specified the nuget packages will only be created on disk"
|
||||
"After a build you can find them in bin/nuget"
|
||||
""
|
||||
"For pushing nuget packages to nuget.org and symbols to symbolsource.org"
|
||||
"you need to specify nugetkey=<key>"
|
||||
" build Nuget nugetKey=<key for nuget.org>"
|
||||
""
|
||||
"For pushing the ordinary nuget packages to another place than nuget.org specify the url"
|
||||
" nugetkey=<key> nugetpublishurl=<url> "
|
||||
""
|
||||
"For pushing symbols packages specify:"
|
||||
" symbolskey=<key> symbolspublishurl=<url> "
|
||||
""
|
||||
"Examples:"
|
||||
" build Nuget Build nuget packages to the bin/nuget folder"
|
||||
""
|
||||
" build Nuget nugetprerelease=dev Build pre-release nuget packages"
|
||||
""
|
||||
" build Nuget nugetkey=123 Build and publish to nuget.org and symbolsource.org"
|
||||
""
|
||||
" build Nuget nugetprerelease=dev nugetkey=123 nugetpublishurl=http://abc"
|
||||
" symbolskey=456 symbolspublishurl=http://xyz"
|
||||
" Build and publish pre-release nuget packages to http://abc"
|
||||
" and symbols packages to http://xyz"
|
||||
""]
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Target dependencies
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
// build dependencies
|
||||
"Clean" ==> "AssemblyInfo" ==> "RestorePackages" ==> "Build" ==> "CopyOutput" ==> "BuildRelease"
|
||||
|
||||
// tests dependencies
|
||||
"CleanTests" ==> "RunTests"
|
||||
|
||||
// nuget dependencies
|
||||
"CleanNuget" ==> "CreateNuget"
|
||||
"CleanNuget" ==> "BuildRelease" ==> "Nuget"
|
||||
|
||||
Target "All" DoNothing
|
||||
"BuildRelease" ==> "All"
|
||||
"RunTests" ==> "All"
|
||||
"Nuget" ==> "All"
|
||||
|
||||
RunTargetOrDefault "Help"
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<solution>
|
||||
<add key="disableSourceControlIntegration" value="true" />
|
||||
</solution>
|
||||
<activePackageSource>
|
||||
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
|
||||
</activePackageSource>
|
||||
</configuration>
|
Двоичный файл не отображается.
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{591B1A06-4111-41CE-B626-EB475D463653}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Akka.Quartz.Actor.Tests</RootNamespace>
|
||||
<AssemblyName>Akka.Quartz.Actor.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Akka, Version=1.0.6.16, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Akka.1.0.6\lib\net45\Akka.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Akka.TestKit, Version=1.0.6.16, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Akka.TestKit.1.0.6\lib\net45\Akka.TestKit.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Akka.TestKit.Xunit2, Version=1.0.6.16, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Akka.TestKit.Xunit2.1.0.6\lib\net45\Akka.TestKit.Xunit2.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Quartz, Version=2.3.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="xunit.assert, Version=2.0.0.2929, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="xunit.core, Version=2.0.0.2929, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="QuartzActorSpec.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Akka.Quartz.Actor\Akka.Quartz.Actor.csproj">
|
||||
<Project>{80E909A0-2379-408D-9711-70D1BF3147A2}</Project>
|
||||
<Name>Akka.Quartz.Actor</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Akka.Quartz.Actor.Tests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Akka.Quartz.Actor.Tests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("591b1a06-4111-41ce-b626-eb475d463653")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,63 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NUnitAssertions.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Akka.Actor;
|
||||
using Akka.Quartz.Actor.Commands;
|
||||
using Akka.Quartz.Actor.Events;
|
||||
using Xunit;
|
||||
|
||||
namespace Akka.Quartz.Actor.Tests
|
||||
{
|
||||
public class QuartzActorSpec : TestKit.Xunit2.TestKit
|
||||
{
|
||||
[Fact]
|
||||
public void QuartzActor_Should_Create_Job()
|
||||
{
|
||||
var probe = CreateTestProbe(Sys);
|
||||
var quartzActor = Sys.ActorOf(Props.Create(() => new QuartzActor(null)), "QuartzActor");
|
||||
quartzActor.Tell(new CreateJob(probe, "Hello", " * * * * * ?"));
|
||||
ExpectMsg<JobCreated>();
|
||||
probe.ExpectMsg("Hello", TimeSpan.FromSeconds(5));
|
||||
probe.ExpectMsg("Hello", TimeSpan.FromSeconds(65));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void QuartzActor_Should_Remove_Job()
|
||||
{
|
||||
var probe = CreateTestProbe(Sys);
|
||||
var quartzActor = Sys.ActorOf(Props.Create(() => new QuartzActor(null)), "QuartzActor");
|
||||
quartzActor.Tell(new CreateJob(probe, "Hello", " * * * * * ?"));
|
||||
var jobCreated = ExpectMsg<JobCreated>();
|
||||
probe.ExpectMsg("Hello", TimeSpan.FromSeconds(5));
|
||||
quartzActor.Tell(new RemoveJob(jobCreated.JobKey, jobCreated.TriggerKey));
|
||||
ExpectMsg<JobRemoved>();
|
||||
Thread.Sleep(TimeSpan.FromSeconds(5));
|
||||
Within(TimeSpan.FromSeconds(70), () => { probe.ExpectNoMsg(); });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void QuartzActor_Should_Fail_With_Invalid_CronString()
|
||||
{
|
||||
var probe = CreateTestProbe(Sys);
|
||||
var quartzActor = Sys.ActorOf(Props.Create(() => new QuartzActor(null)), "QuartzActor");
|
||||
quartzActor.Tell(new CreateJob(probe, "Hello", " invalid strings ?"));
|
||||
var failedJob = ExpectMsg<CreateJobFail>();
|
||||
Assert.NotNull(failedJob.Reason);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void QuartzActor_Should_Fail_With_Null_Actor()
|
||||
{
|
||||
var quartzActor = Sys.ActorOf(Props.Create(() => new QuartzActor(null)), "QuartzActor");
|
||||
quartzActor.Tell(new CreateJob(null, "Hello", " invalid strings ?"));
|
||||
var failedJob = ExpectMsg<CreateJobFail>();
|
||||
Assert.NotNull(failedJob.Reason);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Akka" version="1.0.6" targetFramework="net452" />
|
||||
<package id="Akka.TestKit" version="1.0.6" targetFramework="net452" />
|
||||
<package id="Akka.TestKit.Xunit2" version="1.0.6" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="xunit" version="2.0.0" targetFramework="net452" />
|
||||
<package id="xunit.abstractions" version="2.0.0" targetFramework="net452" />
|
||||
<package id="xunit.assert" version="2.0.0" targetFramework="net452" />
|
||||
<package id="xunit.core" version="2.0.0" targetFramework="net452" />
|
||||
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="net452" />
|
||||
</packages>
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Quartz.Actor", "Akka.Quartz.Actor\Akka.Quartz.Actor.csproj", "{80E909A0-2379-408D-9711-70D1BF3147A2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Quartz.Actor.Tests", "Akka.Quartz.Actor.Tests\Akka.Quartz.Actor.Tests.csproj", "{591B1A06-4111-41CE-B626-EB475D463653}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{80E909A0-2379-408D-9711-70D1BF3147A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{80E909A0-2379-408D-9711-70D1BF3147A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{80E909A0-2379-408D-9711-70D1BF3147A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{80E909A0-2379-408D-9711-70D1BF3147A2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{591B1A06-4111-41CE-B626-EB475D463653}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{591B1A06-4111-41CE-B626-EB475D463653}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{591B1A06-4111-41CE-B626-EB475D463653}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{591B1A06-4111-41CE-B626-EB475D463653}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{80E909A0-2379-408D-9711-70D1BF3147A2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Akka.Quartz.Actor</RootNamespace>
|
||||
<AssemblyName>Akka.Quartz.Actor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Akka, Version=1.0.6.16, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Akka.1.0.6\lib\net45\Akka.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=3.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Quartz, Version=2.3.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Quartz.2.3.3\lib\net40\Quartz.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Commands\CreateJob.cs" />
|
||||
<Compile Include="Commands\IJobCommand.cs" />
|
||||
<Compile Include="Commands\RemoveJob.cs" />
|
||||
<Compile Include="Events\JobCreated.cs" />
|
||||
<Compile Include="Events\CreateJobFail.cs" />
|
||||
<Compile Include="Events\IJobEvent.cs" />
|
||||
<Compile Include="Events\JobEvent.cs" />
|
||||
<Compile Include="Events\RemoveJobFail.cs" />
|
||||
<Compile Include="QuartzActor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="QuartzJob.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="job_scheduling_data_2_0.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,39 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CreateJob.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using Akka.Actor;
|
||||
|
||||
namespace Akka.Quartz.Actor.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// Message to add a cron scheduler.
|
||||
/// </summary>
|
||||
public class CreateJob : IJobCommand
|
||||
{
|
||||
public CreateJob(IActorRef to, object message, string cron)
|
||||
{
|
||||
To = to;
|
||||
Message = message;
|
||||
Cron = cron;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The desination actor
|
||||
/// </summary>
|
||||
public IActorRef To { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Message
|
||||
/// </summary>
|
||||
public object Message { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cron expression
|
||||
/// </summary>
|
||||
public string Cron { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IJobCommand.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
namespace Akka.Quartz.Actor.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// Base interface for job commands
|
||||
/// </summary>
|
||||
internal interface IJobCommand
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RemoveJob.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// Message to remove a cron scheduler.
|
||||
/// </summary>
|
||||
public class RemoveJob : IJobCommand
|
||||
{
|
||||
public RemoveJob(JobKey jobKey, TriggerKey triggerKey)
|
||||
{
|
||||
JobKey = jobKey;
|
||||
TriggerKey = triggerKey;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Job key
|
||||
/// </summary>
|
||||
public JobKey JobKey { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Trigger key
|
||||
/// </summary>
|
||||
public TriggerKey TriggerKey { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CreateJobFail.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Create job fail event
|
||||
/// </summary>
|
||||
public class CreateJobFail : JobEvent
|
||||
{
|
||||
public CreateJobFail(JobKey jobKey, TriggerKey triggerKey, Exception reason) : base(jobKey, triggerKey)
|
||||
{
|
||||
Reason = reason;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fail reason
|
||||
/// </summary>
|
||||
public Exception Reason { get; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Create job {0} with trigger {1} fail. With reason {2}", JobKey, TriggerKey, Reason);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="IJobEvent.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Base interface for job events
|
||||
/// </summary>
|
||||
internal interface IJobEvent
|
||||
{
|
||||
JobKey JobKey { get; }
|
||||
TriggerKey TriggerKey { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="JobCreated.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Job created event
|
||||
/// </summary>
|
||||
public class JobCreated : JobEvent
|
||||
{
|
||||
public JobCreated(JobKey jobKey, TriggerKey triggerKey) : base(jobKey, triggerKey)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} with trigger {1} has been created.", JobKey, TriggerKey);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Job removed event
|
||||
/// </summary>
|
||||
public class JobRemoved : JobEvent
|
||||
{
|
||||
public JobRemoved(JobKey jobKey, TriggerKey triggerKey) : base(jobKey, triggerKey)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} with trigger {1} has been removed.", JobKey, TriggerKey);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="JobEvent.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor.Events
|
||||
{
|
||||
public abstract class JobEvent : IJobEvent
|
||||
{
|
||||
protected JobEvent(JobKey jobKey, TriggerKey triggerKey)
|
||||
{
|
||||
JobKey = jobKey;
|
||||
TriggerKey = triggerKey;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Job key
|
||||
/// </summary>
|
||||
public JobKey JobKey { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Trigger key
|
||||
/// </summary>
|
||||
public TriggerKey TriggerKey { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="RemoveJobFail.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Remove job fail
|
||||
/// </summary>
|
||||
public class RemoveJobFail : JobEvent
|
||||
{
|
||||
public RemoveJobFail(JobKey jobKey, TriggerKey triggerKey, Exception reason) : base(jobKey, triggerKey)
|
||||
{
|
||||
Reason = reason;
|
||||
}
|
||||
|
||||
public Exception Reason { get; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Remove job {0} with trigger {1} fail. With reason {2}", JobKey, TriggerKey, Reason);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Akka.Quartz.Actor")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Akka.Quartz.Actor")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("80e909a0-2379-408d-9711-70d1bf3147a2")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,96 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="QuartzActor.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using Akka.Actor;
|
||||
using Akka.Quartz.Actor.Commands;
|
||||
using Akka.Quartz.Actor.Events;
|
||||
using Quartz;
|
||||
using Quartz.Impl;
|
||||
using IScheduler = Quartz.IScheduler;
|
||||
|
||||
namespace Akka.Quartz.Actor
|
||||
{
|
||||
/// <summary>
|
||||
/// The base quartz scheduling actor. Handles a single quartz scheduler
|
||||
/// and processes Add and Remove messages.
|
||||
/// </summary>
|
||||
public class QuartzActor : ActorBase
|
||||
{
|
||||
private readonly IScheduler _scheduler;
|
||||
|
||||
public QuartzActor(NameValueCollection props = null)
|
||||
{
|
||||
_scheduler = props == null
|
||||
? new StdSchedulerFactory().GetScheduler()
|
||||
: new StdSchedulerFactory(props).GetScheduler();
|
||||
}
|
||||
|
||||
protected override bool Receive(object message)
|
||||
{
|
||||
return message.Match().With<CreateJob>(CreateJobCommand).With<RemoveJob>(RemoveJobCommand).WasHandled;
|
||||
}
|
||||
|
||||
protected override void PreStart()
|
||||
{
|
||||
_scheduler.Start();
|
||||
base.PreStart();
|
||||
}
|
||||
|
||||
protected override void PostStop()
|
||||
{
|
||||
_scheduler.Shutdown();
|
||||
base.PostStop();
|
||||
}
|
||||
|
||||
protected virtual void CreateJobCommand(CreateJob createJob)
|
||||
{
|
||||
var jobKey = CreateJobKey(createJob);
|
||||
var triggerKey = CreateTriggerKey(createJob);
|
||||
var job = QuartzJob.CreateBuilderWithData(createJob.To, createJob.Message).WithIdentity(jobKey).Build();
|
||||
try
|
||||
{
|
||||
_scheduler.ScheduleJob(job, TriggerBuilder.Create().StartNow()
|
||||
.WithIdentity(triggerKey).ForJob(job)
|
||||
.WithSchedule(CronScheduleBuilder.CronSchedule(createJob.Cron)).Build());
|
||||
|
||||
Context.Sender.Tell(new JobCreated(jobKey, triggerKey));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Context.Sender.Tell(new CreateJobFail(jobKey, triggerKey, ex));
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void RemoveJobCommand(RemoveJob removeJob)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scheduler.DeleteJob(removeJob.JobKey);
|
||||
Context.Sender.Tell(new JobRemoved(removeJob.JobKey, removeJob.TriggerKey));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Context.Sender.Tell(new RemoveJobFail(removeJob.JobKey, removeJob.TriggerKey, ex));
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual JobKey CreateJobKey(CreateJob createJob)
|
||||
{
|
||||
return new JobKey(
|
||||
string.Format("{0}{1}{2}job", createJob.To, createJob.Message, createJob.Cron).GetHashCode().ToString());
|
||||
}
|
||||
|
||||
protected virtual TriggerKey CreateTriggerKey(CreateJob createJob)
|
||||
{
|
||||
return new TriggerKey(
|
||||
string.Format("{0}{1}{2}trigger", createJob.To, createJob.Message, createJob.Cron)
|
||||
.GetHashCode()
|
||||
.ToString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
//-----------------------------------------------------------------------
|
||||
// <copyright file="QuartzJob.cs" company="Akka.NET Project">
|
||||
// Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
|
||||
// Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
|
||||
// </copyright>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using Akka.Actor;
|
||||
using Akka.Util.Internal;
|
||||
using Quartz;
|
||||
|
||||
namespace Akka.Quartz.Actor
|
||||
{
|
||||
/// <summary>
|
||||
/// Job
|
||||
/// </summary>
|
||||
public class QuartzJob : IJob
|
||||
{
|
||||
private const string MessageKey = "message";
|
||||
private const string ActorKey = "actor";
|
||||
|
||||
public void Execute(IJobExecutionContext context)
|
||||
{
|
||||
var jdm = context.JobDetail.JobDataMap;
|
||||
if (jdm.ContainsKey(MessageKey) && jdm.ContainsKey(ActorKey))
|
||||
{
|
||||
var actor = jdm[ActorKey] as IActorRef;
|
||||
if (actor != null)
|
||||
{
|
||||
actor.Tell(jdm[MessageKey]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static JobBuilder CreateBuilderWithData(IActorRef actorRef, object message)
|
||||
{
|
||||
var jdm = new JobDataMap();
|
||||
jdm.AddAndReturn(MessageKey, message).Add(ActorKey, actorRef);
|
||||
return JobBuilder.Create<QuartzJob>().UsingJobData(jdm);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,361 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
|
||||
targetNamespace="http://quartznet.sourceforge.net/JobSchedulingData"
|
||||
elementFormDefault="qualified"
|
||||
version="2.0">
|
||||
|
||||
<xs:element name="job-scheduling-data">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Root level node</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence maxOccurs="unbounded">
|
||||
<xs:element name="pre-processing-commands" type="pre-processing-commandsType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Commands to be executed before scheduling the jobs and triggers in this file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="processing-directives" type="processing-directivesType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Directives to be followed while scheduling the jobs and triggers in this file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="schedule" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence maxOccurs="unbounded">
|
||||
<xs:element name="job" type="job-detailType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="trigger" type="triggerType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Version of the XML Schema instance</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="pre-processing-commandsType">
|
||||
<xs:sequence maxOccurs="unbounded">
|
||||
<xs:element name="delete-jobs-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete all jobs, if any, in the identified group. "*" can be used to identify all groups. Will also result in deleting all triggers related to the jobs.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="delete-triggers-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete all triggers, if any, in the identified group. "*" can be used to identify all groups. Will also result in deletion of related jobs that are non-durable.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="delete-job" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete the identified job if it exists (will also result in deleting all triggers related to it).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="delete-trigger" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete the identified trigger if it exists (will also result in deletion of related jobs that are non-durable).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="processing-directivesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="overwrite-existing-data" type="xs:boolean" minOccurs="0" default="true">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Whether the existing scheduling data (with same identifiers) will be overwritten. If false, and ignore-duplicates is not false, and jobs or triggers with the same names already exist as those in the file, an error will occur.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ignore-duplicates" type="xs:boolean" minOccurs="0" default="false">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If true (and overwrite-existing-data is false) then any job/triggers encountered in this file that have names that already exist in the scheduler will be ignored, and no error will be produced.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="schedule-trigger-relative-to-replaced-trigger" type="xs:boolean" minOccurs="0" default="false">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If true trigger's start time is calculated based on earlier run time instead of fixed value. Trigger's start time must be undefined for this to work.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="job-detailType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a JobDetail</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="description" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="job-type" type="xs:string" />
|
||||
<xs:sequence minOccurs="0">
|
||||
<xs:element name="durable" type="xs:boolean" />
|
||||
<xs:element name="recover" type="xs:boolean" />
|
||||
</xs:sequence>
|
||||
<xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="job-data-mapType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a JobDataMap</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="entry" type="entryType" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="entryType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a JobDataMap entry</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="key" type="xs:string" />
|
||||
<xs:element name="value" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="triggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a Trigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:choice>
|
||||
<xs:element name="simple" type="simpleTriggerType" />
|
||||
<xs:element name="cron" type="cronTriggerType" />
|
||||
<xs:element name="calendar-interval" type="calendarIntervalTriggerType" />
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="abstractTriggerType" abstract="true">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Common Trigger definitions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="description" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="job-name" type="xs:string" />
|
||||
<xs:element name="job-group" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="priority" type="xs:nonNegativeInteger" minOccurs="0" />
|
||||
<xs:element name="calendar-name" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
|
||||
<xs:sequence minOccurs="0">
|
||||
<xs:choice>
|
||||
<xs:element name="start-time" type="xs:dateTime" />
|
||||
<xs:element name="start-time-seconds-in-future" type="xs:nonNegativeInteger" />
|
||||
</xs:choice>
|
||||
<xs:element name="end-time" type="xs:dateTime" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="simpleTriggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a SimpleTrigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="abstractTriggerType">
|
||||
<xs:sequence>
|
||||
<xs:element name="misfire-instruction" type="simple-trigger-misfire-instructionType" minOccurs="0" />
|
||||
<xs:sequence minOccurs="0">
|
||||
<xs:element name="repeat-count" type="repeat-countType" />
|
||||
<xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
|
||||
</xs:sequence>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="cronTriggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a CronTrigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="abstractTriggerType">
|
||||
<xs:sequence>
|
||||
<xs:element name="misfire-instruction" type="cron-trigger-misfire-instructionType" minOccurs="0" />
|
||||
<xs:element name="cron-expression" type="cron-expressionType" />
|
||||
<xs:element name="time-zone" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="calendarIntervalTriggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a DateIntervalTrigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="abstractTriggerType">
|
||||
<xs:sequence>
|
||||
<xs:element name="misfire-instruction" type="date-interval-trigger-misfire-instructionType" minOccurs="0" />
|
||||
<xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
|
||||
<xs:element name="repeat-interval-unit" type="interval-unitType" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="cron-expressionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Cron expression (see JavaDoc for examples)
|
||||
|
||||
Special thanks to Chris Thatcher (thatcher@butterfly.net) for the regular expression!
|
||||
|
||||
Regular expressions are not my strong point but I believe this is complete,
|
||||
with the caveat that order for expressions like 3-0 is not legal but will pass,
|
||||
and month and day names must be capitalized.
|
||||
If you want to examine the correctness look for the [\s] to denote the
|
||||
seperation of individual regular expressions. This is how I break them up visually
|
||||
to examine them:
|
||||
|
||||
SECONDS:
|
||||
(
|
||||
((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
|
||||
| (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
) [\s]
|
||||
MINUTES:
|
||||
(
|
||||
((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
|
||||
| (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
) [\s]
|
||||
HOURS:
|
||||
(
|
||||
((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)
|
||||
| (([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
) [\s]
|
||||
DAY OF MONTH:
|
||||
(
|
||||
((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)
|
||||
| (([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)
|
||||
| (L(-[0-9])?)
|
||||
| (L(-[1-2][0-9])?)
|
||||
| (L(-[3][0-1])?)
|
||||
| (LW)
|
||||
| ([1-9]W)
|
||||
| ([1-3][0-9]W)
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
)[\s]
|
||||
MONTH:
|
||||
(
|
||||
((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)
|
||||
| (([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))
|
||||
| (((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)
|
||||
| ((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
)[\s]
|
||||
DAY OF WEEK:
|
||||
(
|
||||
(([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)
|
||||
| ([1-7]/([1-7]))
|
||||
| (((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)
|
||||
| ((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)
|
||||
| (([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))(L|LW)?)
|
||||
| (([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
)
|
||||
YEAR (OPTIONAL):
|
||||
(
|
||||
[\s]?
|
||||
([\*])?
|
||||
| ((19[7-9][0-9])|(20[0-9][0-9]))?
|
||||
| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?
|
||||
| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?
|
||||
)
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern
|
||||
value="(((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)|(([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))|([\?])|([\*]))[\s](((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)|(([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)|(L(-[0-9])?)|(L(-[1-2][0-9])?)|(L(-[3][0-1])?)|(LW)|([1-9]W)|([1-3][0-9]W)|([\?])|([\*]))[\s](((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)|(([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))|(((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)|((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))|([\?])|([\*]))[\s]((([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)|([1-7]/([1-7]))|(((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)|((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)|(([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))?(L|LW)?)|(([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)|([\?])|([\*]))([\s]?(([\*])?|(19[7-9][0-9])|(20[0-9][0-9]))?| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?)" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="repeat-countType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Number of times to repeat the Trigger (-1 for indefinite)</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="-1" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<xs:simpleType name="simple-trigger-misfire-instructionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Simple Trigger Misfire Instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="SmartPolicy" />
|
||||
<xs:pattern value="RescheduleNextWithExistingCount" />
|
||||
<xs:pattern value="RescheduleNextWithRemainingCount" />
|
||||
<xs:pattern value="RescheduleNowWithExistingRepeatCount" />
|
||||
<xs:pattern value="RescheduleNowWithRemainingRepeatCount" />
|
||||
<xs:pattern value="FireNow" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="cron-trigger-misfire-instructionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Cron Trigger Misfire Instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="SmartPolicy" />
|
||||
<xs:pattern value="DoNothing" />
|
||||
<xs:pattern value="FireOnceNow" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="date-interval-trigger-misfire-instructionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Date Interval Trigger Misfire Instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="SmartPolicy" />
|
||||
<xs:pattern value="DoNothing" />
|
||||
<xs:pattern value="FireOnceNow" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="interval-unitType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Interval Units</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="Day" />
|
||||
<xs:pattern value="Hour" />
|
||||
<xs:pattern value="Minute" />
|
||||
<xs:pattern value="Month" />
|
||||
<xs:pattern value="Second" />
|
||||
<xs:pattern value="Week" />
|
||||
<xs:pattern value="Year" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Akka" version="1.0.6" targetFramework="net452" />
|
||||
<package id="Common.Logging" version="3.0.0" targetFramework="net452" />
|
||||
<package id="Common.Logging.Core" version="3.0.0" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="Quartz" version="2.3.3" targetFramework="net452" />
|
||||
</packages>
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyCompanyAttribute("Akka.NET Team")]
|
||||
[assembly: AssemblyCopyrightAttribute("Copyright © 2013-2016 Akka.NET Team")]
|
||||
[assembly: AssemblyTrademarkAttribute("")]
|
||||
[assembly: AssemblyVersionAttribute("0.0.1.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("0.0.1.0")]
|
Загрузка…
Ссылка в новой задаче