public static ICmsHost RegisterHost()
{
ICmsHost cmsHost;
using (var container = ContextScopeProvider.CreateChildContainer())
{
if (container == null)
{
throw new CmsException("Better CMS dependencies container is not initialized.");
}
cmsHost = container.Resolve<ICmsHost>();
if (cmsHost == null)
{
throw new CmsException("Better CMS host context was not created.");
}
}
return cmsHost;
}