public virtual void SetIdentifier(object identifier) { if (_hashCode.HasValue) { Throw.BadAct("Identifier can only be set once."); } _hashCode = HashCodeFor(identifier); }
public override ILifetimeScopeShim BeginLifetimeScope() { if (_scopeShim != null) { Throw.BadAct("A lifetime scope was already started."); } return(_scopeShim = new LifetimeScopeShim(this)); }
public T Resolve <T, TArg>(TArg constructorArg) { if (_scopeShim == null) { Throw.BadAct("Call Resolv.r.BeginLifetimeScope() before resolving anything."); } return(_scopeShim.Resolve <T, TArg>(constructorArg)); }
public T Resolve <T>() { if (_scopeShim == null) { Throw.BadAct("Call Resolv.r.BeginLifetimeScope() before resolving anything."); } return(_scopeShim.Resolve <T>()); }