Exemplo n.º 1
0
        /// <summary>
        /// Create and engine on type with specified encoding
        /// </summary>
        /// <param name="recordType">Class to base engine on</param>
        /// <param name="encoding">encoding of the file</param>
        protected EngineBase(Type recordType, Encoding encoding)
        {
            if (recordType == null)
            {
                throw new BadUsageException(Messages.Messages.Errors.NullRecordClass.Text);
            }

            if (recordType.IsValueType)
            {
                throw new BadUsageException(Messages.Messages.Errors.StructRecordClass
                                            .RecordType(recordType.Name)
                                            .Text);
            }
            RecordType = recordType;
            Encoding   = encoding;
            // What is delimiter???
            RecordInfo = VisynRecordInfo.Resolve(recordType);
            Options    = CreateRecordOptionsCore(RecordInfo);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Event based upon supplied record information
 /// </summary>
 /// <param name="ri"></param>
 internal EventEngineBase(VisynRecordInfo ri) : base(ri)
 {
 }