Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-light committed Dec 10, 2023
1 parent 78d885c commit 7d40782
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 83 deletions.
4 changes: 2 additions & 2 deletions docs/DocEvent.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Summary.DocEvent
# [Summary.DocEvent](../src/Core/DocEvent.cs#L9)
```cs
public record DocEvent : DocMember
```
Expand All @@ -8,7 +8,7 @@ A [`DocMember`](./DocMember.md) that represents a documented event in the parsed
_Similar to [`DocProperty`](./DocProperty.md) but with its own set of accessors._

## Properties
### Type
### [Type](../src/Core/DocEvent.cs#L14)
```cs
public required DocType Type { get; init; }
```
Expand Down
22 changes: 18 additions & 4 deletions docs/DocProperty.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
# [Summary.DocProperty](../src/Core/DocProperty.cs#L6)
# [Summary.DocProperty](../src/Core/DocProperty.cs#L8)
```cs
public record DocProperty : DocMember
```

A [`DocMember`](./DocMember.md) that represents a documented property in the parsed source code.

## Properties
### [Type](../src/Core/DocProperty.cs#L11)
### [Type](../src/Core/DocProperty.cs#L13)
```cs
public required DocType Type { get; init; }
```

The type of the property.

### [Generated](../src/Core/DocProperty.cs#L16)
### [Accessors](../src/Core/DocProperty.cs#L18)
```cs
public required DocPropertyAccessor[] Accessors { get; init; }
```

The accessors of the property (e.g., `get`, `set`, `init`).

### [Generated](../src/Core/DocProperty.cs#L23)
```cs
public required bool Generated { get; init; }
```

