Skip to content

Commit

Permalink
Merge branch 'release/0.5.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
tym32167 committed Apr 4, 2016
2 parents baff0df + 1e31f5c commit 243f872
Show file tree
Hide file tree
Showing 57 changed files with 891 additions and 607 deletions.
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: 0.5.5.{build}
build:
verbosity: minimal
48 changes: 24 additions & 24 deletions src/Arma3BE.Client.Console/App.config
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<appSettings>
<add key="SERVERS" value="RW1_Nazir;RW2_Nazir"/>
<add key="SERVERS" value="RW1_Nazir;RW2_Nazir" />
</appSettings>
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="ConsoleLogs/log"/>
<param name="DatePattern" value="_yyyy_MM_dd_HH.\tx\t"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="90"/>
<param name="RollingStyle" value="Date"/>
<param name="StaticLogFileName" value="false"/>
<param name="File" value="ConsoleLogs/log" />
<param name="DatePattern" value="_yyyy_MM_dd_HH.\tx\t" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="90" />
<param name="RollingStyle" value="Date" />
<param name="StaticLogFileName" value="false" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%date [%thread] %-5level %message%newline"/>
<param name="ConversionPattern" value="%date [%thread] %-5level %message%newline" />
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="RollingFileAppender"/>
<level value="ALL" />
<appender-ref ref="RollingFileAppender" />
</root>
</log4net>
<connectionStrings>
<!--<add name="Arma3BEClientEntities" connectionString="metadata=res://*/Model.DbModel.csdl|res://*/Model.DbModel.ssdl|res://*/Model.DbModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=serv;initial catalog=Arma3BEClient;persist security info=True;user id=sa;password=12qw!@QW;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />-->
<add name="Arma3BEClientEntities" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=Database.sdf"/>
<add name="Arma3BEClientEntities" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=Database.sdf" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0"/>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact"/>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.ServiceLocation" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0"/>
<assemblyIdentity name="Microsoft.Practices.ServiceLocation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0"/>
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<remove invariant="System.Data.SqlServerCe.4.0" />
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</DbProviderFactories>
</system.data>
</configuration>
4 changes: 3 additions & 1 deletion src/Arma3BE.Client.Console/Arma3BE.Client.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down
39 changes: 0 additions & 39 deletions src/Arma3BE.Client.Console/Properties/AssemblyInfo.cs

This file was deleted.

6 changes: 5 additions & 1 deletion src/Arma3BE.Client.Libs/Arma3BE.Client.Libs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Context\Arma3BEClientContext.cs" />
<Compile Include="Repositories\AdminRepository.cs" />
<Compile Include="Repositories\BanRepository.cs" />
Expand All @@ -57,7 +60,7 @@
<Compile Include="ModelCompact\ServerInfo.cs" />
<Compile Include="ModelCompact\Sessions.cs" />
<Compile Include="ModelCompact\Settings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tools\ConnectionFactory.cs" />
<Compile Include="Tools\Settings.cs" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -89,6 +92,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<Private>True</Private>
Expand Down
3 changes: 2 additions & 1 deletion src/Arma3BE.Client.Libs/Context/Arma3BEClientContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Data.Entity;
using Arma3BEClient.Libs.ModelCompact;
using Arma3BEClient.Libs.Tools;

namespace Arma3BEClient.Libs.Context
{
Expand All @@ -12,7 +13,7 @@ static Arma3BeClientContext()
db.Database.Initialize(false);
}

public Arma3BeClientContext() : base("name=Arma3BEClientEntities")
public Arma3BeClientContext() : base(new ConnectionFactory().Create(), true)
{
}

Expand Down
39 changes: 0 additions & 39 deletions src/Arma3BE.Client.Libs/Properties/AssemblyInfo.cs

This file was deleted.

6 changes: 3 additions & 3 deletions src/Arma3BE.Client.Libs/Repositories/BanRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using Arma3BEClient.Common.Core;
using Arma3BEClient.Libs.Context;
using Arma3BEClient.Libs.ModelCompact;
Expand All @@ -12,12 +11,12 @@ namespace Arma3BEClient.Libs.Repositories
{
public class BanRepository : DisposeObject
{
public IEnumerable<Ban> GetActiveBans(Guid serverId, string[] playerGuids)
public IEnumerable<Ban> GetActiveBans(Guid serverId)
{
using (var context = new Arma3BeClientContext())
{
return
context.Bans.Where(x => x.IsActive && x.ServerId == serverId && playerGuids.Contains(x.GuidIp))
context.Bans.Where(x => x.IsActive && x.ServerId == serverId)
.ToList();
}
}
Expand All @@ -38,6 +37,7 @@ public void AddOrUpdate(IEnumerable<Ban> bans)
using (var dc = new Arma3BeClientContext())
{
dc.Bans.AddOrUpdate(bans.ToArray());
dc.SaveChanges();
}
}
}
Expand Down
Loading

0 comments on commit 243f872

Please sign in to comment.