Skip to content

Commit

Permalink
code cleanup, migrated to dotnet core, builds for dnx46, dnx451, net4…
Browse files Browse the repository at this point in the history
…5, net451, net452, net46, net461, netcoreapp1.0, netstandard1.6
  • Loading branch information
AustinWinstanley committed Sep 13, 2016
1 parent 343603f commit c65b8b1
Show file tree
Hide file tree
Showing 45 changed files with 11,706 additions and 838 deletions.
32 changes: 19 additions & 13 deletions Hangfire.Raven.sln
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangfire.Raven", "src\Hangfire.Raven\Hangfire.Raven.csproj", "{A523C0E3-097D-4869-977F-15A717EA3E83}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleSample", "src\ConsoleSample\ConsoleSample.csproj", "{C02BB718-2AE4-434C-8668-C894FF663FCE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{8CF2D2F6-BEFE-47FE-B141-0017FC6F97D8}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hangfire.Raven", "src\Hangfire.Raven\Hangfire.Raven.xproj", "{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EF9BFE2C-0386-4EC4-83EC-D7E315F56735}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ConsoleSample", "src\ConsoleSample\ConsoleSample.xproj", "{3955F2F1-99AF-4CC0-88F5-C9B69757A1B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A523C0E3-097D-4869-977F-15A717EA3E83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A523C0E3-097D-4869-977F-15A717EA3E83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A523C0E3-097D-4869-977F-15A717EA3E83}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A523C0E3-097D-4869-977F-15A717EA3E83}.Release|Any CPU.Build.0 = Release|Any CPU
{C02BB718-2AE4-434C-8668-C894FF663FCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C02BB718-2AE4-434C-8668-C894FF663FCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C02BB718-2AE4-434C-8668-C894FF663FCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C02BB718-2AE4-434C-8668-C894FF663FCE}.Release|Any CPU.Build.0 = Release|Any CPU
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Release|Any CPU.Build.0 = Release|Any CPU
{3955F2F1-99AF-4CC0-88F5-C9B69757A1B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3955F2F1-99AF-4CC0-88F5-C9B69757A1B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3955F2F1-99AF-4CC0-88F5-C9B69757A1B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3955F2F1-99AF-4CC0-88F5-C9B69757A1B2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5} = {EF9BFE2C-0386-4EC4-83EC-D7E315F56735}
{3955F2F1-99AF-4CC0-88F5-C9B69757A1B2} = {EF9BFE2C-0386-4EC4-83EC-D7E315F56735}
EndGlobalSection
EndGlobal
88 changes: 0 additions & 88 deletions src/ConsoleSample/ConsoleSample.csproj

This file was deleted.

21 changes: 21 additions & 0 deletions src/ConsoleSample/ConsoleSample.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>3955f2f1-99af-4cc0-88f5-c9b69757a1b2</ProjectGuid>
<RootNamespace>ConsoleSample</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
38 changes: 21 additions & 17 deletions src/ConsoleSample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Hangfire;
using HangFire.Raven.Storage;
using Hangfire.Raven.Storage;

namespace ConsoleSample
{
Expand All @@ -10,32 +10,36 @@ public static class Program

public static void Main()
{
// you can use Raven Storage and specify the connection string and database name
GlobalConfiguration.Configuration
.UseColouredConsoleLogProvider()
.UseRavenStorage("http://localhost:8080", "hangfire", "apikeytest");
try {
// you can use Raven Storage and specify the connection string and database name
GlobalConfiguration.Configuration
.UseColouredConsoleLogProvider()
.UseRavenStorage("http://localhost:9090", "Hangfire");

// you can use Raven Embedded Storage which runs in memory!
//GlobalConfiguration.Configuration
// .UseColouredConsoleLogProvider()
// .UseEmbeddedRavenStorage();
// you can use Raven Embedded Storage which runs in memory!
//GlobalConfiguration.Configuration
// .UseColouredConsoleLogProvider()
// .UseEmbeddedRavenStorage();

//you have to create an instance of background job server at least once for background jobs to run
var client = new BackgroundJobServer();
//you have to create an instance of background job server at least once for background jobs to run
var client = new BackgroundJobServer();

//BackgroundJob.Enqueue(() => Console.WriteLine("Background Job: Hello, world!"));
BackgroundJob.Enqueue(() => test());
//RecurringJob.AddOrUpdate(() => test(), Cron.Minutely);
//BackgroundJob.Enqueue(() => Console.WriteLine("Background Job: Hello, world!"));
//BackgroundJob.Enqueue(() => test());
RecurringJob.AddOrUpdate(() => test(), Cron.Minutely);

Console.WriteLine("Press Enter to exit...");
Console.ReadLine();
Console.WriteLine("Press Enter to exit...");
Console.ReadLine();
} catch (Exception ex) {
throw ex;
}
}

[AutomaticRetry(Attempts = 2, LogEvents = true, OnAttemptsExceeded = AttemptsExceededAction.Delete)]
public static void test()
{
Console.WriteLine($"{x++} Cron Job: Hello, world!");
throw new ArgumentException("fail");
//throw new ArgumentException("fail");
}
}
}
28 changes: 6 additions & 22 deletions src/ConsoleSample/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// 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("Hangfire.Hosts.Console")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Hangfire.Hosts.Console")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyProduct("ConsoleSample")]
[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
// 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("3c3451fc-663d-4e33-ab72-d92beae38a97")]

// 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")]
[assembly: Guid("3955f2f1-99af-4cc0-88f5-c9b69757a1b2")]
6 changes: 0 additions & 6 deletions src/ConsoleSample/packages.config

This file was deleted.

55 changes: 55 additions & 0 deletions src/ConsoleSample/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"title": "Hangfire.Raven ConsoleSample",
"version": "2.0.0",
"description": "RavenDB job storage for Hangfire",
"copyright": "Copyright @ 2016 Cady, LLC",
"authors": [
"Cady <contact@cady.io>"
],
"buildOptions": {
"allowUnsafe": true,
"debugType": "portable",
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"packOptions": {
"tags": [
"Hangfire",
"AspNet",
"MVC",
"OWIN",
"RavenDB",
"Long-Running",
"Background",
"Fire-And-Forget",
"Delayed",
"Recurring",
"Tasks",
"Jobs",
"Scheduler",
"Threading",
"Queues"
],
"iconUrl": "https://avatars2.githubusercontent.com/u/7880472?v=3&s=200",
"projectUrl": "https://github.com/cady-io/hangfire-ravendb",
"licenseUrl": "http://www.gnu.org/licenses/lgpl-3.0.html",
"owners": [
"Cady <contact@cady.io>"
],
"repository": {
"type": "git",
"url": "https://github.com/cady-io/hangfire-ravendb"
},
"summary": "RavenDB job storage for Hangfire"
},
"runtimes": {
"win10-x64": {}
},
"frameworks": {
"net452": {}
},
"dependencies": {
"Hangfire.Raven": "2.0.0",
"System.ComponentModel.Primitives": "4.1.0"
}
}
Loading

0 comments on commit c65b8b1

Please sign in to comment.