using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Intel.Management.PSModule.Amt { class ValueMap { int _intValue; string _stringValue; private ValueMap(int intValue, string stringValue) { _intValue =intValue; _stringValue=stringValue; } public int Value { get { return _intValue; } } public override string ToString() { return _stringValue; } public static ValueMap Create(string value, IDictionary mappedValues) { ValueMap result = null; string stringValue; if (mappedValues.TryGetValue(value, out stringValue)) { result = new ValueMap(int.Parse(value), stringValue); } else { result = new ValueMap(int.Parse(value), value); } return result; } } }