public void IsAssignableToString() { AbsoluteFilePath absolutePath = new AbsoluteFilePath(Path); string path = absolutePath; path.Should().Be(Path); }
public void Write(Features features, AbsoluteFilePath fulldgmlFileName) { var list = new List<FeatureInfo>(features.AllFeatures); foreach (FeatureInfo featureInfo in list.OrderBy(x => x.FeatureType)) { this.HandleNode(featureInfo, string.Empty); } this.WriteDgml(fulldgmlFileName); }
private void WriteDgml(AbsoluteFilePath fulldgmlFileName) { var documentFinal = new XDocument( new XDeclaration("1.0", "utf-8", string.Empty), new XElement( this.nameSpace + "DirectedGraph", new XElement(this.nameSpace + "Nodes", this.nodes), new XElement(this.nameSpace + "Links", this.links))); documentFinal.Save(fulldgmlFileName); }
private static void StartYEd(AbsoluteFilePath outputPath) { var yEd = new Process { StartInfo = { FileName = @"C:\Program Files (x86)\yWorks\yEd\yEd.exe", Arguments = outputPath } }; yEd.Start(); }
public void WriteTgfFile(AbsoluteFilePath outputPath, Features features) { using (var writer = new StreamWriter(outputPath)) { var list = new List<Type>(features.AllFeatures); foreach (var type in list) { writer.WriteLine(list.IndexOf(type) + " " + type.Name); } writer.WriteLine("#"); foreach (var dependency in features.References) { writer.WriteLine( list.IndexOf(dependency.Feature) + " " + list.IndexOf(dependency.NeededFeature)); } } }
public void WriteTgfFile( AbsoluteFilePath outputPath, Features features, bool includeFactories, bool includeDependencies) { using (var writer = new StreamWriter(outputPath)) { var list = new List<FeatureInfo>(features.AllFeatures); foreach (var featureInfo in list) { var feature = $"{list.IndexOf(featureInfo)} {featureInfo.Feature.Name}"; if (includeFactories && featureInfo.Factory != null) { feature += $" Factory = {featureInfo.Factory?.Name}"; } if (includeDependencies && featureInfo.Dependencies.Any()) { feature += $" Dependencies = {string.Join(", ", featureInfo.Dependencies.Select(d => d.Name))}"; } writer.WriteLine(feature); } var index = list.Select(i => i.Feature).ToList(); writer.WriteLine("#"); foreach (var dependency in features.References) { writer.WriteLine( index.IndexOf(dependency.Feature) + " " + index.IndexOf(dependency.NeededFeature)); } } }
public void RepresentsAnAbsoluteFilePath() { var absoluteFilePath = new AbsoluteFilePath(Path); absoluteFilePath.Value.Should().Be(Path); }
private static void StartYEd(AbsoluteFilePath yedPath, AbsoluteFilePath outputPath) { using (var yEd = new Process()) { yEd.StartInfo = new ProcessStartInfo(yedPath, outputPath); yEd.Start(); } }
private CommandLineArguments(AbsoluteFilePath outputPath, AbsoluteFolderPath assemblyFolder, bool successful) { this.OutputPath = outputPath; this.AssemblyFolder = assemblyFolder; this.Successful = successful; }
public static CommandLineArguments CreateSuccessful( AbsoluteFilePath outputPath, AbsoluteFolderPath assemblyFolder) { return new CommandLineArguments(outputPath, assemblyFolder, true); }