/// <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); }
public MethodFacts GetFacts(MethodBase method) { var entryPoint = method.UnwrapEntryPoint(); return _knownMethods[entryPoint]; }
/// <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); }