public ServiceData(Type serviceType, object instance, Func<Type, object> serviceFactory, bool shouldDispose)
{
if(null == serviceType)
{
throw new ArgumentNullException("serviceType");
}
if((null == instance) && (null == serviceFactory))
{
throw new ArgumentNullException("instance");
}
this.serviceType = serviceType;
this.instance = instance;
this.creator = serviceFactory;
this.shouldDispose = shouldDispose;
}