Skip to content

Instantly share code, notes, and snippets.

@urasandesu
Created February 1, 2014 12:07
Show Gist options
  • Save urasandesu/8751433 to your computer and use it in GitHub Desktop.
Save urasandesu/8751433 to your computer and use it in GitHub Desktop.
using Urasandesu.Prig.Framework;
[assembly: Indirectable(0x06000293)]
namespace System.Prig
{
public static class PException
{
public static class InternalToString
{
public static IndirectionFunc<string> Body
{
set
{
var t = typeof(Exception);
var info = new IndirectionInfo();
info.AssemblyName = t.Assembly.FullName;
info.Token = 0x06000293;
if (value == null)
{
var holder = default(IndirectionHolder<IndirectionFunc<string>>);
if (LooseCrossDomainAccessor.TryGet(out holder))
{
var method = default(IndirectionFunc<string>);
holder.TryRemove(info, out method);
}
}
else
{
var holder = LooseCrossDomainAccessor.GetOrRegister<IndirectionHolder<IndirectionFunc<string>>>();
holder.AddOrUpdate(info, value);
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment