/// <summary>
 /// Checks whether given <paramref name="environment"/> satisfies all requirements imposed by <paramref name="application"/>.
 /// </summary>
 /// <exception cref="RequirementsCheckException">Some of application's requirements were not satisfied.</exception>
 public static void Check(
     [NotNull] IVostokApplication application,
     [NotNull] IVostokHostingEnvironment environment)
 {
     if (!TryCheck(application, environment, out var errors))
     {
         throw new RequirementsCheckException(application.GetType(), errors);
     }
 }
        private static IEnumerable <Type> GetApplicationTypes(IVostokApplication application)
        {
            yield return(application.GetType());

            if (application is CompositeApplication compositeApplication)
            {
                foreach (var type in compositeApplication.ApplicationTypes)
                {
                    yield return(type);
                }
            }
        }