Ejemplo n.º 1
0
 public static void Serialize(FtMeta meta, string outputFilePath, XmlWriterSettings writerSettings)
 {
     using (XmlWriter xmlWriter = XmlWriter.Create(outputFilePath, writerSettings))
     {
         XmlMetaSerializationWriter serializationWriter = new XmlMetaSerializationWriter();
         serializationWriter.Write(xmlWriter, meta);
     }
 }
Ejemplo n.º 2
0
        public virtual void Assign(FtMeta source)
        {
            Culture = source.Culture.Clone() as CultureInfo;

            EndOfLineType          = source.EndOfLineType;
            EndOfLineChar          = source.EndOfLineChar;
            EndOfLineAutoWriteType = source.EndOfLineAutoWriteType;
            LastLineEndedType      = source.LastLineEndedType;

            QuoteChar       = source.QuoteChar;
            DelimiterChar   = source.DelimiterChar;
            LineCommentChar = source.LineCommentChar;

            AllowEndOfLineCharInQuotes = source.AllowEndOfLineCharInQuotes;
            IgnoreBlankLines           = source.IgnoreBlankLines;
            IgnoreExtraChars           = source.IgnoreExtraChars;
            AllowIncompleteRecords     = source.AllowIncompleteRecords;

            StuffedEmbeddedQuotes = source.StuffedEmbeddedQuotes;

            SubstitutionsEnabled = source.SubstitutionsEnabled;
            SubstitutionChar     = source.SubstitutionChar;

            MainHeadingLineIndex = source.MainHeadingLineIndex;
            HeadingLineCount     = source.HeadingLineCount;

            HeadingQuotedType = source.HeadingQuotedType;
            HeadingAlwaysWriteOptionalQuote = source.HeadingAlwaysWriteOptionalQuote;
            HeadingWritePrefixSpace         = source.HeadingWritePrefixSpace;

            HeadingConstraint     = source.HeadingConstraint;
            HeadingPadAlignment   = source.HeadingPadAlignment;
            HeadingPadCharType    = source.HeadingPadCharType;
            HeadingPadChar        = source.HeadingPadChar;
            HeadingTruncateType   = source.HeadingTruncateType;
            HeadingTruncateChar   = source.HeadingTruncateChar;
            HeadingEndOfValueChar = source.HeadingEndOfValueChar;

            fieldList.Assign(source.fieldList);
            sequenceList.Assign(source.sequenceList, fieldList, source.FieldList);
            substitutionList.Assign(source.substitutionList);
        }
Ejemplo n.º 3
0
        public static void Serialize(FtMeta meta, string outputFilePath)
        {
            StreamWriter streamWriter = null;

            try
            {
                streamWriter = new StreamWriter(outputFilePath);
                using (XmlWriter xmlWriter = XmlWriter.Create(streamWriter))
                {
                    streamWriter = null;
                    XmlMetaSerializationWriter serializationWriter = new XmlMetaSerializationWriter();
                    serializationWriter.Write(xmlWriter, meta);
                }
            }
            finally
            {
                if (streamWriter != null)
                {
                    streamWriter.Dispose();
                }
            }
        }
Ejemplo n.º 4
0
 public FtWriter(FtMeta meta) : base(meta)
 {
 }
Ejemplo n.º 5
0
 public FtReader(FtMeta meta, string inputFilePath, bool immediatelyReadHeader = true) : base()
 {
     InternalLoadMeta(meta);
     Open(inputFilePath, immediatelyReadHeader);
 }
Ejemplo n.º 6
0
 public FtReader(string metaFilePath, string inputFilePath, bool immediatelyReadHeader = true) : this(FtMeta.Create(metaFilePath), inputFilePath, immediatelyReadHeader)
 {
 }
Ejemplo n.º 7
0
 public FtReader(string metaFilePath) : this(FtMeta.Create(metaFilePath))
 {
 }
Ejemplo n.º 8
0
 public FtReader(FtMeta meta, TextReader input, bool immediatelyReadHeader = true) : base()
 {
     InternalLoadMeta(meta);
     Open(input, immediatelyReadHeader);
 }
Ejemplo n.º 9
0
 public FtSerializer(string metaFilePath)
 {
     meta = FtMeta.Create(metaFilePath);
 }
Ejemplo n.º 10
0
 public FtReader(FtMeta meta) : base()
 {
     InternalLoadMeta(meta);
     Reset(); // Called here as Open() is not called
 }
Ejemplo n.º 11
0
 public FtWriter(FtMeta meta, TextWriter output, FtWriterSettings settings) : base(meta)
 {
     Open(output, settings);
 }
Ejemplo n.º 12
0
 public FtSerializer(FtMeta myMeta)
 {
     meta = myMeta;
 }
Ejemplo n.º 13
0
        public static void Serialize(FtMeta meta, XmlWriter xmlWriter)
        {
            XmlMetaSerializationWriter serializationWriter = new XmlMetaSerializationWriter();

            serializationWriter.Write(xmlWriter, meta);
        }
Ejemplo n.º 14
0
 public FtWriter(FtMeta meta, TextWriter output) : this(meta, output, new FtWriterSettings())
 {
 }
Ejemplo n.º 15
0
 public FtWriter(string metaFilePath, string outputFilePath, FtWriterSettings settings) : this(FtMeta.Create(metaFilePath), outputFilePath, settings)
 {
 }
Ejemplo n.º 16
0
 public FtWriter(string metaFilePath, string outputFilePath) : this(FtMeta.Create(metaFilePath), outputFilePath)
 {
 }
Ejemplo n.º 17
0
 public FtWriter(string metaFilePath, TextWriter output) : this(FtMeta.Create(metaFilePath), output)
 {
 }
Ejemplo n.º 18
0
 public FtWriter(FtMeta meta, string outputFilePath, FtWriterSettings settings) : base(meta)
 {
     Open(outputFilePath, settings);
 }
Ejemplo n.º 19
0
 public FtWriter(FtMeta meta, string outputFilePath) : this(meta, outputFilePath, new FtWriterSettings())
 {
 }