示例#1
0
 public FileWriter(string filePath, IRecordFormatter recordFormatter, FileMode fileMode = FileMode.CreateNew, FileShare fileShare = FileShare.None)
     : base(recordFormatter)
 {
     this.FilePath  = filePath;
     this.FileMode  = fileMode;
     this.FileShare = fileShare;
 }
示例#2
0
 public DataImport(
     IDataSource dataSource,
     IDataDestination dataDestination,
     IRecordValidator recordValidator = null,
     IRecordMapper recordMapper       = null,
     IRecordFormatter recordFormatter = null)
     : this(dataSource, new IDataDestination[] { dataDestination }, recordValidator, recordMapper, recordFormatter)
 {
 }
示例#3
0
 public ParallelizedDataImport(
     IDataSource dataSource,
     IEnumerable <IDataDestination> dataDestinations,
     IRecordValidator recordValidator = null,
     IRecordMapper recordMapper       = null,
     IRecordFormatter recordFormatter = null)
     : base(dataSource, dataDestinations, recordValidator, recordMapper, recordFormatter)
 {
 }
示例#4
0
文件: EmitEnums.cs 项目: 0xCM/z0
        void Execute(ref uint counter, IRecordFormatter <ClrEnumRecord> formatter)
        {
            var src   = @readonly(Records);
            var t     = default(ClrEnumRecord);
            var count = src.Length;

            using var dst = Target.Writer();
            dst.WriteLine(formatter.FormatHeader());

            for (var i = 0u; i < count; i++)
            {
                ref readonly var record = ref skip(src, i);
示例#5
0
 public DataImport(
     IDataSource dataSource,
     IEnumerable <IDataDestination> dataDestinations,
     IRecordValidator recordValidator = null,
     IRecordMapper recordMapper       = null,
     IRecordFormatter recordFormatter = null)
 {
     this.DataSource       = dataSource;
     this.DataDestinations = dataDestinations;
     this.RecordValidator  = recordValidator;
     this.RecordMapper     = recordMapper;
     this.RecordFormatter  = recordFormatter;
 }
示例#6
0
 BitMaskFormatter(IRecordFormatter <R> formatter)
 {
     Formatter = formatter;
     Buffer    = text.buffer();
 }
示例#7
0
 public TextFileWriter(string filePath, IRecordFormatter recordFormatter = null, FileMode fileMode = FileMode.CreateNew, FileShare fileShare = FileShare.None)
     : base(new FileStreamFactory(filePath, fileMode, FileAccess.Write, fileShare), recordFormatter)
 {
 }
示例#8
0
 public MockDataWriter(IRecordFormatter recordFormatter, Action <object> writeRecord)
     : base(recordFormatter)
 {
     this.writeRecord = writeRecord;
 }
示例#9
0
 public TextStreamWriter(Stream stream, IRecordFormatter recordFormatter = null)
     : base(stream, recordFormatter)
 {
 }
示例#10
0
 public TextStreamWriter(IStreamFactory streamFactory, IRecordFormatter recordFormatter = null)
     : base(streamFactory, recordFormatter)
 {
 }
示例#11
0
 protected DataWriter(IRecordFormatter recordFormatter = null)
 {
     this.RecordFormatter = recordFormatter;
 }
示例#12
0
 public BusScheduler(IRecordFormatter formatter)
 {
     _formatter = formatter;
 }
示例#13
0
 public TextFileWriter(string filePath, IRecordFormatter recordFormatter, FileMode fileMode = FileMode.CreateNew, FileShare fileShare = FileShare.None)
     : base(filePath, recordFormatter, fileMode, fileShare)
 {
 }
示例#14
0
 public StreamWriter(Stream stream, IRecordFormatter recordFormatter = null)
     : base(recordFormatter)
 {
     this.Stream = stream;
 }
示例#15
0
 public StreamWriter(IStreamFactory streamFactory, IRecordFormatter recordFormatter = null)
     : base(recordFormatter)
 {
     this.StreamFactory = streamFactory;
     this.disposeStream = true;
 }
 public OutputRecordWriter(TextWriter sink, IRecordFormatter formatter)
 {
     this.sink      = sink;
     this.formatter = formatter;
 }
示例#17
0
 public MockStreamWriter(IStreamFactory streamFactory, Action <System.IO.StreamWriter, object> writeRecord, IRecordFormatter recordFormatter = null)
     : base(streamFactory, recordFormatter)
 {
     this.writeRecord = writeRecord;
 }