/// <summary> /// /// </summary> /// <param name="fieldNumber"></param> /// <returns></returns> public bool SetFieldPackager(int fieldNumber) { ISOPackager fieldPackager = m_packager.GetFieldPackager(fieldNumber); if (m_isoFields[fieldNumber] == null && fieldPackager != null) // field is not initialized and packager was intialzied from xml for this field { if (fieldPackager.IsComposite()) { // Logger.LogTrace("Field [" + fieldNumber.ToString().PadLeft(3, '0') + "] is composite , set ISOPackager = ISOMessageSubFields"); m_isoFields[fieldNumber] = new ISOFieldBitmapSubFields(Logger, (ISOFieldBitmapSubFieldsPackager)fieldPackager, fieldNumber); return(true); } else { // Logger.LogTrace("Field [" + fieldNumber.ToString().PadLeft(3, '0') + "] is NOT composite, set ISOPackager = ISOField"); m_isoFields[fieldNumber] = new ISOField(Logger, fieldPackager, fieldNumber); return(true); } } else { Logger.LogError("Field Packager was not initialized from XML Packager definition file"); return(false); } }
/// <summary> /// /// </summary> /// <param name="fieldNumber"></param> /// <returns></returns> public bool SetFieldPackager(int fieldNumber) { ISOPackager fieldPackager = m_packager.GetFieldPackager(fieldNumber); if (m_isoFields[fieldNumber] == null && fieldPackager != null) // field is not initialized and packager was intialzied from xml for this field { if (fieldPackager.IsComposite()) { m_isoFields[fieldNumber] = new ISOFieldBitmapSubFields(Logger, (ISOFieldBitmapSubFieldsPackager)fieldPackager, fieldNumber); return(true); } else { m_isoFields[fieldNumber] = new ISOField(Logger, fieldPackager, fieldNumber); return(true); } } else { Logger.LogError("Field Packager was not initialized from XML Packager definition file"); return(false); } }