This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net6.0</TargetFramework> | |
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | |
</PropertyGroup> | |
<Target Name="GenerateCsharp" BeforeTargets="BeforeBuild" KeepDuplicateOutputs="true"> | |
<WriteLinesToFile File="Program.generated.cs" Overwrite="true" Encoding="Unicode" Lines="$([System.IO.File]::ReadAllText('Program.java').Replace('main','Main').Replace('System.out.println','System.Console.WriteLine'))" /> | |
<ItemGroup> | |
<Compile Include="Program.generated.cs" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HtmlAgilityPack; | |
namespace ConsoleApp7; | |
public record CistEvent( | |
string SubjectShortName, // e.g. Фіз, Про | |
string EventType, // e.g. Лб | |
string Place, // e.g. 165-3 | |
DateOnly Date, // e.g. 02.11.2022 | |
int Number, // e.g. 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Interceptors; | |
public class FirstInterceptor : IInterceptor | |
{ | |
public async Task InvokeAsync(PipelineStep next, EventContext ctx) | |
{ | |
Console.WriteLine($"Hello from interceptor {nameof(FirstInterceptor)}"); | |
await next.Invoke(ctx); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Context | |
{ | |
public int Counter { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DependencyUtils | |
open Autofac | |
open Microsoft.Extensions.Configuration | |
let addTransientAs<'service, 'implementation> (services: ContainerBuilder) = | |
services.RegisterType<'implementation>().As<'service>() |> ignore | |
services | |
let addScopedAs<'service, 'implementation> (services: ContainerBuilder) = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MicroCosmo.Parser | |
open Piglet.Parser.Configuration | |
open Piglet.Parser | |
open MicroCosmo.Ast | |
open MicroCosmo.ParsingUtilities | |
open MicroCosmo.CompilerErrors | |
// Piglet configurator | |
let configurator = ParserFactory.Configure<obj>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
for (int i = 0; i < 10; i++) | |
{ | |
Console.Write(Prime(i) + " "); |