A
Alhambra Eidos Development
Hi all,
I have this issue.
I have two enumerations like this:
namespace WcfServices.Contracts
{
[System.Runtime.Serialization.DataContract]
public enum TipoRol
{
[System.Runtime.Serialization.EnumMember]
NoEspecificado,
[System.Runtime.Serialization.EnumMember]
Tomador,
[System.Runtime.Serialization.EnumMember]
Propietario,
}
and other enumeration, with THE SAME VALUES, but in another namespace
namespace DomainModel
{
public enum TipoRol
{
NoEspecificado,
Tomador,
Propietario,
}
I want to create EnumMapper generic like this
T EnumMapper<T,K>(value)
I want use like this:
WcfServices.Contracts.TipoRol value1 =
EnumMapper<WcfServices.Contracts.TipoRol, DomainModel.TipoRol>(
DomainModel.TipoRol.Propietario);
DomainModel.TipoRol value2 = EnumMapper<DomainModel.TipoRol,
WcfServices.Contracts.TipoRol >(WcfServices.Contracts..Propietario);
any idea please ?? I will be very grateful
thanks in advance
I have this issue.
I have two enumerations like this:
namespace WcfServices.Contracts
{
[System.Runtime.Serialization.DataContract]
public enum TipoRol
{
[System.Runtime.Serialization.EnumMember]
NoEspecificado,
[System.Runtime.Serialization.EnumMember]
Tomador,
[System.Runtime.Serialization.EnumMember]
Propietario,
}
and other enumeration, with THE SAME VALUES, but in another namespace
namespace DomainModel
{
public enum TipoRol
{
NoEspecificado,
Tomador,
Propietario,
}
I want to create EnumMapper generic like this
T EnumMapper<T,K>(value)
I want use like this:
WcfServices.Contracts.TipoRol value1 =
EnumMapper<WcfServices.Contracts.TipoRol, DomainModel.TipoRol>(
DomainModel.TipoRol.Propietario);
DomainModel.TipoRol value2 = EnumMapper<DomainModel.TipoRol,
WcfServices.Contracts.TipoRol >(WcfServices.Contracts..Propietario);
any idea please ?? I will be very grateful
thanks in advance