Skip to content

Instantly share code, notes, and snippets.

View heytherewill's full-sized avatar

William Barbosa heytherewill

View GitHub Profile
@heytherewill
heytherewill / EntryPoint.cs
Last active June 20, 2018 01:42
Basic IL modification
public class EntryPoint
{
public static void Main(string[] args)
{
// 1
var assemblyLocation = Assembly.GetExecutingAssembly().Location;
var pathToOriginalDll =
Path.GetFullPath(Path.Combine(assemblyLocation, "../path/to/your.dll"));
// 2
using Android.App;
using Android.OS;
using Android.Support.Design.Widget;
using Android.Support.V7.App;
namespace LeakTest
{
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)]
public class MainActivity : AppCompatActivity
{
@heytherewill
heytherewill / Observable.cs
Last active September 2, 2020 11:59
Use the common method names in Rx.Net instead of using the LINQ ones.
using System.Collections.Generic;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace System.Reactive.ApiMappings
{
public static class ObservableEx
{
@heytherewill
heytherewill / RxMappings.csv
Created March 3, 2019 20:03
Rx.NET mappings
Rx.NET name Reactive Extensions name
Observable.Return Observable.just
Select map
SelectMany flatMap
Where filter
Aggregate reduce
Debounce throttle
Synchronize serialize