dotnet / dotnet/docfx

Question: Extract multiple sections of code from external class files for one .NET API Type

Open
#9,446 0 comments 0 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Describe the bug**
I would like to include multiple code snippets from external .cs files into a .NET API Reference html page.

#### This works

One code snippet from an external cs file:

```
---
uid: ArcGIS.Core.Data.DataStore
example: [*content]
---
Opening a File Geodatabase given the path
[!code-csharp[Foo](..\\src\\ProSnippetsCore.cs#L50-L70)]

---
```

#### This does not work

Add 2 code snippets to the same class

```
---
uid: ArcGIS.Core.Data.DataStore
example: [*content]
---
Opening a File Geodatabase given the path
[!code-csharp[Foo](..\\src\\ProSnippetsCore.cs#L72-L111)]

Opening a File Geodatabase given the path 2
[!code-csharp[Foo](..\\src\\ProSnippetsCore.cs#L120-L130)]

---
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.