Compare commits

...

5 Commits

  1. 19
      DesignPattern/ChainOfResponsibility/AddHandler.cs
  2. 6
      DesignPattern/ChainOfResponsibility/App.config
  3. 14
      DesignPattern/ChainOfResponsibility/CalcHandler.cs
  4. 16
      DesignPattern/ChainOfResponsibility/CalcType.cs
  5. 60
      DesignPattern/ChainOfResponsibility/ChainOfResponsibility.csproj
  6. 26
      DesignPattern/ChainOfResponsibility/Client.cs
  7. 19
      DesignPattern/ChainOfResponsibility/DivideHandler.cs
  8. 19
      DesignPattern/ChainOfResponsibility/MultiplyHandler.cs
  9. 25
      DesignPattern/ChainOfResponsibility/Program.cs
  10. 36
      DesignPattern/ChainOfResponsibility/Properties/AssemblyInfo.cs
  11. 19
      DesignPattern/ChainOfResponsibility/SubtractHandler.cs
  12. 6
      DesignPattern/Command/App.config
  13. 29
      DesignPattern/Command/Client.cs
  14. 59
      DesignPattern/Command/Command.csproj
  15. 13
      DesignPattern/Command/ICommand.cs
  16. 28
      DesignPattern/Command/Program.cs
  17. 36
      DesignPattern/Command/Properties/AssemblyInfo.cs
  18. 16
      DesignPattern/Command/StockBroker.cs
  19. 29
      DesignPattern/Command/StockCommand.cs
  20. 14
      DesignPattern/Command/TxType.cs
  21. 32
      DesignPattern/Command/User.cs
  22. 30
      DesignPattern/DesignPattern.sln
  23. 6
      DesignPattern/State-VendingMachineExample/App.config
  24. 21
      DesignPattern/State-VendingMachineExample/Client.cs
  25. 38
      DesignPattern/State-VendingMachineExample/DispenseChangeState.cs
  26. 39
      DesignPattern/State-VendingMachineExample/DispenseItemState.cs
  27. 46
      DesignPattern/State-VendingMachineExample/HasMoneyState.cs
  28. 36
      DesignPattern/State-VendingMachineExample/Product.cs
  29. 18
      DesignPattern/State-VendingMachineExample/Program.cs
  30. 36
      DesignPattern/State-VendingMachineExample/Properties/AssemblyInfo.cs
  31. 33
      DesignPattern/State-VendingMachineExample/ReadyState.cs
  32. 61
      DesignPattern/State-VendingMachineExample/State-VendingMachineExample.csproj
  33. 17
      DesignPattern/State-VendingMachineExample/VMState.cs
  34. 47
      DesignPattern/State-VendingMachineExample/VendingMachine.cs
  35. 6
      DesignPattern/State/App.config
  36. 26
      DesignPattern/State/BadState.cs
  37. 21
      DesignPattern/State/Client.cs
  38. 24
      DesignPattern/State/Context.cs
  39. 32
      DesignPattern/State/NormalState.cs
  40. 28
      DesignPattern/State/Program.cs
  41. 36
      DesignPattern/State/Properties/AssemblyInfo.cs
  42. 15
      DesignPattern/State/State.cs
  43. 59
      DesignPattern/State/State.csproj
  44. 26
      DesignPattern/State/VIPState.cs
  45. 6
      DesignPattern/Template/App.config
  46. 20
      DesignPattern/Template/Client.cs
  47. 52
      DesignPattern/Template/Letter.cs
  48. 21
      DesignPattern/Template/OfferLetter.cs
  49. 23
      DesignPattern/Template/Program.cs
  50. 36
      DesignPattern/Template/Properties/AssemblyInfo.cs
  51. 16
      DesignPattern/Template/SalesLetter.cs
  52. 57
      DesignPattern/Template/Template.csproj

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal class AddHandler : CalcHandler
{
public override int Calculate(CalcType cType, int a, int b)
{
if (cType == CalcType.Add)
return a + b;
else
return Next.Calculate(cType, a, b);
}
}
}

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

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal abstract class CalcHandler
{
public CalcHandler Next { get; set; }
public abstract int Calculate(CalcType cType, int a, int b);
}
}

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal enum CalcType
{
Add,
Subtract,
Multiply,
Divide,
}
}

