예제 #1
0
파일: Dare.cs 프로젝트: ggrov/tacny
 public DareController(Program program, IRemover remover)
 {
     Contract.Requires(program != null);
     Program = program;
     if (!IsProgramValid())
         throw new NotValidException();
     var removalTypeFinder = new RemovableTypeFinder(program);
     AllRemovableTypes = removalTypeFinder.FindRemovables();
     Remover = remover;
 }
예제 #2
0
        public DareController(Program program, IRemover remover)
        {
            Contract.Requires(program != null);
            Program = program;
            if (!IsProgramValid())
            {
                throw new NotValidException();
            }
            var removalTypeFinder = new RemovableTypeFinder(program);

            AllRemovableTypes = removalTypeFinder.FindRemovables();
            Remover           = remover;
        }
예제 #3
0
        public SimplificationData FastRemoveAllInMethods(StopChecker stopChecker, List <MemberDecl> members)
        {
            var remover          = new SimultaneousAllTypeRemover(Program);
            var newAllRemovables = new AllRemovableTypes();

            foreach (var member in members)
            {
                if (!AllRemovableTypes.RemovableTypesInMethods.ContainsKey(member))
                {
                    continue;
                }
                newAllRemovables.RemovableTypesInMethods.Add(member, AllRemovableTypes.RemovableTypesInMethods[member]);
            }
            var simpData = remover.Remove(newAllRemovables, stopChecker);

            return(simpData);
        }
예제 #4
0
파일: Dare.cs 프로젝트: ggrov/tacny
 public SimplificationData FastRemoveAllInMethods(StopChecker stopChecker, List<MemberDecl> members)
 {
     var remover = new SimultaneousAllTypeRemover(Program);
     var newAllRemovables = new AllRemovableTypes();
     foreach (var member in members) {
         if(!AllRemovableTypes.RemovableTypesInMethods.ContainsKey(member))
             continue;
         newAllRemovables.RemovableTypesInMethods.Add(member, AllRemovableTypes.RemovableTypesInMethods[member]);
     }
     var simpData = remover.Remove(newAllRemovables, stopChecker);
     return simpData;
 }