Skip to content

Commit

Permalink
Add visual studio project templates
Browse files Browse the repository at this point in the history
New templates for creating an autoclutch solution.
  • Loading branch information
txavier committed Jun 6, 2016
1 parent 8126efa commit 3191c6a
Show file tree
Hide file tree
Showing 338 changed files with 104,665 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Templates/AutoClutch.CompositionRoot/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="TrackerEnabledDbContext.Common" publicKeyToken="4f92af0b908c4a0a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="TrackerEnabledDbContext" publicKeyToken="4f92af0b908c4a0a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
151 changes: 151 additions & 0 deletions Templates/AutoClutch.CompositionRoot/AutoClutch.CompositionRoot.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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>
<ProjectGuid>{797D6C6D-0F6D-4FE6-A407-74E6CC8B967D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>$safeprojectname$</RootNamespace>
<AssemblyName>$safeprojectname$</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<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="Auto.Repo, Version=1.0.8.14, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AutoClutch.AutoRepo.3.12\lib\net45\Auto.Repo.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Auto.Service, Version=1.0.8.14, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AutoClutch.AutoService.3.12\lib\net45\Auto.Service.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.MappingAPI, Version=6.1.0.9, Culture=neutral, PublicKeyToken=7ee2e825d201459e, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.MappingAPI.6.1.0.9\lib\net45\EntityFramework.MappingAPI.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="StructureMap, Version=4.0.1.318, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\structuremap.4.0.1.318\lib\net40\StructureMap.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="StructureMap.Net4, Version=4.0.1.318, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\structuremap.4.0.1.318\lib\net40\StructureMap.Net4.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="StructureMap.Web, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\structuremap.web.3.1.6.186\lib\net40\StructureMap.Web.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Linq.Dynamic, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.Dynamic.1.0.4\lib\net40\System.Linq.Dynamic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="TrackerEnabledDbContext, Version=3.5.2.0, Culture=neutral, PublicKeyToken=4f92af0b908c4a0a, processorArchitecture=MSIL">
<HintPath>..\packages\TrackerEnabledDbContext.3.5.2\lib\net45\TrackerEnabledDbContext.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="TrackerEnabledDbContext.Common, Version=3.5.2.0, Culture=neutral, PublicKeyToken=4f92af0b908c4a0a, processorArchitecture=MSIL">
<HintPath>..\packages\TrackerEnabledDbContext.Common.3.5.2\lib\net45\TrackerEnabledDbContext.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XavierEnterpriseLibrary.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XavierEnterpriseLibrary.1.1.1\lib\net45\XavierEnterpriseLibrary.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XavierEnterpriseLibrary.Infrastructure, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XavierEnterpriseLibrary.1.1.1\lib\net45\XavierEnterpriseLibrary.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="zxing, Version=0.14.0.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.14.0.1\lib\net40\zxing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="zxing.presentation, Version=0.14.0.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.14.0.1\lib\net40\zxing.presentation.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="DefaultRegistry.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyProjectTestA.Core\MyProjectTestA.Core.csproj">
<Project>{3b826046-ac3c-4f1f-9a74-7a7cf8c47a19}</Project>
<Name>ContractTrackingManagement.Core</Name>
</ProjectReference>
<ProjectReference Include="..\MyProjectTestA.Data\MyProjectTestA.Data.csproj">
<Project>{1ef75c9b-76ab-4f7e-b2f2-2698773dfa72}</Project>
<Name>ContractTrackingManagement.Data</Name>
</ProjectReference>
<ProjectReference Include="..\MyProjectTestA.Infrastructure\MyProjectTestA.Infrastructure.csproj">
<Project>{8353e604-41e2-4bb7-b50e-4ceff06da666}</Project>
<Name>ContractTrackingManagement.Infrastructure</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="bin\Debug\StructureMap.dll" />
<Content Include="bin\Debug\StructureMap.Net4.dll" />
<Content Include="bin\Debug\StructureMap.Web.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- 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>
40 changes: 40 additions & 0 deletions Templates/AutoClutch.CompositionRoot/DefaultRegistry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using AutoClutch.Auto.Repo.Interfaces;
using AutoClutch.Auto.Repo.Objects;
using AutoClutch.Auto.Service.Interfaces;
using AutoClutch.Auto.Service.Services;
using StructureMap.Configuration.DSL;
using StructureMap;
using StructureMap.Graph;
using StructureMap.Web;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace $safeprojectname$
{
public class DefaultRegistry : Registry
{
public DefaultRegistry()
{
Scan(scan =>
{
scan.TheCallingAssembly();
scan.AssembliesFromApplicationBaseDirectory();
scan.WithDefaultConventions();
});

For<DbContext>().Use<EfDataDbContext>();

For(typeof(IService<>)).Use(typeof(Service<>));

For(typeof(IRepository<>)).Use(typeof(Repository<>));

For<IEnvironmentConfigSettingsGetter>().Use<EnvironmentConfigSettingsGetter>();

For(typeof(ILogService<>)).Use(typeof(UserActionLogService<>));
}
}
}
34 changes: 34 additions & 0 deletions Templates/AutoClutch.CompositionRoot/MyTemplate.vstemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>AutoClutch.CompositionRoot</Name>
<Description>AutoClutch composition root layer template.</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>AutoClutch.CompositionRoot</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>__TemplateIcon.png</Icon>
<PreviewImage>__PreviewImage.png</PreviewImage>
</TemplateData>
<TemplateContent>
<Project TargetFileName="AutoClutch.CompositionRoot.csproj" File="AutoClutch.CompositionRoot.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="App.config">App.config</ProjectItem>
<Folder Name="bin" TargetFolderName="bin">
<Folder Name="Debug" TargetFolderName="Debug">
<ProjectItem ReplaceParameters="false" TargetFileName="StructureMap.dll">StructureMap.dll</ProjectItem>
<ProjectItem ReplaceParameters="false" TargetFileName="StructureMap.Net4.dll">StructureMap.Net4.dll</ProjectItem>
<ProjectItem ReplaceParameters="false" TargetFileName="StructureMap.Web.dll">StructureMap.Web.dll</ProjectItem>
</Folder>
</Folder>
<ProjectItem ReplaceParameters="true" TargetFileName="DefaultRegistry.cs">DefaultRegistry.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="packages.config">packages.config</ProjectItem>
<Folder Name="Properties" TargetFolderName="Properties">
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
</Folder>
</Project>
</TemplateContent>
</VSTemplate>
36 changes: 36 additions & 0 deletions Templates/AutoClutch.CompositionRoot/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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("$safeprojectname$")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("$safeprojectname$")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[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("160e34f3-fcca-47ce-821c-4883f03fcd7c")]

// 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")]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions Templates/AutoClutch.CompositionRoot/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoClutch.AutoRepo" version="3.12" targetFramework="net452" />
<package id="AutoClutch.AutoService" version="3.12" targetFramework="net452" />
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="EntityFramework.MappingAPI" version="6.1.0.9" targetFramework="net45" />
<package id="structuremap" version="4.0.1.318" targetFramework="net452" />
<package id="System.Linq.Dynamic" version="1.0.4" targetFramework="net45" />
<package id="TrackerEnabledDbContext" version="3.5.2" targetFramework="net452" />
<package id="TrackerEnabledDbContext.Common" version="3.5.2" targetFramework="net452" />
</packages>
17 changes: 17 additions & 0 deletions Templates/AutoClutch.Core/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb"/>
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
9 changes: 9 additions & 0 deletions Templates/AutoClutch.Core/Interfaces/IAuthorizeService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Collections.Generic;

namespace $safeprojectname$.Interfaces
{
public interface IAuthorizeService
{
string IsAuthorized(string userName, bool? loginRequired, string permissionCheckType, string requiredPermissions, string uri, List<KeyValuePair<string, string>> parameters);
}
}
29 changes: 29 additions & 0 deletions Templates/AutoClutch.Core/Interfaces/IContractDocumentService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using AutoClutch.Auto.Repo.Objects;
using $safeprojectname$.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace $safeprojectname$.Interfaces
{
public interface IContractDocumentService
{
IEnumerable<Error> Errors { get; set; }
string ParentFolderName { get; set; }
DEPFile Add(byte[] file, string fileName);
DEPFile Add(DEPFile file);
long AddFolder(string folderName);
DEPFile GetFile(string fileName);
DEPFile GetFile(int fileId);
Task<DEPFile> GetFileAsync(int fileId);
void InitialSetup();
bool IsExists(string filename);
void Remove(string filename);
void Remove(int fileId);
DEPFile Update(DEPFile file);
Task<DEPFile> UpdateAsync(DEPFile file);
long? Add(byte[] file, string filename, long? newFileId);
}
}
Loading

0 comments on commit 3191c6a

Please sign in to comment.