Skip to content

Commit

Permalink
fix CRLF
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeapage committed Jun 1, 2012
1 parent 84378b1 commit 2ce7e39
Show file tree
Hide file tree
Showing 38 changed files with 2,424 additions and 2,424 deletions.
90 changes: 45 additions & 45 deletions src/dotless.AspNet/AspNetContainerFactory.cs
@@ -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();
}
}
}
20 changes: 10 additions & 10 deletions src/dotless.AspNet/Input/VirtualFileReader.cs
Expand Up @@ -5,16 +5,16 @@ namespace dotless.Core.Input

public class VirtualFileReader : IFileReader
{
public byte[] GetBinaryFileContents(string fileName)
{
var virtualPathProvider = HostingEnvironment.VirtualPathProvider;
var virtualFile = virtualPathProvider.GetFile(fileName);
using (var stream = virtualFile.Open())
{
var buffer = new byte[stream.Length];
stream.Read(buffer, 0, (int)stream.Length);
return buffer;
}
public byte[] GetBinaryFileContents(string fileName)
{
var virtualPathProvider = HostingEnvironment.VirtualPathProvider;
var virtualFile = virtualPathProvider.GetFile(fileName);
using (var stream = virtualFile.Open())
{
var buffer = new byte[stream.Length];
stream.Read(buffer, 0, (int)stream.Length);
return buffer;
}
}

public string GetFileContents(string fileName)
Expand Down
162 changes: 81 additions & 81 deletions src/dotless.AspNet/dotless.AspNet.csproj
@@ -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>

0 comments on commit 2ce7e39

Please sign in to comment.