-
-
Notifications
You must be signed in to change notification settings - Fork 3
Configurations
Cesil distinguishes between Options and configurations:
- A set of Options describes the format being read or written
- A configuration binds a set of Options to a type
Cesil supports binding to static types, and binding to .NET's dynamic
(a "static dynamic type").
Once bound, a configuration is responsible for creating readers and writers. Cesil represents a bound configuration with the IBoundConfiguration<T>
interface.
All methods for creating IBoundConfiguration<T>
are on Configuration
.
To bind to a static type T
call Configuration.For<T>()
(to use Options.Default
for Options), or call Configuration.For<T>(Options)
(to use custom Options).
To bind to dynamic
call Configuration.ForDynamic()
(to use Options.DynamicDefault
for Options), or call Configuration.ForDynamic(Options)
(to use custom Options).
All of the members of Configuration
are thread safe, as are the members on the returned IBoundConfiguration<T>
instances.