Whether this property was generated by compiler (e.g., it's a property of a record).

### [Event](../src/Core/DocProperty.cs#L21)
### [Event](../src/Core/DocProperty.cs#L29)
```cs
public required bool Event { get; init; }
```

Whether this property represents an event.

### [AccessorsDeclaration](../src/Core/DocProperty.cs#L34)
```cs
public string AccessorsDeclaration { get; }
```

The declaration of property accessors as they declared in the C# source code.

10 changes: 5 additions & 5 deletions docs/DocPropertyAccessor.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# Summary.DocPropertyAccessor
# [Summary.DocPropertyAccessor](../src/Core/DocPropertyAccessor.cs#L6)
```cs
public record DocPropertyAccessor
```

One of the [`DocProperty`](./DocProperty.md) accessors (e.g., `get`, `set`, `init`).

## Fields
### Access
### [Access](../src/Core/DocPropertyAccessor.cs#L29)
```cs
public AccessModifier? Access
```

The access modifier of the accessor.
If the value is `null`, then the access modifier is inherited from the property declaration.

### Kind
### [Kind](../src/Core/DocPropertyAccessor.cs#L34)
```cs
public AccessorKind Kind
```

The kind of the accessor.

## Methods
### Defaults()
### [Defaults()](../src/Core/DocPropertyAccessor.cs#L11)
```cs
public static DocPropertyAccessor[] Defaults()
```

The sequence that consists only of a default `public get` property accessor.

### Default()
### [Default()](../src/Core/DocPropertyAccessor.cs#L19)
```cs
public static DocPropertyAccessor Default()
```
Expand Down
4 changes: 2 additions & 2 deletions docs/FilterMemberPipe.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Summary.Pipes.Filters.FilterMemberPipe](../src/Core/Pipes/Filters/FilterMemberPipe.cs#L6)
# [Summary.Pipes.Filters.FilterMemberPipe](../src/Core/Pipes/Filters/FilterMemberPipe.cs#L7)
```cs
public class FilterMemberPipe : IPipe<Doc, Doc>
```
Expand All @@ -7,7 +7,7 @@ A simple pipe that filters all members inside the document using the specified p
and then applies the given map function on them.

## Methods
### [Run(Doc)](../src/Core/Pipes/Filters/FilterMemberPipe.cs#L9)
### [Run(Doc)](../src/Core/Pipes/Filters/FilterMemberPipe.cs#L12)
```cs
public Task<Doc> Run(Doc input)
```
Expand Down
12 changes: 6 additions & 6 deletions docs/FilteringExtensions.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Summary.Pipelines.FilteringExtensions
# [Summary.Pipelines.FilteringExtensions](../src/Core/Pipelines/SummaryPipelineFilteringExtensions.cs#L9)
```cs
public static class FilteringExtensions
```

A set of extensions for [`SummaryPipeline`](./SummaryPipeline.md) that add support for filtering functionality.

## Methods
### UseDefaultFilters(SummaryPipeline)
### [UseDefaultFilters(SummaryPipeline)](../src/Core/Pipelines/SummaryPipelineFilteringExtensions.cs#L14)
```cs
public static SummaryPipeline UseDefaultFilters(this SummaryPipeline self)
```

Enables default filters for the given pipeline (i.e. a filter that removes all non-public members).

### IncludeAtLeast(SummaryPipeline, AccessModifier)
### [IncludeAtLeast(SummaryPipeline, AccessModifier)](../src/Core/Pipelines/SummaryPipelineFilteringExtensions.cs#L29)
```cs
public static SummaryPipeline IncludeAtLeast(this SummaryPipeline self, AccessModifier access)
```
Expand All @@ -29,7 +29,7 @@ var pipeline = ...;
pipeline.IncludeAtLeast(AccessModifier.Internal);
```

### IncludeOnly(SummaryPipeline, AccessModifier)
### [IncludeOnly(SummaryPipeline, AccessModifier)](../src/Core/Pipelines/SummaryPipelineFilteringExtensions.cs#L44)
```cs
public static SummaryPipeline IncludeOnly(this SummaryPipeline self, AccessModifier access)
```
Expand All @@ -45,14 +45,14 @@ var pipeline = ...;
pipeline.IncludeOnly(AccessModifier.Internal);
```

### WithAccess(SummaryPipeline, Func<AccessModifier, bool>)
### [WithAccess(SummaryPipeline, Func<AccessModifier, bool>)](../src/Core/Pipelines/SummaryPipelineFilteringExtensions.cs#L50)
```cs
public static SummaryPipeline WithAccess(this SummaryPipeline self, Func<AccessModifier, bool> p)
```

Includes only members that have the access modifier that satisfies the given predicate.

### UseFilter(SummaryPipeline, IPipe<Doc, Doc>)
### [UseFilter(SummaryPipeline, IPipe<Doc, Doc>)](../src/Core/Pipelines/SummaryPipelineFilteringExtensions.cs#L67)
```cs
public static SummaryPipeline UseFilter(this SummaryPipeline self, IPipe<Doc, Doc> filter)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/GlobalDelegate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [GlobalDelegate(int, int)](../src/Core/Samples/Sample.cs#L6)
# [GlobalDelegate(int, int)](../src/Core/Samples/Sample.cs#L15)
```cs
public void GlobalDelegate(int x, int y)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/Sample{T0,T1}.Child.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [~~Summary.Samples.Sample.Child~~](../src/Core/Samples/Sample.cs#L33)
# [~~Summary.Samples.Sample.Child~~](../src/Core/Samples/Sample.cs#L42)
> [!WARNING]
> The type is deprecated.
Expand All @@ -10,7 +10,7 @@ public class Child
A child of the [`Sample{T0,T1}`](./Sample{T0,T1}.md) class.

## Fields
### [Field](../src/Core/Samples/Sample.cs#L38)
### [Field](../src/Core/Samples/Sample.cs#L47)
```cs
public int Field
```
Expand Down
30 changes: 15 additions & 15 deletions docs/Sample{T0,T1}.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Summary.Samples.Sample<T0, T1>](../src/Core/Samples/Sample.cs#L26)
# [Summary.Samples.Sample<T0, T1>](../src/Core/Samples/Sample.cs#L35)
```cs
public class Sample<T0, T1>
```
Expand All @@ -22,37 +22,37 @@ _Btw, this type has a child: [`Sample{T0,T1}.Child`](./Sample{T0,T1}.Child.md)._
- `T1`: A second type parameter.

## Delegates
### [Delegate1(int, int)](../src/Core/Samples/Sample.cs#L44)
### [Delegate1(int, int)](../src/Core/Samples/Sample.cs#L53)
```cs
public void Delegate1(int x, int y)
```

A sample delegate.

## Events
### [Event1](../src/Core/Samples/Sample.cs#L92)
### [Event1](../src/Core/Samples/Sample.cs#L101)
```cs
public event Action Event1
```

A sample field event.

### [Event2](../src/Core/Samples/Sample.cs#L97)
### [Event2](../src/Core/Samples/Sample.cs#L106)
```cs
public Action Event2
```

A sample property event.

## Fields
### [Field](../src/Core/Samples/Sample.cs#L38)
### [Field](../src/Core/Samples/Sample.cs#L47)
```cs
public int Field
```

A field of the child class.

### [~~Field1~~](../src/Core/Samples/Sample.cs#L50)
### [~~Field1~~](../src/Core/Samples/Sample.cs#L59)
> [!WARNING]
> The field is deprecated.

Expand All @@ -63,36 +63,36 @@ public int Field1

A sample field.

### [Field2](../src/Core/Samples/Sample.cs#L55)
### [Field2](../src/Core/Samples/Sample.cs#L64)
```cs
public int Field2
```

A pair of fields.

### [Field3](../src/Core/Samples/Sample.cs#L55)
### [Field3](../src/Core/Samples/Sample.cs#L64)
```cs
public int Field3
```

A pair of fields.

## Properties
### [Property1](../src/Core/Samples/Sample.cs#L60)
### [Property1](../src/Core/Samples/Sample.cs#L69)
```cs
public int Property1 { get; set; }
```

A sample property.

### [Property2](../src/Core/Samples/Sample.cs#L65)
### [Property2](../src/Core/Samples/Sample.cs#L74)
```cs
public int Property2 { set; }
```

A sample property with custom visibility.

### [Property3](../src/Core/Samples/Sample.cs#L71)
### [Property3](../src/Core/Samples/Sample.cs#L80)
```cs
public int Property3 { get; }
```
Expand All @@ -102,15 +102,15 @@ A sample property with custom visibility and an exception.
#### Exceptions
- `ArithmeticException`: Invalid number.

### [Property4](../src/Core/Samples/Sample.cs#L76)
### [Property4](../src/Core/Samples/Sample.cs#L85)
```cs
public int Property4 { get; set; }
```

A sample property with custom accessors.

## Indexers
### [this[int]](../src/Core/Samples/Sample.cs#L87)
### [this[int]](../src/Core/Samples/Sample.cs#L96)
```cs
public int this[int i] { get; }
```
Expand All @@ -124,7 +124,7 @@ A sample indexer.
What indexer returns.

## Methods
### [Method<M0, M1, M2>(int, string)](../src/Core/Samples/Sample.cs#L121)
### [Method<M0, M1, M2>(int, string)](../src/Core/Samples/Sample.cs#L130)
```cs
public TimeSpan Method<M0, M1, M2>(int x, string y)
```
Expand Down Expand Up @@ -154,7 +154,7 @@ The `TimeSpan` instance.
- `ArgumentException`: The argument is incorrect.
- `ApplicationException`: Something went wrong.

### [Method<M0, M1, M2>(short, string)](../src/Core/Samples/Sample.cs#L128)
### [Method<M0, M1, M2>(short, string)](../src/Core/Samples/Sample.cs#L137)
```cs
public TimeSpan Method<M0, M1, M2>(short x, string y)
```
Expand Down
46 changes: 0 additions & 46 deletions docs/SummaryPipelineExtensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,3 @@ Specifies the logger factory to use for pipes inside the pipeline.
_This method should be called _before_ anything else so that_
_given logger factory is passed into all subsequent calls._

### [UseDefaultFilters(SummaryPipeline)](../src/Core/Pipelines/SummaryPipelineExtensions.cs#L25)
```cs
public static SummaryPipeline UseDefaultFilters(this SummaryPipeline self)
```

Enables default filters for the given pipeline (i.e. a filter that removes all non-public members).

### [IncludeAtLeast(SummaryPipeline, AccessModifier)](../src/Core/Pipelines/SummaryPipelineExtensions.cs#L40)
```cs
public static SummaryPipeline IncludeAtLeast(this SummaryPipeline self, AccessModifier access)
```

Includes only members that have at least the given access modifier.

#### Example
In order to include both `internal` and `public` members in the generated docs,
you can call this method as follows:
```cs
var pipeline = ...;

pipeline.IncludeAtLeast(AccessModifier.Internal);
```

### [IncludeOnly(SummaryPipeline, AccessModifier)](../src/Core/Pipelines/SummaryPipelineExtensions.cs#L55)
```cs
public static SummaryPipeline IncludeOnly(this SummaryPipeline self, AccessModifier access)
```

Includes only members that have at least the given access modifier.

#### Example
In order to include onl `internal` members in the generated docs,
you can call this method as follows:
```cs
var pipeline = ...;

pipeline.IncludeOnly(AccessModifier.Internal);
```

### [UseFilter(SummaryPipeline, IPipe<Doc, Doc>)](../src/Core/Pipelines/SummaryPipelineExtensions.cs#L62)
```cs
public static SummaryPipeline UseFilter(this SummaryPipeline self, IPipe<Doc, Doc> filter)
```

Adds the given filter into the pipeline.

0 comments on commit 7d40782

Please sign in to comment.