public string Execute(string iUnitContent, SuggestedUnitStructure iSuggestedStructure, IList<string> iIgnoredUnits)
        {
            string vInterface, vImplementation;
            SuggestedUnitStructure vSuggestedStructure = RemoveIgnoredUnits(iSuggestedStructure.Clone(), iIgnoredUnits);
            UsesClauseReader.ExtractUses(iUnitContent, out vInterface, out vImplementation);
            string vResult = iUnitContent;
            vResult = CleanUpInterface(vResult, vInterface, vSuggestedStructure);
            vResult = CleanUpImplementation(vResult, vImplementation, vSuggestedStructure);

            return vResult;
        }
Example #2
0
        public string Execute(string iUnitContent, SuggestedUnitStructure iSuggestedStructure, IList <string> iIgnoredUnits)
        {
            string vInterface, vImplementation;
            SuggestedUnitStructure vSuggestedStructure = RemoveIgnoredUnits(iSuggestedStructure.Clone(), iIgnoredUnits);

            UsesClauseReader.ExtractUses(iUnitContent, out vInterface, out vImplementation);
            string vResult = iUnitContent;

            vResult = CleanUpInterface(vResult, vInterface, vSuggestedStructure);
            vResult = CleanUpImplementation(vResult, vImplementation, vSuggestedStructure);

            return(vResult);
        }
Example #3
0
        protected SuggestedUnitStructure RemoveIgnoredUnits(SuggestedUnitStructure iSuggestedUnitStructure, IList <string> iIgnoredUnits)
        {
            List <string> vList = new List <string>(iIgnoredUnits);

            for (int vUnitIdx = 0; vUnitIdx < vList.Count; vUnitIdx++)
            {
                vList[vUnitIdx] = vList[vUnitIdx].ToLower();
            }

            SuggestedUnitStructure vResult = iSuggestedUnitStructure.Clone();

            RemoveUnits(vResult.MoveToInterface, vList);
            RemoveUnits(vResult.ToDelete, vList);
            return(vResult);
        }
        protected SuggestedUnitStructure RemoveIgnoredUnits(SuggestedUnitStructure iSuggestedUnitStructure, IList<string> iIgnoredUnits)
        {
            List<string> vList = new List<string>(iIgnoredUnits);
            for (int vUnitIdx = 0; vUnitIdx < vList.Count; vUnitIdx++)
                vList[vUnitIdx] = vList[vUnitIdx].ToLower();

            SuggestedUnitStructure vResult = iSuggestedUnitStructure.Clone();
            RemoveUnits(vResult.MoveToInterface, vList);
            RemoveUnits(vResult.ToDelete, vList);
            return vResult;
        }