You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ to the organization of the docs for .NET. Some of the articles will have more th
7
7
8
8
The content team tracks issues for .NET documentation in the [dotnet/docs](https://github.com/dotnet/docs) and [dotnet/dotnet-api-docs](https://github.com/dotnet/dotnet-api-docs) repositories. Issues are turned off on this repository. File issues against existing samples and suggestions for new samples in those repositories. If you're not sure where, choose [dotnet/docs](https://github.com/dotnet/docs/issues). This process keeps the issues associated with the articles that explain the concepts for each sample. The best process is to file an issue from the feedback control at the bottom of each docs page:
9
9
10
-
- For existing samples, file the issue on the page with the sample.
10
+
- For existing samples, file the issue on the page with the sample.
11
11
- To suggest new samples, file the issue on the index page where you want to see the new sample.
12
12
13
13
There are two classes of code in this repository:
@@ -26,7 +26,7 @@ project. Ideally, add tests for correctness on samples as well.
26
26
27
27
Snippets are extracted from small programs that include the snippet. Snippets are all located in the top level **/snippets** folder. While snippets are small blocks of code, we want to move toward snippets that are part of buildable sample projects.
28
28
29
-
## Building a snippet or sample
29
+
## Building a snippet or sample
30
30
31
31
You build any .NET Core snippet or sample using the .NET Core CLI, which can be installed with [the .NET Core SDK](https://www.microsoft.com/net/download). Then, execute
32
32
these commands from the CLI in the directory of any sample:
@@ -43,9 +43,9 @@ Multi-project samples have instructions in their root directory in
43
43
a `README.md` file.
44
44
45
45
Except where noted, all samples build from the command line on
46
-
any platform supported by .NET Core. There are a few samples that are
47
-
specific to Visual Studio and require Visual Studio 2017 or later. In
48
-
addition, some samples show platform-specific features and will require
46
+
any platform supported by .NET Core. There are a few samples that are
47
+
specific to Visual Studio and require Visual Studio 2017 or later. In
48
+
addition, some samples show platform-specific features and will require
49
49
a specific platform. Other samples and snippets require the .NET Framework
50
50
and will run on Windows platforms, and will need the Developer Pack for
51
51
the target Framework version.
@@ -90,7 +90,7 @@ To create a sample:
90
90
}
91
91
}
92
92
```
93
-
93
+
94
94
5. Don't check in the solution file if it contains only one project.
95
95
96
96
Tobuildandrunyoursample:
@@ -100,12 +100,13 @@ To build and run your sample:
100
100
```console
101
101
dotnet build
102
102
```
103
+
103
104
2. Run your sample:
104
105
105
106
```console
106
107
dotnet run
107
108
```
108
109
109
-
3. Add a *README.md* to the root directory of your sample.
110
+
3. Add a *README.md* to the root directory of your sample.
110
111
111
112
This should include a brief description of the code, and refer people to the article that references the sample.
Copy file name to clipboardExpand all lines: async/async-and-await/cs/readme.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ name: "Async Sample: Asynchronous Programming with Async and Await in C#"
9
9
urlFragment: "async-and-await-cs"
10
10
description: "A .NET Core WPF application that contains the example method from Asynchronous Progamming with Async and Await in C#."
11
11
---
12
-
# Async programming with async and await in C#
12
+
# Async programming with async and await in C\#
13
13
14
14
This sample is a WPF application written in C# that contains the example method from [Task asynchronous programming model](https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/async/task-asynchronous-programming-model). The article gives an overview of asynchronous programming, including when to use it and how to write an async method. This sample contains an async function that is used as an illustration.
15
15
@@ -27,22 +27,22 @@ This sample is written in C# and targets .NET Core 3.0 running on Windows. It re
27
27
28
28
To download and run the sample, follow these steps:
29
29
30
-
1. Download and unzip the sample.
31
-
32
-
2. In Visual Studio (2019 or later):
33
-
30
+
1. Download and unzip the sample.
31
+
32
+
2. In Visual Studio (2019 or later):
33
+
34
34
1. On the menu bar, choose **File** > **Open** > **Project/Solution**.
35
-
35
+
36
36
2. Navigate to the folder that holds the unzipped sample code, and open the c# project (.csproj) file.
37
-
37
+
38
38
3. Choose the <kbd>F5</kbd> key to run with debugging, or <kbd>Ctrl</kbd>+<kbd>F5</kbd> keys to run the project without debugging.
39
39
40
40
3. From the command line:
41
41
42
42
1. Navigate to the folder that holds the unzipped sample code.
Copy file name to clipboardExpand all lines: core/console-apps/NewTypesMsBuild/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ dotnet test
25
25
26
26
`dotnet test` runs the configured tests.
27
27
28
-
`dotnet build` will follow the dependency on the `NewTypesMsBuild` project and build both the app and unit tests projects. It implicitly runs `dotnet restore` on .NET Core 2.0 and later versions. If you're using .NET Core 1.0 or .NET Core 1.1, you first have to run `dotnet restore` yourself.
28
+
`dotnet build` will follow the dependency on the `NewTypesMsBuild` project and build both the app and unit tests projects. It implicitly runs `dotnet restore` on .NET Core 2.0 and later versions. If you're using .NET Core 1.0 or .NET Core 1.1, you first have to run `dotnet restore` yourself.
29
29
30
30
<aname="dotnet-restore-note"></a>
31
31
**Note:** Starting with .NET Core 2.0 SDK, you don't have to run [`dotnet restore`](https://docs.microsoft.com/dotnet/core/tools/dotnet-restore) because it's run implicitly by all commands that require a restore to occur, such as `dotnet new`, `dotnet build` and `dotnet run`. It's still a valid command in certain scenarios where doing an explicit restore makes sense, such as [continuous integration builds in Azure DevOps Services](https://docs.microsoft.com/azure/devops/build-release/apps/aspnet/build-aspnet-core) or in build systems that need to explicitly control the time at which the restore occurs.
Copy file name to clipboardExpand all lines: core/encoding/cyrillic-to-latin/cs/readme.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ name: ".NET Core Cyrillic to Latin Transliteration Utility (C#)"
8
8
urlFragment: "cyrillic-transliteration-cs"
9
9
description: "A .NET Core console application written in C# that uses the encoding fallback functionality to transliterate Cyrillic to Latin characters."
10
10
---
11
-
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12
-
to their Latin equivalents. It uses a modified Library of Congress system for
11
+
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12
+
to their Latin equivalents. It uses a modified Library of Congress system for
13
13
transliteration. Its syntax is:
14
14
15
15
```
@@ -20,24 +20,24 @@ where *sourceFile* is the path and filename of a text file that contains modern
20
20
characters, and *destinationFile* is the name of the text file that will store the
21
21
original text with its Cyrillic characters replaced by transliterated Latin characters.
22
22
If a file path is included in *destinationFile* and any portion of that path does
23
-
not exist, the utility terminates.
23
+
not exist, the utility terminates.
24
24
25
25
The specific mappings of upper- and lower-case Cyrillic characters
26
-
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
26
+
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
27
27
class, where the entries of a case mapping table named `table` are defined.
28
28
29
-
The utility illustrates the extensibility of character encoding in the .NET
30
-
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31
-
responsible for translating a sequence of characters into a sequence of bytes. The
29
+
The utility illustrates the extensibility of character encoding in the .NET
30
+
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31
+
responsible for translating a sequence of characters into a sequence of bytes. The
32
32
decoder is responsible for translating the sequence of bytes into a sequence of
33
33
characters. .NET Core supports ASCII as well as the standard Unicode
34
34
encodings and allows the [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) class to be overridden to support otherwise
35
-
unsupported encodings. It also allows an encoder and a decoder's handling of
35
+
unsupported encodings. It also allows an encoder and a decoder's handling of
36
36
unmapped characters and bytes to be customized. Broadly, an encoder or a decoder can handle data that it cannot map by throwing an exception or by using some alternate mapping. For more information, see [Character Encoding in .NET Framework](https://docs.microsoft.com/dotnet/standard/base-types/character-encoding).
37
37
38
38
The transliteration utility works by instantiating an [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) object that represents ASCII encoding, which supports ASCII characters in the range from U+00 to U+FF. Because modern Cyrillic characters occupy the range from U+0410 to U+044F, they do not automatically map to ASCII encoding. When the utility instantiates its Encoding object, it passes its constructor an instance of a class named `CyrillicToLatinFallback` that is derived from [EncoderFallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback). This class maintains an internal table that maps modern Cyrillic characters to one or more Latin characters.
39
39
40
40
When the encoder encounters a character that it cannot encode, it calls the fallback
41
-
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
41
+
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
42
42
the modern Cyrillic character mapping table. It then passes the `CyrillicToLatinFallbackBuffer`
43
-
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
43
+
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
Copy file name to clipboardExpand all lines: core/encoding/cyrillic-to-latin/vb/readme.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ name: ".NET Core Cyrillic to Latin Transliteration Utility (Visual Basic)"
8
8
urlFragment: "cyrillic-transliteration-vb"
9
9
description: "A .NET Core console application written in Visual Basic that uses the encoding fallback functionality to transliterate Cyrillic to Latin characters."
10
10
---
11
-
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12
-
to their Latin equivalents. It uses a modified Library of Congress system for
11
+
cyrillic-to-latin is a command-line utility that transliterates modern Cyrillic characters
12
+
to their Latin equivalents. It uses a modified Library of Congress system for
13
13
transliteration. Its syntax is:
14
14
15
15
```
@@ -20,24 +20,24 @@ where *sourceFile* is the path and filename of a text file that contains modern
20
20
characters, and *destinationFile* is the name of the text file that will store the
21
21
original text with its Cyrillic characters replaced by transliterated Latin characters.
22
22
If a file path is included in *destinationFile* and any portion of that path does
23
-
not exist, the utility terminates.
23
+
not exist, the utility terminates.
24
24
25
25
The specific mappings of upper- and lower-case Cyrillic characters
26
-
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
26
+
to Latin characters are listed in the constructor of the `CyrillicToLatinFallback`
27
27
class, where the entries of a case mapping table named `table` are defined.
28
28
29
-
The utility illustrates the extensibility of character encoding in the .NET
30
-
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31
-
responsible for translating a sequence of characters into a sequence of bytes. The
29
+
The utility illustrates the extensibility of character encoding in the .NET
30
+
Framework. An encoding system consists of an encoder and a decoder. The encoder is
31
+
responsible for translating a sequence of characters into a sequence of bytes. The
32
32
decoder is responsible for translating the sequence of bytes into a sequence of
33
33
characters. .NET Core supports ASCII as well as the standard Unicode
34
34
encodings and allows the [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) class to be overridden to support otherwise
35
-
unsupported encodings. It also allows an encoder and a decoder's handling of
35
+
unsupported encodings. It also allows an encoder and a decoder's handling of
36
36
unmapped characters and bytes to be customized. Broadly, an encoder or a decoder can handle data that it cannot map by throwing an exception or by using some alternate mapping. For more information, see [Character Encoding in .NET Framework](https://docs.microsoft.com/dotnet/standard/base-types/character-encoding).
37
37
38
38
The transliteration utility works by instantiating an [Encoding](https://docs.microsoft.com/dotnet/api/system.text.encoding) object that represents ASCII encoding, which supports ASCII characters in the range from U+00 to U+FF. Because modern Cyrillic characters occupy the range from U+0410 to U+044F, they do not automatically map to ASCII encoding. When the utility instantiates its Encoding object, it passes its constructor an instance of a class named `CyrillicToLatinFallback` that is derived from [EncoderFallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback). This class maintains an internal table that maps modern Cyrillic characters to one or more Latin characters.
39
39
40
40
When the encoder encounters a character that it cannot encode, it calls the fallback
41
-
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
41
+
object's [CreateFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallback.createfallbackbuffer) method. This method instantiates a `CyrillicToLatinFallbackBuffer` object (a subclass of the [EncoderFallbackBuffer](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer) class) and passes its constructor
42
42
the modern Cyrillic character mapping table. It then passes the `CyrillicToLatinFallbackBuffer`
43
-
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
43
+
object's [Fallback](https://docs.microsoft.com/dotnet/api/system.text.encoderfallbackbuffer.fallback) method each character that it is unable to encode, and if a mapping is available, the method can provide a suitable replacement.
Copy file name to clipboardExpand all lines: core/extensions/COMServerDemo/README.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,43 +1,40 @@
1
-
COM Server Demo
2
-
================
1
+
# COM Server Demo
3
2
4
3
This is a basic example of providing a managed COM server in .NET Core 3.0. Documentation on the inner workings of activation can be found [here](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/COM-activation.md).
5
4
6
-
Key Features
7
-
------------
5
+
## Key Features
8
6
9
7
Demonstrates how to provide a COM server in .NET Core 3.0 Preview 7 or later.
10
8
11
9
Additional comments are contained in source and project files.
12
10
13
-
Build and Run
14
-
-------------
11
+
## Build and Run
15
12
16
13
The project will only build and run on the Windows platform. You can build and run the example either by registering the COM server or by using registration-free COM.
17
14
18
-
### Registered COM ###
15
+
### Registered COM
19
16
20
-
1) Install .NET Core 3.0 Preview 7 or later.
17
+
1. Install .NET Core 3.0 Preview 7 or later.
21
18
22
-
1) Navigate to the root directory and run `dotnet.exe build`.
19
+
1. Navigate to the root directory and run `dotnet.exe build`.
23
20
24
-
1) Follow the instructions for COM server registration that were emitted during the build.
21
+
1. Follow the instructions for COM server registration that were emitted during the build.
25
22
26
-
1) Navigate to `COMClient/` and run `dotnet.exe run`.
23
+
1. Navigate to `COMClient/` and run `dotnet.exe run`.
27
24
28
25
Program should output an estimated value of π.
29
26
30
27
**Note** Remember to unregister the COM server when the demo is complete.
31
28
32
-
### RegFree COM ###
29
+
### RegFree COM
33
30
34
-
1) Install .NET Core 3.0 Preview 7 or later.
31
+
1. Install .NET Core 3.0 Preview 7 or later.
35
32
36
-
1) Navigate to the root directory and run `dotnet.exe build /p:RegFree=True`.
33
+
1. Navigate to the root directory and run `dotnet.exe build /p:RegFree=True`.
37
34
38
35
- If the Registered COM demo was previously run, the project should be cleaned first - `dotnet.exe clean`
39
36
40
-
1) Run the generated binary directly. For example, `COMClient\bin\Debug\netcoreapp3.0\COMClient.exe`.
37
+
1. Run the generated binary directly. For example, `COMClient\bin\Debug\netcoreapp3.0\COMClient.exe`.
41
38
42
39
Program should output an estimated value of π.
0 commit comments