Permalink
Browse files

Initial Import

  • Loading branch information...
0 parents commit ff28b5348995e52a7b3504bee353aa0290e265e9 @anurse committed Apr 13, 2012
@@ -0,0 +1,31 @@
+# Generated by http://gitignore.org/
+
+#
+# Windows
+#
+
+# Windows Thumbnail Cache
+# See: http://en.wikipedia.org/wiki/Windows_thumbnail_cache
+Thumbs.db
+
+#
+# Visual Studio
+#
+
+# Solution User Options
+*.suo
+
+# Project User Options
+*.user
+
+# Build Directories
+bin/
+obj/
+
+# .webinfo files are user-specific mappings for project endpoints
+# http://support.microsoft.com/kb/830611
+*.webinfo
+
+
+# NuGet Package Restore means we don't need to check in packages/
+packages/
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("RazorSpy.Parsers.v2")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("RazorSpy.Parsers.v2")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8c559ddd-fc84-48d3-8963-85365efd861e")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RazorSpy.SyntaxTree;
+using System.IO;
+using System.CodeDom;
+using System.Web.Razor;
+
+namespace RazorSpy.Engines.v2
+{
+ public class RazorEngineV2 : RazorEngine
+ {
+ public override ParserResult Parse(TextReader reader)
+ {
+ RazorEngineHost host = new RazorEngineHost(new CSharpRazorCodeLanguage());
+ RazorTemplateEngine engine = new RazorTemplateEngine(host);
+ var result = engine.ParseTemplate(reader);
+ return new ParserResult()
+ {
+ Success = result.Success
+ };
+ }
+
+ public override SyntaxTree.GenerationResult Generate(SyntaxTreeNode document)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override SyntaxTree.CompilationResult Compile(CodeCompileUnit code)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
@@ -0,0 +1,61 @@
+<?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>{F0CB6162-D719-4F26-9525-6CCB3D3AD626}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>RazorSpy.Engines.v2</RootNamespace>
+ <AssemblyName>RazorSpy.Engines.v2</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </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="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\AspNetRazor.Core.2.0.20126.16343\lib\net40\System.Web.Razor.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="RazorEngineV2.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </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,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="AspNetRazor.Core" version="2.0.20126.16343" />
+</packages>
@@ -0,0 +1,42 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorSpy", "RazorSpy\RazorSpy.csproj", "{87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorSpy.Engines.v2", "RazorSpy.Engines.v2\RazorSpy.Engines.v2.csproj", "{F0CB6162-D719-4F26-9525-6CCB3D3AD626}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Debug|x86.ActiveCfg = Debug|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Debug|x86.Build.0 = Debug|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Release|Any CPU.ActiveCfg = Release|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Release|Mixed Platforms.Build.0 = Release|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Release|x86.ActiveCfg = Release|x86
+ {87DB0FEC-705D-42CB-802B-CC7B59AB8BE7}.Release|x86.Build.0 = Release|x86
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {F0CB6162-D719-4F26-9525-6CCB3D3AD626}.Release|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,8 @@
+<Application x:Class="RazorSpy.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ StartupUri="MainWindow.xaml">
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace RazorSpy
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : Application
+ {
+ }
+}
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RazorSpy.SyntaxTree;
+using System.IO;
+using System.CodeDom;
+
+namespace RazorSpy.Engines
+{
+ public abstract class RazorEngine
+ {
+ public abstract ParserResult Parse(TextReader reader);
+
+ public virtual GenerationResult Generate(TextReader reader)
+ {
+ return Generate(Parse(reader).Document);
+ }
+ public abstract GenerationResult Generate(SyntaxTreeNode document);
+
+ public virtual CompilationResult Compile(TextReader reader)
+ {
+ return Compile(Generate(reader).Code);
+ }
+
+ public virtual CompilationResult Compile(SyntaxTreeNode document)
+ {
+ return Compile(Generate(document).Code);
+ }
+
+ public abstract CompilationResult Compile(CodeCompileUnit code);
+ }
+}
@@ -0,0 +1,8 @@
+<Window x:Class="RazorSpy.MainWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="MainWindow" Height="350" Width="525">
+ <Grid>
+
+ </Grid>
+</Window>
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace RazorSpy
+{
+ /// <summary>
+ /// Interaction logic for MainWindow.xaml
+ /// </summary>
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("RazorSpy")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("RazorSpy")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Oops, something went wrong.

0 comments on commit ff28b53

Please sign in to comment.