Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to set VirtualPathRoot in QuartzminPlugin #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 8 additions & 36 deletions Quartzmin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCoreSelfHost", "Source\E
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormSelfHost", "Source\Examples\WinFormSelfHost\WinFormSelfHost.csproj", "{C54F4403-F40A-497C-B3A7-D1F1E1830D52}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetCoreDocker", "Source\Examples\AspNetCoreDocker\AspNetCoreDocker.csproj", "{68D816F2-21BF-4376-ABF4-70390E4783C5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreDocker", "Source\Examples\AspNetCoreDocker\AspNetCoreDocker.csproj", "{68D816F2-21BF-4376-ABF4-70390E4783C5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetSelfHost", "Source\Examples\NetSelfHost\NetSelfHost.csproj", "{55BCC363-DA5E-478B-9141-E570C63FBC2D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -59,6 +61,10 @@ Global
{68D816F2-21BF-4376-ABF4-70390E4783C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68D816F2-21BF-4376-ABF4-70390E4783C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68D816F2-21BF-4376-ABF4-70390E4783C5}.Release|Any CPU.Build.0 = Release|Any CPU
{55BCC363-DA5E-478B-9141-E570C63FBC2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55BCC363-DA5E-478B-9141-E570C63FBC2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55BCC363-DA5E-478B-9141-E570C63FBC2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55BCC363-DA5E-478B-9141-E570C63FBC2D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -69,43 +75,9 @@ Global
{7CF90DB9-37C4-4704-910E-BF1DB8AB79F1} = {B669A725-70A9-4E80-BAC7-9765A14CAAA4}
{C54F4403-F40A-497C-B3A7-D1F1E1830D52} = {B669A725-70A9-4E80-BAC7-9765A14CAAA4}
{68D816F2-21BF-4376-ABF4-70390E4783C5} = {B669A725-70A9-4E80-BAC7-9765A14CAAA4}
{55BCC363-DA5E-478B-9141-E570C63FBC2D} = {B669A725-70A9-4E80-BAC7-9765A14CAAA4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0357313D-BD09-4C5D-AF0D-439B3BD33B5A}
EndGlobalSection
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 9
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = http://tfs/defaultcollection
SccLocalPath0 = .
SccProjectUniqueName1 = Source\\Quartzmin\\Quartzmin.csproj
SccProjectName1 = Source/Quartzmin
SccLocalPath1 = Source\\Quartzmin
SccProjectUniqueName2 = Source\\Quartz.Plugins.RecentHistory\\Quartz.Plugins.RecentHistory.csproj
SccProjectName2 = Source/Quartz.Plugins.RecentHistory
SccLocalPath2 = Source\\Quartz.Plugins.RecentHistory
SccProjectUniqueName3 = Source\\Quartzmin.SelfHost\\Quartzmin.SelfHost.csproj
SccProjectName3 = Source/Quartzmin.SelfHost
SccLocalPath3 = Source\\Quartzmin.SelfHost
SccProjectUniqueName4 = Source\\Examples\\NetCoreSelfHost\\NetCoreSelfHost.csproj
SccProjectTopLevelParentUniqueName4 = Quartzmin.sln
SccProjectName4 = Source/Examples/NetCoreSelfHost
SccLocalPath4 = Source\\Examples\\NetCoreSelfHost
SccProjectUniqueName5 = Source\\Examples\\AspNetCoreHost\\AspNetCoreHost.csproj
SccProjectTopLevelParentUniqueName5 = Quartzmin.sln
SccProjectName5 = Source/Examples/AspNetCoreHost
SccLocalPath5 = Source\\Examples\\AspNetCoreHost
SccProjectUniqueName6 = Source\\Examples\\AspNetWebHost\\AspNetWebHost.csproj
SccProjectTopLevelParentUniqueName6 = Quartzmin.sln
SccProjectName6 = Source/Examples/AspNetWebHost
SccLocalPath6 = Source\\Examples\\AspNetWebHost
SccProjectUniqueName7 = Source\\Examples\\WinFormSelfHost\\WinFormSelfHost.csproj
SccProjectTopLevelParentUniqueName7 = Quartzmin.sln
SccProjectName7 = Source/Examples/WinFormSelfHost
SccLocalPath7 = Source\\Examples\\WinFormSelfHost
SccProjectUniqueName8 = Source\\Examples\\AspNetCoreDocker\\AspNetCoreDocker.csproj
SccProjectTopLevelParentUniqueName8 = Quartzmin.sln
SccProjectName8 = Source/Examples/AspNetCoreDocker
SccLocalPath8 = Source\\Examples\\AspNetCoreDocker
EndGlobalSection
EndGlobal
6 changes: 5 additions & 1 deletion Source/Examples/NetCoreSelfHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Quartzmin;
using System;
using Quartzmin;
using System.Threading;

namespace NetCoreSelfHost
Expand All @@ -11,7 +12,10 @@ static void Main(string[] args)
scheduler.Start();

while (!scheduler.IsShutdown)
{
Console.WriteLine("Working");
Thread.Sleep(500);
}
}
}
}
2 changes: 1 addition & 1 deletion Source/Examples/NetCoreSelfHost/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<add key="quartz.plugin.recentHistory.storeType" value="Quartz.Plugins.RecentHistory.Impl.InProcExecutionHistoryStore, Quartz.Plugins.RecentHistory" />

<add key="quartz.plugin.quartzmin.type" value="Quartzmin.SelfHost.QuartzminPlugin, Quartzmin.SelfHost" />
<add key="quartz.plugin.quartzmin.url" value="http://*:333" />
<add key="quartz.plugin.quartzmin.url" value="http://*:3333" />
</quartz>
</configuration>
32 changes: 32 additions & 0 deletions Source/Examples/NetSelfHost/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="quartz" type="System.Configuration.NameValueFileSectionHandler" />
</configSections>

<quartz>
<add key="quartz.plugin.recentHistory.type" value="Quartz.Plugins.RecentHistory.ExecutionHistoryPlugin, Quartz.Plugins.RecentHistory" />
<add key="quartz.plugin.recentHistory.storeType" value="Quartz.Plugins.RecentHistory.Impl.InProcExecutionHistoryStore, Quartz.Plugins.RecentHistory" />

<add key="quartz.plugin.quartzmin.type" value="Quartzmin.SelfHost.QuartzminPlugin, Quartzmin.SelfHost" />
<add key="quartz.plugin.quartzmin.url" value="http://localhost:3333/test" />
<add key="quartz.plugin.quartzmin.virtualPathRoot" value="/test" />
</quartz>

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
95 changes: 95 additions & 0 deletions Source/Examples/NetSelfHost/NetSelfHost.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{55BCC363-DA5E-478B-9141-E570C63FBC2D}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>NetSelfHost</RootNamespace>
<AssemblyName>NetSelfHost</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Owin.Host.HttpListener.2.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Owin.Host.SystemWeb.2.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Hosting, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Owin.Hosting.2.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
<Reference Include="Quartz, Version=3.0.7.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Quartz.3.0.7\lib\net452\Quartz.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.6\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web.Http, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.6\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.Owin, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.6\lib\net45\System.Web.Http.Owin.dll</HintPath>
</Reference>
<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="..\Shared\DemoScheduler.cs">
<Link>DemoScheduler.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Quartzmin.SelfHost\Quartzmin.SelfHost.csproj">
<Project>{89097967-adcb-4b14-8497-eb336c6c4cb3}</Project>
<Name>Quartzmin.SelfHost</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
21 changes: 21 additions & 0 deletions Source/Examples/NetSelfHost/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using Quartzmin;
using System.Threading;

namespace NetSelfHost
{
class Program
{
static void Main(string[] args)
{
var scheduler = DemoScheduler.Create().Result;
scheduler.Start();

while (!scheduler.IsShutdown)
{
Console.WriteLine("Working");
Thread.Sleep(500);
}
}
}
}
36 changes: 36 additions & 0 deletions Source/Examples/NetSelfHost/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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("NetSelfHost")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NetSelfHost")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("55bcc363-da5e-478b-9141-e570c63fbc2d")]

// 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")]
14 changes: 14 additions & 0 deletions Source/Examples/NetSelfHost/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.6" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.6" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.6" targetFramework="net462" />
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net462" />
<package id="Microsoft.Owin.Host.HttpListener" version="2.1.0" targetFramework="net462" />
<package id="Microsoft.Owin.Host.SystemWeb" version="2.1.0" targetFramework="net462" />
<package id="Microsoft.Owin.Hosting" version="2.1.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net462" />
<package id="Owin" version="1.0" targetFramework="net462" />
<package id="Quartz" version="3.0.7" targetFramework="net462" />
</packages>
4 changes: 4 additions & 0 deletions Source/Quartzmin.SelfHost/QuartzminPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class QuartzminPlugin : ISchedulerPlugin
public string Logo { get; set; }
public string ProductName { get; set; }

public string VirtualPathRoot { get; set; }

private IScheduler _scheduler;
private IDisposable _webApp;

Expand Down Expand Up @@ -80,6 +82,8 @@ private QuartzminOptions CreateQuartzminOptions()
options.Logo = Logo;
if (!string.IsNullOrEmpty(ProductName))
options.ProductName = ProductName;
if (!string.IsNullOrEmpty(VirtualPathRoot))
options.VirtualPathRoot = VirtualPathRoot;

return options;
}
Expand Down