public ApiModelHandler Add(ApiModelHandler handler) { var tail = this; while (tail.Next != null) { tail = tail.Next; } tail.Next = handler; return(this); }
public SchemaGenerator(IApiModelResolver apiModelResolver, SchemaGeneratorOptions options) { _apiModelResolver = apiModelResolver; _options = options; _chainOfHandlers = new FileTypeHandler(options, this) .Add(new PolymorphicTypeHandler(options, this)) .Add(new ApiPrimitiveHandler(options, this)) .Add(new ApiDictionaryHandler(options, this)) .Add(new ApiArrayHandler(options, this)) .Add(new ApiObjectHandler(options, this)) .Add(new FallbackHandler(options, this)); }