CSMSL.Analysis.Quantitation.QuantitationChannelSet.GetQuantChannelModifications C# (CSharp) Method

GetQuantChannelModifications() public static method

public static GetQuantChannelModifications ( Peptide peptide ) : HashSet
peptide Peptide
return HashSet
        public static HashSet<QuantitationChannelSet> GetQuantChannelModifications(Peptide peptide)
        {
            HashSet<QuantitationChannelSet> sets = new HashSet<QuantitationChannelSet>();
            IMass[] mods = peptide.Modifications;
            int modLength = mods.Length;

            for (int i = 0; i < modLength; i++)
            {
                if (mods[i] != null)
                {
                    IMass mod = mods[i];

                    QuantitationChannelSet quantSetMod;
                    ModificationCollection modCol;
                    if ((modCol = mod as ModificationCollection) != null)
                    {
                        foreach (IMass mod2 in modCol)
                        {
                            if ((quantSetMod = mod2 as QuantitationChannelSet) != null)
                            {
                                sets.Add(quantSetMod);
                            }
                        }
                    }
                    else if ((quantSetMod = mod as QuantitationChannelSet) != null)
                    {
                        sets.Add(quantSetMod);
                    }
                }
            }
            return sets;
        }