PIbd-22. Shabunov O.A. Lab work 08 #14

Closed
olshab wants to merge 11 commits from Lab8 into Lab7
3 changed files with 6 additions and 4 deletions
Showing only changes of commit a03bb5e7aa - Show all commits

View File

@ -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);
}
}
}

View File

@ -12,5 +12,5 @@
"PopHost": "pop.gmail.com",
"PopPort": "995",
"MailLogin": "testingpurposeslab7@gmail.com",
"MailPassword": "gvdg ovtu lmis djwq"
"MailPassword": "kxdk seny yjaj vrav"
}

View File

@ -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>