PIbd-22. Shabunov O.A. Lab work 08 #14
@ -92,9 +92,11 @@ namespace AutoWorkshopBusinessLogic.BusinessLogics
|
||||
}
|
||||
|
||||
var JsonFormatter = new DataContractJsonSerializer(typeof(List<T>));
|
||||
using var fs = new FileStream(string.Format("{0}/{1}.json", FolderName, typeof(T).Name), FileMode.OpenOrCreate);
|
||||
|
||||
JsonFormatter.WriteObject(fs, Records);
|
||||
using var fs = new FileStream(string.Format("{0}/{1}.json", FolderName, typeof(T).Name), FileMode.OpenOrCreate);
|
||||
using var writer = JsonReaderWriterFactory.CreateJsonWriter(fs, System.Text.Encoding.UTF8, false, true);
|
||||
|
||||
JsonFormatter.WriteObject(writer, Records);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,5 +12,5 @@
|
||||
"PopHost": "pop.gmail.com",
|
||||
"PopPort": "995",
|
||||
"MailLogin": "testingpurposeslab7@gmail.com",
|
||||
"MailPassword": "gvdg ovtu lmis djwq"
|
||||
"MailPassword": "kxdk seny yjaj vrav"
|
||||
}
|
||||
|
@ -6,6 +6,6 @@
|
||||
<add key="PopHost" value="pop.gmail.com" />
|
||||
<add key="PopPort" value="995" />
|
||||
<add key="MailLogin" value="testingpurposeslab7@gmail.com" />
|
||||
<add key="MailPassword" value="gvdg ovtu lmis djwq" />
|
||||
<add key="MailPassword" value="kxdk seny yjaj vrav" />
|
||||
</appSettings>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user