コード例 #1
0
ファイル: EngineBase.cs プロジェクト: Visyn/Visyn.Windows.Io
        /// <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);
        }
コード例 #2
0
 /// <summary>
 /// Event based upon supplied record information
 /// </summary>
 /// <param name="ri"></param>
 internal EventEngineBase(VisynRecordInfo ri) : base(ri)
 {
 }