Example #1
0
        /// <summary>
        /// Instantiates a <see cref="SeccsFormatter{TBuffer}"/> with additional formatters and default options.
        /// </summary>
        /// <param name="formats">The additional formatters to be used</param>
        /// <param name="options">The options object, or null for default</param>
        public SeccsFormatter(IEnumerable <ITypeFormat> formats, SeccsOptions options = null)
        {
            this.Formats = new TypeFormatCollection <TBuffer>();
            this.Options = options ?? new SeccsOptions();

            Formats.Register(DefaultFormats);
            Formats.Register(formats);
        }
Example #2
0
 /// <summary>
 /// Instantiates a <see cref="SeccsFormatter{TBuffer}"/> with no additional formatters and default options.
 /// </summary>
 /// <param name="options">The options object, or null for default</param>
 public SeccsFormatter(SeccsOptions options = null) : this(Enumerable.Empty <ITypeFormat>(), options)
 {
 }