55 lines
1.3 KiB
C#
55 lines
1.3 KiB
C#
|
|
/*
|
|||
|
|
* ToyotaCsv.File.cs
|
|||
|
|
*
|
|||
|
|
* Copyright © 2009
|
|||
|
|
* Diversified Technical Systems, Inc.
|
|||
|
|
* All Rights Reserved
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
namespace DTS.Serialization.ToyotaCsv
|
|||
|
|
{ ///
|
|||
|
|
/// <summary>
|
|||
|
|
/// Basic representation of a Toyota CSV file.
|
|||
|
|
/// </summary>
|
|||
|
|
///
|
|||
|
|
public partial class File
|
|||
|
|
: Serialization.File, IWritable<Test>
|
|||
|
|
{ ///
|
|||
|
|
/// <summary>
|
|||
|
|
/// Initialize an instance of the ToyotaCsv.File class.
|
|||
|
|
/// </summary>
|
|||
|
|
///
|
|||
|
|
public File()
|
|||
|
|
: base("Toyota CSV")
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Get this file format's extension.
|
|||
|
|
/// </summary>
|
|||
|
|
public static string Extension => ".csv";
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Get the file writer for this file type.
|
|||
|
|
/// </summary>
|
|||
|
|
public IWriter<Test> Exporter
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
if (_Exporter == null)
|
|||
|
|
_Exporter = new Writer(this, DefaultEncoding);
|
|||
|
|
return _Exporter;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
catch (System.Exception ex)
|
|||
|
|
{
|
|||
|
|
throw new Exception("encountered problem getting exporter", ex);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
private IWriter<Test> _Exporter = null;
|
|||
|
|
}
|
|||
|
|
}
|