public static CustomFactory FromProxyModule(ProxyModule proxyModule) { return((CustomFactory)_accessor.GetOrCreateFrom(proxyModule, pm => new CustomFactory())); }
public static SafeFactory FromProxyModule(ProxyModule proxyModule) { return((SafeFactory)_accessor.GetOrCreateFrom(proxyModule, pm => new SafeFactory(pm))); }
public void UninitializedFactoryAccessorThrows() { var accessor = new FactoryAccessor(); Assert.Throws <InvalidOperationException>(() => accessor.GetOrCreateFrom(ProxyModule.Default, pm => new object())); }