コード例 #1
0
ファイル: HandlebarsService.cs プロジェクト: odnodn/FuManchu
        /// <inheritdoc />
        public string RunHelper(string name, HelperOptions options)
        {
            Func <HelperOptions, string> func;

            if (_helpers.TryGetValue(name, out func))
            {
                return(func(options));
            }

            throw new ArgumentException("No helper called '" + name + "' has been registered.");
        }
コード例 #2
0
		/// <inheritdoc />
		public string RunHelper(string name, HelperOptions options)
		{
			Func<HelperOptions, string> func;
			if (_helpers.TryGetValue(name, out func))
			{
				return func(options);
			}

			throw new ArgumentException("No helper called '" + name + "' has been registered.");
		}