using System;
namespace Domain
{
///
/// This represents the domain entity system-identifier.
///
public sealed class SystemIdentifier
{
#region member data
///
/// this is the system identifier
///
private Int64 sid;
#endregion member data
#region constructors
///
/// initialize with defaults
///
public SystemIdentifier()
{
}
///
/// initialize with specified identifier
///
/// system identifier
public SystemIdentifier(Int16 sid)
{
this.sid = sid;
}
///
/// initialize with specified identifier
///
/// system identifier
public SystemIdentifier(Int32 sid)
{
this.sid = sid;
}
///
/// initialize with specified identifier
///
/// system identifier
public SystemIdentifier(Int64 sid)
{
this.sid = sid;
}
///
/// initialize with specified identifier
///
/// system identifier
public SystemIdentifier(Decimal sid)
{
this.sid = Convert.ToInt64(sid);
}
///
/// initialize with specified identifier
///
/// system identifier
public SystemIdentifier(String sid)
{
this.sid = Convert.ToInt64(sid);
}
#endregion constructors
#region member functions
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator short(SystemIdentifier sid)
{
return Convert.ToInt16(sid.sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator SystemIdentifier(short sid)
{
return new SystemIdentifier(sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator int(SystemIdentifier sid)
{
return Convert.ToInt32(sid.sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator SystemIdentifier(int sid)
{
return new SystemIdentifier(sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator long(SystemIdentifier sid)
{
return sid.sid;
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator SystemIdentifier(long sid)
{
return new SystemIdentifier(sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator decimal(SystemIdentifier sid)
{
return Convert.ToDecimal(sid.sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator SystemIdentifier(decimal sid)
{
return new SystemIdentifier(sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator string(SystemIdentifier sid)
{
return Convert.ToString(sid.sid);
}
///
/// this implicitly casts SystemIdentifier
///
/// SystemIdentifier
/// casted sid
public static implicit operator SystemIdentifier(string sid)
{
return new SystemIdentifier(sid);
}
///
/// Returns a that represents the current
/// .
///
/// A that represents the current
/// .
public override string ToString()
{
return Convert.ToString(this.sid);
}
#endregion member functions
}
}