Skip to content

Commit

Permalink
Only export to eds variables with the [EdsExport] attribute fixes #52
Browse files Browse the repository at this point in the history
EdsExport was not being tested during save and was wrong on one
variable. Fixing this also removed 4 special cases that were excluded on
export
  • Loading branch information
robincornelius committed Feb 4, 2017
1 parent 61c2b84 commit 8674986
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions libEDSsharp/eds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,8 @@ public void write(StreamWriter writer)

foreach (FieldInfo f in fields)
{
if (f.Name == "EDSVersionMajor")
continue;
if (f.Name == "EDSVersionMinor")
continue;
if (f.Name == "CreationDateTime")
continue;
if (f.Name == "ModificationDateTime")

if (!Attribute.IsDefined(f, typeof(EdsExport)))
continue;

if (f.GetValue(this) == null)
Expand Down Expand Up @@ -462,9 +457,9 @@ public class FileInfo : InfoSection
[EdsExport]
public byte FileRevision;//=1

[EdsExport]

public byte EDSVersionMajor;//=4.0
[EdsExport]

public byte EDSVersionMinor;//=4.0
[EdsExport]
public string EDSVersion="";
Expand Down

0 comments on commit 8674986

Please sign in to comment.