public SuggestedUnitStructure Clone()
        {
            SuggestedUnitStructure vResult = new SuggestedUnitStructure();

            vResult.MoveToInterface.AddRange(MoveToInterface);
            vResult.ToDelete.AddRange(ToDelete);
            vResult.Uses.Interface.AddRange(Uses.Interface);
            vResult.Uses.Implementation.AddRange(Uses.Implementation);
            return(vResult);
        }
Пример #2
0
        protected static void ParseMatch(string aUnitName, UsesListType aUsesListType, string aModuleReport, SuggestedUnitStructureList aLists)
        {
            if (!aLists.ContainsKey(aUnitName))
            {
                aLists.Add(aUnitName, new SuggestedUnitStructure());
            }

            SuggestedUnitStructure vList = aLists[aUnitName];

            ExtractUnitNames(aModuleReport, aUsesListType, vList);
        }
Пример #3
0
        protected static void ExtractUnitNames(string iMatch, UsesListType iUsesType, SuggestedUnitStructure iUnitUses)
        {
            Regex           vRegExpr = new Regex(@"(-->|==>)?\s?(\w+)\s(in\simplementation|in\sinterface|unnecessary|source\snot\sfound)(?=\s\(|\r\n)", RegexOptions.IgnoreCase | RegexOptions.Singleline);
            MatchCollection vMatches = vRegExpr.Matches(iMatch);

            ExtractUnitsGroup(vMatches, "", (iUsesType == UsesListType.Interface ? iUnitUses.Uses.Interface : iUnitUses.Uses.Implementation));
            ExtractUnitsGroup(vMatches, "==>", iUnitUses.ToDelete);
            if (iUsesType == UsesListType.Interface)
            {
                ExtractUnitsGroup(vMatches, "-->", iUnitUses.MoveToInterface, iUnitUses.Uses.Implementation);
            }
        }