Commit 6430228d authored by Kirill's avatar Kirill

Переименование TourDataManager.cs для предотвращения коллизий имен....

Переименование TourDataManager.cs для предотвращения коллизий имен. targetFramework установлен в значение 4.5
parent 1ea772d6
...@@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TourDataManager", "TourData ...@@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TourDataManager", "TourData
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TourDataManagerConsoleApplication", "TourDataManagerConsoleApplication\TourDataManagerConsoleApplication.csproj", "{66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TourDataManagerConsoleApplication", "TourDataManagerConsoleApplication\TourDataManagerConsoleApplication.csproj", "{66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clifton.Core.Pipes", "Clifton.Core.Pipes\Clifton.Core.Pipes.csproj", "{B826097C-CC24-4CAC-8D31-8A65C4B76BE9}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -18,5 +20,9 @@ Global ...@@ -18,5 +20,9 @@ Global
{66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU {66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU {66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}.Release|Any CPU.Build.0 = Release|Any CPU {66F0D20A-DA45-45CB-8DDF-0F9900E03AE3}.Release|Any CPU.Build.0 = Release|Any CPU
{B826097C-CC24-4CAC-8D31-8A65C4B76BE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B826097C-CC24-4CAC-8D31-8A65C4B76BE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B826097C-CC24-4CAC-8D31-8A65C4B76BE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B826097C-CC24-4CAC-8D31-8A65C4B76BE9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections> </configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup> </startup>
</configuration> </configuration>
\ No newline at end of file
...@@ -63,7 +63,7 @@ namespace TourDataManager { ...@@ -63,7 +63,7 @@ namespace TourDataManager {
private MyDbContext context; private MyDbContext context;
public Db(){ public Db(){
connection = new SQLiteConnection($"data source={TourDataManager.GetPathInPersistent("sandbox.sqlite")}"); connection = new SQLiteConnection($"data source={TourDataManagerPlugin.GetPathInPersistent("sandbox.sqlite")}");
context = new MyDbContext(connection,true); context = new MyDbContext(connection,true);
} }
......
...@@ -48,7 +48,7 @@ namespace TourDataManager { ...@@ -48,7 +48,7 @@ namespace TourDataManager {
// Id AutoIncrement // Id AutoIncrement
var val = regex.Match(file.Url).Value; var val = regex.Match(file.Url).Value;
System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(val)); System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(val));
file.LocalUrl = TourDataManager.GetPathInPersistent(val); file.LocalUrl = TourDataManagerPlugin.GetPathInPersistent(val);
} }
Database.InsertFiles(files); Database.InsertFiles(files);
return files; return files;
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<Compile Include="FetchTourPreviewsUseCase.cs" /> <Compile Include="FetchTourPreviewsUseCase.cs" />
<Compile Include="IAuthenticator.cs" /> <Compile Include="IAuthenticator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TourDataManager.cs" /> <Compile Include="TourDataManagerPlugin.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
......
...@@ -13,7 +13,7 @@ namespace TourDataManager { ...@@ -13,7 +13,7 @@ namespace TourDataManager {
/// <summary> /// <summary>
/// Фасад для всего плагина /// Фасад для всего плагина
/// </summary> /// </summary>
public class TourDataManager : IAuthenticator{ public class TourDataManagerPlugin : IAuthenticator{
public static volatile string PersistentPath; public static volatile string PersistentPath;
...@@ -28,7 +28,7 @@ namespace TourDataManager { ...@@ -28,7 +28,7 @@ namespace TourDataManager {
private IKernel Container; private IKernel Container;
public TourDataManager(string persistentPath){ public TourDataManagerPlugin(string persistentPath){
PersistentPath = persistentPath; PersistentPath = persistentPath;
Container = new StandardKernel(new MyModule()); Container = new StandardKernel(new MyModule());
...@@ -80,7 +80,7 @@ namespace TourDataManager { ...@@ -80,7 +80,7 @@ namespace TourDataManager {
public override void Load(){ public override void Load(){
var cookieStorage = new CookieStorage(TourDataManager.GetPathInPersistent("cookie.storage")); var cookieStorage = new CookieStorage(TourDataManagerPlugin.GetPathInPersistent("cookie.storage"));
var httpClientHandler = new HttpClientHandler(); var httpClientHandler = new HttpClientHandler();
//CookieContainer сам запоминает полученные из ответа куки //CookieContainer сам запоминает полученные из ответа куки
httpClientHandler.CookieContainer = cookieStorage.Get(); httpClientHandler.CookieContainer = cookieStorage.Get();
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net45" userInstalled="true" /> <package id="EntityFramework" version="6.2.0" targetFramework="net45" userInstalled="true" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net472" /> <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
<package id="Ninject" version="3.3.4" targetFramework="net472" /> <package id="Ninject" version="3.3.4" targetFramework="net45" />
<package id="SQLite.CodeFirst" version="1.5.1.25" targetFramework="net472" /> <package id="SQLite.CodeFirst" version="1.5.1.25" targetFramework="net45" />
<package id="System.Data.SqlClient" version="4.5.1" targetFramework="net472" /> <package id="System.Data.SqlClient" version="4.5.1" targetFramework="net45" />
<package id="System.Data.SQLite" version="1.0.109.2" targetFramework="net472" /> <package id="System.Data.SQLite" version="1.0.109.2" targetFramework="net45" />
<package id="System.Data.SQLite.Core" version="1.0.109.2" targetFramework="net472" /> <package id="System.Data.SQLite.Core" version="1.0.109.2" targetFramework="net45" />
<package id="System.Data.SQLite.EF6" version="1.0.109.0" targetFramework="net472" /> <package id="System.Data.SQLite.EF6" version="1.0.109.0" targetFramework="net45" />
<package id="System.Data.SQLite.Linq" version="1.0.109.0" targetFramework="net472" /> <package id="System.Data.SQLite.Linq" version="1.0.109.0" targetFramework="net45" />
<package id="System.IO" version="4.3.0" targetFramework="net472" /> <package id="System.IO" version="4.3.0" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.3" targetFramework="net472" /> <package id="System.Net.Http" version="4.3.3" targetFramework="net45" />
<package id="System.Runtime" version="4.3.0" targetFramework="net472" /> <package id="System.Runtime" version="4.3.0" targetFramework="net45" />
</packages> </packages>
\ No newline at end of file
...@@ -14,11 +14,11 @@ namespace TourDataManagerConsoleApplication { ...@@ -14,11 +14,11 @@ namespace TourDataManagerConsoleApplication {
const string defaultLogin = "demo@biganto.ru"; const string defaultLogin = "demo@biganto.ru";
const string defaultPassword = "demo"; const string defaultPassword = "demo";
public static TourDataManager.TourDataManager tourDataManager; public static TourDataManager.TourDataManagerPlugin TourDataManagerPlugin;
public static void Main(string[] args){ public static void Main(string[] args){
tourDataManager = new TourDataManager.TourDataManager(PersistentPath); TourDataManagerPlugin = new TourDataManager.TourDataManagerPlugin(PersistentPath);
MainWindow(); MainWindow();
...@@ -40,12 +40,12 @@ namespace TourDataManagerConsoleApplication { ...@@ -40,12 +40,12 @@ namespace TourDataManagerConsoleApplication {
Debug.Log("Password : "); Debug.Log("Password : ");
var pass = Console.ReadLine(); var pass = Console.ReadLine();
var result = tourDataManager.Login(login,pass); var result = TourDataManagerPlugin.Login(login,pass);
Debug.Log($"Auth result : {result.Item1} {result.Item2}"); Debug.Log($"Auth result : {result.Item1} {result.Item2}");
MainWindow(); MainWindow();
break; break;
case '1' : case '1' :
var estates = tourDataManager.FetchEstatesAsync().Result; var estates = TourDataManagerPlugin.FetchEstatesAsync().Result;
foreach (var estate in estates){ foreach (var estate in estates){
Debug.Log(estate); Debug.Log(estate);
} }
...@@ -63,7 +63,7 @@ namespace TourDataManagerConsoleApplication { ...@@ -63,7 +63,7 @@ namespace TourDataManagerConsoleApplication {
case '0' : case '0' :
Debug.Log("Estate id : "); Debug.Log("Estate id : ");
var id = Console.ReadLine(); var id = Console.ReadLine();
var tours = tourDataManager.FetchTourPreviewsAsync(Int32.Parse(id)).Result; var tours = TourDataManagerPlugin.FetchTourPreviewsAsync(Int32.Parse(id)).Result;
foreach (var tour in tours){ foreach (var tour in tours){
Debug.Log(tour); Debug.Log(tour);
} }
...@@ -75,7 +75,7 @@ namespace TourDataManagerConsoleApplication { ...@@ -75,7 +75,7 @@ namespace TourDataManagerConsoleApplication {
} }
public static async void AsyncMethod(TourDataManager.TourDataManager plugin){ public static async void AsyncMethod(TourDataManager.TourDataManagerPlugin plugin){
try{ try{
var estates = await plugin.FetchEstatesAsync(); var estates = await plugin.FetchEstatesAsync();
Tour[] tours = null; Tour[] tours = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment