public override void SetValue(string fieldName, string value) { switch (fieldName) { case Fields.Mode: Mode = (MzTab.MzTabMode) Enum.Parse(typeof (MzTab.MzTabMode), value, true); return; case Fields.Type: Type = (MzTab.MzTabType) Enum.Parse(typeof (MzTab.MzTabType), value, true); return; case Fields.Description: Description = value; return; case Fields.Title: Title = value; return; case Fields.Version: Version = value; return; case Fields.ID: ID = value; return; case Fields.ProteinQuantificationUnit: ProteinQuantificationUnit = new CVParamater(value); return; } if (fieldName.Contains("[")) { string condensedFieldName; List<int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName); switch (condensedFieldName) { case Fields.FixedMod: SetListValue(ref _fixedModifications, indices[0], new CVParamater(value)); return; case Fields.FixedModSite: SetListValue(ref _fixedModificationSites, indices[0], value); return; case Fields.VariableMod: SetListValue(ref _variableModifications, indices[0], new CVParamater(value)); return; case Fields.PsmSearchEngineScore: SetListValue(ref _psmSearchEngineScores, indices[0], new CVParamater(value)); return; case Fields.ProteinSearchEngineScore: SetListValue(ref _proteinSearchEngineScores, indices[0], new CVParamater(value)); return; case Fields.StudyVariableDescription: SetListValue(ref _studyVariableDescriptions, indices[0], value); return; case Fields.MsRunLocation: SetListValue(ref _msRunLocations, indices[0], value); return; case Fields.Software: SetListValue(ref _software, indices[0], new MzTabSoftware(new CVParamater(value))); return; case Fields.SoftwareSettings: SetFieldValue(ref _software, indices[0], sw => sw.Settings, value); return; } } //throw new ArgumentException("Unexpected field name: " + fieldName); }
public override void SetValue(string fieldName, string value) { switch (fieldName) { case Fields.Mode: Mode = (MzTab.MzTabMode)Enum.Parse(typeof(MzTab.MzTabMode), value, true); return; case Fields.Type: Type = (MzTab.MzTabType)Enum.Parse(typeof(MzTab.MzTabType), value, true); return; case Fields.Description: Description = value; return; case Fields.Title: Title = value; return; case Fields.Version: Version = value; return; case Fields.ID: ID = value; return; case Fields.ProteinQuantificationUnit: ProteinQuantificationUnit = new CVParamater(value); return; } if (fieldName.Contains("[")) { string condensedFieldName; List <int> indices = MzTab.GetFieldIndicies(fieldName, out condensedFieldName); switch (condensedFieldName) { case Fields.FixedMod: SetListValue(ref _fixedModifications, indices[0], new CVParamater(value)); return; case Fields.FixedModSite: SetListValue(ref _fixedModificationSites, indices[0], value); return; case Fields.VariableMod: SetListValue(ref _variableModifications, indices[0], new CVParamater(value)); return; case Fields.PsmSearchEngineScore: SetListValue(ref _psmSearchEngineScores, indices[0], new CVParamater(value)); return; case Fields.ProteinSearchEngineScore: SetListValue(ref _proteinSearchEngineScores, indices[0], new CVParamater(value)); return; case Fields.StudyVariableDescription: SetListValue(ref _studyVariableDescriptions, indices[0], value); return; case Fields.MsRunLocation: SetListValue(ref _msRunLocations, indices[0], value); return; case Fields.Software: SetListValue(ref _software, indices[0], new MzTabSoftware(new CVParamater(value))); return; case Fields.SoftwareSettings: SetFieldValue(ref _software, indices[0], sw => sw.Settings, value); return; } } //throw new ArgumentException("Unexpected field name: " + fieldName); }
public MzTabSoftware(CVParamater paramater) { Parameter = paramater; Settings = new List <string>(); }
public MzTabSoftware(CVParamater paramater) { Parameter = paramater; Settings = new List<string>(); }