Show Menu
Cheatography

Toolkit Cheat Sheet (DRAFT) by

toolkit funktions, windowspath, exceptions etc

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Errors

private string? Value
{
 get => this._myClass?
            .Value;
 set
 {
  _ = this._myClass 
  ?? Errors
     .UnableToAssignValue()
  this._myClass.Value = value;
  }
}
Property Wertüb­ergabe, Errors wirft Exception

Except­ions1

throw-­catch
 

ThrowIf

value.ThrowIf();
//Bsp 
value.ThrowIfNotDirectoryPath();
value.ThrowIfNullOrWhitespace;
//usw.
Je nach Datentyp unters­chi­edliche ThrowI­f-M­eth­oden. Erleic­htert Exception Throwing
 

window­spath (copy)


Console.Writeline("Hello World!");
Hello world

Precon­ditions

                  
public string Value {get;} 
=Preconditions.CheckIfNull(value)
Übergeben von Konstr­ukt­orp­ara­metern nach Null-Check ggf. an Proper­tiers