Add state pattern example
This commit is contained in:
16
src/StatePattern/TVExample/TVOnState.cs
Normal file
16
src/StatePattern/TVExample/TVOnState.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatePattern.TVExample
|
||||
{
|
||||
public class TVOnState : ITVState
|
||||
{
|
||||
public void OnPowerButtonPresed()
|
||||
{
|
||||
Console.WriteLine("TV turning off");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user