Banking.AU.Common.Converters.EnumConverter.FieldToString C# (CSharp) Method

FieldToString() public method

public FieldToString ( object from ) : string
from object
return string
        public override string FieldToString(object from)
        {
            if (from == null)
                return string.Empty;

            if (_lookup.ContainsKey(from))
                return _lookup[from];
            return base.FieldToString(from);
        }

Usage Example

Ejemplo n.º 1
0
        public void From_transaction_code()
        {
            // Arrange
            var c = new EnumConverter(typeof(TransactionCode));

            // Act
            var result = c.FieldToString(TransactionCode.CreditItem);

            // Assert
            Assert.AreEqual("50", result);
        }
All Usage Examples Of Banking.AU.Common.Converters.EnumConverter::FieldToString