public XElement Render() { return(new XElement(NodeName, new XAttribute(StubModeName, StubMode.ToString()), new XElement(DescrName, Description), TypeMap.Render(), new XElement(CallsName, Calls.Select(c => c.Render()).ToArray()))); }
public CallInfo FindCall(IMethodInvocation invocationInfo) { switch (StubMode) { case StubModeType.MethodName: return(FindCallByName(invocationInfo.MethodBase)); case StubModeType.MethodSignature: return(FindCallBySignature(invocationInfo.MethodBase)); case StubModeType.MethodArguments: return(FindCallByArguments(invocationInfo)); default: throw new InvalidOperationException("Unknown StubMode: " + StubMode.ToString()); } }