public GameObject Create([NotNull] GameObject prefab, Vector3 position, Quaternion rotation)
        {
            if (prefab == null)
            {
                throw new ArgumentNullException(nameof(prefab));
            }

            GameObject obj = GameObject.Instantiate(prefab, position, rotation) as GameObject;

            //Decorate the current resolver with one that uses the contextual services
            IResolver resolver = new ContextualDependencyResolverDecorator(ResolverService, ServiceMap);

            //Inject using the decorated resolver
            InjectionStrategy.InjectDependencies <MonoBehaviour>(InjecteeLocator <MonoBehaviour> .Create(obj), resolver);

            return(obj);
        }
        public TComponentType AddTo <TComponentType>([NotNull] GameObject gameObject)
            where TComponentType : MonoBehaviour
        {
            if (gameObject == null)
            {
                throw new ArgumentNullException(nameof(gameObject));
            }

            TComponentType component = gameObject.AddComponent <TComponentType>();

            //Decorate the current resolver with one that uses the contextual services
            IResolver resolver = new ContextualDependencyResolverDecorator(this.ResolverService, ServiceMap);

            //Inject using the decorated resolver
            InjectionStrategy.InjectDependencies <MonoBehaviour>(component, resolver);

            return(component);
        }