forked from dotless/dotless
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,424 additions
and
2,424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
namespace dotless.Core | ||
{ | ||
using Pandora.Fluent; | ||
using Abstractions; | ||
using Cache; | ||
using Input; | ||
using Loggers; | ||
using Parameters; | ||
using Response; | ||
using configuration; | ||
|
||
public class AspNetContainerFactory : ContainerFactory | ||
{ | ||
protected override void RegisterServices(FluentRegistration pandora, DotlessConfiguration configuration) | ||
{ | ||
base.RegisterServices(pandora, configuration); | ||
RegisterWebServices(pandora, configuration); | ||
} | ||
|
||
private void RegisterWebServices(FluentRegistration pandora, DotlessConfiguration configuration) | ||
{ | ||
pandora.Service<IHttp>().Implementor<Http>().Lifestyle.Transient(); | ||
pandora.Service<HandlerImpl>().Implementor<HandlerImpl>().Lifestyle.Transient(); | ||
|
||
if (!configuration.DisableParameters) | ||
{ | ||
pandora.Service<IParameterSource>().Implementor<QueryStringParameterSource>().Lifestyle.Transient(); | ||
} | ||
|
||
var responseService = configuration.CacheEnabled ? | ||
pandora.Service<IResponse>().Implementor<CachedCssResponse>() : | ||
pandora.Service<IResponse>().Implementor<CssResponse>(); | ||
|
||
responseService.Parameters("isCompressionHandledByResponse").Set("default-is-compression-handled-by-response").Lifestyle.Transient(); | ||
pandora.Service<bool>("default-is-compression-handled-by-response").Instance(configuration.HandleWebCompression); | ||
|
||
pandora.Service<ICache>().Implementor<HttpCache>().Lifestyle.Transient(); | ||
pandora.Service<ILogger>().Implementor<AspResponseLogger>().Parameters("level").Set("error-level").Lifestyle.Transient(); | ||
|
||
if (configuration.MapPathsToWeb) | ||
pandora.Service<IPathResolver>().Implementor<AspServerPathResolver>().Lifestyle.Transient(); | ||
else | ||
pandora.Service<IPathResolver>().Implementor<AspRelativePathResolver>().Lifestyle.Transient(); | ||
} | ||
} | ||
namespace dotless.Core | ||
{ | ||
using Pandora.Fluent; | ||
using Abstractions; | ||
using Cache; | ||
using Input; | ||
using Loggers; | ||
using Parameters; | ||
using Response; | ||
using configuration; | ||
|
||
public class AspNetContainerFactory : ContainerFactory | ||
{ | ||
protected override void RegisterServices(FluentRegistration pandora, DotlessConfiguration configuration) | ||
{ | ||
base.RegisterServices(pandora, configuration); | ||
RegisterWebServices(pandora, configuration); | ||
} | ||
|
||
private void RegisterWebServices(FluentRegistration pandora, DotlessConfiguration configuration) | ||
{ | ||
pandora.Service<IHttp>().Implementor<Http>().Lifestyle.Transient(); | ||
pandora.Service<HandlerImpl>().Implementor<HandlerImpl>().Lifestyle.Transient(); | ||
|
||
if (!configuration.DisableParameters) | ||
{ | ||
pandora.Service<IParameterSource>().Implementor<QueryStringParameterSource>().Lifestyle.Transient(); | ||
} | ||
|
||
var responseService = configuration.CacheEnabled ? | ||
pandora.Service<IResponse>().Implementor<CachedCssResponse>() : | ||
pandora.Service<IResponse>().Implementor<CssResponse>(); | ||
|
||
responseService.Parameters("isCompressionHandledByResponse").Set("default-is-compression-handled-by-response").Lifestyle.Transient(); | ||
pandora.Service<bool>("default-is-compression-handled-by-response").Instance(configuration.HandleWebCompression); | ||
|
||
pandora.Service<ICache>().Implementor<HttpCache>().Lifestyle.Transient(); | ||
pandora.Service<ILogger>().Implementor<AspResponseLogger>().Parameters("level").Set("error-level").Lifestyle.Transient(); | ||
|
||
if (configuration.MapPathsToWeb) | ||
pandora.Service<IPathResolver>().Implementor<AspServerPathResolver>().Lifestyle.Transient(); | ||
else | ||
pandora.Service<IPathResolver>().Implementor<AspRelativePathResolver>().Lifestyle.Transient(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,82 @@ | ||
<?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>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{27FDE40F-E671-4C5C-BC24-FD04EA6EA2B2}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>dotless.Core</RootNamespace> | ||
<AssemblyName>dotless.AspNet</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<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> | ||
</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="Microsoft.Practices.ServiceLocation"> | ||
<HintPath>..\..\lib\Pandora\Microsoft.Practices.ServiceLocation.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Pandora"> | ||
<HintPath>..\..\lib\Pandora\Pandora.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Web.Abstractions" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Abstractions\Http.cs" /> | ||
<Compile Include="Abstractions\IHttp.cs" /> | ||
<Compile Include="AspNetContainerFactory.cs" /> | ||
<Compile Include="Cache\HttpCache.cs" /> | ||
<Compile Include="HandlerImpl.cs" /> | ||
<Compile Include="Input\AspRelativePathResolver.cs" /> | ||
<Compile Include="Input\AspServerPathResolver.cs" /> | ||
<Compile Include="Input\VirtualFileReader.cs" /> | ||
<Compile Include="LessCssHttpHandler.cs" /> | ||
<Compile Include="Loggers\AspNetTraceLogger.cs" /> | ||
<Compile Include="Loggers\AspResponseLogger.cs" /> | ||
<Compile Include="Parameters\QueryStringParameterSource.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Response\CachedCssResponse.cs" /> | ||
<Compile Include="Response\CssResponse.cs" /> | ||
<Compile Include="Response\IResponse.cs" /> | ||
<Compile Include="Response\QValue.cs" /> | ||
<Compile Include="Response\QValueList.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\dotless.Core\dotless.Core.csproj"> | ||
<Project>{D7A24E58-68D0-4B10-A324-EA33C822FA56}</Project> | ||
<Name>dotless.Core</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<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> | ||
--> | ||
<?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>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{27FDE40F-E671-4C5C-BC24-FD04EA6EA2B2}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>dotless.Core</RootNamespace> | ||
<AssemblyName>dotless.AspNet</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<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> | ||
</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="Microsoft.Practices.ServiceLocation"> | ||
<HintPath>..\..\lib\Pandora\Microsoft.Practices.ServiceLocation.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Pandora"> | ||
<HintPath>..\..\lib\Pandora\Pandora.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Web.Abstractions" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Abstractions\Http.cs" /> | ||
<Compile Include="Abstractions\IHttp.cs" /> | ||
<Compile Include="AspNetContainerFactory.cs" /> | ||
<Compile Include="Cache\HttpCache.cs" /> | ||
<Compile Include="HandlerImpl.cs" /> | ||
<Compile Include="Input\AspRelativePathResolver.cs" /> | ||
<Compile Include="Input\AspServerPathResolver.cs" /> | ||
<Compile Include="Input\VirtualFileReader.cs" /> | ||
<Compile Include="LessCssHttpHandler.cs" /> | ||
<Compile Include="Loggers\AspNetTraceLogger.cs" /> | ||
<Compile Include="Loggers\AspResponseLogger.cs" /> | ||
<Compile Include="Parameters\QueryStringParameterSource.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Response\CachedCssResponse.cs" /> | ||
<Compile Include="Response\CssResponse.cs" /> | ||
<Compile Include="Response\IResponse.cs" /> | ||
<Compile Include="Response\QValue.cs" /> | ||
<Compile Include="Response\QValueList.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\dotless.Core\dotless.Core.csproj"> | ||
<Project>{D7A24E58-68D0-4B10-A324-EA33C822FA56}</Project> | ||
<Name>dotless.Core</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<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> |
Oops, something went wrong.