66 lines
2.3 KiB
C#
66 lines
2.3 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="CleanUrlParamModel.cs" company="BTU/IIT">
|
|
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
|
// </copyright>
|
|
// <author>Stubbfel</author>
|
|
// <date>15.10.2013</date>
|
|
// <summary>Implements the clean URL parameter model class</summary>
|
|
//-----------------------------------------------------------------------
|
|
namespace CampusAppWPortalLib8.Model.Utility
|
|
{
|
|
/// <summary> This class is a Model for the URLParameter like GET-Parameter. </summary>
|
|
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
|
/// <seealso cref="T:CampusAppWPortalLib8.Model.Utility.UrlParamModel"/>
|
|
public class CleanUrlParamModel : UrlParamModel
|
|
{
|
|
#region Constructor
|
|
|
|
/// <summary> Initializes a new instance of the CleanUrlParamModel class. </summary>
|
|
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
|
/// <param name="key"> the key for the parameter. </param>
|
|
public CleanUrlParamModel(string key)
|
|
: base(key)
|
|
{
|
|
}
|
|
|
|
/// <summary> Initializes a new instance of the CleanUrlParamModel class. </summary>
|
|
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
|
/// <param name="key"> the key for the parameter. </param>
|
|
/// <param name="value"> The value. </param>
|
|
public CleanUrlParamModel(string key, string value)
|
|
: base(key, value)
|
|
{
|
|
}
|
|
#endregion
|
|
|
|
#region Proberty
|
|
|
|
/// <summary> Gets the token, which indicate that the parameterList started. </summary>
|
|
/// <seealso cref="P:CampusAppWPortalLib8.Model.Utility.UrlParamModel.ParamToken"/>
|
|
public override string ParamToken
|
|
{
|
|
get
|
|
{
|
|
return string.Empty;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
/// <summary> Method return a formatted string like Key=Value. </summary>
|
|
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
|
/// <seealso cref="M:CampusAppWPortalLib8.Model.Utility.UrlParamModel.ToString()"/>
|
|
public override string ToString()
|
|
{
|
|
if (!this.IsParamValid())
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
return "/" + this.key + "/" + this.Value;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|