Skip to content

Instantly share code, notes, and snippets.

View Emzi0767's full-sized avatar

Mateusz Brawański Emzi0767

View GitHub Profile
@Emzi0767
Emzi0767 / EventDispatchData.cs
Last active August 5, 2019 20:42
Asynchronous Event Queue
internal interface IEventDispatchData<TSender, out TArgs>
where TArgs : AsyncEventArgs
{
Task InvokeAsync();
}
internal sealed class EventDispatchData<TSender, TArgs> : IEventDispatchData<TSender, TArgs>
where TArgs : AsyncEventArgs
{
public AsyncEvent<TSender, TArgs> Event { get; }
// Copyright 2020 Emzi0767
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@Emzi0767
Emzi0767 / EzPasswords.cs
Created September 22, 2020 16:45
Simple password-like string generator.
// Copyright 2020 Emzi0767
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@Emzi0767
Emzi0767 / Dictionary2Lookup.cs
Created September 22, 2020 16:47
An elaborate shitpost. Transforms TKey-indexed dictionaries into T-indexed lookups.
// Copyright 2020 Emzi0767
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,