mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Moved IMachineNameProvider into Orchard.Framework.
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Services;
|
||||
using Orchard.TaskLease.Models;
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user