Last active
August 29, 2015 13:56
-
-
Save urasandesu/9070203 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Urasandesu.Prig.Framework; | |
| [assembly: Indirectable(0x060002D2)] | |
| namespace System.Prig | |
| { | |
| public class PDateTime | |
| { | |
| public class NowGet | |
| { | |
| NowGet() { } | |
| Func<bool> m_predicate; | |
| public static NowGet When(Func<bool> predicate) | |
| { | |
| return new NowGet() { m_predicate = predicate }; | |
| } | |
| public IndirectionFunc<DateTime> Body | |
| { | |
| set | |
| { | |
| var info = new IndirectionInfo(); | |
| info.AssemblyName = "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; | |
| info.Token = 0x060002D2; | |
| var holder = LooseCrossDomainAccessor.GetOrRegister<IndirectionHolder<IndirectionFunc<IndirectionFunc<DateTime>>>>(); | |
| holder.AddOrUpdate(info, () => m_predicate() ? value : null); | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment