Example #1
0
 /// <summary>
 /// Queries whether the universe contains information on a particular method or constructor
 /// </summary>
 /// <param name="method">method or constructor</param>
 /// <returns>whether the universe contains information on supplied method/constructor</returns>
 public bool HaveFacts(MethodBase method)
 {
     var entryPoint = method.UnwrapEntryPoint(); 
     return _knownMethods.IsCached(entryPoint);
 }
Example #2
0
 public MethodFacts GetFacts(MethodBase method)
 {
     var entryPoint = method.UnwrapEntryPoint();
     return _knownMethods[entryPoint];
 }
Example #3
0
 /// <summary>
 /// Adds a new method to the universe
 /// </summary>
 /// <param name="method">method to add</param>
 public void AddMethod(MethodBase method)
 {
     Contract.Requires<ArgumentNullException>(method != null);
     Contract.Requires<InvalidOperationException>(!IsCompleted, UniverseCompletedErrorMsg);
     var entryPoint = method.UnwrapEntryPoint();
     _knownMethods.Cache(entryPoint);
 }