Skip to content

Commit 9c59c43

Browse files
committed
Fix the Serialize button which was broken because field weren't properly initialized.
1 parent 6c9ced7 commit 9c59c43

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

Rubberduck.Parsing/ComReflection/XmlComProjectSerializer.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ public class XmlComProjectSerializer : IComProjectSerializationProvider
1717
public readonly string DefaultSerializationPath;
1818
private readonly IFileSystem _fileSystem;
1919

20-
public XmlComProjectSerializer(
21-
IPersistencePathProvider pathProvider,
22-
IFileSystem fileSystem)
20+
private XmlComProjectSerializer(IFileSystem fileSystem, string defaultPath, string path)
2321
{
24-
DefaultSerializationPath = pathProvider.DataFolderPath("Declarations");
2522
_fileSystem = fileSystem;
26-
}
27-
28-
public XmlComProjectSerializer(IFileSystem filesystem, string path = null)
29-
{
23+
DefaultSerializationPath = defaultPath;
3024
Target = path ?? DefaultSerializationPath;
31-
_fileSystem = filesystem;
3225
}
3326

27+
public XmlComProjectSerializer(
28+
IPersistencePathProvider pathProvider,
29+
IFileSystem fileSystem)
30+
: this(fileSystem, pathProvider.DataFolderPath("Declarations"), null)
31+
{ }
32+
33+
public XmlComProjectSerializer(IFileSystem fileSystem, string path)
34+
: this(fileSystem, path, path)
35+
{ }
36+
3437
private static readonly XmlReaderSettings ReaderSettings = new XmlReaderSettings
3538
{
3639
CheckCharacters = false

0 commit comments

Comments
 (0)