private static object ActivateAndInitialize(IScopeContextInternal context, Action <object> initializeMethod)
        {
            var instance = (context.CreatorMethod.IsInstance() ? context.CreatorMethod() : CreateInstance(context));

            if (initializeMethod.IsInstance())
            {
                initializeMethod(instance);
            }
            return(instance);
        }
        private static T ActivateAndInitialize <T>(IScopeContextInternal context, Action <T> initializeMethod)
        {
            var instance = (T)(context.CreatorMethod.IsInstance() ? context.CreatorMethod(context.ActivationScopeContext?.Resolver) : CreateInstance(context));

            if (initializeMethod.IsInstance())
            {
                initializeMethod(instance);
            }
            return(instance);
        }