コード例 #1
0
		/// <summary>
		///		Get the value of the segment (if any).
		/// </summary>
		/// <param name="evaluationContext">
		///		The current template evaluation context.
		/// </param>
		/// <returns>
		///		The segment value, or <c>null</c> if the segment is missing.
		/// </returns>
		public override string GetValue(ITemplateEvaluationContext evaluationContext)
		{
			if (evaluationContext == null)
				throw new ArgumentNullException("evaluationContext");

			return _value;
		}
コード例 #2
0
		/// <summary>
		///		Get the value of the segment (if any).
		/// </summary>
		/// <param name="evaluationContext">
		///		The current template evaluation context.
		/// </param>
		/// <returns>
		///		The segment value, or <c>null</c> if the segment has no value.
		/// </returns>
		public override string GetValue(ITemplateEvaluationContext evaluationContext)
		{
			if (evaluationContext == null)
				throw new ArgumentNullException("evaluationContext");

			return evaluationContext[_templateParameterName, _isOptional];
		}
コード例 #3
0
        /// <summary>
        ///		Get the value of the segment (if any).
        /// </summary>
        /// <param name="evaluationContext">
        ///		The current template evaluation context.
        /// </param>
        /// <returns>
        ///		The segment value, or <c>null</c> if the segment has no value.
        /// </returns>
        public override string GetValue(ITemplateEvaluationContext evaluationContext)
        {
            if (evaluationContext == null)
            {
                throw new ArgumentNullException(nameof(evaluationContext));
            }

            return(_queryParameterValue);
        }
コード例 #4
0
        /// <summary>
        ///		Get the value of the segment (if any).
        /// </summary>
        /// <param name="evaluationContext">
        ///		The current template evaluation context.
        /// </param>
        /// <returns>
        ///		The segment value, or <c>null</c> if the segment is missing.
        /// </returns>
        public override string GetValue(ITemplateEvaluationContext evaluationContext)
        {
            if (evaluationContext == null)
            {
                throw new ArgumentNullException(nameof(evaluationContext));
            }

            return(evaluationContext[_templateParameterName, _isOptional]);
        }
コード例 #5
0
        /// <summary>
        ///		Get the value of the segment (if any).
        /// </summary>
        /// <param name="evaluationContext">
        ///		The current template evaluation context.
        /// </param>
        /// <returns>
        ///		The segment value, or <c>null</c> if the segment is missing.
        /// </returns>
        public override string GetValue(ITemplateEvaluationContext evaluationContext)
        {
            if (evaluationContext == null)
            {
                throw new ArgumentNullException(nameof(evaluationContext));
            }

            return(String.Empty);
        }
コード例 #6
0
		/// <summary>
		///		Get the value of the segment (if any).
		/// </summary>
		/// <param name="evaluationContext">
		///		The current template evaluation context.
		/// </param>
		/// <returns>
		///		The segment value, or <c>null</c> if the segment has no value.
		/// </returns>
		public abstract string GetValue(ITemplateEvaluationContext evaluationContext);
コード例 #7
0
 /// <summary>
 ///		Get the value of the segment (if any).
 /// </summary>
 /// <param name="evaluationContext">
 ///		The current template evaluation context.
 /// </param>
 /// <returns>
 ///		The segment value, or <c>null</c> if the segment has no value.
 /// </returns>
 public abstract string GetValue(ITemplateEvaluationContext evaluationContext);