private void writePluginType(IPluginTypeConfiguration pluginType) { _writer.AddDivider('-'); var contents = new[] { "{0} ({1})".ToFormat(pluginType.PluginType.GetName(), pluginType.PluginType.GetFullName()), string.Empty, string.Empty }; if (pluginType.Default != null) { setContents(contents, pluginType.Default); } _writer.AddText(contents); if (pluginType.Lifecycle != null) { _writer.AddContent("Scoped as: " + pluginType.Lifecycle); } else { _writer.AddContent("Scoped as: PerRequest/Transient"); } foreach (InstanceRef instance in pluginType.Instances) { writeInstance(instance); } }
private void writePluginType(IPluginTypeConfiguration pluginType) { _writer.AddDivider('-'); var contents = new[] { "{0}".ToFormat(pluginType.PluginType.GetTypeName()), pluginType.PluginType.Namespace, string.Empty, string.Empty, string.Empty }; if (pluginType.Default != null) { setContents(contents, pluginType.Default); if (contents[4].IsEmpty()) { contents[4] = "(Default)"; } else { contents[4] += " (Default)"; } } _writer.AddText(contents); foreach (var instance in pluginType.Instances) { writeInstance(instance); } if (pluginType.MissingNamedInstance != null) { writeInstance(pluginType.MissingNamedInstance, "*Missing Named Instance*"); } if (pluginType.Fallback != null) { writeInstance(pluginType.Fallback, "*Fallback*"); } }
private void writeContentsOfPluginTypes(IEnumerable <IPluginTypeConfiguration> pluginTypes) { _writer = new TextReportWriter(5); _instances = new List <Instance>(); _writer.AddDivider('='); _writer.AddText("PluginType", "Namespace", "Lifecycle", "Description", "Name"); pluginTypes.OrderBy(x => x.PluginType.Name).Each(writePluginType); _writer.AddDivider('='); _writer.Write(_stringWriter); }
private void writeContentsOfPluginTypes(StringWriter stringWriter) { _writer = new TextReportWriter(3); _instances = new List<InstanceRef>(); _writer.AddDivider('='); _writer.AddText("PluginType", "Name", "Description"); foreach (IPluginTypeConfiguration pluginType in _graph.GetPluginTypes(null)) { writePluginType(pluginType); } _writer.AddDivider('='); _writer.Write(stringWriter); }
private void writeContentsOfPluginTypes(StringWriter stringWriter) { _writer = new TextReportWriter(3); _instances = new List <InstanceRef>(); _writer.AddDivider('='); _writer.AddText("PluginType", "Name", "Description"); foreach (IPluginTypeConfiguration pluginType in _graph.GetPluginTypes(null)) { writePluginType(pluginType); } _writer.AddDivider('='); _writer.Write(stringWriter); }
public void TryWithTwoColumnsAndSomeDividers() { var writer = new TextReportWriter(2); writer.AddDivider('='); writer.AddText("Name", "City"); writer.AddDivider('='); writer.AddText("Jeremy", "Austin"); writer.AddText("Jessica", "Little Rock"); writer.AddText("Natalie", "Bentonville"); writer.AddDivider('-'); writer.AddText("Monte", "Joplin"); writer.AddText("aaaaaaaaaaaaaaaaaaaaaaaaaa", "Joplin"); writer.AddText("aaaaaaaaaaa", "Joplin adsf asdf asdf asdf"); writer.AddDivider('='); writer.DumpToConsole(); }
private void writeContentsOfPluginTypes(IEnumerable<IPluginTypeConfiguration> pluginTypes) { _writer = new TextReportWriter(5); _instances = new List<Instance>(); _writer.AddDivider('='); _writer.AddText("PluginType", "Namespace", "Lifecycle", "Description", "Name"); pluginTypes.OrderBy(x => x.PluginType.Name).Each(writePluginType); _writer.AddDivider('='); _writer.Write(_stringWriter); }