CSMSL.Proteomics.ModificationSiteExtensions.ContainsSite C# (CSharp) Method

ContainsSite() public static method

public static ContainsSite ( this sites, ModificationSites otherSites ) : bool
sites this
otherSites ModificationSites
return bool
        public static bool ContainsSite(this ModificationSites sites, ModificationSites otherSites)
        {
            // By convention, if the other site is 'Any', they are always equal
            if (otherSites == ModificationSites.Any)
                return true;

            if (otherSites == ModificationSites.None)
                return sites == ModificationSites.None;

            return sites == otherSites;
        }
ModificationSiteExtensions