2021-10-01 09:09:20 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Service.MeterProcessState.Areas.HelpPage
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This represents an image sample on the help page. There's a display template named ImageSample associated with this class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ImageSample
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="ImageSample"/> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="src">The URL of an image.</param>
|
2022-10-19 10:58:08 +00:00
|
|
|
public ImageSample(String src)
|
2021-10-01 09:09:20 +00:00
|
|
|
{
|
|
|
|
|
if (src == null)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentNullException("src");
|
|
|
|
|
}
|
|
|
|
|
Src = src;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-19 10:58:08 +00:00
|
|
|
public String Src { get; private set; }
|
2021-10-01 09:09:20 +00:00
|
|
|
|
2022-10-19 10:58:08 +00:00
|
|
|
public override Boolean Equals(Object obj)
|
2021-10-01 09:09:20 +00:00
|
|
|
{
|
|
|
|
|
ImageSample other = obj as ImageSample;
|
|
|
|
|
return other != null && Src == other.Src;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-19 10:58:08 +00:00
|
|
|
public override Int32 GetHashCode()
|
2021-10-01 09:09:20 +00:00
|
|
|
{
|
|
|
|
|
return Src.GetHashCode();
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-19 10:58:08 +00:00
|
|
|
public override String ToString()
|
2021-10-01 09:09:20 +00:00
|
|
|
{
|
|
|
|
|
return Src;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|