Skip to main content

Xamarin Workbooks

I started experimenting with Xamarin Workbooks as a new(better) way to create my API documentation. Workbooks are an interactive combination of executable code snippets and markdown documentation.

image

Xamarin Workbooks is a cross platform tool both available for Windows and Mac. Download information is available here: https://developer.xamarin.com/guides/cross-platform/workbooks/install/

After installation, it is time to create your first workbook:

  • Open Xamarin Workbooks. The new C# workbook window is shown. You can choose between a Console iOS, Android or WPF app(at the moment of writing).
    • Xamarin Workbooks uses the concept of agents. Agents are responsible to inject and execute your code in a specific application type. This means there is a seperate agent for WPF, iOS, Android,…
  • Let’s start simple and choose Console.

image

  • You are welcomed by a blank workbook.

image

  • In the workbook you can add two types of cells, either an executable C# cell or a documentation cell. Click on the + or “ button to add a new cell.

image

  • In a C# cell you can enter your C# code. The workbook will provide code completion, syntax coloring, inline live-diagnostics, and multi-line statement support to optimize the editing experience.

image

  • To execute the code you can hit <enter>, click on the play button or press <control>+<return>.

image

  • In a Documentation cell you can enter any documentation including images. Formatting is done using the MarkDown format

image

Some annoyances I have at the moment:

  • I noticed that the editing experience isn’t bug free yet. I got some strange behavior.
  • I couldn’t find a way to include my own assemblies or use my own NuGet server.
  • Compilation is (too) slow.
  • No undo functionality(yet).

It will be interesting to see how this application evolves…

Popular posts from this blog

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Color B

Help! I accidently enabled HSTS–on localhost

I ran into an issue after accidently enabling HSTS for a website on localhost. This was not an issue for the original website that was running in IIS and had a certificate configured. But when I tried to run an Angular app a little bit later on http://localhost:4200 the browser redirected me immediately to https://localhost . Whoops! That was not what I wanted in this case. To fix it, you need to go the network settings of your browser, there are available at: chrome://net-internals/#hsts edge://net-internals/#hsts brave://net-internals/#hsts Enter ‘localhost’ in the domain textbox under the Delete domain security policies section and hit Delete . That should do the trick…

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.