Moved IMachineNameProvider into Orchard.Framework.

This commit is contained in:
Daniel Stolt
2014-11-17 02:30:25 +01:00
parent 9855914af2
commit 4a18247588
8 changed files with 23 additions and 27 deletions

View File

@@ -8,7 +8,7 @@
<autofac defaultAssembly="Orchard.Framework">
<components>
<component instance-scope="single-instance" type="Orchard.Localization.Services.CultureDateTimeFormatProvider, Orchard.Framework" service="Orchard.Localization.Services.IDateTimeFormatProvider"></component>
<component instance-scope="single-instance" type="Orchard.TaskLease.Services.MachineNameProvider, Orchard.TaskLease" service="Orchard.TaskLease.Services.IMachineNameProvider, Orchard.TaskLease"></component>
<component instance-scope="single-instance" type="Orchard.Environment.MachineNameProvider, Orchard.Framework" service="Orchard.Environment.IMachineNameProvider, Orchard.Framework"></component>
</components>
</autofac>

View File

@@ -124,10 +124,6 @@
<Project>{6e444ff1-a47c-4cf6-bb3f-507c8ebd776d}</Project>
<Name>Orchard.OutputCache</Name>
</ProjectReference>
<ProjectReference Include="..\Orchard.TaskLease\Orchard.TaskLease.csproj">
<Project>{3f72a4e9-7b72-4260-b010-c16ec54f9baf}</Project>
<Name>Orchard.TaskLease</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Constants.cs" />

View File

@@ -2,8 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orchard.Environment.Extensions;
using Orchard.TaskLease.Services;
using Orchard.Environment;
namespace Orchard.Azure.Services.TaskLease {
public class AzureMachineNameProvider : IMachineNameProvider {

View File

@@ -82,8 +82,6 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="Models\TaskLeaseRecord.cs" />
<Compile Include="Services\MachineNameProvider.cs" />
<Compile Include="Services\IMachineNameProvider.cs" />
<Compile Include="Services\ITaskLeaseService.cs" />
<Compile Include="Services\TaskLeaseService.cs" />
</ItemGroup>

View File

@@ -1,5 +1,6 @@
using System;
using Orchard.Data;
using Orchard.Environment;
using Orchard.Services;
using Orchard.TaskLease.Models;

View File

@@ -1,13 +1,13 @@
namespace Orchard.TaskLease.Services {
/// <summary>
/// Describes a service which the name of the machine running the application.
/// </summary>
public interface IMachineNameProvider {
/// <summary>
/// Returns the name of the machine running the application.
/// </summary>
string GetMachineName();
}
namespace Orchard.Environment {
/// <summary>
/// Describes a service which the name of the machine running the application.
/// </summary>
public interface IMachineNameProvider {
/// <summary>
/// Returns the name of the machine running the application.
/// </summary>
string GetMachineName();
}
}

View File

@@ -1,7 +1,7 @@
namespace Orchard.TaskLease.Services {
public class MachineNameProvider : IMachineNameProvider {
public string GetMachineName() {
return System.Environment.MachineName;
}
}
namespace Orchard.Environment {
public class MachineNameProvider : IMachineNameProvider {
public string GetMachineName() {
return System.Environment.MachineName;
}
}
}

View File

@@ -238,8 +238,10 @@
<Compile Include="Environment\HostComponentsConfigModule.cs" />
<Compile Include="Environment\Extensions\ICriticalErrorProvider.cs" />
<Compile Include="Environment\IFeatureEventHandler.cs" />
<Compile Include="Environment\IMachineNameProvider.cs" />
<Compile Include="Environment\IOrchardFrameworkAssemblies.cs" />
<Compile Include="Environment\IWorkContextEvents.cs" />
<Compile Include="Environment\MachineNameProvider.cs" />
<Compile Include="Environment\State\ContextState.cs" />
<Compile Include="Environment\ViewsBackgroundCompilation.cs" />
<Compile Include="Environment\Warmup\WarmupUtility.cs" />