/// <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; }
/// <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]; }
/// <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); }
/// <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]); }
/// <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); }
/// <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);