/// <summary>
        /// Gets a creation method which instantiates the <see cref="IExpressionHost"/> instance for a given model.
        /// </summary>
        /// <returns>The expression host creator.</returns>
        /// <param name="assembly">Assembly.</param>
        /// <param name="model">Model.</param>
        private Func<IExpressionHost> GetExpressionHostCreator(Assembly assembly, ExpressionModel model)
        {
            if(assembly == null)
              {
            throw new ArgumentNullException(nameof(assembly));
              }

              var type = assembly.GetType(String.Concat(model.Namespace, ".", model.GetClassName()));
              if(type == null)
              {
            throw new CSharpExpressionExceptionException(Resources.ExceptionMessages.ExpressionTypeMustExist) {
              ExpressionText = model.ExpressionText
            };
              }

              return () => (IExpressionHost) Activator.CreateInstance(type);
        }