Class SchemaFileSet
A set of schema files parsed together, so a file may refer to named types that another file defines, whatever the
order of the files. Used by the source generator and the avrosharp tool.
public sealed class SchemaFileSet
- Inheritance
-
SchemaFileSet
- Inherited Members
Remarks
Files are parsed in ordinal path order with one parser; a file whose references are not defined yet is retried after the others, until no more files can be parsed. Files that need each other's types are parsed by inlining the definitions one needs from the others at their first use (#16). A type repeated identically in several files (as schema sets written for Apache.Avro's one-file-at-a-time tooling often do) is accepted once.
Properties
- DefinedIn
Gets the path of the file that first defined each named type, by full name.
- Errors
Gets the error of each file that could not be parsed, by path.
- Schemas
Gets the schemas of the files that parsed, in the order they parsed.
- SchemasByPath
Gets the schema of each file that parsed, by path.
Methods
- GetErrorMessage(string)
Gets the error message of a file that could not be parsed. When the file defines again a type that another file defines differently, the message names that other file; when it uses a type that another file which could not be parsed defines, it names that file, and says whether the two files need each other's types.
- Parse(IEnumerable<(string Path, string Json)>, CancellationToken)
Parses schema files together.