Skip to content

Commit 60fc95e

Browse files
authored
Update README.md
1 parent 34c7da7 commit 60fc95e

File tree

1 file changed

+30
-36
lines changed

1 file changed

+30
-36
lines changed

README.md

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -53,70 +53,44 @@ By default the extension uses `JSON`-serialization and the `DefaultFileManager`
5353
Serializes data using System.XML
5454

5555
```cs
56-
optionsBuilder.UseFileContext(new FileContextCore.Serializer.XMLSerializer());
57-
58-
//disable indent
59-
optionsBuilder.UseFileContext(new FileContextCore.Serializer.XMLSerializer(false));
56+
optionsBuilder.UseFileContext("xml");
6057
```
6158

6259
### CSVSerializer
6360

6461
Serializes data using CsvHelper ([https://joshclose.github.io/CsvHelper/](https://joshclose.github.io/CsvHelper/))
6562

6663
```cs
67-
optionsBuilder.UseFileContext(new FileContextCore.Serializer.CSVSerializer());
68-
69-
//change default delimiter (,)
70-
optionsBuilder.UseFileContext(new FileContextCore.Serializer.CSVSerializer(";"));
64+
optionsBuilder.UseFileContext("csv");
7165
```
7266

7367
### JSONSerializer
7468

7569
Serializes data using Newtonsoft Json.NET ([http://www.newtonsoft.com/json](http://www.newtonsoft.com/json))
7670

7771
```cs
78-
optionsBuilder.UseFileContext(new FileContextCore.Serializer.JSONSerializer());
79-
80-
//change formatting
81-
optionsBuilder.UseFileContext(
82-
new FileContextCore.Serializer.JSONSerializer(Newtonsoft.Json.Formatting.None)
83-
);
84-
```
85-
86-
## File Manager
87-
88-
### DefaultFileManager
89-
90-
Saves the data into files
91-
92-
```cs
93-
optionsBuilder.UseFileContext(fileManager: new FileContextCore.FileManager.DefaultFileManager());
72+
optionsBuilder.UseFileContext("json");
9473
```
9574

96-
### EncryptedFileManager
75+
### BSONSerializer
9776

98-
Encrypts the data and saves them into files
77+
Serializes data to bson using Newtonsoft Json.NET ([http://www.newtonsoft.com/json](http://www.newtonsoft.com/json))
9978

10079
```cs
101-
optionsBuilder.UseFileContext(fileManager: new FileContextCore.FileManager.EncryptedFileManager());
102-
103-
//change key
104-
optionsBuilder.UseFileContext(fileManager: new FileContextCore.FileManager.EncryptedFileManager("key"));
80+
optionsBuilder.UseFileContext("bson");
10581
```
10682

107-
## Combined Manager
108-
109-
### Excel Manager
83+
### EXCELSerializer
11084

11185
Saves files into an .xlsx-file and enables the quick editing of the data using Excel
11286

11387
Uses [EEPlus](http://epplus.codeplex.com/documentation) implementation for .Net Core ([https://github.com/VahidN/EPPlus.Core](https://github.com/VahidN/EPPlus.Core))
11488

11589
```cs
116-
optionsBuilder.UseFileContext(new FileContextCore.CombinedManager.ExcelManager());
90+
optionsBuilder.UseFileContext("excel");
11791

11892
//use password
119-
optionsBuilder.UseFileContext(new FileContextCore.CombinedManager.ExcelManager("password"));
93+
optionsBuilder.UseFileContext("excel:password");
12094
```
12195

12296
To run on Linux-Systems
@@ -126,9 +100,29 @@ sudo apt-get update
126100
sudo apt-get install libgdiplus
127101
```
128102

103+
## File Manager
104+
105+
### DefaultFileManager
106+
107+
Saves the data into files
108+
109+
```cs
110+
optionsBuilder.UseFileContext("json", "default");
111+
```
112+
113+
### EncryptedFileManager
114+
115+
Encrypts the data and saves them into files
116+
117+
```cs
118+
optionsBuilder.UseFileContext("json", "encrypted:password");
119+
```
120+
121+
## Combined Manager
122+
129123
## Custom implementation
130124

131-
For customization you can implement the Interfaces `ISerializer`, `IFileManager` and `ICombinedManager`
125+
For customization you can implement the Interfaces `ISerializer` and `IFileManager`
132126

133127
## Author
134128

0 commit comments

Comments
 (0)