mirror of
https://github.com/romanlryji/EventLogLoader.git
synced 2024-11-28 08:48:40 +02:00
.net45
This commit is contained in:
parent
ea8983961c
commit
f9518e1a22
@ -14,9 +14,10 @@
|
||||
<AssemblyName>EventLogLoader</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<NuGetPackageImportStamp>16534656</NuGetPackageImportStamp>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -44,6 +45,7 @@
|
||||
<DocumentationFile>EventLogLoader.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@ -54,6 +56,7 @@
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EventLogLoader.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
@ -80,19 +83,8 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\MySql.Data.6.9.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.94.0\lib\net20\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.Linq">
|
||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.94.1\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Xml" />
|
||||
@ -147,7 +139,6 @@
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EventLogLoaderManager\EventLogLoaderManager.vbproj">
|
||||
@ -177,13 +168,6 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
@ -1,8 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>
|
||||
<remove invariant="MySql.Data.MySqlClient"/><add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/></DbProviderFactories>
|
||||
</system.data>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
||||
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.0.94.0" newVersion="1.0.94.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.5" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.94.1" targetFramework="net20" />
|
||||
</packages>
|
2
EventLogLoaderManager/AboutBox.Designer.vb
generated
2
EventLogLoaderManager/AboutBox.Designer.vb
generated
@ -138,7 +138,7 @@ Partial Class AboutBox
|
||||
Me.TextBoxDescription.Size = New System.Drawing.Size(257, 123)
|
||||
Me.TextBoxDescription.TabIndex = 0
|
||||
Me.TextBoxDescription.TabStop = False
|
||||
Me.TextBoxDescription.Text = "Описание:" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(Во время выполнения текст подписи будет заменен информацией о сборк" & _
|
||||
Me.TextBoxDescription.Text = "Описание:" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(Во время выполнения текст подписи будет заменен информацией о сборк" &
|
||||
"е приложения." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Настроить эту информацию можно в области "
|
||||
'
|
||||
'OKButton
|
||||
|
@ -112,9 +112,9 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<remove invariant="MySql.Data.MySqlClient" />
|
||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
|
||||
</DbProviderFactories>
|
||||
</system.data></configuration>
|
||||
|
@ -13,7 +13,11 @@
|
||||
<AssemblyName>EventLogLoaderManager</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -26,12 +30,8 @@
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -42,6 +42,7 @@
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderManager.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@ -52,6 +53,7 @@
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderManager.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
@ -69,24 +71,12 @@
|
||||
<ApplicationIcon>Untitled - 5.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\MySql.Data.6.9.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.104.0\lib\net20\System.Data.SQLite.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.Linq, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.104.0\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
@ -199,13 +189,6 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.104.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net20\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.104.0\build\net20\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
@ -8,14 +8,14 @@ Imports System.Runtime.InteropServices
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("Загрузчик файлов ЖР в СУБД")>
|
||||
<Assembly: AssemblyDescription("Загрузчик файлов журналов регистрации в БД MS SQL Server или MySQL" + _
|
||||
vbNewLine + "" + _
|
||||
<Assembly: AssemblyTitle("Загрузчик файлов ЖР во внешнюю базу данных")>
|
||||
<Assembly: AssemblyDescription("Загрузчик файлов журналов регистрации в БД MS SQL Server, MySQL или ElasticSearch" +
|
||||
vbNewLine + "" +
|
||||
vbNewLine + "Обнаруженные ошибки, а также предложения оставляйте в комментариях к публикации на Инфостарте http://infostart.ru/public/182820/. ")>
|
||||
<Assembly: AssemblyCompany("Aleksey Bochkov")>
|
||||
<Assembly: AssemblyProduct("Загрузчик файлов ЖР в СУБД")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Aleksey Bochkov, 2015")>
|
||||
<Assembly: AssemblyTrademark("Aleksey Bochkov")>
|
||||
<Assembly: AssemblyCompany("Alexey Bochkov")>
|
||||
<Assembly: AssemblyProduct("Загрузчик файлов ЖР во внешнюю базу данных")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Alexey Bochkov, 2017")>
|
||||
<Assembly: AssemblyTrademark("Alexey Bochkov")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@ -33,5 +33,5 @@ Imports System.Runtime.InteropServices
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.1.2.1")>
|
||||
<Assembly: AssemblyFileVersion("1.1.2.1")>
|
||||
<Assembly: AssemblyVersion("2.0.0.1")>
|
||||
<Assembly: AssemblyFileVersion("2.0.0.1")>
|
||||
|
@ -90,16 +90,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property logo_main_new() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("logo_main_new", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
|
@ -117,7 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="save_all" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save_all.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -130,8 +130,4 @@
|
||||
<data name="edit_add_3860" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\edit_add_3860.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="logo_main_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo_main_new.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
@ -1,8 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.9" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net35" />
|
||||
<package id="System.Data.SQLite" version="1.0.104.0" targetFramework="net35" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.104.0" targetFramework="net35" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.104.0" targetFramework="net35" />
|
||||
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
||||
</packages>
|
@ -14,7 +14,11 @@
|
||||
<AssemblyName>EventLogLoaderService</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -27,10 +31,8 @@
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<NuGetPackageImportStamp>a0f3464e</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -41,6 +43,7 @@
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderService.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@ -51,6 +54,7 @@
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderService.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
@ -68,12 +72,28 @@
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\MySql.Data.6.9.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
<Reference Include="Elasticsearch.Net, Version=5.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Elasticsearch.Net.5.0.0\lib\net45\Elasticsearch.Net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Nest, Version=5.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NEST.5.0.0\lib\net45\Nest.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net20\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
@ -81,13 +101,16 @@
|
||||
<HintPath>C:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.94.0\lib\net20\System.Data.SQLite.dll</HintPath>
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.104.0\lib\net45\System.Data.SQLite.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.Linq">
|
||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.94.1\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
||||
<Reference Include="System.Data.SQLite.EF6, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.104.0\lib\net45\System.Data.SQLite.EF6.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
@ -179,12 +202,12 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.104.0\build\net45\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net45\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.104.0\build\net45\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -1,7 +1,7 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
|
@ -1,7 +1,7 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
@ -11,6 +11,7 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
@ -21,10 +22,10 @@ Namespace My.Resources
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
@ -34,7 +35,7 @@ Namespace My.Resources
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
@ -49,12 +50,12 @@ Namespace My.Resources
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
@ -1,7 +1,7 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
@ -14,26 +14,26 @@ Option Explicit On
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
@ -41,14 +41,14 @@ Namespace My
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
|
@ -3,6 +3,7 @@ Imports System.Globalization
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports MySql.Data.MySqlClient
|
||||
Imports Nest
|
||||
|
||||
Public Class EventLogLoaderService
|
||||
|
||||
@ -65,6 +66,7 @@ Public Class EventLogLoaderService
|
||||
Public ConnectionString As String
|
||||
Public ItIsMSSQL As Boolean = False
|
||||
Public ItIsMySQL As Boolean = False
|
||||
Public ItIsES As Boolean = False
|
||||
|
||||
Public LastUpdate As DateTime
|
||||
|
||||
@ -483,31 +485,30 @@ Public Class EventLogLoaderService
|
||||
|
||||
Class EventLogLoader
|
||||
|
||||
Structure OneEvent
|
||||
Dim RowID As Integer
|
||||
Dim DateTime As Date
|
||||
'Dim RecordType As String
|
||||
Dim TransactionStatus As String
|
||||
Dim Transaction As String
|
||||
Dim TransactionStartTime As Date
|
||||
Dim TransactionMark As Int64
|
||||
Dim UserName As Integer
|
||||
Dim ComputerName As Integer
|
||||
Dim AppName As Integer
|
||||
Dim Field2 As String
|
||||
Dim EventID As Integer
|
||||
Dim EventType As String
|
||||
Dim Comment As String
|
||||
Dim MetadataID As Integer
|
||||
Dim DataStructure As String
|
||||
Dim DataString As String
|
||||
Dim ServerID As Integer
|
||||
Dim MainPortID As Integer
|
||||
Dim SecondPortID As Integer
|
||||
Dim Seance As Integer
|
||||
Dim Field7 As String
|
||||
Dim Field8 As String
|
||||
End Structure
|
||||
Class OneEvent
|
||||
Public RowID As Integer
|
||||
Public DateTime As Date
|
||||
Public TransactionStatus As String
|
||||
Public Transaction As String
|
||||
Public TransactionStartTime As Date
|
||||
Public TransactionMark As Int64
|
||||
Public UserName As Integer
|
||||
Public ComputerName As Integer
|
||||
Public AppName As Integer
|
||||
Public Field2 As String
|
||||
Public EventID As Integer
|
||||
Public EventType As String
|
||||
Public Comment As String
|
||||
Public MetadataID As Integer
|
||||
Public DataStructure As String
|
||||
Public DataString As String
|
||||
Public ServerID As Integer
|
||||
Public MainPortID As Integer
|
||||
Public SecondPortID As Integer
|
||||
Public Seance As Integer
|
||||
Public Field7 As String
|
||||
Public Field8 As String
|
||||
End Class
|
||||
|
||||
Public Events As List(Of OneEvent) = New List(Of OneEvent)
|
||||
Public CurrentPosition As Int64 = 0
|
||||
@ -594,11 +595,7 @@ Public Class EventLogLoaderService
|
||||
Public Sub AddEvent(Str As String)
|
||||
|
||||
Dim provider As CultureInfo = CultureInfo.InvariantCulture
|
||||
Dim OneEvent = New OneEvent
|
||||
|
||||
'If Not Events(0).DateTime = Nothing Then
|
||||
' ReDim Preserve Events(Events.Length)
|
||||
'End If
|
||||
Dim OneEvent As OneEvent = New OneEvent
|
||||
|
||||
Dim Array = ParserServices.ParseEventlogString(Str)
|
||||
OneEvent.DateTime = Date.ParseExact(Array(0), "yyyyMMddHHmmss", provider)
|
||||
@ -662,9 +659,9 @@ Public Class EventLogLoaderService
|
||||
Dim command As New SqlCommand("BEGIN TRANSACTION", objConn)
|
||||
command.ExecuteNonQuery()
|
||||
|
||||
command.CommandText = "INSERT INTO [dbo].[Events] ([InfobaseCode],[DateTime],[TransactionStatus],[Transaction],[UserName],[ComputerName]" + _
|
||||
",[AppName],[Field2],[EventID],[EventType],[Comment],[MetadataID],[DataStructure],[DataString]" + _
|
||||
",[ServerID],[MainPortID],[SecondPortID],[Seance],[Field7],[Field8],[TransactionStartTime],[TransactionMark])" + _
|
||||
command.CommandText = "INSERT INTO [dbo].[Events] ([InfobaseCode],[DateTime],[TransactionStatus],[Transaction],[UserName],[ComputerName]" +
|
||||
",[AppName],[Field2],[EventID],[EventType],[Comment],[MetadataID],[DataStructure],[DataString]" +
|
||||
",[ServerID],[MainPortID],[SecondPortID],[Seance],[Field7],[Field8],[TransactionStartTime],[TransactionMark])" +
|
||||
" VALUES(@v0,@v1,@v2,@v3,@v4,@v5,@v6,@v7,@v8,@v9,@v10,@v11,@v12,@v13,@v14,@v15,@v16,@v17,@v18,@v19,@v20,@v21)"
|
||||
|
||||
Dim i = 0
|
||||
@ -705,7 +702,7 @@ Public Class EventLogLoaderService
|
||||
command.ExecuteNonQuery()
|
||||
i += 1
|
||||
Catch ex As Exception
|
||||
Log.Error("Ошибка сохранения в БД записи от " + Ev.DateTime.ToString + _
|
||||
Log.Error("Ошибка сохранения в БД записи от " + Ev.DateTime.ToString +
|
||||
" по ИБ " + InfobaseName + " : " + ex.Message)
|
||||
End Try
|
||||
|
||||
@ -714,8 +711,8 @@ Public Class EventLogLoaderService
|
||||
|
||||
Console.WriteLine(Now.ToShortTimeString + " Записано новых событий в базу " + i.ToString)
|
||||
|
||||
command.CommandText = "IF NOT EXISTS (select * from [dbo].[Params] where [InfobaseCode] = @v3) " + _
|
||||
"INSERT INTO [dbo].[Params] ([InfobaseCode], [Position], [Filename], [LastEventID]) VALUES(@v3,@v1,@v2,@v4) " + _
|
||||
command.CommandText = "IF NOT EXISTS (select * from [dbo].[Params] where [InfobaseCode] = @v3) " +
|
||||
"INSERT INTO [dbo].[Params] ([InfobaseCode], [Position], [Filename], [LastEventID]) VALUES(@v3,@v1,@v2,@v4) " +
|
||||
"ELSE UPDATE [dbo].[Params] SET [Position] = @v1, [Filename] = @v2, [LastEventID] = @v4 WHERE [InfobaseCode] = @v3"
|
||||
|
||||
command.Parameters.Clear()
|
||||
@ -741,9 +738,9 @@ Public Class EventLogLoaderService
|
||||
Dim command As New MySqlCommand("START TRANSACTION", objConn)
|
||||
command.ExecuteNonQuery()
|
||||
|
||||
command.CommandText = "INSERT INTO `Events` (`InfobaseCode`,`DateTime`,`TransactionStatus`,`Transaction`,`UserName`,`ComputerName`" + _
|
||||
",`AppName`,`Field2`,`EventID`,`EventType`,`Comment`,`MetadataID`,`DataStructure`,`DataString`" + _
|
||||
",`ServerID`,`MainPortID`,`SecondPortID`,`Seance`,`Field7`,`Field8`,`TransactionStartTime`,`TransactionMark`)" + _
|
||||
command.CommandText = "INSERT INTO `Events` (`InfobaseCode`,`DateTime`,`TransactionStatus`,`Transaction`,`UserName`,`ComputerName`" +
|
||||
",`AppName`,`Field2`,`EventID`,`EventType`,`Comment`,`MetadataID`,`DataStructure`,`DataString`" +
|
||||
",`ServerID`,`MainPortID`,`SecondPortID`,`Seance`,`Field7`,`Field8`,`TransactionStartTime`,`TransactionMark`)" +
|
||||
" VALUES(@v0,@v1,@v2,@v3,@v4,@v5,@v6,@v7,@v8,@v9,@v10,@v11,@v12,@v13,@v14,@v15,@v16,@v17,@v18,@v19,@v20,@v21)"
|
||||
|
||||
Dim i = 0
|
||||
@ -779,7 +776,7 @@ Public Class EventLogLoaderService
|
||||
command.ExecuteNonQuery()
|
||||
i += 1
|
||||
Catch ex As Exception
|
||||
Log.Error("Ошибка сохранения в БД записи от " + Ev.DateTime.ToString + _
|
||||
Log.Error("Ошибка сохранения в БД записи от " + Ev.DateTime.ToString +
|
||||
" по ИБ " + InfobaseName + " : " + ex.Message)
|
||||
End Try
|
||||
|
||||
@ -805,6 +802,29 @@ Public Class EventLogLoaderService
|
||||
objConn.Close()
|
||||
objConn.Dispose()
|
||||
|
||||
ElseIf ItIsES Then
|
||||
|
||||
Dim Index = "event-log-ibguid"
|
||||
Dim node = New Uri(ConnectionString)
|
||||
|
||||
Dim _settings = New ConnectionSettings(node).DefaultIndex(Index).MaximumRetries(2).MaxRetryTimeout(TimeSpan.FromSeconds(150))
|
||||
Dim _current = New ElasticClient(_settings)
|
||||
|
||||
'Dim elasticsearchMappingResolver As IElasticsearchMappingResolver = New ElasticsearchMappingResolver()
|
||||
'elasticsearchMappingResolver.AddElasticSearchMappingForEntityType(TypeOf (), New ElasticsearchMappingTestDto());
|
||||
'Dim context = New ElasticsearchContext(ConnectionString, New ElasticsearchSerializerConfiguration(elasticsearchMappingResolver, True, True))
|
||||
|
||||
|
||||
'Dim descriptor = New BulkDescriptor()
|
||||
'For Each item In Events
|
||||
' ' descriptor.Index(Of OneEvent)(Function(op) op.Document(item))
|
||||
'Next
|
||||
'Dim result = _current.Bulk(descriptor)
|
||||
|
||||
Dim Result = _current.IndexMany(Events, Index, "event-record")
|
||||
|
||||
Dim a = 0
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@ -874,6 +894,7 @@ Public Class EventLogLoaderService
|
||||
Public ConnectionString As String
|
||||
Public ItIsMSSQL As Boolean = False
|
||||
Public ItIsMySQL As Boolean = False
|
||||
Public ItIsES As Boolean = False
|
||||
Public Guid As String
|
||||
Public ID As Integer = 0
|
||||
Public Reference As ReferenceClass
|
||||
@ -982,6 +1003,7 @@ Public Class EventLogLoaderService
|
||||
Events.Log = Log
|
||||
Events.ItIsMSSQL = ItIsMSSQL
|
||||
Events.ItIsMySQL = ItIsMySQL
|
||||
Events.ItIsES = ItIsES
|
||||
Events.GetParamFromSQL()
|
||||
|
||||
End Sub
|
||||
@ -1410,6 +1432,7 @@ Public Class EventLogLoaderService
|
||||
Reference.ConnectionString = ConnectionString
|
||||
Reference.ItIsMSSQL = ItIsMSSQL
|
||||
Reference.ItIsMySQL = ItIsMySQL
|
||||
Reference.ItIsES = ItIsES
|
||||
|
||||
Catch ex As Exception
|
||||
Log.ErrorException("Ошибка создания объекта справочника для ИБ (" + Name + ")", ex)
|
||||
@ -1447,6 +1470,8 @@ Public Class EventLogLoaderService
|
||||
Dim DBType As String
|
||||
Dim ItIsMSSQL As Boolean = False
|
||||
Dim ItIsMySQL As Boolean = False
|
||||
Dim ItIsES As Boolean = False
|
||||
|
||||
Public SleepTime As Integer = 60 * 1000 '1 минута
|
||||
|
||||
Function LoadConfigSetting()
|
||||
@ -1467,6 +1492,8 @@ Public Class EventLogLoaderService
|
||||
ItIsMySQL = True
|
||||
ElseIf DBType = "MS SQL Server" Then
|
||||
ItIsMSSQL = True
|
||||
ElseIf DBType = "ElasticSearch" Then
|
||||
ItIsES = True
|
||||
End If
|
||||
|
||||
Dim s = ConfigSettingObj.RepeatTime
|
||||
@ -1488,6 +1515,7 @@ Public Class EventLogLoaderService
|
||||
IB.SleepTime = SleepTime
|
||||
IB.ItIsMSSQL = ItIsMSSQL
|
||||
IB.ItIsMySQL = ItIsMySQL
|
||||
IB.ItIsES = ItIsES
|
||||
|
||||
ReDim Preserve ArrayIB(i)
|
||||
ArrayIB(i) = IB
|
||||
@ -1555,7 +1583,7 @@ Public Class EventLogLoaderService
|
||||
'Log.Info("Запуск основного функционала")
|
||||
|
||||
If Not LoadConfigSetting() Then
|
||||
Log.Error("Ошибка работы с файлом параметров setting.ini в каталоге приложения")
|
||||
Log.Error("Ошибка работы с файлом параметров config.json в каталоге приложения")
|
||||
Environment.Exit(-1)
|
||||
End If
|
||||
|
||||
@ -1599,28 +1627,31 @@ Public Class EventLogLoaderService
|
||||
Dim objConn As New SqlConnection(ConnectionString)
|
||||
objConn.Open()
|
||||
|
||||
Dim command As New SqlCommand("IF NOT EXISTS (select * from sysobjects where id = object_id(N'Events'))" + vbNewLine + _
|
||||
" CREATE TABLE [dbo].[Events]([InfobaseCode] int NOT NULL, [DateTime] [datetime] NOT NULL, " + _
|
||||
" [TransactionStatus] [char](1) NULL, " + _
|
||||
" [TransactionStartTime] [datetime] NULL, " + _
|
||||
" [TransactionMark] bigint NULL, " + _
|
||||
" [Transaction] [char](100) NULL, " + _
|
||||
" [UserName] int NULL, " + _
|
||||
" [ComputerName] int NULL, " + _
|
||||
" [AppName] int NULL, " + _
|
||||
" [Field2] [char](100) NULL, " + _
|
||||
" [EventID] int NULL, " + _
|
||||
" [EventType] [char](1) NULL, " + _
|
||||
" [Comment] [varchar](max) NULL, " + _
|
||||
" [MetadataID] int NULL, " + _
|
||||
" [DataStructure] [char](100) NULL, " + _
|
||||
" [DataString] [varchar](max) NULL, " + _
|
||||
" [ServerID] int NULL, " + _
|
||||
" [MainPortID] int NULL, " + _
|
||||
" [SecondPortID] int NULL, " + _
|
||||
" [Seance] int NULL, " + _
|
||||
" [Field7] [char](100) NULL, " + _
|
||||
" [Field8] [char](100) NULL)", objConn)
|
||||
Dim command As New SqlCommand("IF NOT EXISTS (select * from sysobjects where id = object_id(N'Events'))
|
||||
BEGIN
|
||||
CREATE TABLE [dbo].[Events]([InfobaseCode] int Not NULL, [DateTime] [datetime] Not NULL,
|
||||
[TransactionStatus] [char](1) NULL,
|
||||
[TransactionStartTime] [datetime] NULL,
|
||||
[TransactionMark] bigint NULL,
|
||||
[Transaction] [char](100) NULL,
|
||||
[UserName] int NULL,
|
||||
[ComputerName] int NULL,
|
||||
[AppName] Int NULL,
|
||||
[Field2] [char](100) NULL,
|
||||
[EventID] int NULL,
|
||||
[EventType] [char](1) NULL,
|
||||
[Comment] [varchar](max) NULL,
|
||||
[MetadataID] int NULL,
|
||||
[DataStructure] [Char](100) NULL,
|
||||
[DataString] [varchar](max) NULL,
|
||||
[ServerID] int NULL,
|
||||
[MainPortID] int NULL,
|
||||
[SecondPortID] int NULL,
|
||||
[Seance] int NULL,
|
||||
[Field7] [char](100) NULL,
|
||||
[Field8] [char](100) NULL);
|
||||
CREATE CLUSTERED INDEX [CIX_Events] ON [dbo].[Events]([InfobaseCode], [DateTime])
|
||||
END", objConn)
|
||||
command.ExecuteNonQuery()
|
||||
|
||||
'**********************************************************************************
|
||||
|
@ -1,8 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework"
|
||||
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
requirePermission="false"/>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
|
||||
</startup>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
|
||||
<remove invariant="MySql.Data.MySqlClient" /><add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /></DbProviderFactories>
|
||||
|
||||
|
||||
|
||||
|
||||
<remove invariant="MySql.Data.MySqlClient"/><add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
|
||||
description=".Net Framework Data Provider for MySQL"
|
||||
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/><remove invariant="System.Data.SQLite.EF6"/><add name="SQLite Data Provider (Entity Framework 6)"
|
||||
invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)"
|
||||
type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/></DbProviderFactories>
|
||||
</system.data>
|
||||
</configuration>
|
@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.5" targetFramework="net20" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.94.1" targetFramework="net20" />
|
||||
<package id="Elasticsearch.Net" version="5.0.0" targetFramework="net45" />
|
||||
<package id="EntityFramework" version="6.0.0" targetFramework="net45" />
|
||||
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
||||
<package id="NEST" version="5.0.0" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||
<package id="System.Data.SQLite" version="1.0.104.0" targetFramework="net45" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.104.0" targetFramework="net45" />
|
||||
<package id="System.Data.SQLite.EF6" version="1.0.104.0" targetFramework="net45" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.104.0" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user