Skip to content

Instantly share code, notes, and snippets.

@urasandesu
Created February 1, 2014 12:10
Show Gist options
  • Select an option

  • Save urasandesu/8751477 to your computer and use it in GitHub Desktop.

Select an option

Save urasandesu/8751477 to your computer and use it in GitHub Desktop.
using Urasandesu.Prig.Framework;
[assembly: Indirectable(0x06000B2B)]
namespace System.Prig
{
public static class PInt32
{
public static class TryParse
{
public static IndirectionOutFunc<string, int, bool> Body
{
set
{
var info = new IndirectionInfo();
info.AssemblyName = "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
info.Token = 0x06000B2B;
if (value == null)
{
var holder = default(IndirectionHolder<IndirectionOutFunc<string, int, bool>>);
if (LooseCrossDomainAccessor.TryGet(out holder))
{
var method = default(IndirectionOutFunc<string, int, bool>);
holder.TryRemove(info, out method);
}
}
else
{
var holder = LooseCrossDomainAccessor.GetOrRegister<IndirectionHolder<IndirectionOutFunc<string, int, bool>>>();
holder.AddOrUpdate(info, value);
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment