Skip to content

Commit ce6dc32

Browse files
committed
Fixed indentation issues with comments.
1 parent a6d3e7b commit ce6dc32

File tree

8 files changed

+28
-40
lines changed

8 files changed

+28
-40
lines changed

Command.Conceptual/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ public ComplexCommand(Receiver receiver, string a, string b)
6969
this._b = b;
7070
}
7171

72-
//
7372
// EN: Commands can delegate to any methods of a receiver.
7473
//
7574
// RU: Команды могут делегировать выполнение любым методам получателя.
76-
///
7775
public void Execute()
7876
{
7977
Console.WriteLine("ComplexCommand: Complex stuff should be done by a receiver object.");

Decorator.Conceptual/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ public void SetComponent(Component component)
6262
this._component = component;
6363
}
6464

65-
//
6665
// EN: The Decorator delegates all work to the wrapped component.
6766
//
6867
// RU: Декоратор делегирует всю работу обёрнутому компоненту.
69-
///
7068
public override string Operation()
7169
{
7270
if (this._component != null)

Facade.Conceptual/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@ public Facade(Subsystem1 subsystem1, Subsystem2 subsystem2)
3737
this._subsystem2 = subsystem2;
3838
}
3939

40-
//
4140
// EN: The Facade's methods are convenient shortcuts to the sophisticated
4241
// functionality of the subsystems. However, clients get only to a fraction
4342
// of a subsystem's capabilities.
4443
//
4544
// RU: Методы Фасада удобны для быстрого доступа к сложной функциональности
4645
// подсистем. Однако клиенты получают только часть возможностей подсистемы.
47-
///
4846
public string Operation()
4947
{
5048
string result = "Facade initializes subsystems:\n";

Observer.Conceptual/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ public void Detach(IObserver observer)
9090
Console.WriteLine("Subject: Detached an observer.");
9191
}
9292

93-
//
9493
// EN: Trigger an update in each subscriber.
9594
//
9695
// RU: Запуск обновления в каждом подписчике.
97-
///
9896
public void Notify()
9997
{
10098
Console.WriteLine("Subject: Notifying observers...");

Prototype.Conceptual/Program.cs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
///
2-
// EN: Prototype Design Pattern
3-
//
4-
// Intent: Produce new objects by copying existing ones without compromising
5-
// their internal structure.
6-
//
7-
// RU: Паттерн Прототип
8-
//
9-
// Назначение: Создаёт новые объекты, копируя существующие без нарушения их
10-
// внутренней структуры.
11-
///
1+
// EN: Prototype Design Pattern
2+
//
3+
// Intent: Produce new objects by copying existing ones without compromising
4+
// their internal structure.
5+
//
6+
// RU: Паттерн Прототип
7+
//
8+
// Назначение: Создаёт новые объекты, копируя существующие без нарушения их
9+
// внутренней структуры.
1210

1311
using System;
1412

Proxy.Conceptual/Program.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
 // EN: Proxy Design Pattern
2-
//
3-
// Intent: Provide a surrogate or placeholder for another object to control
4-
// access to the original object or to add other responsibilities.
5-
//
6-
// RU: Паттерн Заместитель
7-
//
8-
// Назначение: Предоставляет заменитель или местозаполнитель для другого
9-
// объекта, чтобы контролировать доступ к оригинальному объекту или добавлять
10-
// другие обязанности.
1+
// EN: Proxy Design Pattern
2+
//
3+
// Intent: Provide a surrogate or placeholder for another object to control
4+
// access to the original object or to add other responsibilities.
5+
//
6+
// RU: Паттерн Заместитель
7+
//
8+
// Назначение: Предоставляет заменитель или местозаполнитель для другого
9+
// объекта, чтобы контролировать доступ к оригинальному объекту или добавлять
10+
// другие обязанности.
1111

1212
using System;
1313

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ It contains C# examples for all classic GoF design patterns. Each pattern includ
77
- **Conceptual** examples show the internal structure of patterns with detailed comments.
88
- **RealWold** examples show how the patterns can be used in a real-world C# application.
99

10+
1011
## Status & Roadmap
1112

1213
This repository is in the very initial state at the moment. Here are the missing examples:
@@ -65,19 +66,18 @@ Here's a style guide which might help you to keep your changes consistent with o
6566
6. Comments may or may not have language tags in them, such as this:
6667

6768
```csharp
68-
/// <summary>
69-
/// EN: All products families have the same varieties (MacOS/Windows).
70-
///
71-
/// This is a MacOS variant of a button.
72-
///
73-
/// RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows).
74-
///
75-
/// Это вариант кнопки под MacOS.
76-
/// </summary>
69+
// EN: All products families have the same varieties (MacOS/Windows).
70+
//
71+
// This is a MacOS variant of a button.
72+
//
73+
// RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows).
74+
//
75+
// Это вариант кнопки под MacOS.
7776
```
7877

7978
This notation helps to keep the code in one place while allowing the website to generates separate versions of examples for all listed languages. Don't be scared and ignore the non-English part of such comments. If you want to change something in a comment like this, just do it. Even if you do it wrong, we'll tell you how to fix it during the Pull Request.
8079

80+
8181
## License
8282

8383
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Strategy.Conceptual/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ public void SetStrategy(IStrategy strategy)
5252
this._strategy = strategy;
5353
}
5454

55-
//
5655
// EN: The Context delegates some work to the Strategy object instead of
5756
// implementing multiple versions of the algorithm on its own.
5857
//
5958
// RU: Вместо того, чтобы самостоятельно реализовывать множественные версии
6059
// алгоритма, Контекст делегирует некоторую работу объекту Стратегии.
61-
///
6260
public void DoSomeBusinessLogic()
6361
{
6462
Console.WriteLine("Context: Sorting data using the strategy (not sure how it'll do it)");

0 commit comments

Comments
 (0)