/// <summary> /// Gets a callback that creates an instance of the <see cref="MockProvider"/>. /// </summary> /// <returns>The created callback.</returns> public static Func<IContext, IProvider> GetCreationCallback(MockingKernel mockingKernel) { return ctx => { var provider = new MockProvider(ctx.Kernel.Components.Get<IInjectorFactory>()); mockingKernel.AddProvider(provider); return provider; }; }
internal void AddProvider(MockProvider provider) { mockProviders.Add(provider); provider.MockCreated += new MockCreatedEventHandler(provider_MockCreated); }