Skip to content

Instantly share code, notes, and snippets.

@dunglas
Created May 25, 2020 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dunglas/ab8bb780387e6bad2f905dea60bd68d8 to your computer and use it in GitHub Desktop.
Save dunglas/ab8bb780387e6bad2f905dea60bd68d8 to your computer and use it in GitHub Desktop.
URI Template test in C#
using System;
using Tavis.UriTemplates;
public class Program
{
public static void Main()
{
var ut = new UriTemplate("https://example.net/{ip}");
var p = ut.GetParameters(new Uri("https://example.net/2001:db8::35"));
Console.WriteLine(p["ip"]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment