public void Write(string oldAssembliesName, IEnumerable <IAssembly> oldAssemblies, string newAssembliesName, IEnumerable <IAssembly> newAssemblies) { AssemblySetMapping mapping; if (!string.IsNullOrEmpty(newAssembliesName)) { _settings.ElementCount = 2; mapping = new AssemblySetMapping(_settings); mapping.AddMappings(oldAssemblies, newAssemblies); } else { _settings.ElementCount = 1; mapping = new AssemblySetMapping(_settings); mapping.AddMapping(0, oldAssemblies); } if (oldAssembliesName != null) { using (_syntaxWriter.StartStyle(SyntaxStyle.Removed)) _syntaxWriter.Write("{0}", oldAssembliesName); _syntaxWriter.WriteLine(); } if (newAssembliesName != null) { using (_syntaxWriter.StartStyle(SyntaxStyle.Added)) _syntaxWriter.Write("{0}", newAssembliesName); _syntaxWriter.WriteLine(); } Visit(mapping); }
public override void Visit(AssemblySetMapping assemblySet) { if (this.IncludeAssemblyProperties && assemblySet.ElementCount > 1) { foreach (var assembly in assemblySet.Assemblies) { var attributes = assembly.Attributes.Where(e => DiffFilter.Include(e.Difference)); var properties = assembly.Properties.Where(e => DiffFilter.Include(e.Difference)); if (!attributes.Any() && !properties.Any()) { continue; } _syntaxWriter.WriteKeyword("assembly"); _syntaxWriter.WriteSpace(); _syntaxWriter.WriteIdentifier(assembly.Representative.Name.Value); using (_syntaxWriter.StartBraceBlock()) { Visit(properties); Visit(attributes); } } } base.Visit(assemblySet); }
public void Visit(IEnumerable<IAssembly> oldAssemblies, IEnumerable<IAssembly> newAssemblies) { Contract.Requires(oldAssemblies != null); Contract.Requires(newAssemblies != null); AssemblySetMapping mapping = new AssemblySetMapping(this.Settings); mapping.AddMappings(oldAssemblies, newAssemblies); Visit(mapping); }
public void Visit(IEnumerable <IAssembly> oldAssemblies, IEnumerable <IAssembly> newAssemblies) { Contract.Requires(oldAssemblies != null); Contract.Requires(newAssemblies != null); AssemblySetMapping mapping = new AssemblySetMapping(this.Settings); mapping.AddMappings(oldAssemblies, newAssemblies); Visit(mapping); }
public virtual void Visit(AssemblySetMapping assemblySet) { if (this.Settings.GroupByAssembly) { Visit(assemblySet.Assemblies); } else { Visit(assemblySet.Namespaces); } }
public virtual void Visit(AssemblySetMapping assemblySet) { if (this.Settings.GroupByAssembly) { Visit(assemblySet.Assemblies); } else { Visit(assemblySet.Namespaces); } }
public new void Write(string oldAssembliesName, IEnumerable <IAssembly> oldAssemblies, string newAssembliesName, IEnumerable <IAssembly> newAssemblies) { AssemblySetMapping mapping; if (!string.IsNullOrEmpty(newAssembliesName)) { _settings.ElementCount = 2; mapping = new AssemblySetMapping(_settings); mapping.AddMappings(oldAssemblies, newAssemblies); } else { _settings.ElementCount = 1; mapping = new AssemblySetMapping(_settings); mapping.AddMapping(0, oldAssemblies); } Visit(mapping); }
public virtual DifferenceType Diff <T>(IDifferences differences, ElementMapping <T> mapping) where T : class { if (mapping.ElementCount < 2) { return(DifferenceType.Unchanged); } MemberMapping member = mapping as MemberMapping; if (member != null) { return(Diff(differences, member)); } TypeMapping type = mapping as TypeMapping; if (type != null) { return(Diff(differences, type)); } NamespaceMapping ns = mapping as NamespaceMapping; if (ns != null) { return(Diff(differences, ns)); } AssemblyMapping asm = mapping as AssemblyMapping; if (asm != null) { return(Diff(differences, asm)); } AssemblySetMapping asmSet = mapping as AssemblySetMapping; if (asmSet != null) { return(Diff(differences, asmSet)); } return(DifferenceType.Unknown); }
public override void Visit(AssemblySetMapping mapping) { Visit(mapping.Differences); base.Visit(mapping); }
public virtual DifferenceType Diff(IDifferences differences, AssemblySetMapping mapping) { return(Diff(differences, mapping[0], mapping[1])); }
public override void Visit(AssemblySetMapping mapping) { Visit(mapping.Differences); base.Visit(mapping); }