コード例 #1
0
 private void CreateRecordOptions()
 {
     if (mRecordInfo.IsDelimited)
     {
         mOptions = new DelimitedRecordOptions(mRecordInfo);
     }
     else
     {
         mOptions = new FixedRecordOptions(mRecordInfo);
     }
 }
コード例 #2
0
ファイル: EngineBase.cs プロジェクト: jformacek/FileHelpers
        internal static RecordOptions CreateRecordOptionsCore(IRecordInfo info)
        {
            RecordOptions options;

            if (info.IsDelimited)
            {
                options = new DelimitedRecordOptions(info);
            }
            else
            {
                options = new FixedRecordOptions(info);
            }

            for (int index = 0; index < options.Fields.Count; index++)
            {
                var field = options.Fields[index];
                field.Parent      = options;
                field.ParentIndex = index;
            }

            return(options);
        }