本文整理汇总了C#中IOutputFormatter类的典型用法代码示例。如果您正苦于以下问题:C# IOutputFormatter类的具体用法?C# IOutputFormatter怎么用?C# IOutputFormatter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IOutputFormatter类属于命名空间,在下文中一共展示了IOutputFormatter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderSelection
/// <summary>
/// Renders just the selection set completely.
/// </summary>
///
/// <param name="outputFormatter">
/// The output formatter.
/// </param>
///
/// <returns>
/// A string of HTML.
/// </returns>
public string RenderSelection(IOutputFormatter outputFormatter)
{
StringWriter writer = new StringWriter();
RenderSelection(outputFormatter, writer);
return writer.ToString();
}
示例2: MixinReferenceReportGenerator
public MixinReferenceReportGenerator(
InvolvedType involvedType,
IIdentifierGenerator<Assembly> assemblyIdentifierGenerator,
IIdentifierGenerator<Type> involvedTypeIdentifierGenerator,
IIdentifierGenerator<Type> interfaceIdentifierGenerator,
IIdentifierGenerator<Type> attributeIdentifierGenerator,
IRemotionReflector remotionReflector,
IOutputFormatter outputFormatter
)
{
ArgumentUtility.CheckNotNull ("involvedType", involvedType);
ArgumentUtility.CheckNotNull ("assemblyIdentifierGenerator", assemblyIdentifierGenerator);
ArgumentUtility.CheckNotNull ("involvedTypeIdentifierGenerator", involvedTypeIdentifierGenerator);
ArgumentUtility.CheckNotNull ("interfaceIdentifierGenerator", interfaceIdentifierGenerator);
ArgumentUtility.CheckNotNull ("attributeIdentifierGenerator", attributeIdentifierGenerator);
ArgumentUtility.CheckNotNull ("remotionReflector", remotionReflector);
ArgumentUtility.CheckNotNull ("outputFormatter", outputFormatter);
_involvedType = involvedType;
_assemblyIdentifierGenerator = assemblyIdentifierGenerator;
_involvedTypeIdentifierGenerator = involvedTypeIdentifierGenerator;
_interfaceIdentifierGenerator = interfaceIdentifierGenerator;
_attributeIdentifierGenerator = attributeIdentifierGenerator;
_remotionReflector = remotionReflector;
_outputFormatter = outputFormatter;
}
示例3: JsonResult
/// <summary>
/// Creates a new <see cref="JsonResult"/> with the given <paramref name="value"/>.
/// </summary>
/// <param name="value">The value to format as JSON.</param>
/// <param name="formatter">The formatter to use, or <c>null</c> to choose a formatter dynamically.</param>
public JsonResult(object value, IOutputFormatter formatter)
{
Value = value;
Formatter = formatter;
ContentTypes = new List<MediaTypeHeaderValue>();
}
示例4: InvolvedTypeReportGenerator
public InvolvedTypeReportGenerator(
InvolvedType[] involvedTypes,
IIdentifierGenerator<Assembly> assemblyIdentifierGenerator,
IIdentifierGenerator<Type> involvedTypeIdentifierGenerator,
IIdentifierGenerator<MemberInfo> memberIdentifierGenerator,
IIdentifierGenerator<Type> interfaceIdentifierGenerator,
IIdentifierGenerator<Type> attributeIdentifierGenerator,
IRemotionReflector remotionReflector,
IOutputFormatter outputFormatter)
{
ArgumentUtility.CheckNotNull ("involvedTypes", involvedTypes);
ArgumentUtility.CheckNotNull ("assemblyIdentifierGenerator", assemblyIdentifierGenerator);
ArgumentUtility.CheckNotNull ("involvedTypeIdentifierGenerator", involvedTypeIdentifierGenerator);
ArgumentUtility.CheckNotNull ("memberIdentifierGenerator", memberIdentifierGenerator);
ArgumentUtility.CheckNotNull ("interfaceIdentifierGenerator", interfaceIdentifierGenerator);
ArgumentUtility.CheckNotNull ("attributeIdentifierGenerator", attributeIdentifierGenerator);
ArgumentUtility.CheckNotNull ("remotionReflector", remotionReflector);
ArgumentUtility.CheckNotNull ("outputFormatter", outputFormatter);
_involvedTypes = involvedTypes;
_assemblyIdentifierGenerator = assemblyIdentifierGenerator;
_involvedTypeIdentifierGenerator = involvedTypeIdentifierGenerator;
_memberIdentifierGenerator = memberIdentifierGenerator;
_interfaceIdentifierGenerator = interfaceIdentifierGenerator;
_attributeIdentifierGenerator = attributeIdentifierGenerator;
_remotionReflector = remotionReflector;
_outputFormatter = outputFormatter;
}
示例5: TargetCallDependenciesReportGenerator
public TargetCallDependenciesReportGenerator(ReflectedObject mixinDefinition, IIdentifierGenerator<Assembly> assemblyIdentifierGenerator, IRemotionReflector remotionReflector, IOutputFormatter outputFormatter)
{
_mixinDefinition = mixinDefinition;
_assemblyIdentifierGenerator = assemblyIdentifierGenerator;
_remotionReflector = remotionReflector;
_outputFormatter = outputFormatter;
}
示例6: FormatterSelected
public static void FormatterSelected(
this ILogger logger,
IOutputFormatter outputFormatter,
OutputFormatterWriteContext context)
{
var contentType = Convert.ToString(context.ContentType);
_formatterSelected(logger, outputFormatter, contentType, null);
}
示例7: DecoratedOutputFormatter
public DecoratedOutputFormatter(IOutputFormatter formatter, IAstVisitor visitor)
{
if (formatter == null)
throw new ArgumentNullException(nameof(formatter));
if (visitor == null)
throw new ArgumentNullException(nameof(visitor));
_formatter = formatter;
_visitor = visitor;
}
示例8: CodeCommentDecorator
/// <summary>
/// Initializes a new instance of <see cref="CodeCommentDecorator"/> with the provided
/// <paramref name="outputFormatter"/>.
/// </summary>
///
/// <param name="outputFormatter">
/// An <see cref="IOutputFormatter"/> implementation to which code documentation comments will be written.
/// </param>
public CodeCommentDecorator(IOutputFormatter outputFormatter)
{
if (outputFormatter == null)
{
Debug.Assert(false, "outputFormatter is null");
throw new ArgumentNullException("outputFormatter");
}
_formatter = outputFormatter;
}
示例9: CreateInterfaceReportGenerator
public static InterfaceReportGenerator CreateInterfaceReportGenerator(IRemotionReflector remotionReflector, IOutputFormatter outputFormatter, params InvolvedType[] types)
{
return new InterfaceReportGenerator (types,
new IdentifierGenerator<Assembly> (),
new IdentifierGenerator<Type> (),
new IdentifierGenerator<MemberInfo> (),
new IdentifierGenerator<Type> (),
remotionReflector,
outputFormatter);
}
示例10: CSharpOutputVisitor
public CSharpOutputVisitor (IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
{
if (formatter == null) {
throw new ArgumentNullException ("formatter");
}
if (formattingPolicy == null) {
throw new ArgumentNullException ("formattingPolicy");
}
this.formatter = formatter;
this.policy = formattingPolicy;
}
示例11: Configuration
public Configuration(IEnumerable<IFieldHarvester> fieldHarvesters,
IEnumerable<IValueConverter> valueConverters,
string indentIncrement,
IOutputFormatter outputFormatter,
CultureInfo culture)
{
this.valueConverters = valueConverters.ToList();
this.fieldHarvesters = fieldHarvesters.ToList();
IndentIncrement = indentIncrement;
OutputFormatter = outputFormatter;
Culture = culture;
}
示例12: AdditionalDependencyReportGenerator
public AdditionalDependencyReportGenerator(
ReflectedObject explicitDependencies,
IIdentifierGenerator<Type> involvedTypeIdentifierGenerator,
IOutputFormatter outputFormatter)
{
ArgumentUtility.CheckNotNull ("explicitDependencies", explicitDependencies);
ArgumentUtility.CheckNotNull ("involvedTypeIdentifierGenerator", involvedTypeIdentifierGenerator);
ArgumentUtility.CheckNotNull ("outputFormatter", outputFormatter);
_explicitDependencies = explicitDependencies;
_involvedTypeIdentifierGenerator = involvedTypeIdentifierGenerator;
_outputFormatter = outputFormatter;
}
示例13: CreateInvolvedTypeReportGenerator
public static InvolvedTypeReportGenerator CreateInvolvedTypeReportGenerator(IRemotionReflector remotionReflector, IOutputFormatter outputFormatter, params InvolvedType[] involvedTypes)
{
var assemblyIdentifierGenerator = StubFactory.CreateIdentifierGeneratorStub (new Assembly[0]);
var involvedTypeIdentifierGenerator = StubFactory.CreateIdentifierGeneratorStub (involvedTypes.Select (t => t.Type));
return new InvolvedTypeReportGenerator (involvedTypes,
assemblyIdentifierGenerator,
involvedTypeIdentifierGenerator,
new IdentifierGenerator<MemberInfo> (),
new IdentifierGenerator<Type> (),
new IdentifierGenerator<Type> (),
remotionReflector,
outputFormatter);
}
示例14: FullReportGenerator
public FullReportGenerator(
InvolvedType[] involvedTypes,
ErrorAggregator<Exception> configurationErrors,
ErrorAggregator<Exception> validationErrors,
IRemotionReflector remotionReflector,
IOutputFormatter outputFormatter)
{
ArgumentUtility.CheckNotNull ("_involvedTypes", involvedTypes);
ArgumentUtility.CheckNotNull ("configurationErrors", configurationErrors);
ArgumentUtility.CheckNotNull ("validationErrors", validationErrors);
ArgumentUtility.CheckNotNull ("remotionReflector", remotionReflector);
ArgumentUtility.CheckNotNull ("outputFormatter", outputFormatter);
_involvedTypes = involvedTypes;
_configurationErrors = configurationErrors;
_validationErrors = validationErrors;
_remotionReflector = remotionReflector;
_outputFormatter = outputFormatter;
}
示例15: MemberReportGenerator
public MemberReportGenerator(
Type type,
InvolvedType involvedTypeOrNull,
IIdentifierGenerator<Type> involvedTypeIdentifierGeneratorOrNull,
IIdentifierGenerator<MemberInfo> memberIdentifierGeneratorOrNull,
IOutputFormatter outputFormatter)
{
ArgumentUtility.CheckNotNull ("type", type);
// may be null
// ArgumentUtility.CheckNotNull ("involvedTypeOrNull", involvedTypeOrNull);
// ArgumentUtility.CheckNotNull ("involvedTypeIdentifierGeneratorOrNull", involvedTypeIdentifierGeneratorOrNull);
// ArgumentUtility.CheckNotNull ("memberIdentifierGeneratorOrNull", memberIdentifierGeneratorOrNull);
ArgumentUtility.CheckNotNull ("outputFormatter", outputFormatter);
_type = type;
_involvedType = involvedTypeOrNull;
_involvedTypeIdentifierGenerator = involvedTypeIdentifierGeneratorOrNull;
_memberIdentifierGenerator = memberIdentifierGeneratorOrNull;
_outputFormatter = outputFormatter;
_memberSignatureUtility = new MemberSignatureUtility (outputFormatter);
}