コード例 #1
0
        public static bool IsMarkerInUse(string marker, LawsuitDB DB)
        { // no Regex for speed
            string formattedMarker = "#" + marker + "#";

            foreach (Part part in DB.Parts)
            {
                if (part.PartText.Contains(formattedMarker))
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #2
0
        public static bool ValidateMarkers(Part part, LawsuitDB DB)
        {
            List <string> partMarkers = Utils.GetPartMarkers(DB, part);

            if (partMarkers.Count > 0)
            {
                List <string> existingMarkers = Utils.GetMarkers(DB);
                foreach (string partMarker in partMarkers)
                {
                    if (!existingMarkers.Contains(partMarker))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }