Пример #1
0
        public void AddInvocationOperation(InvocationDescriptor invocationDescriptor, InvocationOperation invocationOperation)
        {
            var mockAndMethod = new MockAndMethod(invocationDescriptor);
            var sub           = table.GetOrAdd(mockAndMethod, add => new MockMethodInvocationOperationManagerFinder());

            sub.AddInvocationOperation(invocationDescriptor, invocationOperation);
        }
Пример #2
0
        public bool TryFind(InvocationDescriptor invocationDescriptor, out InvocationOperationManager invocationOperationManager)
        {
            invocationOperationManager = null;
            var mockAndMethod = new MockAndMethod(invocationDescriptor);
            MockMethodInvocationOperationManagerFinder mockMethodInvocationOperationManagerFinder;

            return(table.TryGetValue(mockAndMethod, out mockMethodInvocationOperationManagerFinder) &&
                   mockMethodInvocationOperationManagerFinder.TryFind(invocationDescriptor, out invocationOperationManager));
        }