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

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

История страницы
Updated Class diagram (markdown) создал Май 27, 2022 по автору wowbios's avatar wowbios
Показать
Построчно Рядом
Class-diagram.md
Просмотреть страницу @a598334a
Class diagram specs
\ Нет новой строки в конце файла
[Original mermaid js class diagram documentation](https://mermaid-js.github.io/mermaid/#/classDiagram)
> "In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects." Wikipedia
To create a class diagram call `Create` method of `ClassDiagram` class
```c#
var diagram = ClassDiagram.Create(Orientation.RightToLeft);
```
## Classes
### Definition
```c#
var typeName = new TypeName("List", "int[]");
var listOfIntArrays = diagram.AddClass(typeName, "My list annotation", "customCssClass");
```
### Properties
Examples: define property `public abstract List<decimal> Foo { ... }`
use this
```c#
myClass.AddProperty(
"Foo",
new TypeName("List", "decimal"),
Visibility.Abstract | Visibility.Public
);
```
### Functions
Example: define method `private static decimal Average(decimal[] values)`
```c#
myClass.AddFunction(
"Average",
new TypeName("decimal", null),
Visibility.Static | Visibility.Private,
new FunctionArgument(
"values",
new TypeName("decimal[]", null)))
```
## Relations
```c#
diagram.Relation(
// related classes
firstClass,
secondClass,
// first class relation
Relationship.Aggregation,
Cardinality.Many,
// second class relation
Relationship.Composition,
Cardinality.ZeroToN,
// relation link style and text
RelationLink.Solid,
"SomeLable");
```
## Interaction
### Callbacks
```c#
myClass.SetCallback("alert", "CALLBACK TOOLTIP");
```
### Links
```c#
myClass.SetLink(new Uri("https://github.com"), "github toolTIP");
```
## Generate markdown syntax
```c#
string markdownSyntax = diagram.Render();
```
\ Нет новой строки в конце файла
Клонировать репозиторий
  • Class diagram
  • Flowchart
  • Home
  • Pie chart
  • Sequence diagram