Initial add of three projects

This commit is contained in:
2019-01-04 00:04:44 +01:00
commit c638f0cf2d
54 changed files with 549 additions and 0 deletions

6
BooksLambda/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{D7C73E43-0BD2-4EC5-B6B1-2106EDE4BE41}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>BooksLambda</RootNamespace>
<AssemblyName>BooksLambda</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</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.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

47
BooksLambda/Program.cs Normal file
View File

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BooksLambda
{
public class Program
{
static void Main(string[] args)
{
var books = new BookRepository().GetBooks();
//var cheapBooks = books.FindAll(IsCheaperThan10Dollars);
var cheapBooks = books.FindAll(b => b.Price<10);
foreach (var book in cheapBooks)
{
Console.WriteLine(book.Title);
}
}
//static bool IsCheaperThan10Dollars(Book book)
//{
// return book.Price < 10;
//}
}
public class BookRepository
{
public List<Book> GetBooks()
{
return new List<Book>
{
new Book(){Title="Title 1", Price=5.25m},
new Book(){Title="Title 2", Price=9.25m},
new Book(){Title="Title 3", Price=10.75m}
};
}
}
public class Book
{
public string Title { get; set; }
public decimal Price { get; set; }
}
}

View File

@ -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("BooksLambda")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BooksLambda")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[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("d7c73e43-0bd2-4ec5-b6b1-2106ede4be41")]
// 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")]

Binary file not shown.

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

Binary file not shown.

View File

@ -0,0 +1 @@
776a4596f18f18d5b55dda90c4584f71b9d5b430

View File

@ -0,0 +1,7 @@
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\bin\Debug\BooksLambda.exe.config
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\bin\Debug\BooksLambda.exe
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\bin\Debug\BooksLambda.pdb
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\obj\Debug\BooksLambda.csprojAssemblyReference.cache
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\obj\Debug\BooksLambda.csproj.CoreCompileInputs.cache
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\obj\Debug\BooksLambda.exe
C:\Users\tommy\Source\Repos\TrainingAdvancedTechniques\BooksLambda\obj\Debug\BooksLambda.pdb

Binary file not shown.

Binary file not shown.