/// <summary> /// Configures the underlying container to use /// the specified instance whenever an instance of the interface type /// in the container is resolved. /// </summary> /// <param name="implementation"> /// Specifies the instance to be used. /// </param> /// <exception cref="ArgumentNullException"> /// Thrown when <paramref name="implementation"/> is <c>null</c>. /// </exception> public void Use(object implementation) { Guard.AgainstArgumentNull(implementation, "implementation"); _registrar.Store(new ObjectMapping(_interfaceType, implementation)); }