Skip to content

Commit 99753f9

Browse files
committed
First commit
1 parent e20e5c7 commit 99753f9

94 files changed

Lines changed: 35409 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,11 @@
22
bin
33
obj
44

5-
# mstest test results
6-
TestResults
5+
6+
*.suo
7+
8+
*.user
9+
10+
packages/
11+
logs/
12+
Projects/

.nuget/NuGet.Config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

.nuget/NuGet.exe

17.5 KB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Download NuGet.exe if it does not already exist -->
13+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
14+
</PropertyGroup>
15+
16+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
17+
<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
18+
<!--
19+
<PackageSource Include="https://nuget.org/api/v2/" />
20+
<PackageSource Include="https://my-nuget-source/nuget/" />
21+
-->
22+
</ItemGroup>
23+
24+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
25+
<!-- Windows specific commands -->
26+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
27+
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
28+
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
29+
</PropertyGroup>
30+
31+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
32+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
33+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
34+
<PackagesConfig>packages.config</PackagesConfig>
35+
<PackagesDir>$(SolutionDir)packages</PackagesDir>
36+
</PropertyGroup>
37+
38+
<PropertyGroup>
39+
<!-- NuGet command -->
40+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
41+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
42+
43+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
44+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
45+
46+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
47+
48+
<!-- Commands -->
49+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" -o "$(PackagesDir)"</RestoreCommand>
50+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
51+
52+
<!-- Make the build depend on restore packages -->
53+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
54+
RestorePackages;
55+
$(BuildDependsOn);
56+
</BuildDependsOn>
57+
58+
<!-- Make the build depend on restore packages -->
59+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
60+
$(BuildDependsOn);
61+
BuildPackage;
62+
</BuildDependsOn>
63+
</PropertyGroup>
64+
65+
<Target Name="CheckPrerequisites">
66+
<!-- Raise an error if we're unable to locate nuget.exe -->
67+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
68+
<SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
69+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
70+
</Target>
71+
72+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
73+
<Exec Command="$(RestoreCommand)"
74+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
75+
76+
<Exec Command="$(RestoreCommand)"
77+
LogStandardErrorAsError="true"
78+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
79+
</Target>
80+
81+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
82+
<Exec Command="$(BuildCommand)"
83+
Condition=" '$(OS)' != 'Windows_NT' " />
84+
85+
<Exec Command="$(BuildCommand)"
86+
LogStandardErrorAsError="true"
87+
Condition=" '$(OS)' == 'Windows_NT' " />
88+
</Target>
89+
90+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
91+
<ParameterGroup>
92+
<OutputFilename ParameterType="System.String" Required="true" />
93+
</ParameterGroup>
94+
<Task>
95+
<Reference Include="System.Core" />
96+
<Using Namespace="System" />
97+
<Using Namespace="System.IO" />
98+
<Using Namespace="System.Net" />
99+
<Using Namespace="Microsoft.Build.Framework" />
100+
<Using Namespace="Microsoft.Build.Utilities" />
101+
<Code Type="Fragment" Language="cs">
102+
<![CDATA[
103+
try {
104+
OutputFilename = Path.GetFullPath(OutputFilename);
105+
106+
Log.LogMessage("Downloading latest version of NuGet.exe...");
107+
WebClient webClient = new WebClient();
108+
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
109+
110+
return true;
111+
}
112+
catch (Exception ex) {
113+
Log.LogErrorFromException(ex);
114+
return false;
115+
}
116+
]]>
117+
</Code>
118+
</Task>
119+
</UsingTask>
120+
121+
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
122+
<ParameterGroup>
123+
<EnvKey ParameterType="System.String" Required="true" />
124+
<EnvValue ParameterType="System.String" Required="true" />
125+
</ParameterGroup>
126+
<Task>
127+
<Using Namespace="System" />
128+
<Code Type="Fragment" Language="cs">
129+
<![CDATA[
130+
try {
131+
Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
132+
}
133+
catch {
134+
}
135+
]]>
136+
</Code>
137+
</Task>
138+
</UsingTask>
139+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using SourceCodeReader.Web.Infrastructure;
6+
using System.Web.Http;
7+
using System.Reflection;
8+
9+
namespace SourceCodeReader.Web
10+
{
11+
public static class BootStrapper
12+
{
13+
public static void Start()
14+
{
15+
var kernal = new Ninject.StandardKernel();
16+
kernal.Load(new[] { Assembly.GetExecutingAssembly()});
17+
GlobalConfiguration.Configuration.DependencyResolver = new NinjectDependencyResolver(kernal);
18+
}
19+
}
20+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System.Web;
2+
using System.Web.Optimization;
3+
4+
namespace SourceCodeReader.Web
5+
{
6+
public class BundleConfig
7+
{
8+
public static void RegisterBundles(BundleCollection bundles)
9+
{
10+
RegisterScriptBundles(bundles);
11+
RegisterStyleBundles(bundles);
12+
}
13+
14+
private static void RegisterScriptBundles(BundleCollection bundles)
15+
{
16+
bundles.Add(new ScriptBundle("~/bundles/jquery")
17+
.Include("~/Scripts/jquery-1.*"));
18+
19+
bundles.Add(new ScriptBundle("~/bundles/jqueryval")
20+
.Include("~/Scripts/jquery.unobtrusive*",
21+
"~/Scripts/jquery.validate*"));
22+
23+
bundles.Add(new ScriptBundle("~/bundles/bootstrap")
24+
.Include("~/Scripts/bootstrap*"));
25+
26+
bundles.Add(new ScriptBundle("~/bundles/modernizr")
27+
.Include("~/Scripts/modernizr-*"));
28+
29+
bundles.Add(new ScriptBundle("~/bundles/spa")
30+
.Include("~/Scripts/knockout-2.*",
31+
"~/Scripts/sammy-latest.min.js"));
32+
33+
bundles.Add(new ScriptBundle("~/bundles/applicationjs")
34+
.Include("~/Scripts/jsuri-1.1.1.min.js",
35+
"~/Scripts/App/Application.js"));
36+
37+
bundles.Add(new ScriptBundle("~/bundles/signalr")
38+
.Include("~/Scripts/jquery.signalR-0.5*"));
39+
}
40+
41+
private static void RegisterStyleBundles(BundleCollection bundles)
42+
{
43+
bundles.Add(new StyleBundle("~/Content/bootrap")
44+
.Include("~/Content/bootstrap*",
45+
"~/Content/bootstrap-responsive*"));
46+
47+
bundles.Add(new StyleBundle("~/Content/css")
48+
.Include("~/Content/site.css"));
49+
}
50+
}
51+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Web;
2+
using System.Web.Mvc;
3+
4+
namespace SourceCodeReader.Web
5+
{
6+
public class FilterConfig
7+
{
8+
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9+
{
10+
filters.Add(new HandleErrorAttribute());
11+
}
12+
}
13+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Http;
6+
using System.Web.Mvc;
7+
using System.Web.Routing;
8+
9+
namespace SourceCodeReader.Web
10+
{
11+
public class RouteConfig
12+
{
13+
public static void RegisterRoutes(RouteCollection routes)
14+
{
15+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
16+
17+
routes.MapHttpRoute(
18+
name: "DefaultApi",
19+
routeTemplate: "api/{controller}/{username}/{project}/{*path}",
20+
defaults: new { path = RouteParameter.Optional }
21+
);
22+
23+
routes.MapRoute(
24+
name: "Default",
25+
url: "{controller}/{action}/{id}",
26+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
27+
);
28+
}
29+
}
30+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+

2+
3+
body {
4+
font-size: .85em;
5+
font-family: "Segoe UI", Verdana, Helvetica, Sans-Serif;
6+
}
7+
8+
.dockrow, .dockcol { overflow: hidden; position: absolute; }
9+
.dockrow { left: 0; right: 0; }
10+
.dockcol { top: 0; bottom: 0; }
11+
.scroll-x { overflow-x: auto; }
12+
.scroll-y { overflow-y: auto; }
13+
14+
.header.dockrow
15+
{
16+
height: 40px;
17+
top: 0;
18+
}
19+
.body.dockrow { top: 40px; bottom: 50px;}
20+
.footer.dockrow { height: 50px; bottom: 0; }
21+
22+
.centerstage
23+
{
24+
margin: auto 0;
25+
}
26+
27+
.projectheader .dockrow
28+
{
29+
height: 80px;
30+
}
31+
32+
.projectcontent{
33+
top: 80px;
34+
bottom: 31px;
35+
}
36+
37+
38+
.statusbar {
39+
background-color: #FBFBFB;
40+
background-image: -moz-linear-gradient(center top , #FFFFFF, #F5F5F5);
41+
background-repeat: repeat-x;
42+
border: 1px solid #DDDDDD;
43+
border-radius: 3px 3px 3px 3px;
44+
box-shadow: 0 1px 0 #FFFFFF inset;
45+
list-style: none outside none;
46+
padding: 7px 14px;
47+
text-align: right;
48+
}
49+
50+
.statusbar.dockrow
51+
{
52+
height: 18px;
53+
bottom: 0;
54+
}
55+
56+
.showprogress
57+
{
58+
height: 100%;
59+
width: 100%;
60+
position: absolute;
61+
right: 0;
62+
background: url('/images/loader.gif') no-repeat center center;
63+
}
64+
65+
.projectcontent::-webkit-scrollbar{
66+
width:10px;
67+
height:10px;
68+
background-color:#fff;
69+
box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset -1px -1px 0 rgba(0,0,0,.07);
70+
}
71+
.projectcontent::-webkit-scrollbar:hover{
72+
background-color:#eee;
73+
}
74+
.projectcontent::-webkit-resizer{
75+
-webkit-border-radius:4px;
76+
background-color:#666;
77+
}
78+
.projectcontent::-webkit-scrollbar-thumb{
79+
min-height:0.8em;
80+
min-width:0.8em;
81+
background-color: rgba(0, 0, 0, .2);
82+
box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset -1px -1px 0 rgba(0,0,0,.07);
83+
}
84+
.projectcontent::-webkit-scrollbar-thumb:hover{
85+
background-color: #bbb;
86+
}
87+
.projectcontent::-webkit-scrollbar-thumb:active{
88+
background-color:#888;
89+
}
90+
91+
.iconcolumn
92+
{
93+
width: 15px;
94+
}
95+

0 commit comments

Comments
 (0)