This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FakeItEasy; | |
using FluentAssertions; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public sealed class Pattern7 | |
{ | |
public interface IBank { decimal SavingsAmount(string customer); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FluentAssertions; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public sealed class Pattern6 | |
{ | |
interface IProduct { decimal Cost { get; } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text; | |
using FluentAssertions; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public sealed class Pattern5 | |
{ | |
interface IDrawable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using FluentAssertions; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public sealed class Pattern4 | |
{ | |
public class Computer | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FluentAssertions; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public sealed class Pattern3 | |
{ | |
public abstract class Approver | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using FakeItEasy; | |
using FluentAssertions; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public class Pattern2 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FakeItEasy; | |
using Xunit; | |
namespace DesignPatters | |
{ | |
public sealed class Pattern1 | |
{ | |
public interface IAmericanSocket { void GetPower(); } | |
public interface IEuropeanSocket { void RetrievePower(); } | |
public sealed class EuropeanDevice { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Diagnostics; | |
using FluentAssertions; | |
using Xunit; | |
namespace SompareWithRuby | |
{ | |
[DebuggerDisplay("{Payload}")] | |
public sealed class Node<T> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
// Пример вызова функции без аргументов | |
var x = GetNumberFromConsole(); |