-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add first sln with some quests
- Loading branch information
yad
committed
May 16, 2018
1 parent
8e55ad6
commit 62b8b90
Showing
19 changed files
with
413 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27703.2000 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LegacyWebApplication", "LegacyWebApplication\LegacyWebApplication.csproj", "{D8CA48D3-34E8-4DF5-817B-5B10AADE8AC1}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External Assemblies", "External Assemblies", "{40B6D327-87A7-454B-9D90-8B4B6C73B820}" | ||
ProjectSection(SolutionItems) = preProject | ||
External Assemblies\LegacyFramework.dll = External Assemblies\LegacyFramework.dll | ||
External Assemblies\LegacyQuestTracker.dll = External Assemblies\LegacyQuestTracker.dll | ||
External Assemblies\Microsoft.Web.Infrastructure.dll = External Assemblies\Microsoft.Web.Infrastructure.dll | ||
External Assemblies\System.Web.Helpers.dll = External Assemblies\System.Web.Helpers.dll | ||
External Assemblies\System.Web.Mvc.dll = External Assemblies\System.Web.Mvc.dll | ||
External Assemblies\System.Web.Razor.dll = External Assemblies\System.Web.Razor.dll | ||
External Assemblies\System.Web.WebPages.Deployment.dll = External Assemblies\System.Web.WebPages.Deployment.dll | ||
External Assemblies\System.Web.WebPages.dll = External Assemblies\System.Web.WebPages.dll | ||
External Assemblies\System.Web.WebPages.Razor.dll = External Assemblies\System.Web.WebPages.Razor.dll | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D8CA48D3-34E8-4DF5-817B-5B10AADE8AC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D8CA48D3-34E8-4DF5-817B-5B10AADE8AC1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D8CA48D3-34E8-4DF5-817B-5B10AADE8AC1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D8CA48D3-34E8-4DF5-817B-5B10AADE8AC1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {C2AD54C6-AE1E-448E-9EF1-B3057B268B3A} | ||
EndGlobalSection | ||
EndGlobal |
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,13 @@ | ||
using System.Web.Mvc; | ||
|
||
namespace LegacyWebApplication.Controllers | ||
{ | ||
[Authorize] | ||
public class HomeController : Controller | ||
{ | ||
public ActionResult Index() | ||
{ | ||
return Content(string.Format("Welcome {0} !", HttpContext.User.Identity.Name)); | ||
} | ||
} | ||
} |
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 @@ | ||
<%@ Application Codebehind="Global.asax.cs" Inherits="LegacyWebApplication.Global" Language="C#" %> |
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,93 @@ | ||
using LegacyFramework; | ||
using Microsoft.Practices.ServiceLocation; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Web.Mvc; | ||
using System.Web.Routing; | ||
|
||
namespace LegacyWebApplication | ||
{ | ||
public class Global : System.Web.HttpApplication | ||
{ | ||
protected void Application_Start(object sender, EventArgs e) | ||
{ | ||
RegisterRoutes(RouteTable.Routes); | ||
|
||
var serviceLocator = new AppServiceLocator(); | ||
serviceLocator.RegisterInstance<ILogger>(new Logger()); | ||
ServiceLocator.SetLocatorProvider(() => serviceLocator); | ||
} | ||
|
||
public static void RegisterRoutes(RouteCollection routes) | ||
{ | ||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | ||
|
||
routes.MapRoute( | ||
"Default", // Route name | ||
"{controller}/{action}/{id}", // URL with parameters | ||
new { controller = "Home", action = "Index", id = "" } // Parameter defaults | ||
); | ||
} | ||
|
||
public class AppServiceLocator : IServiceLocator | ||
{ | ||
private readonly Dictionary<Type, object> _instances; | ||
|
||
public AppServiceLocator() | ||
{ | ||
_instances = new Dictionary<Type, object>(); | ||
} | ||
|
||
public void RegisterInstance<TService>(object instance) | ||
{ | ||
_instances.Add(typeof(TService), instance); | ||
} | ||
|
||
public IEnumerable<object> GetAllInstances(Type serviceType) | ||
{ | ||
if (serviceType == null) | ||
{ | ||
return _instances.Values; | ||
} | ||
|
||
throw new NotImplementedException(); | ||
} | ||
|
||
public IEnumerable<TService> GetAllInstances<TService>() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public object GetInstance(Type serviceType) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public object GetInstance(Type serviceType, string key) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public TService GetInstance<TService>() | ||
{ | ||
var type = typeof(TService); | ||
if (_instances[type] == null) | ||
{ | ||
throw new InvalidOperationException(string.Format("Type {0} is not registered.", type)); | ||
} | ||
|
||
return (TService)_instances[type]; | ||
} | ||
|
||
public TService GetInstance<TService>(string key) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public object GetService(Type serviceType) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} | ||
} |
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,148 @@ | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion> | ||
</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{D8CA48D3-34E8-4DF5-817B-5B10AADE8AC1}</ProjectGuid> | ||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>LegacyWebApplication</RootNamespace> | ||
<AssemblyName>LegacyWebApplication</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<UseIISExpress>true</UseIISExpress> | ||
<Use64BitIISExpress /> | ||
<IISExpressSSLPort /> | ||
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication> | ||
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication> | ||
<IISExpressUseClassicPipelineMode>true</IISExpressUseClassicPipelineMode> | ||
<UseGlobalApplicationHostFile /> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<IncludeIisSettings>false</IncludeIisSettings> | ||
<IncludeAppPool>false</IncludeAppPool> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="LegacyFramework"> | ||
<HintPath>..\External Assemblies\LegacyFramework.dll</HintPath> | ||
</Reference> | ||
<Reference Include="LegacyQuestTracker"> | ||
<HintPath>..\External Assemblies\LegacyQuestTracker.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Web.Infrastructure"> | ||
<HintPath>..\External Assemblies\Microsoft.Web.Infrastructure.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Web.ApplicationServices" /> | ||
<Reference Include="System.Web.DynamicData" /> | ||
<Reference Include="System.Web.Entity" /> | ||
<Reference Include="System.ComponentModel.DataAnnotations" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Web.Extensions" /> | ||
<Reference Include="System.Web.Helpers"> | ||
<HintPath>..\External Assemblies\System.Web.Helpers.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Web.Mvc"> | ||
<HintPath>..\External Assemblies\System.Web.Mvc.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Web.Razor"> | ||
<HintPath>..\External Assemblies\System.Web.Razor.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Web.WebPages"> | ||
<HintPath>..\External Assemblies\System.Web.WebPages.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Web.WebPages.Deployment"> | ||
<HintPath>..\External Assemblies\System.Web.WebPages.Deployment.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Web.WebPages.Razor"> | ||
<HintPath>..\External Assemblies\System.Web.WebPages.Razor.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Configuration" /> | ||
<Reference Include="System.Web.Services" /> | ||
<Reference Include="System.EnterpriseServices" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
<None Include="Web.Debug.config"> | ||
<DependentUpon>Web.config</DependentUpon> | ||
</None> | ||
<None Include="Web.Release.config"> | ||
<DependentUpon>Web.config</DependentUpon> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Global.asax" /> | ||
<Content Include="Web.config"> | ||
<SubType>Designer</SubType> | ||
</Content> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Controllers\HomeController.cs" /> | ||
<Compile Include="Global.asax.cs"> | ||
<DependentUpon>Global.asax</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> | ||
<ProjectExtensions> | ||
<VisualStudio> | ||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> | ||
<WebProjectProperties> | ||
<UseIIS>True</UseIIS> | ||
<AutoAssignPort>True</AutoAssignPort> | ||
<DevelopmentServerPort>60713</DevelopmentServerPort> | ||
<DevelopmentServerVPath>/</DevelopmentServerVPath> | ||
<IISUrl>http://localhost:60713/</IISUrl> | ||
<NTLMAuthentication>False</NTLMAuthentication> | ||
<UseCustomServer>False</UseCustomServer> | ||
<CustomServerUrl> | ||
</CustomServerUrl> | ||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> | ||
</WebProjectProperties> | ||
</FlavorProperties> | ||
</VisualStudio> | ||
</ProjectExtensions> | ||
<!-- 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> |
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,34 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// Les informations générales relatives à un assembly dépendent de | ||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations | ||
// associées à un assembly. | ||
[assembly: AssemblyTitle("LegacyWebApplication")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("LegacyWebApplication")] | ||
[assembly: AssemblyCopyright("Copyright © 2018")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly | ||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de | ||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type. | ||
[assembly: ComVisible(false)] | ||
|
||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM | ||
[assembly: Guid("d8ca48d3-34e8-4df5-817b-5b10aade8ac1")] | ||
|
||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes : | ||
// | ||
// Version principale | ||
// Version secondaire | ||
// Numéro de build | ||
// Révision | ||
// | ||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de révision et de build par défaut | ||
// en utilisant '*', comme indiqué ci-dessous : | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
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,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- Pour plus d'informations sur l'utilisation de la transformation web.config, visitez https://go.microsoft.com/fwlink/?LinkId=125889 --> | ||
|
||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<!-- | ||
Dans l'exemple ci-dessous, la transformation "SetAttributes" changera la valeur de | ||
"connectionString" afin d'utiliser "ReleaseSQLServer" uniquement lorsque le localisateur "Match" | ||
trouve un attribut "name" qui a une valeur "MyDB". | ||
<connectionStrings> | ||
<add name="MyDB" | ||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" | ||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> | ||
</connectionStrings> | ||
--> | ||
<system.web> | ||
<!-- | ||
Dans l'exemple ci-dessous, la transformation "Replace" remplacera toute la section | ||
<customErrors> de votre fichier web.config. | ||
Dans la mesure où il n'y a qu'une section customErrors sous le | ||
nœud <system.web>, il n'est pas nécessaire d'utiliser l'attribut "xdt:Locator". | ||
<customErrors defaultRedirect="GenericError.htm" | ||
mode="RemoteOnly" xdt:Transform="Replace"> | ||
<error statusCode="500" redirect="InternalError.htm"/> | ||
</customErrors> | ||
--> | ||
</system.web> | ||
</configuration> |
Oops, something went wrong.