public GodClassResults(Func <string, int, string> pathProcessor, TypeConstraints typeRelations, string results_directory = "results") { _pathProcessor = pathProcessor; _typeRelations = typeRelations; MiningResults = new List <SubTreeResults>(); ResultsDirectory = results_directory + "/"; try { if (!Directory.Exists(results_directory)) { Directory.CreateDirectory(results_directory); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); System.Environment.Exit(-1); } System.IO.DirectoryInfo di = new DirectoryInfo(results_directory); foreach (FileInfo file in di.GetFiles()) { file.Delete(); } foreach (DirectoryInfo dir in di.GetDirectories()) { dir.Delete(true); } }
public bool IsAssignableTo(string pattern, bool useRegularExpressions = false) { return(pattern != null && TypeConstraints.All(type => type.IsAssignableTo(pattern, useRegularExpressions))); }
public bool IsAssignableTo(IType assignableToType) { return(TypeConstraints.All(type => type.IsAssignableTo(assignableToType))); }
private TypeConstraint(TypeConstraints tag) { Tag = tag; }