public object MapToIdlEnum(System.Type clsType) { lock (m_enumSers.SyncRoot) { Serializer result = (Serializer)m_enumSers[clsType]; if (result == null) { if (ClsToIdlMapper.IsIdlEnum(clsType)) { result = new IdlEnumSerializer(clsType); } else { result = new EnumMapClsToIdlRangeSerializer(clsType); } m_enumSers[clsType] = result; } return(result); } }