public void SetFieldValue(byte fieldNum, int fieldArrayIndex, Object value, String subfieldName) { Field testField = new Field(this.GetField(fieldNum)); Subfield subfield = testField.GetSubfield(subfieldName); if ((subfield != null) && !(subfield.CanMesgSupport(this))) { return; } Field field = GetField(fieldNum); if (field == null) { // We normally won't have fields attached to our skeleton message, // as we add values we need to add the fields too based on the mesg,field // combo in the profile. field = new Field(Profile.GetMesg(this.Num).GetField(fieldNum)); if (field.Num == Fit.FieldNumInvalid) { // If there was no info in the profile our FieldNum will get set to invalid, // at least preserve FieldNum while we know it field.Num = fieldNum; } SetField(field); } field.SetValue(fieldArrayIndex, value, subfieldName); }
public object GetFieldValue(byte fieldNum, int fieldArrayIndex, ushort subFieldIndex) { Field field = GetField(fieldNum); if (field == null) { return(null); } if (subFieldIndex == Fit.SubfieldIndexActiveSubfield) { return(field.GetValue(fieldArrayIndex, GetActiveSubFieldIndex(fieldNum))); } else { Subfield subfield = field.GetSubfield(subFieldIndex); if ((subfield == null) || (subfield.CanMesgSupport(this))) { return(field.GetValue(fieldArrayIndex, subFieldIndex)); } else { return(null); } } }
public int GetNumFieldValues(byte fieldNum, ushort subfieldIndex) { Field field = GetField(fieldNum); if (field == null) { return(0); } if (subfieldIndex == Fit.SubfieldIndexActiveSubfield) { return(field.GetNumValues()); } Subfield subfield = field.GetSubfield(subfieldIndex); if ((subfield == null) || (subfield.CanMesgSupport(this))) { return(field.GetNumValues()); } else { return(0); } }
public void SetFieldValue(String name, int fieldArrayIndex, Object value) { Field testField = new Field(this.GetField(name)); Subfield subfield = testField.GetSubfield(name); if ((subfield != null) && !(subfield.CanMesgSupport(this))) { return; } Field field = GetField(name, false); if (field == null) { field = new Field(Profile.GetMesg(this.Num).GetField(name)); SetField(field); } field.SetValue(fieldArrayIndex, value, name); }
public object GetFieldValue(string name, int fieldArrayIndex) { Field field = GetField(name, false); if (field == null) { return(null); } Subfield subfield = field.GetSubfield(name); if ((subfield == null) || (subfield.CanMesgSupport(this))) { return(field.GetValue(fieldArrayIndex, name)); } else { return(null); } }
public object GetFieldValue(byte fieldNum, int fieldArrayIndex, string subfieldName) { Field field = GetField(fieldNum); if (field == null) { return(null); } Subfield subfield = field.GetSubfield(subfieldName); if ((subfield == null) || (subfield.CanMesgSupport(this))) { return(field.GetValue(fieldArrayIndex, subfieldName)); } else { return(null); } }
public int GetNumFieldValues(byte fieldNum, string subfieldName) { Field field = GetField(fieldNum); if (field == null) { return(0); } Subfield subfield = field.GetSubfield(subfieldName); if ((subfield == null) || (subfield.CanMesgSupport(this))) { return(field.GetNumValues()); } else { return(0); } }
public void SetFieldValue(String name, int fieldArrayIndex, Object value) { Field testField = new Field(this.GetField(name)); Subfield subfield = testField.GetSubfield(name); if ((subfield != null) && !(subfield.CanMesgSupport(this))) { return; } Field field = GetField(name, false); if (field == null) { field = new Field(Profile.GetMesg(this.Num).GetField(name)); SetField(field); } field.SetValue(fieldArrayIndex, value, name); }
public void SetFieldValue(byte fieldNum, int fieldArrayIndex, Object value, String subfieldName) { Field testField = new Field(this.GetField(fieldNum)); Subfield subfield = testField.GetSubfield(subfieldName); if ((subfield != null) && !(subfield.CanMesgSupport(this))) { return; } Field field = GetField(fieldNum); if (field == null) { // We normally won't have fields attached to our skeleton message, // as we add values we need to add the fields too based on the mesg,field // combo in the profile. field = new Field(Profile.GetMesg(this.Num).GetField(fieldNum)); if (field.Num == Fit.FieldNumInvalid) { // If there was no info in the profile our FieldNum will get set to invalid, // at least preserve FieldNum while we know it field.Num = fieldNum; } SetField(field); } field.SetValue(fieldArrayIndex, value, subfieldName); }