Skip to content

Commit

Permalink
upgraded projects to .net 4 and VS2010.
Browse files Browse the repository at this point in the history
upgraded json.net dependency
reformatted code
ran cleanup per resharper
  • Loading branch information
virtualstaticvoid committed Mar 15, 2012
1 parent fbe3bd2 commit 2b61c21
Show file tree
Hide file tree
Showing 39 changed files with 16,794 additions and 8,460 deletions.
13 changes: 13 additions & 0 deletions ExampleRunner/App.config
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<configuration>

<appSettings>
<add key="redis-host" value="localhost" />
<add key="redis-port" value="6379" />
</appSettings>

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

</configuration>
16 changes: 16 additions & 0 deletions ExampleRunner/DummyJob.cs
@@ -0,0 +1,16 @@
using System;

namespace ExampleRunner
{
class DummyJob
{
public static string queue()
{
return "jobs";
}
public static void perform(params object[] args)
{
Console.WriteLine("This is the dummy job reporting in");
}
}
}
159 changes: 103 additions & 56 deletions ExampleRunner/ExampleRunner.csproj
@@ -1,63 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7C670D87-2575-4197-9D10-304E0532955B}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExampleRunner</RootNamespace>
<AssemblyName>ExampleRunner</AssemblyName>
<TargetFrameworkVersion>v3.5</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="resque-sharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\resque-sharp\bin\Debug\resque-sharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7C670D87-2575-4197-9D10-304E0532955B}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExampleRunner</RootNamespace>
<AssemblyName>ExampleRunner</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</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>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</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>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="resque-sharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\resque-sharp\bin\Debug\resque-sharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DummyJob.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</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>
69 changes: 29 additions & 40 deletions ExampleRunner/Program.cs
@@ -1,41 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using resque;
using System.Reflection;

class DummyJob
{
public static string queue()
{
return "jobs";
}
public static void perform(params object[] args)
{
Console.WriteLine("This is the dummy job reporting in");
}
}

namespace ExampleRunner
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(resque.DummyJob.assemblyQualifiedName());

Type t = typeof(DummyJob);
Assembly.GetExecutingAssembly();

Console.WriteLine(t.AssemblyQualifiedName);
string assemblyQualification = ", ExampleRunner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
Resque.setAssemblyQualifier(assemblyQualification);
String server = "192.168.1.7";
Resque.setRedis(new Redis(server, 6379));
Job.create("jobs", "DummyJob", "foo", 20, "bar");
Worker w = new Worker("*");
w.work(1);
}
}
namespace ExampleRunner
{
using System;
using System.Configuration;
using System.Reflection;
using resque;

class Program
{
static void Main(string[] args)
{
Console.WriteLine(resque.DummyJob.assemblyQualifiedName());

Type t = typeof(DummyJob);
Assembly.GetExecutingAssembly();

Console.WriteLine(t.AssemblyQualifiedName);
const string assemblyQualification = ", ExampleRunner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
Resque.setAssemblyQualifier(assemblyQualification);

String server = ConfigurationManager.AppSettings["redis-host"];
String port = ConfigurationManager.AppSettings["redis-port"] ?? "6379";

Resque.setRedis(new Redis(server, Convert.ToInt32(port)));
Job.create("jobs", "DummyJob", "foo", 20, "bar");
Worker w = new Worker("*");
w.work(1);
}
}
}
13 changes: 13 additions & 0 deletions ExampleRunner/bin/Debug/App.config
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<configuration>

<appSettings>
<add key="redis-host" value="localhost" />
<add key="redis-port" value="6379" />
</appSettings>

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

</configuration>
Binary file added ExampleRunner/bin/Debug/ExampleRunner.exe
Binary file not shown.
13 changes: 13 additions & 0 deletions ExampleRunner/bin/Debug/ExampleRunner.exe.config
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<configuration>

<appSettings>
<add key="redis-host" value="localhost" />
<add key="redis-port" value="6379" />
</appSettings>

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

</configuration>
Binary file added ExampleRunner/bin/Debug/ExampleRunner.pdb
Binary file not shown.
Binary file added ExampleRunner/bin/Debug/Newtonsoft.Json.dll
Binary file not shown.
Binary file added ExampleRunner/bin/Debug/Newtonsoft.Json.pdb
Binary file not shown.

0 comments on commit 2b61c21

Please sign in to comment.