Framework Setup

This commit is contained in:
2020-04-19 21:56:56 -06:00
parent 3d4a0515e5
commit 1acf94c900
220 changed files with 809047 additions and 0 deletions
@@ -0,0 +1,4 @@
$HEADER$namespace $NAMESPACE$
{
public class $CLASS$ {$END$}
}
@@ -0,0 +1,17 @@
using DryIoc;
using FinalProject.Utilities.BootStrap;
namespace ConsoleClient
{
public class ConsoleClientModule : Module
{
public override void Register(IContainer container)
{
}
public override void Resolve(IContainer container)
{
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\DryIoc.4.1.4\build\DryIoc.props" Condition="Exists('..\packages\DryIoc.4.1.4\build\DryIoc.props')" />
<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>{B97EDA0D-1380-4C4D-A402-46D78D690F33}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleClient</RootNamespace>
<AssemblyName>FinalProject.ConsoleClient</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConsoleClient.cs" />
<Compile Include="ConsoleClientModule.cs" />
<Compile Include="DryIoc\Container.cs" />
<Compile Include="DryIoc\Expression.cs" />
<Compile Include="DryIoc\FastExpressionCompiler.cs" />
<Compile Include="DryIoc\ImTools.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FinalProject.SimRunner\FinalProject.SimRunner.csproj">
<Project>{aa7aad1b-151d-42fc-af4f-e8e73a36c633}</Project>
<Name>FinalProject.SimRunner</Name>
</ProjectReference>
<ProjectReference Include="..\FinalProject.Utilities\FinalProject.Utilities.csproj">
<Project>{a417c78d-6ca9-43b4-9d23-195541862b21}</Project>
<Name>FinalProject.Utilities</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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('..\packages\DryIoc.4.1.4\build\DryIoc.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DryIoc.4.1.4\build\DryIoc.props'))" />
</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>
@@ -0,0 +1,35 @@
using System.Reflection;
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("FinalProject.ConsoleClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FinalProject.ConsoleClient")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("B97EDA0D-1380-4C4D-A402-46D78D690F33")]
// 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,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DryIoc" version="4.1.4" targetFramework="net472" />
</packages>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\DryIoc.4.1.4\build\DryIoc.props" Condition="Exists('..\packages\DryIoc.4.1.4\build\DryIoc.props')" />
<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>{AA7AAD1B-151D-42FC-AF4F-E8E73A36C633}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FinalProject.SimRunner</RootNamespace>
<AssemblyName>FinalProject.SimRunner</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DryIoc\Container.cs" />
<Compile Include="DryIoc\Expression.cs" />
<Compile Include="DryIoc\FastExpressionCompiler.cs" />
<Compile Include="DryIoc\ImTools.cs" />
<Compile Include="ISimRunner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SimRunner.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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('..\packages\DryIoc.4.1.4\build\DryIoc.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DryIoc.4.1.4\build\DryIoc.props'))" />
</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>
@@ -0,0 +1,7 @@
namespace FinalProject.Core
{
public interface ISimRunner
{
void RunSimulation();
}
}
@@ -0,0 +1,35 @@
using System.Reflection;
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("FinalProject.SimRunner")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FinalProject.SimRunner")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("AA7AAD1B-151D-42FC-AF4F-E8E73A36C633")]
// 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,15 @@
namespace FinalProject.Core
{
public class SimRunner : ISimRunner
{
public SimRunner()
{
}
public void RunSimulation()
{
throw new System.NotImplementedException();
}
}
}
@@ -0,0 +1,4 @@
$HEADER$namespace $NAMESPACE$
{
public class $CLASS$ {$END$}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DryIoc" version="4.1.4" targetFramework="net472" />
</packages>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.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>{005252C4-D14C-4A29-9BF2-84EBB7E70E8F}</ProjectGuid>
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FinalProject.UnitTests</RootNamespace>
<AssemblyName>FinalProject.UnitTests</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Data"/>
<Reference Include="System.Xml"/>
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
<HintPath>..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Tests.cs"/>
<Compile Include="Properties\AssemblyInfo.cs"/>
</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,35 @@
using System.Reflection;
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("FinalProject.UnitTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FinalProject.UnitTests")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("005252C4-D14C-4A29-9BF2-84EBB7E70E8F")]
// 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,15 @@
using System;
using NUnit.Framework;
namespace FinalProject.UnitTests
{
[TestFixture]
public class Tests
{
[Test]
public void Test1()
{
Assert.True(true);
}
}
}
@@ -0,0 +1,4 @@
$HEADER$namespace $NAMESPACE$
{
public class $CLASS$ {$END$}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.5.0" targetFramework="net45" />
</packages>
@@ -0,0 +1,4 @@
$HEADER$namespace $NAMESPACE$
{
public class $CLASS$ {$END$}
}
@@ -0,0 +1,4 @@
$HEADER$namespace $NAMESPACE$
{
public interface $INTERFACE$ {$END$}
}
@@ -0,0 +1,4 @@
$HEADER$namespace $NAMESPACE$
{
public class $CLASS$ {$END$}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\DryIoc.4.1.4\build\DryIoc.props" Condition="Exists('..\packages\DryIoc.4.1.4\build\DryIoc.props')" />
<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>{A417C78D-6CA9-43B4-9D23-195541862B21}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FinalProject.Utilities</RootNamespace>
<AssemblyName>FinalProject.Utilities</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BootStrap\Bootstrapper.cs" />
<Compile Include="BootStrap\IModule.cs" />
<Compile Include="BootStrap\Module.cs" />
<Compile Include="DryIoc\Container.cs" />
<Compile Include="DryIoc\Expression.cs" />
<Compile Include="DryIoc\FastExpressionCompiler.cs" />
<Compile Include="DryIoc\ImTools.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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('..\packages\DryIoc.4.1.4\build\DryIoc.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DryIoc.4.1.4\build\DryIoc.props'))" />
</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>
@@ -0,0 +1,35 @@
using System.Reflection;
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("FinalProject.Utilities")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FinalProject.Utilities")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("A417C78D-6CA9-43B4-9D23-195541862B21")]
// 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")]
+16
View File
@@ -0,0 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinalProject", "FinalProject\FinalProject.csproj", "{4C8204B4-3D84-40E4-88EF-E4986D957671}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4C8204B4-3D84-40E4-88EF-E4986D957671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C8204B4-3D84-40E4-88EF-E4986D957671}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C8204B4-3D84-40E4-88EF-E4986D957671}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C8204B4-3D84-40E4-88EF-E4986D957671}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
+20
View File
@@ -0,0 +1,20 @@
using DryIoc;
using FinalProject.Core;
using FinalProject.Utilities.BootStrap;
namespace FinalProject
{
public class CoreModule : Module
{
public void Register(IContainer container)
{
container.Register<ISimRunner, SimRunner>(Reuse.Singleton);
}
public void Resolve(IContainer container)
{
container.Resolve<ISimRunner>();
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\DryIoc.4.1.4\build\DryIoc.props" Condition="Exists('..\packages\DryIoc.4.1.4\build\DryIoc.props')" />
<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>{4C8204B4-3D84-40E4-88EF-E4986D957671}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FinalProject</RootNamespace>
<AssemblyName>FinalProject</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CoreModule.cs" />
<Compile Include="Core\ISimRunner.cs" />
<Compile Include="Core\SimRunner.cs" />
<Compile Include="DryIoc\Container.cs" />
<Compile Include="DryIoc\Expression.cs" />
<Compile Include="DryIoc\FastExpressionCompiler.cs" />
<Compile Include="DryIoc\ImTools.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ConsoleClient\ConsoleClient.csproj">
<Project>{b97eda0d-1380-4c4d-a402-46d78d690f33}</Project>
<Name>ConsoleClient</Name>
</ProjectReference>
<ProjectReference Include="..\FinalProject.Utilities\FinalProject.Utilities.csproj">
<Project>{a417c78d-6ca9-43b4-9d23-195541862b21}</Project>
<Name>FinalProject.Utilities</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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('..\packages\DryIoc.4.1.4\build\DryIoc.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DryIoc.4.1.4\build\DryIoc.props'))" />
</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>
+21
View File
@@ -0,0 +1,21 @@
using ConsoleClient;
using FinalProject.Core;
using FinalProject.Utilities.BootStrap;
namespace FinalProject
{
internal class Program
{
public static void Main(string[] args)
{
var bootstrapper = Bootstrapper.BootstrapSystem
(
new ConsoleClientModule(),
new CoreModule()
);
var consoleClient = new ConsoleClient.ConsoleClient(bootstrapper.Resolve<ISimRunner>());
consoleClient.Run(args);
}
}
}
@@ -0,0 +1,35 @@
using System.Reflection;
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("FinalProject")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FinalProject")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("4C8204B4-3D84-40E4-88EF-E4986D957671")]
// 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,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DryIoc" version="4.1.4" targetFramework="net472" />
</packages>
Binary file not shown.
@@ -0,0 +1,23 @@
#pragma warning disable 1591
namespace Example
{
public interface IService { }
public class MyService : IService
{
public MyService(IDependencyA a, DependencyB<string> b, RuntimeDependencyC c) { }
}
public interface IDependencyA { }
public class DependencyA : IDependencyA { }
public class DependencyB<T>
{
}
public class RuntimeDependencyC
{
}
}
@@ -0,0 +1,58 @@
<#
// TODO:
// 1. Fill-in method `GetContainerWithRegistrations` below with creation of DryIoc `Container` and registrations.
// 2. Specify the resolution roots via `SpecifyResolutionRoots` method, see example below.
// 3. Save the "Container.Generated.tt" file. Confirm the Visual Studio prompt if any.
// 4. Check the "Container.Generated.cs" for the generated results and issues.
//
// Note:
// - When specifying assembly path, you may use $(SolutionDir), $(ProjectDir), $(Configuration) parameters.
//
#>
<#@ import Namespace="DryIoc" #>
<#@ import Namespace="ImTools" #>
<#// TODO: Insert the assemblies and namespaces of your services to be registered in container #>
<#@ import Namespace="Example" #>
<#+
// TODO: Specify the container and registrations ...
IContainer GetContainerWithRegistrations()
{
var container = new Container();
// NOTE: `RegisterDelegate`, `RegisterInstance` and `Use` methods are not supported because of runtime state usage.
// Instead you can use `RegisterPlaceholder` to put a hole in the generated object graph, then you fill it in with the runtime registration.
// TODO: Add the registrations to generate factories for them in compile-time...
// for example:
container.Register<IService, MyService>();
container.Register<IDependencyA, DependencyA>();
container.Register(typeof(DependencyB<>));
container.RegisterPlaceholder<RuntimeDependencyC>();
// or from the assembly:
// container.RegisterMany(new[] { MyAssembly });
return container;
}
// TODO: For each passed registration specify what resolution roots it provides, null if none
ServiceInfo[] SpecifyResolutionRoots(ServiceRegistrationInfo reg)
{
return reg.AsResolutionRoot ? reg.ToServiceInfo().One() : null;
}
// TODO: Explicitly specified roots to generate ...
ServiceInfo[] CustomResolutionRoots =
{
// for example:
ServiceInfo.Of<Example.IService>(),
};
// TODO: Specify the namespace to go into `using` instead of qualify the type all the times,
// You may generate the Container.Generated.cs first, then look what you want to move to using
string[] NamespaceUsings =
{
"Example",
//"Foo.Bar.Buzz",
};
#>
+281
View File
@@ -0,0 +1,281 @@
// <auto-generated/>
#if !PCL && !NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5
/*
The MIT License (MIT)
Copyright (c) 2016-2020 Maksim Volkau
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ output extension=".cs" #>
<#@ CleanupBehavior processor="T4VSHost" CleanupAfterProcessingtemplate="true" #>
<#@ assembly Name="System.Core" #>
<#@ assembly Name="System.Runtime" #>
<#@ assembly Name="$(ExpressionToCodeLibAssembly)" #>
<#@ assembly Name="$(TargetPath)" #>
<#@ import Namespace="ExpressionToCodeLib" #>
<#@ import Namespace="System.Linq" #>
<#@ import Namespace="System.Linq.Expressions" #>
<#@ import Namespace="DryIoc" #>
<#@ import Namespace="ImTools" #>
<#@ include File="CompileTimeRegistrations.ttinclude" #>
<#
var container = GetContainerWithRegistrations().With(rules => rules.ForExpressionGeneration());
var includeVariants = container.Rules.VariantGenericTypesInResolvedCollection;
var result = container.GenerateResolutionExpressions(x => x.SelectMany(r =>
SpecifyResolutionRoots(r).EmptyIfNull()).Concat(CustomResolutionRoots.EmptyIfNull()));
var exprToCode = ExpressionToCodeConfiguration.DefaultCodeGenConfiguration
.WithObjectStringifier(ObjectStringify.WithFullTypeNames);
string RemoveUsings(string source)
{
foreach (var x in NamespaceUsings)
source = source.Replace(x + ".", "");
return source;
}
string Code(object x) =>
x == null ? "null" :
x is Expression ? RemoveUsings(exprToCode.ToCode((Expression)x)) :
x is Request ? Code(container.GetRequestExpression((Request)x).ToExpression()) :
Code(container.GetConstantExpression(x, x.GetType(), true).ToExpression());
string GetTypeNameOnly(string typeName) => typeName.Split('`').First().Split('.').Last();
string OptArg(string arg) => arg == "null" ? "" : ", " + arg;
var rootCodes = result.Roots.Select((r, i) =>
new { ServiceType = r.Key.ServiceType,
ServiceTypeCode = Code(r.Key.ServiceType),
ServiceKeyCode = Code(r.Key.ServiceKey),
RequiredServiceTypeCode = Code(r.Key.Details.RequiredServiceType),
ExpressionCode = Code(r.Value.Body),
CreateMethodName = "Get_" + i + "_" + GetTypeNameOnly(r.Key.ServiceType.Name) });
var depCodes = result.ResolveDependencies.Select((r, i) =>
new { ServiceType = Code(r.Key.ServiceType),
ServiceKey = Code(r.Key.ServiceKey), ServiceKeyObject = r.Key.ServiceKey,
Expression = Code(r.Value),
RequiredServiceType = Code(r.Key.RequiredServiceType),
PreResolveParent = Code(r.Key.Parent),
CreateMethodName = "GetDep_" + i + "_" + GetTypeNameOnly(r.Key.ServiceType.Name) });
#>
/*
========================================================================================================
NOTE: The code below is generated automatically at compile-time and not supposed to be changed by hand.
========================================================================================================
<# var errCount = result.Errors.Count;
if (errCount == 0) { #>
Generation is completed successfully.
<# } else { #>
There are <#=errCount#> generation issues (may be not an error dependent on context):
The issues with run-time registrations may be solved by `container.RegisterPlaceholder<T>()`
in Registrations.ttinclude. Then you can replace placeholders using `DryIocZero.Container.Register`
at runtime.
<# } #>
--------------------------------------------------------------------------------------------------------
<# var eNum = 0;
foreach(var e in result.Errors) { #>
<#=++eNum#>. <#=e.Key#>
Error: <#=e.Value.Message#>
<# } #>
*/
using System;
using System.Linq; // for Enumerable.Cast method required by LazyEnumerable<T>
using System.Collections.Generic;
using System.Threading;
using ImTools;
// Specified `NamespaceUsings` if any:
<# foreach (var ns in NamespaceUsings) {#>
using <#=ns#>;
<#}#>
namespace DryIoc
{
partial class Container
{
partial void GetLastGeneratedFactoryID(ref int lastFactoryID)
{
lastFactoryID = <#=Factory.GetNextID()#>; // generated: equals to the last used Factory.FactoryID
}
partial void ResolveGenerated(ref object service, Type serviceType)
{
<#
var index = 0;
foreach (var root in rootCodes.Where(f => f.ServiceKeyCode == "null"))
{
if (index++ > 0) WriteLine(@"
else");
#>
if (serviceType == <#=root.ServiceTypeCode#>)
service = <#=root.CreateMethodName#>(this);
<#
}
#>
}
partial void ResolveGenerated(ref object service,
Type serviceType, object serviceKey, Type requiredServiceType, Request preRequestParent, object[] args)
{
<#
index = 0;
foreach (var rootGroup in rootCodes.Where(x => x.ServiceKeyCode != "null").GroupBy(x => x.ServiceTypeCode))
{
if (index++ > 0) WriteLine(@"
else");
#>
if (serviceType == <#=rootGroup.Key#>)
{
<#
var innerIndex = 0;
foreach (var root in rootGroup)
{
if (innerIndex++ > 0) WriteLine(@"
else");
#>
if (<#=root.ServiceKeyCode#>.Equals(serviceKey))
service = <#=root.CreateMethodName#>(this);
<#
}
#>
}
<#
}
#>
<#
foreach (var depGroup in depCodes.GroupBy(x => x.ServiceType))
{
if (index++ > 0) WriteLine(@"
else");
#>
if (serviceType == <#=depGroup.Key#>)
{
<#
var innerIndex = 0;
foreach (var dep in depGroup)
{
if (innerIndex++ > 0) WriteLine(@"
else");
#>
if (<#=dep.ServiceKeyObject == null ? "serviceKey == null"
: dep.ServiceKeyObject is DefaultKey ? "(serviceKey == null || " + dep.ServiceKey + ".Equals(serviceKey))"
: dep.ServiceKey + ".Equals(serviceKey)"#> &&
requiredServiceType == <#= dep.RequiredServiceType #> &&
Equals(preRequestParent, <#= dep.PreResolveParent #>))
service = <#=dep.CreateMethodName#>(this);
<#
}
#>
}
<#
}
#>
}
partial void ResolveManyGenerated(ref IEnumerable<ResolveManyResult> services, Type serviceType)
{
services = ResolveManyGenerated(serviceType);
}
private IEnumerable<ResolveManyResult> ResolveManyGenerated(Type serviceType)
{
<#
if (!rootCodes.Any())
{
#>
yield break;
<#
}
else
{
foreach (var rootGroup in rootCodes.GroupBy(x => x.ServiceType))
{
#>
if (serviceType == <#=rootGroup.First().ServiceTypeCode#>)
{
<#
foreach (var root in rootGroup)
{
#>
yield return ResolveManyResult.Of(<#=root.CreateMethodName#><#=OptArg(root.ServiceKeyCode)#><#=OptArg(root.RequiredServiceTypeCode)#>);
<#
}
if (includeVariants && rootGroup.Key.IsGeneric())
{
var sourceType = rootGroup.Key;
var variants = rootCodes
.Where(x => x.ServiceType.IsGeneric() &&
x.ServiceType.GetGenericTypeDefinition() == sourceType.GetGenericTypeDefinition() &&
x.ServiceType != sourceType && x.ServiceType.IsAssignableTo(sourceType));
foreach (var variant in variants)
{
#>
yield return ResolveManyResult.Of(<#=variant.CreateMethodName#><#=OptArg(variant.ServiceKeyCode)#><#=OptArg(variant.RequiredServiceTypeCode)#>); // co-variant
<#
}
}
#>
}
<#
}
}
#>
}
<#
foreach (var root in rootCodes)
{
#>
// <#=root.ServiceTypeCode#>
internal static object <#=root.CreateMethodName#>(IResolverContext r)
{
return <#=root.ExpressionCode#>;
}
<#
}
#>
<#
foreach (var dep in depCodes)
{
#>
// <#=dep.ServiceType#>
internal static object <#=dep.CreateMethodName#>(IResolverContext r)
{
return <#=dep.Expression#>;
}
<#
}
#>
}
}
#endif
Binary file not shown.
BIN
View File
Binary file not shown.
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013-2020 Maksim Volkau
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More