@ -0,0 +1,60 @@
<?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>{808A59EA-EF38-4D24-B4C9-ADD93D21EDDC}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ChainOfResponsibility</RootNamespace>
<AssemblyName>ChainOfResponsibility</AssemblyName>
<TargetFrameworkVersion>v4.8.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="AddHandler.cs" />
<Compile Include="CalcHandler.cs" />
<Compile Include="CalcType.cs" />
<Compile Include="Client.cs" />
<Compile Include="DivideHandler.cs" />
<Compile Include="MultiplyHandler.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SubtractHandler.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal class Client
{
public static void HowToUse()
{
CalcHandler add = new AddHandler();
CalcHandler sub = new SubtractHandler();
CalcHandler mul = new MultiplyHandler();
CalcHandler div = new DivideHandler();
add.Next = sub;
sub.Next = mul;
mul.Next = div;
int result = add.Calculate(CalcType.Multiply, 10, 20);
Console.WriteLine(result);
}
}
}

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal class DivideHandler : CalcHandler
{
public override int Calculate(CalcType cType, int a, int b)
{
if (cType == CalcType.Divide)
return a + b;
else
return Next.Calculate(cType, a, b);
}
}
}

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal class MultiplyHandler : CalcHandler
{
public override int Calculate(CalcType cType, int a, int b)
{
if (cType == CalcType.Multiply)
return a * b;
else
return Next.Calculate(cType, a, b);
}
}
}

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
/*
* :
* :
*
*
*
*/
internal class Program
{
static void Main(string[] args)
{
Client.HowToUse();
Console.ReadKey();
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("ChainOfResponsibility")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ChainOfResponsibility")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("808a59ea-ef38-4d24-b4c9-add93d21eddc")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibility
{
internal class SubtractHandler : CalcHandler
{
public override int Calculate(CalcType cType, int a, int b)
{
if (cType == CalcType.Subtract)
return a - b;
else
return Next.Calculate(cType, a, b);
}
}
}

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

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
internal class Client
{
public static void HowToUse()
{
// Receiver 객체
StockBroker broker = new StockBroker();
// Invoker 객체
User user = new User();
// Command 객체
ICommand command = new StockCommand(broker, "MSFT", TxType.Buy, 150);
user.AddCommand(command);
user.AddCommand(broker, "AMZN", TxType.Sell, 2000);
// Command 실행 요청
user.ExecuteAll();
}
}
}

@ -0,0 +1,59 @@
<?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>{F34D75D4-7025-4CE3-AF7F-11117FA32F8B}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Command</RootNamespace>
<AssemblyName>Command</AssemblyName>
<TargetFrameworkVersion>v4.8.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="Client.cs" />
<Compile Include="ICommand.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StockBroker.cs" />
<Compile Include="StockCommand.cs" />
<Compile Include="TxType.cs" />
<Compile Include="User.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
internal interface ICommand
{
void Execute();
}
}

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
/*
* :
* :
* , ,
* Undo
*
* Invoker:
* Command:
* Receiver:
*/
internal class Program
{
static void Main(string[] args)
{
Client.HowToUse();
Console.ReadKey();
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("Command")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Command")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("f34d75d4-7025-4ce3-af7f-11117fa32f8b")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
internal class StockBroker
{
public void Process(string stockSymbol, TxType txType, int qty)
{
Console.WriteLine($"{txType.ToString()}, {stockSymbol}, {qty}");
}
}
}

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
internal class StockCommand : ICommand
{
private StockBroker _broker;
private string symbol;
private TxType txType;
private int qty;
public StockCommand(StockBroker broker, string symbol, TxType txType, int qty)
{
_broker = broker;
this.symbol = symbol;
this.txType = txType;
this.qty = qty;
}
public void Execute()
{
_broker.Process(symbol, txType, qty);
}
}
}

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
internal enum TxType
{
Buy,
Sell,
}
}

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Command
{
internal class User
{
private List<ICommand> _commands = new List<ICommand>();
public void AddCommand(ICommand command)
{
_commands.Add(command);
}
public void AddCommand(StockBroker broker, string symbol, TxType txType, int qty)
{
ICommand command = new StockCommand(broker, symbol, txType, qty);
_commands.Add(command);
}
public void ExecuteAll()
{
foreach (ICommand cmd in _commands)
{
cmd.Execute();
}
}
}
}

