• F FluentMermaid
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 9
    • Задачи 9
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 0
    • Запросы на слияние 0
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • wowbios
  • FluentMermaid
  • Wiki
  • Sequence diagram

Sequence diagram · Изменения

История страницы
Updated Sequence diagram (markdown) создал Май 27, 2022 по автору wowbios's avatar wowbios
Скрыть пробелы
Построчно Рядом
Sequence-diagram.md
Просмотреть страницу @ec553380
[Original mermaid-js sequence diagram documentation](https://mermaid-js.github.io/mermaid/#/sequenceDiagram)
A Sequence diagram is an interaction diagram that shows how processes operate with one another and in what order
To create sequence diagram call create new `SequenceDiagramBuilder`. You could enable `autonumber` of sequence steps within its constructor
```c#
var builder = new SequenceDiagramBuilder(autoNumber:true);
```
## Defining members
```c#
var alice = diagram.AddMember("Alice", MemberType.Participant);
var bob = diagram.AddMember("Alice", MemberType.Participant);
```
### Links
You could add links for diagram members
```c#
alice.AddLink("Dashboard", new Uri("https://dashboard.contoso.com/alice"));
alice.AddLink("Wiki", new Uri("https://wiki.contoso.com/alice"));
```
## Building diagram
### Messages
To sent message from one member to another/self
```c#
builder
.Message(alice, bob, "Hello Bob!", MessageType.Solid)
.Message(alice, bob, "Hello! Can you hear me?", MessageType.Solid)
```
For simpler messaging process definition between two members you could use Messaging
```c#
builder
.Messaging(alice, bob)
.Request("Hi Bob!", MessageType.SolidArrow)
.Response("Hello Alice!", MessageType.SolidArrow)
.Request("How are you?", MessageType.SolidArrow)
.Response("Well ..", MessageType.DottedArrow)
.Response("Done", MessageType.SolidArrow)
.End()
```
### Activation
To do things, when some of the members activated use `Activate` method
```c#
builder.Activate(alice, diagram =>
{
diagram.Message(alice, bob, "Hello", MessageType.Solid);
});
```
### Loops
```c#
builder.Loop("Endless conversation", diagram =>
{
diagram.Message(alice, bob, "Hello", MessageType.Solid);
...
});
```
### Alt
It is possible to express alternative paths in a sequence diagram
```c#
builder.AltOr(
"Alice hungry",
diagram => diagram.Message(alice, bob, "Wait Bob, I need something to eat", MessageType.Solid),
"Alice not hungry",
diagram => diagram.Message(alice, bob, "Ok, let`s go", MessageType.Solid)
);
```
### Optional
```c#
builder.Optional("Alice tired", diagram => ...);
```
### Parallel
```c#
builder.Parallel(new [] {
("alice is going to work", diagram => ...),
("alice is talking to the phone", diagram => ...)
});
```
or
```c#
builder.Parallel(
("alice is going to work", diagram => ...),
("alice is talking to the phone", diagram => ...)
);
```
## Rectangles
It is possible to highlight flows by providing colored background rects.
```c#
builder.Rect(Color.Yellow, diagram => ...);
```
## Notes
### Note
```c#
builder
.Note(alice, NoteLocation.LeftOf, "Alice is a girl")
.Note(bob, NoteLocation.LeftOf, "Bob is a boy");
```
### Note over members
```c#
builder.NoteOver("Teenagers", alice, bob);
```
## Generating markdown
```c#
string markdownSyntax = builder.Build();
```
\ Нет новой строки в конце файла
Клонировать репозиторий
  • Class diagram
  • Flowchart
  • Home
  • Pie chart
  • Sequence diagram