Module csharp

Source
Expand description

Specialization for Csharp code generation.

§String Quoting in C#

Since C# uses UTF-16 internally, but literal strings support C-style family of escapes.

See c_family_write_quoted.

use genco::prelude::*;

let toks: csharp::Tokens = quote!("start π 😊 \n \x7f end");
assert_eq!("\"start \\u03c0 \\U0001f60a \\n \\x7f end\"", toks.to_string()?);

Structs§

BlockComment
Format a doc comment where each line is preceeded by ///.
Comment
Format a doc comment where each line is preceeded by //.
Config
Config data for Csharp formatting.
Csharp
Language specialization for C#.
Format
State using during formatting of C# language items.
Import
The import of a C# type using System.IO;.

Enums§

Any
A type-erased language item capable of holding any kind.

Functions§

block_comment
Format a doc comment where each line is preceeded by ///.
comment
Format a doc comment where each line is preceeded by //.
import
The import of a C# type using System.IO;.

Type Aliases§

Tokens
Tokens container specialization for C#.