@ -33,6 +33,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Observer", "Observer\Observ
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Strategy", "Strategy\Strategy.csproj", "{D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainOfResponsibility", "ChainOfResponsibility\ChainOfResponsibility.csproj", "{808A59EA-EF38-4D24-B4C9-ADD93D21EDDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Command", "Command\Command.csproj", "{F34D75D4-7025-4CE3-AF7F-11117FA32F8B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Template", "Template\Template.csproj", "{8C1CA345-A2D4-46E2-9FD0-34E8BE4CE7C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "State", "State\State.csproj", "{008D8C56-8546-4EB1-83C6-68FAF2051895}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "State-VendingMachineExample", "State-VendingMachineExample\State-VendingMachineExample.csproj", "{ED14B6E2-04BB-4F77-80E7-C5F0E945B750}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -99,6 +109,26 @@ Global
{D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Release|Any CPU.Build.0 = Release|Any CPU
{808A59EA-EF38-4D24-B4C9-ADD93D21EDDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{808A59EA-EF38-4D24-B4C9-ADD93D21EDDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{808A59EA-EF38-4D24-B4C9-ADD93D21EDDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{808A59EA-EF38-4D24-B4C9-ADD93D21EDDC}.Release|Any CPU.Build.0 = Release|Any CPU
{F34D75D4-7025-4CE3-AF7F-11117FA32F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F34D75D4-7025-4CE3-AF7F-11117FA32F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F34D75D4-7025-4CE3-AF7F-11117FA32F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F34D75D4-7025-4CE3-AF7F-11117FA32F8B}.Release|Any CPU.Build.0 = Release|Any CPU
{8C1CA345-A2D4-46E2-9FD0-34E8BE4CE7C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C1CA345-A2D4-46E2-9FD0-34E8BE4CE7C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C1CA345-A2D4-46E2-9FD0-34E8BE4CE7C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C1CA345-A2D4-46E2-9FD0-34E8BE4CE7C4}.Release|Any CPU.Build.0 = Release|Any CPU
{008D8C56-8546-4EB1-83C6-68FAF2051895}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{008D8C56-8546-4EB1-83C6-68FAF2051895}.Debug|Any CPU.Build.0 = Debug|Any CPU
{008D8C56-8546-4EB1-83C6-68FAF2051895}.Release|Any CPU.ActiveCfg = Release|Any CPU
{008D8C56-8546-4EB1-83C6-68FAF2051895}.Release|Any CPU.Build.0 = Release|Any CPU
{ED14B6E2-04BB-4F77-80E7-C5F0E945B750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED14B6E2-04BB-4F77-80E7-C5F0E945B750}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED14B6E2-04BB-4F77-80E7-C5F0E945B750}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED14B6E2-04BB-4F77-80E7-C5F0E945B750}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

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

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
internal class Client
{
public static void HowToTest()
{
VendingMachine vm = new VendingMachine();
vm.AddMoney(1);
vm.AddMoney(1);
vm.AddMoney(1);
vm.AddMoney(1);
vm.SelectItem(101);
}
}
}

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
internal class DispenseChangeState : VMState
{
public DispenseChangeState(VendingMachine context)
{
vendingMachine = context;
}
public override void AddMoney(decimal money)
{
throw new ApplicationException();
}
public override void ReturnChange(decimal money)
{
// Return charge here
if (vendingMachine.Money > 0)
{
Console.WriteLine($"Return charge ${money}");
vendingMachine.Money -= money;
}
vendingMachine.State = vendingMachine.ReadyState;
}
public override void SelectItem(int itemId)
{
throw new ApplicationException();
}
}
}

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
internal class DispenseItemState : VMState
{
public DispenseItemState(VendingMachine context)
{
vendingMachine = context;
}
public override void AddMoney(decimal money)
{
throw new ApplicationException();
}
public override void ReturnChange(decimal money)
{
throw new ApplicationException();
}
public override void SelectItem(int itemId)
{
decimal? price = vendingMachine.GetPrice(itemId).Value;
// Dispense item here
Console.WriteLine($"Dispense Item#{itemId} ({price.Value})");
vendingMachine.Money -= price.Value;
vendingMachine.State = vendingMachine.DispenseChangeState;
vendingMachine.State.ReturnChange(vendingMachine.Money);
}
}
}

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
internal class HasMoneyState : VMState
{
public HasMoneyState(VendingMachine context)
{
vendingMachine = context;
}
public override void AddMoney(decimal money)
{
vendingMachine.Money += money;
Console.WriteLine($"Add ${money}, Balance: {vendingMachine.Money}");
}
public override void ReturnChange(decimal money)
{
throw new ApplicationException();
}
public override void SelectItem(int itemId)
{
decimal? price = vendingMachine.GetPrice(itemId).Value;
if (!price.HasValue)
{
Console.WriteLine($"{itemId} not found");
return;
}
if (vendingMachine.Money < price.Value)
{
Console.WriteLine("Insufficient money");
return;
}
vendingMachine.State = vendingMachine.DispenseItemState;
vendingMachine.State.SelectItem(itemId);
}
}
}

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
internal class Product
{
private List<Item> items;
public Product()
{
items = new List<Item>()
{
new Item() { Id = 101, Price = 3.50M },
new Item() { Id = 201, Price = 4.50M },
new Item() { Id = 301, Price = 4.50M }
};
}
public decimal? GetPrice(int itemId)
{
Item item = items.SingleOrDefault(x => x.Id == itemId);
return item == null ? null : (decimal?)item.Price;
}
private class Item
{
public int Id { get; set; }
public decimal Price { get; set; }
}
}
}

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
internal class Program
{
static void Main(string[] args)
{
Client.HowToTest();
Console.ReadKey();
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("State-VendingMachineExample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("State-VendingMachineExample")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("ed14b6e2-04bb-4f77-80e7-c5f0e945b750")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
// Concrete State
internal class ReadyState : VMState
{
public ReadyState(VendingMachine context)
{
vendingMachine = context;
}
public override void AddMoney(decimal money)
{
vendingMachine.State = vendingMachine.HasMoneyState;
vendingMachine.State.AddMoney(money);
}
public override void ReturnChange(decimal money)
{
throw new ApplicationException();
}
public override void SelectItem(int itemId)
{
throw new ApplicationException();
}
}
}

@ -0,0 +1,61 @@
<?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>{ED14B6E2-04BB-4F77-80E7-C5F0E945B750}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>State_VendingMachineExample</RootNamespace>
<AssemblyName>State-VendingMachineExample</AssemblyName>
<TargetFrameworkVersion>v4.8.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="Client.cs" />
<Compile Include="DispenseChangeState.cs" />
<Compile Include="DispenseItemState.cs" />
<Compile Include="HasMoneyState.cs" />
<Compile Include="Product.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReadyState.cs" />
<Compile Include="VendingMachine.cs" />
<Compile Include="VMState.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
// State 인터페이스
internal abstract class VMState
{
protected VendingMachine vendingMachine;
public abstract void AddMoney(decimal money);
public abstract void SelectItem(int itemId);
public abstract void ReturnChange(decimal money);
}
}

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State_VendingMachineExample
{
// Context
internal class VendingMachine
{
private Product product = new Product();
internal decimal Money { get; set; }
internal VMState State { get; set; }
internal VMState ReadyState { get; private set; }
internal VMState HasMoneyState { get; private set; }
internal VMState DispenseItemState { get; private set; }
internal VMState DispenseChangeState { get; private set; }
public VendingMachine()
{
this.Money = 0;
this.ReadyState = new ReadyState(this);
this.HasMoneyState = new HasMoneyState(this);
this.DispenseItemState = new DispenseItemState(this);
this.DispenseChangeState = new DispenseChangeState(this);
this.State = this.ReadyState;
}
public void AddMoney(decimal money)
{
this.State.AddMoney(money);
}
public void SelectItem(int itemId)
{
this.State.SelectItem(itemId);
}
internal decimal? GetPrice(int itemId)
{
return product.GetPrice(itemId);
}
}
}

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

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
internal class BadState : State
{
public BadState()
{
this.InterestRate = 35.00M;
}
public override void ChangeScore(Context context, int score)
{
if (score >= 600)
{
context.CurrentState = new NormalState();
context.CurrentState.ChangeScore(context, score);
}
}
}
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
internal class Client
{
public static void HowToTest()
{
Context ctx = new Context();
ctx.SetCreditScore(550);
Console.WriteLine($"{ctx.CurrentState.InterestRate}%");
ctx.SetCreditScore(760);
Console.WriteLine($"{ctx.CurrentState.InterestRate}%");
}
}
}

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
internal class Context
{
public State CurrentState { get; set; }
public Context()
{
this.CurrentState = new NormalState();
}
public void SetCreditScore(int creditScore)
{
Console.WriteLine($"{creditScore}");
this.CurrentState.ChangeScore(this, creditScore);
}
}
}

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
internal class NormalState : State
{
public NormalState()
{
this.InterestRate = 25.00M;
}
public override void ChangeScore(Context context, int score)
{
if (score < 600)
{
context.CurrentState = new BadState();
context.CurrentState.ChangeScore(context, score);
}
else if (score >= 750)
{
context.CurrentState = new VIPState();
context.CurrentState.ChangeScore(context, score);
}
}
}
}

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
/*
* :
* :
*
* /
*
* Context:
* State:
* Concrete State:
*/
internal class Program
{
static void Main(string[] args)
{
Client.HowToTest();
Console.ReadKey();
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("State")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("State")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("008d8c56-8546-4eb1-83c6-68faf2051895")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
internal abstract class State
{
public decimal InterestRate { get; protected set; }
public abstract void ChangeScore(Context context, int score);
}
}

@ -0,0 +1,59 @@
<?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>{008D8C56-8546-4EB1-83C6-68FAF2051895}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>State</RootNamespace>
<AssemblyName>State</AssemblyName>
<TargetFrameworkVersion>v4.8.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="BadState.cs" />
<Compile Include="Client.cs" />
<Compile Include="Context.cs" />
<Compile Include="NormalState.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="State.cs" />
<Compile Include="VIPState.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace State
{
internal class VIPState : State
{
public VIPState()
{
this.InterestRate = 15.00M;
}
public override void ChangeScore(Context context, int score)
{
if (score < 750)
{
context.CurrentState = new NormalState();
context.CurrentState.ChangeScore(context, score);
}
}
}
}

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

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Template
{
internal class Client
{
public static void HowToTest()
{
Letter letter = new SalesLetter();
letter.Send();
letter = new OfferLetter();
letter.Send();
}
}
}

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Template
{
// 베이스클래스
internal abstract class Letter
{
public void Send()
{
CompanyLogo();
Greeting();
Message();
Offer();
Ending();
Footer();
}
// 필수
public abstract void Message();
// 옵션
public virtual void Offer() { }
// 고정 메서드 들
private void CompanyLogo()
{
Console.WriteLine("COMPANY LOGO");
}
private void Greeting()
{
Console.WriteLine("HELLO");
}
private void Ending()
{
Console.WriteLine("BYE");
}
private void Footer()
{
Console.WriteLine("WARM REGARD");
}
}
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Template
{
internal class OfferLetter : Letter
{
public override void Message()
{
Console.WriteLine("This is offer letter");
}
public override void Offer()
{
Console.WriteLine("This is our offer");
}
}
}

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Template
{
/*
* :
* :
* 릿 /
*/
internal class Program
{
static void Main(string[] args)
{
Client.HowToTest();
Console.ReadKey();
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("Template")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Template")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("8c1ca345-a2d4-46e2-9fd0-34e8be4ce7c4")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Template
{
internal class SalesLetter : Letter
{
public override void Message()
{
Console.WriteLine("This is sales letter");
}
}
}

@ -0,0 +1,57 @@
<?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>{8C1CA345-A2D4-46E2-9FD0-34E8BE4CE7C4}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Template</RootNamespace>
<AssemblyName>Template</AssemblyName>
<TargetFrameworkVersion>v4.8.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="Client.cs" />
<Compile Include="Letter.cs" />
<Compile Include="OfferLetter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SalesLetter.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading…
Cancel
Save