Skip to content

Instantly share code, notes, and snippets.

@urasandesu
Created February 1, 2014 12:01
Show Gist options
  • Save urasandesu/8751367 to your computer and use it in GitHub Desktop.
Save urasandesu/8751367 to your computer and use it in GitHub Desktop.
using Urasandesu.Prig.Framework;
[assembly: Indirectable(0x060002D2)]
namespace System.Prig
{
public class PDateTime
{
public static class NowGet
{
public static IndirectionFunc<DateTime> Body
{
set
{
var info = new IndirectionInfo();
info.AssemblyName = "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
info.Token = 0x060002D2;
if (value == null)
{
var holder = default(IndirectionHolder<IndirectionFunc<DateTime>>);
if (LooseCrossDomainAccessor.TryGet(out holder))
{
var method = default(IndirectionFunc<DateTime>);
holder.TryRemove(info, out method);
}
}
else
{
var holder = LooseCrossDomainAccessor.GetOrRegister<IndirectionHolder<IndirectionFunc<DateTime>>>();
holder.AddOrUpdate(info, value);
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment