forked from skroonenburg/Rejuicer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabed content transformations on pass through debugging mode. Otherw…
…ise CSS transforms are not performed.
- Loading branch information
skroonenburg
committed
Sep 25, 2011
1 parent
fcb99c8
commit ab82e5c
Showing
18 changed files
with
132 additions
and
67 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using Rejuicer.Model; | ||
|
||
namespace Rejuicer.Engine | ||
{ | ||
public static class PhysicalFileRegister | ||
{ | ||
private static readonly IDictionary<string, PhysicalFileSource> fileSourceRegister = new Dictionary<string, PhysicalFileSource>(); | ||
internal static IVirtualPathResolver VirtualPathResolver { get; set; } | ||
|
||
static PhysicalFileRegister() | ||
{ | ||
VirtualPathResolver = new VirtualPathResolver(); | ||
} | ||
|
||
public static void Set(PhysicalFileSource fileSource) | ||
{ | ||
fileSourceRegister[fileSource.VirtualPath] = fileSource; | ||
} | ||
|
||
public static PhysicalFileSource For(string virtualPath) | ||
{ | ||
return fileSourceRegister.ContainsKey(virtualPath) ? fileSourceRegister[virtualPath] : null; | ||
} | ||
|
||
public static PhysicalFileSource For(FileInfo file, ResourceType resourceType, Mode mode) | ||
{ | ||
var virtualPathFor = VirtualPathResolver.GetVirtualPathFor(file); | ||
|
||
var physicalFileSource = For(virtualPathFor); | ||
|
||
if (physicalFileSource == null) | ||
{ | ||
physicalFileSource = new PhysicalFileSource(resourceType, | ||
virtualPathFor, | ||
file.FullName); | ||
|
||
Set(physicalFileSource); | ||
} | ||
|
||
return physicalFileSource; | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.