Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Pitt Mark-RSK

View GitHub Profile
View switchOnType.dart
class Cat {
String meow() => 'meow';
}
String foo(dynamic a) {
switch (a.runtimeType) {
case String:
return 'str';
case int:
return 'int';
View CreateJsReportInstance.cs
private static IRenderService CreateJsReportInstance(bool useWeb)
{
IReportingBinary binary = null;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
binary = jsreport.Binary.Ph2.JsReportBinary.GetBinary();
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
binary = jsreport.Binary.Linux.Ph2.JsReportBinary.GetBinary();
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
binary = jsreport.Binary.OSX.Ph2.JsReportBinary.GetBinary();