Michael Jarvis

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure#

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

  • Sed ut perspiciatis unde omnis iste natus
  • Nemo enim ipsam voluptatem quia voluptas
  • Neque porro quisquam est qui dolorem

Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus.

Code sample#

Curabitur pretium tincidunt lacus, with some inline code and a link.

Program.cs
public static class Program
{
public static void Main() => Console.WriteLine("Lorem ipsum");
}

Code from a real file#

This block is imported from src/snippets/Greeter.cs, so the example stays in sync with real source. It shows line numbers, a title, and collapsed sections that expand on click.

Greeter.cs
3 collapsed lines
using System;
namespace Demo;
public class Greeter
{
private readonly string _greeting;
public Greeter(string greeting = "Hello")
{
_greeting = greeting;
}
public string Greet(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException("A name is required.", nameof(name));
}
return $"{_greeting}, {name}!";
}
}
8 collapsed lines
public static class Program
{
public static void Main(string[] args)
{
var greeter = new Greeter();
Console.WriteLine(greeter.Greet(args.Length > 0 ? args[0] : "world"));
}
}

Lines can be marked, or shown as an insertion or deletion:

Marking lines
public string Greet(string name)
{
var greeting = "Hello";
var old = $"Hi {name}";
var line = $"{greeting}, {name}!";
return line;
}

And a terminal block:

Terminal window
dotnet new console -n Lorem
dotnet run

Callouts#

NOTE

Useful information that readers should know, even when skimming.

TIP

Helpful advice for doing things better, with inline code and links too.

IMPORTANT

Key information users need to know to succeed.

WARNING

Urgent info that needs immediate user attention to avoid problems.

CAUTION

Advises about risks or negative outcomes of certain actions.

Tables#

LifetimeCreatedTypical use
TransientEvery timeLightweight services
ScopedOnce per requestDbContext
SingletonOnce per appCaches, config

Flowchart#

Diagrams are written as text and rendered at build time, so they ship as plain SVG.

yes

no

Request

Authenticated?

Controller

401 Unauthorized

Database

Response

Sequence diagram#

SQL ServerASP.NET CoreClientSQL ServerASP.NET CoreClientGET /orders/42SELECT * FROM Ordersrow200 OK (JSON)

Embeds#

A video URL on a line by itself becomes a click-to-play embed:

Play

Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus.

← Back to BlogSubscribe via RSS