Modernize NuGet dependencies and migrate to PackageReference (#823)
* Add .vscode to .gitignore * Update copyright year * Update Newtonsoft.Json package to version 13.0.4 * Migrate NuGet to PackageReference * Replace vocaluxe.dependencies.sqlite with Microsoft.Data.Sqlite * Update Serilog package references to latest versions * Fix typo
This commit is contained in:
1 parent
f11e27d98b
commit
9fbcc077ff
16 files changed
+417
-460
No files matched your search
@@ -3,6 +3,7 @@ PitchTracker.dll
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
.transifexrc
|
.transifexrc
|
||||||
.vs
|
.vs
|
||||||
|
.vscode
|
||||||
tx.exe
|
tx.exe
|
||||||
*.mp4
|
*.mp4
|
||||||
*.pdb
|
*.pdb
|
||||||
|
|||||||
+4
-18
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" />
|
|
||||||
<Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -56,13 +54,13 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="nunit.framework, Version=3.10.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="NUnit" Version="3.10.1" />
|
||||||
|
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" PrivateAssets="all" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="PartyModeChallenge\CPartyModeChallangeTest.cs" />
|
<Compile Include="PartyModeChallenge\CPartyModeChallangeTest.cs" />
|
||||||
<Content Include="VocaluxeLib\Log\CLogTest.tt">
|
<Content Include="VocaluxeLib\Log\CLogTest.tt">
|
||||||
@@ -80,11 +78,6 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="VocaluxeLib\XML\CXmlSerializerTest.cs" />
|
<Compile Include="VocaluxeLib\XML\CXmlSerializerTest.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||||
@@ -113,13 +106,6 @@
|
|||||||
<Content Include="VocaluxeLib\XML\TestFiles\SThemeScreen.xml" />
|
<Content Include="VocaluxeLib\XML\TestFiles\SThemeScreen.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.10.1\build\NUnit.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="NUnit" version="3.10.1" targetFramework="net47" />
|
|
||||||
<package id="NUnit3TestAdapter" version="3.10.0" targetFramework="net47" />
|
|
||||||
</packages>
|
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -25,21 +24,13 @@ using Vocaluxe.Base;
|
|||||||
using VocaluxeLib;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Draw;
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Log;
|
using VocaluxeLib.Log;
|
||||||
#if WIN
|
using Microsoft.Data.Sqlite;
|
||||||
using System.Data.SQLite;
|
|
||||||
|
|
||||||
#else
|
|
||||||
using Mono.Data.Sqlite;
|
|
||||||
using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
|
|
||||||
using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
|
|
||||||
using SQLiteTransaction = Mono.Data.Sqlite.SqliteTransaction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Database
|
namespace Vocaluxe.Lib.Database
|
||||||
{
|
{
|
||||||
public class CCoverDB : CDatabaseBase
|
public class CCoverDB : CDatabaseBase
|
||||||
{
|
{
|
||||||
private SQLiteTransaction _TransactionCover;
|
private SqliteTransaction _TransactionCover;
|
||||||
|
|
||||||
public CCoverDB(string filePath) : base(filePath) {}
|
public CCoverDB(string filePath) : base(filePath) {}
|
||||||
|
|
||||||
@@ -84,12 +75,14 @@ namespace Vocaluxe.Lib.Database
|
|||||||
//Double check here because we may have just closed our connection
|
//Double check here because we may have just closed our connection
|
||||||
if (_Connection == null)
|
if (_Connection == null)
|
||||||
return false;
|
return false;
|
||||||
using (var command = new SQLiteCommand(_Connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = _Connection;
|
||||||
command.CommandText = "SELECT id, width, height FROM Cover WHERE [Path] = @path";
|
command.CommandText = "SELECT id, width, height FROM Cover WHERE [Path] = @path";
|
||||||
command.Parameters.Add("@path", DbType.String).Value = coverPath;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@path", coverPath);
|
||||||
|
|
||||||
SQLiteDataReader reader = command.ExecuteReader();
|
SqliteDataReader reader = command.ExecuteReader();
|
||||||
|
|
||||||
if (reader != null && reader.HasRows)
|
if (reader != null && reader.HasRows)
|
||||||
{
|
{
|
||||||
@@ -100,7 +93,8 @@ namespace Vocaluxe.Lib.Database
|
|||||||
reader.Close();
|
reader.Close();
|
||||||
|
|
||||||
command.CommandText = "SELECT Data FROM CoverData WHERE CoverID = @id";
|
command.CommandText = "SELECT Data FROM CoverData WHERE CoverID = @id";
|
||||||
command.Parameters.Add("@id", DbType.Int32).Value = id;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@id", id);
|
||||||
reader = command.ExecuteReader();
|
reader = command.ExecuteReader();
|
||||||
|
|
||||||
if (reader.HasRows)
|
if (reader.HasRows)
|
||||||
@@ -112,7 +106,8 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
command.CommandText = "DELETE FROM Cover WHERE id = @id";
|
command.CommandText = "DELETE FROM Cover WHERE id = @id";
|
||||||
command.Parameters.Add("@id", DbType.Int32).Value = id;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@id", id);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
if (reader != null)
|
if (reader != null)
|
||||||
@@ -159,17 +154,21 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return false;
|
return false;
|
||||||
if (_TransactionCover == null)
|
if (_TransactionCover == null)
|
||||||
_TransactionCover = _Connection.BeginTransaction();
|
_TransactionCover = _Connection.BeginTransaction();
|
||||||
using (var command = new SQLiteCommand(_Connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = _Connection;
|
||||||
|
command.Transaction = _TransactionCover;
|
||||||
command.CommandText = "INSERT INTO Cover (Path, width, height) VALUES (@path, @w, @h)";
|
command.CommandText = "INSERT INTO Cover (Path, width, height) VALUES (@path, @w, @h)";
|
||||||
command.Parameters.Add("@w", DbType.Int32).Value = size.Width;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@h", DbType.Int32).Value = size.Height;
|
command.Parameters.AddWithValue("@w", size.Width);
|
||||||
command.Parameters.Add("@path", DbType.String).Value = coverPath;
|
command.Parameters.AddWithValue("@h", size.Height);
|
||||||
|
command.Parameters.AddWithValue("@path", coverPath);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
command.CommandText = "SELECT id FROM Cover WHERE [Path] = @path";
|
command.CommandText = "SELECT id FROM Cover WHERE [Path] = @path";
|
||||||
command.Parameters.Add("@path", DbType.String).Value = coverPath;
|
command.Parameters.Clear();
|
||||||
SQLiteDataReader reader = command.ExecuteReader();
|
command.Parameters.AddWithValue("@path", coverPath);
|
||||||
|
SqliteDataReader reader = command.ExecuteReader();
|
||||||
|
|
||||||
if (reader != null)
|
if (reader != null)
|
||||||
{
|
{
|
||||||
@@ -177,8 +176,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
int id = reader.GetInt32(0);
|
int id = reader.GetInt32(0);
|
||||||
reader.Dispose();
|
reader.Dispose();
|
||||||
command.CommandText = "INSERT INTO CoverData (CoverID, Data) VALUES (@id, @data)";
|
command.CommandText = "INSERT INTO CoverData (CoverID, Data) VALUES (@id, @data)";
|
||||||
command.Parameters.Add("@id", DbType.Int32).Value = id;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@data", DbType.Binary).Value = data;
|
command.Parameters.AddWithValue("@id", id);
|
||||||
|
command.Parameters.AddWithValue("@data", data);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -211,13 +211,15 @@ namespace Vocaluxe.Lib.Database
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var command = new SQLiteCommand(_Connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = _Connection;
|
||||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Version (Value INTEGER NOT NULL);";
|
command.CommandText = "CREATE TABLE IF NOT EXISTS Version (Value INTEGER NOT NULL);";
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
command.CommandText = "INSERT INTO Version (Value) VALUES(@Value)";
|
command.CommandText = "INSERT INTO Version (Value) VALUES(@Value)";
|
||||||
command.Parameters.Add("@Value", DbType.Int32).Value = CSettings.DatabaseCoverVersion;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@Value", CSettings.DatabaseCoverVersion);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Cover ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
command.CommandText = "CREATE TABLE IF NOT EXISTS Cover ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
||||||
|
|||||||
@@ -17,22 +17,14 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
#if WIN
|
using Microsoft.Data.Sqlite;
|
||||||
using System.Data.SQLite;
|
|
||||||
|
|
||||||
#else
|
|
||||||
using Mono.Data.Sqlite;
|
|
||||||
using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
|
|
||||||
using SQLiteConnection = Mono.Data.Sqlite.SqliteConnection;
|
|
||||||
using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Database
|
namespace Vocaluxe.Lib.Database
|
||||||
{
|
{
|
||||||
public abstract class CDatabaseBase
|
public abstract class CDatabaseBase
|
||||||
{
|
{
|
||||||
protected readonly string _FilePath;
|
protected readonly string _FilePath;
|
||||||
protected SQLiteConnection _Connection;
|
protected SqliteConnection _Connection;
|
||||||
|
|
||||||
//You have to lock all actions using connection or transaction, otherwhise order is not guaranted
|
//You have to lock all actions using connection or transaction, otherwhise order is not guaranted
|
||||||
protected readonly object _Mutex = new object();
|
protected readonly object _Mutex = new object();
|
||||||
@@ -50,7 +42,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
{
|
{
|
||||||
if (_Connection != null)
|
if (_Connection != null)
|
||||||
return false;
|
return false;
|
||||||
_Connection = new SQLiteConnection("Data Source=" + _FilePath);
|
_Connection = new SqliteConnection("Data Source=" + _FilePath);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_Connection.Open();
|
_Connection.Open();
|
||||||
@@ -62,11 +54,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(_Connection))
|
using (var command = new SqliteCommand("SELECT Value FROM Version", _Connection))
|
||||||
{
|
{
|
||||||
command.CommandText = "SELECT Value FROM Version";
|
SqliteDataReader reader = null;
|
||||||
|
|
||||||
SQLiteDataReader reader = null;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -112,7 +102,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
/// <param name="reader"></param>
|
/// <param name="reader"></param>
|
||||||
/// <param name="field">Field number to read from (default=first)</param>
|
/// <param name="field">Field number to read from (default=first)</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected static byte[] _GetBytes(SQLiteDataReader reader, int field = 0)
|
protected static byte[] _GetBytes(SqliteDataReader reader, int field = 0)
|
||||||
{
|
{
|
||||||
const int chunkSize = 2 * 1024;
|
const int chunkSize = 2 * 1024;
|
||||||
var buffer = new byte[chunkSize];
|
var buffer = new byte[chunkSize];
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Community.CsharpSqlite;
|
using Community.CsharpSqlite;
|
||||||
@@ -25,16 +24,7 @@ using Vocaluxe.Base;
|
|||||||
using VocaluxeLib;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Log;
|
using VocaluxeLib.Log;
|
||||||
using VocaluxeLib.Songs;
|
using VocaluxeLib.Songs;
|
||||||
#if WIN
|
using Microsoft.Data.Sqlite;
|
||||||
using System.Data.SQLite;
|
|
||||||
|
|
||||||
#else
|
|
||||||
using Mono.Data.Sqlite;
|
|
||||||
using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
|
|
||||||
using SQLiteConnection = Mono.Data.Sqlite.SqliteConnection;
|
|
||||||
using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
|
|
||||||
using SQLiteTransaction = Mono.Data.Sqlite.SqliteTransaction;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Database
|
namespace Vocaluxe.Lib.Database
|
||||||
{
|
{
|
||||||
@@ -102,7 +92,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
string sArtist;
|
string sArtist;
|
||||||
string sTitle;
|
string sTitle;
|
||||||
int songID;
|
int songID;
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + _FilePath;
|
connection.ConnectionString = "Data Source=" + _FilePath;
|
||||||
|
|
||||||
@@ -112,8 +102,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
}
|
}
|
||||||
catch (Exception) {}
|
catch (Exception) {}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
songID = _GetDataBaseSongID(artist, title, 0, command);
|
songID = _GetDataBaseSongID(artist, title, 0, command);
|
||||||
highscoreID = songID;
|
highscoreID = songID;
|
||||||
}
|
}
|
||||||
@@ -123,7 +114,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
|
|
||||||
public void IncreaseSongCounter(int dataBaseSongID)
|
public void IncreaseSongCounter(int dataBaseSongID)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + _FilePath;
|
connection.ConnectionString = "Data Source=" + _FilePath;
|
||||||
|
|
||||||
@@ -133,15 +124,18 @@ namespace Vocaluxe.Lib.Database
|
|||||||
}
|
}
|
||||||
catch (Exception) {}
|
catch (Exception) {}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
|
{
|
||||||
|
command.Connection = connection;
|
||||||
_IncreaseSongCounter(dataBaseSongID, command);
|
_IncreaseSongCounter(dataBaseSongID, command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int AddScore(string playerName, int score, int lineNr, long date, int medley, int duet, int shortSong, int difficulty,
|
public int AddScore(string playerName, int score, int lineNr, long date, int medley, int duet, int shortSong, int difficulty,
|
||||||
string artist, string title, int numPlayed, string filePath)
|
string artist, string title, int numPlayed, string filePath)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -154,8 +148,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
int dataBaseSongID = _GetDataBaseSongID(artist, title, numPlayed, command);
|
int dataBaseSongID = _GetDataBaseSongID(artist, title, numPlayed, command);
|
||||||
int result = _AddScore(playerName, score, lineNr, date, medley, duet, shortSong, difficulty, dataBaseSongID, command);
|
int result = _AddScore(playerName, score, lineNr, date, medley, duet, shortSong, difficulty, dataBaseSongID, command);
|
||||||
return result;
|
return result;
|
||||||
@@ -165,7 +160,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
|
|
||||||
public int AddScore(SPlayer player)
|
public int AddScore(SPlayer player)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + _FilePath;
|
connection.ConnectionString = "Data Source=" + _FilePath;
|
||||||
|
|
||||||
@@ -194,8 +189,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
int dataBaseSongID = CSongs.GetSong(player.SongID).DataBaseSongID;
|
int dataBaseSongID = CSongs.GetSong(player.SongID).DataBaseSongID;
|
||||||
return _AddScore(CProfiles.GetPlayerName(player.ProfileID), (int)Math.Round(player.Points), player.VoiceNr, player.DateTicks, medley,
|
return _AddScore(CProfiles.GetPlayerName(player.ProfileID), (int)Math.Round(player.Points), player.VoiceNr, player.DateTicks, medley,
|
||||||
duet, shortSong, (int)CProfiles.GetDifficulty(player.ProfileID), dataBaseSongID, command);
|
duet, shortSong, (int)CProfiles.GetDifficulty(player.ProfileID), dataBaseSongID, command);
|
||||||
@@ -204,7 +200,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int _AddScore(string playerName, int score, int lineNr, long date, int medley, int duet, int shortSong, int difficulty,
|
private int _AddScore(string playerName, int score, int lineNr, long date, int medley, int duet, int shortSong, int difficulty,
|
||||||
int dataBaseSongID, SQLiteCommand command)
|
int dataBaseSongID, SqliteCommand command)
|
||||||
{
|
{
|
||||||
int lastInsertID = -1;
|
int lastInsertID = -1;
|
||||||
|
|
||||||
@@ -212,17 +208,18 @@ namespace Vocaluxe.Lib.Database
|
|||||||
{
|
{
|
||||||
command.CommandText = "SELECT id FROM Scores WHERE SongID = @SongID AND PlayerName = @PlayerName AND Score = @Score AND " +
|
command.CommandText = "SELECT id FROM Scores WHERE SongID = @SongID AND PlayerName = @PlayerName AND Score = @Score AND " +
|
||||||
"LineNr = @LineNr AND Date = @Date AND Medley = @Medley AND Duet = @Duet AND ShortSong = @ShortSong AND Difficulty = @Difficulty";
|
"LineNr = @LineNr AND Date = @Date AND Medley = @Medley AND Duet = @Duet AND ShortSong = @ShortSong AND Difficulty = @Difficulty";
|
||||||
command.Parameters.Add("@SongID", DbType.Int32, 0).Value = dataBaseSongID;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@PlayerName", DbType.String, 0).Value = playerName;
|
command.Parameters.AddWithValue("@SongID", dataBaseSongID);
|
||||||
command.Parameters.Add("@Score", DbType.Int32, 0).Value = score;
|
command.Parameters.AddWithValue("@PlayerName", playerName ?? String.Empty);
|
||||||
command.Parameters.Add("@LineNr", DbType.Int32, 0).Value = lineNr;
|
command.Parameters.AddWithValue("@Score", score);
|
||||||
command.Parameters.Add("@Date", DbType.Int64, 0).Value = date;
|
command.Parameters.AddWithValue("@LineNr", lineNr);
|
||||||
command.Parameters.Add("@Medley", DbType.Int32, 0).Value = medley;
|
command.Parameters.AddWithValue("@Date", date);
|
||||||
command.Parameters.Add("@Duet", DbType.Int32, 0).Value = duet;
|
command.Parameters.AddWithValue("@Medley", medley);
|
||||||
command.Parameters.Add("@ShortSong", DbType.Int32, 0).Value = shortSong;
|
command.Parameters.AddWithValue("@Duet", duet);
|
||||||
command.Parameters.Add("@Difficulty", DbType.Int32, 0).Value = difficulty;
|
command.Parameters.AddWithValue("@ShortSong", shortSong);
|
||||||
|
command.Parameters.AddWithValue("@Difficulty", difficulty);
|
||||||
|
|
||||||
SQLiteDataReader reader = null;
|
SqliteDataReader reader = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reader = command.ExecuteReader();
|
reader = command.ExecuteReader();
|
||||||
@@ -240,15 +237,16 @@ namespace Vocaluxe.Lib.Database
|
|||||||
|
|
||||||
command.CommandText = "INSERT INTO Scores (SongID, PlayerName, Score, LineNr, Date, Medley, Duet, ShortSong, Difficulty) " +
|
command.CommandText = "INSERT INTO Scores (SongID, PlayerName, Score, LineNr, Date, Medley, Duet, ShortSong, Difficulty) " +
|
||||||
"VALUES (@SongID, @PlayerName, @Score, @LineNr, @Date, @Medley, @Duet, @ShortSong, @Difficulty)";
|
"VALUES (@SongID, @PlayerName, @Score, @LineNr, @Date, @Medley, @Duet, @ShortSong, @Difficulty)";
|
||||||
command.Parameters.Add("@SongID", DbType.Int32, 0).Value = dataBaseSongID;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@PlayerName", DbType.String, 0).Value = playerName;
|
command.Parameters.AddWithValue("@SongID", dataBaseSongID);
|
||||||
command.Parameters.Add("@Score", DbType.Int32, 0).Value = score;
|
command.Parameters.AddWithValue("@PlayerName", playerName ?? String.Empty);
|
||||||
command.Parameters.Add("@LineNr", DbType.Int32, 0).Value = lineNr;
|
command.Parameters.AddWithValue("@Score", score);
|
||||||
command.Parameters.Add("@Date", DbType.Int64, 0).Value = date;
|
command.Parameters.AddWithValue("@LineNr", lineNr);
|
||||||
command.Parameters.Add("@Medley", DbType.Int32, 0).Value = medley;
|
command.Parameters.AddWithValue("@Date", date);
|
||||||
command.Parameters.Add("@Duet", DbType.Int32, 0).Value = duet;
|
command.Parameters.AddWithValue("@Medley", medley);
|
||||||
command.Parameters.Add("@ShortSong", DbType.Int32, 0).Value = shortSong;
|
command.Parameters.AddWithValue("@Duet", duet);
|
||||||
command.Parameters.Add("@Difficulty", DbType.Int32, 0).Value = difficulty;
|
command.Parameters.AddWithValue("@ShortSong", shortSong);
|
||||||
|
command.Parameters.AddWithValue("@Difficulty", difficulty);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
//Read last insert line
|
//Read last insert line
|
||||||
@@ -270,7 +268,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
public List<SDBScoreEntry> LoadScore(int songID, EGameMode gameMode, EHighscoreStyle style)
|
public List<SDBScoreEntry> LoadScore(int songID, EGameMode gameMode, EHighscoreStyle style)
|
||||||
{
|
{
|
||||||
var scores = new List<SDBScoreEntry>();
|
var scores = new List<SDBScoreEntry>();
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + _FilePath;
|
connection.ConnectionString = "Data Source=" + _FilePath;
|
||||||
|
|
||||||
@@ -283,8 +281,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return scores;
|
return scores;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
int medley = 0;
|
int medley = 0;
|
||||||
int duet = 0;
|
int duet = 0;
|
||||||
int shortSong = 0;
|
int shortSong = 0;
|
||||||
@@ -336,12 +335,13 @@ namespace Vocaluxe.Lib.Database
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
command.Parameters.Add("@SongID", DbType.Int32, 0).Value = dataBaseSongID;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@Medley", DbType.Int32, 0).Value = medley;
|
command.Parameters.AddWithValue("@SongID", dataBaseSongID);
|
||||||
command.Parameters.Add("@Duet", DbType.Int32, 0).Value = duet;
|
command.Parameters.AddWithValue("@Medley", medley);
|
||||||
command.Parameters.Add("@ShortSong", DbType.Int32, 0).Value = shortSong;
|
command.Parameters.AddWithValue("@Duet", duet);
|
||||||
|
command.Parameters.AddWithValue("@ShortSong", shortSong);
|
||||||
|
|
||||||
SQLiteDataReader reader = command.ExecuteReader();
|
SqliteDataReader reader = command.ExecuteReader();
|
||||||
if (reader != null && reader.HasRows)
|
if (reader != null && reader.HasRows)
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
@@ -365,14 +365,15 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return scores;
|
return scores;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _IncreaseSongCounter(int dataBaseSongID, SQLiteCommand command)
|
private void _IncreaseSongCounter(int dataBaseSongID, SqliteCommand command)
|
||||||
{
|
{
|
||||||
command.CommandText = "UPDATE Songs SET NumPlayed = NumPlayed + 1 WHERE [id] = @id";
|
command.CommandText = "UPDATE Songs SET NumPlayed = NumPlayed + 1 WHERE [id] = @id";
|
||||||
command.Parameters.Add("@id", DbType.Int32, 0).Value = dataBaseSongID;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@id", dataBaseSongID);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _GetDataBaseSongID(int songID, SQLiteCommand command)
|
private int _GetDataBaseSongID(int songID, SqliteCommand command)
|
||||||
{
|
{
|
||||||
CSong song = CSongs.GetSong(songID);
|
CSong song = CSongs.GetSong(songID);
|
||||||
|
|
||||||
@@ -382,13 +383,14 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return _GetDataBaseSongID(song.Artist, song.Title, 0, command);
|
return _GetDataBaseSongID(song.Artist, song.Title, 0, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _GetDataBaseSongID(string artist, string title, int defNumPlayed, SQLiteCommand command)
|
private int _GetDataBaseSongID(string artist, string title, int defNumPlayed, SqliteCommand command)
|
||||||
{
|
{
|
||||||
command.CommandText = "SELECT id FROM Songs WHERE [Title] = @title AND [Artist] = @artist";
|
command.CommandText = "SELECT id FROM Songs WHERE [Title] = @title AND [Artist] = @artist";
|
||||||
command.Parameters.Add("@title", DbType.String, 0).Value = title;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@artist", DbType.String, 0).Value = artist;
|
command.Parameters.AddWithValue("@title", title ?? String.Empty);
|
||||||
|
command.Parameters.AddWithValue("@artist", artist ?? String.Empty);
|
||||||
|
|
||||||
SQLiteDataReader reader = command.ExecuteReader();
|
SqliteDataReader reader = command.ExecuteReader();
|
||||||
|
|
||||||
if (reader != null && reader.HasRows)
|
if (reader != null && reader.HasRows)
|
||||||
{
|
{
|
||||||
@@ -403,15 +405,17 @@ namespace Vocaluxe.Lib.Database
|
|||||||
|
|
||||||
command.CommandText = "INSERT INTO Songs (Title, Artist, NumPlayed, DateAdded) " +
|
command.CommandText = "INSERT INTO Songs (Title, Artist, NumPlayed, DateAdded) " +
|
||||||
"VALUES (@title, @artist, @numplayed, @dateadded)";
|
"VALUES (@title, @artist, @numplayed, @dateadded)";
|
||||||
command.Parameters.Add("@title", DbType.String, 0).Value = title;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@artist", DbType.String, 0).Value = artist;
|
command.Parameters.AddWithValue("@title", title ?? String.Empty);
|
||||||
command.Parameters.Add("@numplayed", DbType.Int32, 0).Value = defNumPlayed;
|
command.Parameters.AddWithValue("@artist", artist ?? String.Empty);
|
||||||
command.Parameters.Add("@dateadded", DbType.Int64, 0).Value = DateTime.Now.Ticks;
|
command.Parameters.AddWithValue("@numplayed", defNumPlayed);
|
||||||
|
command.Parameters.AddWithValue("@dateadded", DateTime.Now.Ticks);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
command.CommandText = "SELECT id FROM Songs WHERE [Title] = @title AND [Artist] = @artist";
|
command.CommandText = "SELECT id FROM Songs WHERE [Title] = @title AND [Artist] = @artist";
|
||||||
command.Parameters.Add("@title", DbType.String, 0).Value = title;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@artist", DbType.String, 0).Value = artist;
|
command.Parameters.AddWithValue("@title", title ?? String.Empty);
|
||||||
|
command.Parameters.AddWithValue("@artist", artist ?? String.Empty);
|
||||||
|
|
||||||
reader = command.ExecuteReader();
|
reader = command.ExecuteReader();
|
||||||
|
|
||||||
@@ -433,7 +437,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
numPlayed = 0;
|
numPlayed = 0;
|
||||||
dateAdded = DateTime.Today;
|
dateAdded = DateTime.Today;
|
||||||
|
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -446,12 +450,14 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
command.CommandText = "SELECT Artist, Title, NumPlayed, DateAdded FROM Songs WHERE [id] = @id";
|
command.CommandText = "SELECT Artist, Title, NumPlayed, DateAdded FROM Songs WHERE [id] = @id";
|
||||||
command.Parameters.Add("@id", DbType.String, 0).Value = songID;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@id", songID);
|
||||||
|
|
||||||
SQLiteDataReader reader;
|
SqliteDataReader reader;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reader = command.ExecuteReader();
|
reader = command.ExecuteReader();
|
||||||
@@ -490,7 +496,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
|
|
||||||
private void _CreateHighscoreDB(string filePath)
|
private void _CreateHighscoreDB(string filePath)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -503,13 +509,15 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Version ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Value INTEGER NOT NULL);";
|
command.CommandText = "CREATE TABLE IF NOT EXISTS Version ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Value INTEGER NOT NULL);";
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
command.CommandText = "INSERT INTO Version (id, Value) VALUES(NULL, @Value)";
|
command.CommandText = "INSERT INTO Version (id, Value) VALUES(NULL, @Value)";
|
||||||
command.Parameters.Add("@Value", DbType.Int32).Value = CSettings.DatabaseHighscoreVersion;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@Value", CSettings.DatabaseHighscoreVersion);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Songs ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
command.CommandText = "CREATE TABLE IF NOT EXISTS Songs ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
||||||
@@ -526,7 +534,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
|
|
||||||
private void _CreateHighscoreDBV1(string filePath)
|
private void _CreateHighscoreDBV1(string filePath)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -539,8 +547,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Version ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Value INTEGER NOT NULL);";
|
command.CommandText = "CREATE TABLE IF NOT EXISTS Version ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Value INTEGER NOT NULL);";
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
@@ -567,7 +576,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
private bool _CreateOrConvert(string filePath)
|
private bool _CreateOrConvert(string filePath)
|
||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -580,10 +589,11 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
command.CommandText = "PRAGMA user_version";
|
command.CommandText = "PRAGMA user_version";
|
||||||
SQLiteDataReader reader = command.ExecuteReader();
|
SqliteDataReader reader = command.ExecuteReader();
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|
||||||
int version = reader.GetInt32(0);
|
int version = reader.GetInt32(0);
|
||||||
@@ -655,7 +665,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
/// <returns>True if succeeded</returns>
|
/// <returns>True if succeeded</returns>
|
||||||
private bool _ConvertFrom110(string filePath)
|
private bool _ConvertFrom110(string filePath)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -668,8 +678,9 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
//The USDX database has no column for LineNr, Medley and Duet so just fill 0 in there
|
//The USDX database has no column for LineNr, Medley and Duet so just fill 0 in there
|
||||||
command.CommandText =
|
command.CommandText =
|
||||||
"INSERT INTO Scores (SongID, PlayerName, Score, LineNr, Date, Medley, Duet, Difficulty) SELECT SongID, Player, Score, '0', Date, '0', '0', Difficulty from US_Scores";
|
"INSERT INTO Scores (SongID, PlayerName, Score, LineNr, Date, Medley, Duet, Difficulty) SELECT SongID, Player, Score, '0', Date, '0', '0', Difficulty from US_Scores";
|
||||||
@@ -682,7 +693,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
var songs = new List<SData>();
|
var songs = new List<SData>();
|
||||||
|
|
||||||
command.CommandText = "SELECT id, PlayerName, Date FROM Scores";
|
command.CommandText = "SELECT id, PlayerName, Date FROM Scores";
|
||||||
SQLiteDataReader reader = command.ExecuteReader();
|
SqliteDataReader reader = command.ExecuteReader();
|
||||||
|
|
||||||
if (reader != null && reader.HasRows)
|
if (reader != null && reader.HasRows)
|
||||||
{
|
{
|
||||||
@@ -720,14 +731,16 @@ namespace Vocaluxe.Lib.Database
|
|||||||
if (reader != null)
|
if (reader != null)
|
||||||
reader.Dispose();
|
reader.Dispose();
|
||||||
|
|
||||||
SQLiteTransaction transaction = connection.BeginTransaction();
|
SqliteTransaction transaction = connection.BeginTransaction();
|
||||||
|
command.Transaction = transaction;
|
||||||
// update Title and Artist strings
|
// update Title and Artist strings
|
||||||
foreach (SData data in songs)
|
foreach (SData data in songs)
|
||||||
{
|
{
|
||||||
command.CommandText = "UPDATE Songs SET [Artist] = @artist, [Title] = @title WHERE [ID] = @id";
|
command.CommandText = "UPDATE Songs SET [Artist] = @artist, [Title] = @title WHERE [ID] = @id";
|
||||||
command.Parameters.Add("@title", DbType.String, 0).Value = data.Str2;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@artist", DbType.String, 0).Value = data.Str1;
|
command.Parameters.AddWithValue("@title", data.Str2 ?? String.Empty);
|
||||||
command.Parameters.Add("@id", DbType.Int32, 0).Value = data.Id;
|
command.Parameters.AddWithValue("@artist", data.Str1 ?? String.Empty);
|
||||||
|
command.Parameters.AddWithValue("@id", data.Id);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,9 +748,10 @@ namespace Vocaluxe.Lib.Database
|
|||||||
foreach (SData data in scores)
|
foreach (SData data in scores)
|
||||||
{
|
{
|
||||||
command.CommandText = "UPDATE Scores SET [PlayerName] = @player, [Date] = @date WHERE [id] = @id";
|
command.CommandText = "UPDATE Scores SET [PlayerName] = @player, [Date] = @date WHERE [id] = @id";
|
||||||
command.Parameters.Add("@player", DbType.String, 0).Value = data.Str1;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@date", DbType.Int64, 0).Value = data.Ticks;
|
command.Parameters.AddWithValue("@player", data.Str1 ?? String.Empty);
|
||||||
command.Parameters.Add("@id", DbType.Int32, 0).Value = data.Id;
|
command.Parameters.AddWithValue("@date", data.Ticks);
|
||||||
|
command.Parameters.AddWithValue("@id", data.Id);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
transaction.Commit();
|
transaction.Commit();
|
||||||
@@ -777,7 +791,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
/// <returns>True if succeeded</returns>
|
/// <returns>True if succeeded</returns>
|
||||||
private bool _ConvertFrom101(string filePath)
|
private bool _ConvertFrom101(string filePath)
|
||||||
{
|
{
|
||||||
using (var connection = new SQLiteConnection())
|
using (var connection = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connection.ConnectionString = "Data Source=" + filePath;
|
connection.ConnectionString = "Data Source=" + filePath;
|
||||||
|
|
||||||
@@ -790,11 +804,12 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
command.CommandText = "PRAGMA table_info(US_Scores);";
|
command.CommandText = "PRAGMA table_info(US_Scores);";
|
||||||
bool dateExists = false;
|
bool dateExists = false;
|
||||||
using (SQLiteDataReader reader = command.ExecuteReader())
|
using (SqliteDataReader reader = command.ExecuteReader())
|
||||||
{
|
{
|
||||||
//Check for column Date
|
//Check for column Date
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
@@ -891,15 +906,17 @@ namespace Vocaluxe.Lib.Database
|
|||||||
}
|
}
|
||||||
Sqlite3.sqlite3_close(oldDB);
|
Sqlite3.sqlite3_close(oldDB);
|
||||||
|
|
||||||
SQLiteTransaction transaction = connection.BeginTransaction();
|
SqliteTransaction transaction = connection.BeginTransaction();
|
||||||
|
command.Transaction = transaction;
|
||||||
|
|
||||||
// update Title and Artist strings
|
// update Title and Artist strings
|
||||||
foreach (SData data in songs)
|
foreach (SData data in songs)
|
||||||
{
|
{
|
||||||
command.CommandText = "UPDATE Songs SET [Artist] = @artist, [Title] = @title WHERE [ID] = @id";
|
command.CommandText = "UPDATE Songs SET [Artist] = @artist, [Title] = @title WHERE [ID] = @id";
|
||||||
command.Parameters.Add("@title", DbType.String, 0).Value = data.Str2;
|
command.Parameters.Clear();
|
||||||
command.Parameters.Add("@artist", DbType.String, 0).Value = data.Str1;
|
command.Parameters.AddWithValue("@title", data.Str2 ?? String.Empty);
|
||||||
command.Parameters.Add("@id", DbType.Int32, 0).Value = data.Id;
|
command.Parameters.AddWithValue("@artist", data.Str1 ?? String.Empty);
|
||||||
|
command.Parameters.AddWithValue("@id", data.Id);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,10 +928,13 @@ namespace Vocaluxe.Lib.Database
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
command.CommandText = "UPDATE Scores SET [PlayerName] = @player, [Date] = @date WHERE [id] = @id";
|
command.CommandText = "UPDATE Scores SET [PlayerName] = @player, [Date] = @date WHERE [id] = @id";
|
||||||
command.Parameters.Add("@date", DbType.Int64, 0).Value = data.Ticks;
|
|
||||||
}
|
}
|
||||||
command.Parameters.Add("@player", DbType.String, 0).Value = data.Str1;
|
|
||||||
command.Parameters.Add("@id", DbType.Int32, 0).Value = data.Id;
|
command.Parameters.Clear();
|
||||||
|
if (dateExists)
|
||||||
|
command.Parameters.AddWithValue("@date", data.Ticks);
|
||||||
|
command.Parameters.AddWithValue("@player", data.Str1 ?? String.Empty);
|
||||||
|
command.Parameters.AddWithValue("@id", data.Id);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
transaction.Commit();
|
transaction.Commit();
|
||||||
@@ -931,7 +951,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _UpdateDatabase(int currentVersion, SQLiteConnection connection)
|
private bool _UpdateDatabase(int currentVersion, SqliteConnection connection)
|
||||||
{
|
{
|
||||||
bool updated = true;
|
bool updated = true;
|
||||||
|
|
||||||
@@ -943,39 +963,44 @@ namespace Vocaluxe.Lib.Database
|
|||||||
return updated;
|
return updated;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _ConvertV1toV2(SQLiteConnection connection)
|
private bool _ConvertV1toV2(SqliteConnection connection)
|
||||||
{
|
{
|
||||||
using (var command = new SQLiteCommand(connection))
|
using (var command = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
command.Connection = connection;
|
||||||
command.CommandText = "ALTER TABLE Scores ADD ShortSong INTEGER";
|
command.CommandText = "ALTER TABLE Scores ADD ShortSong INTEGER";
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
command.CommandText = "UPDATE Scores SET [ShortSong] = @ShortSong";
|
command.CommandText = "UPDATE Scores SET [ShortSong] = @ShortSong";
|
||||||
command.Parameters.Add("@ShortSong", DbType.Int32, 0).Value = 0;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@ShortSong", 0);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
command.CommandText = "UPDATE Version SET [Value] = @version";
|
command.CommandText = "UPDATE Version SET [Value] = @version";
|
||||||
command.Parameters.Add("@version", DbType.Int32, 0).Value = 2;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@version", 2);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _ConvertV2toV3(SQLiteConnection connection)
|
private bool _ConvertV2toV3(SqliteConnection connection)
|
||||||
{
|
{
|
||||||
var command = new SQLiteCommand(connection) {CommandText = "ALTER TABLE Songs ADD DateAdded BIGINT"};
|
var command = new SqliteCommand("ALTER TABLE Songs ADD DateAdded BIGINT", connection);
|
||||||
|
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
command.CommandText = "UPDATE Songs SET [DateAdded] = @DateAdded";
|
command.CommandText = "UPDATE Songs SET [DateAdded] = @DateAdded";
|
||||||
command.Parameters.Add("@DateAdded", DbType.Int64, 0).Value = DateTime.Now.Ticks;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@DateAdded", DateTime.Now.Ticks);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
command.CommandText = "UPDATE Version SET [Value] = @version";
|
command.CommandText = "UPDATE Version SET [Value] = @version";
|
||||||
command.Parameters.Add("@version", DbType.Int32, 0).Value = 3;
|
command.Parameters.Clear();
|
||||||
|
command.Parameters.AddWithValue("@version", 3);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|
||||||
//Read NumPlayed from Scores and save to Songs
|
//Read NumPlayed from Scores and save to Songs
|
||||||
command.CommandText = "SELECT SongID, Date FROM Scores ORDER BY Date ASC";
|
command.CommandText = "SELECT SongID, Date FROM Scores ORDER BY Date ASC";
|
||||||
|
|
||||||
SQLiteDataReader reader;
|
SqliteDataReader reader;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reader = command.ExecuteReader();
|
reader = command.ExecuteReader();
|
||||||
@@ -1013,7 +1038,7 @@ namespace Vocaluxe.Lib.Database
|
|||||||
private bool _ImportData(string sourceDBPath)
|
private bool _ImportData(string sourceDBPath)
|
||||||
{
|
{
|
||||||
#region open db
|
#region open db
|
||||||
using (var connSource = new SQLiteConnection())
|
using (var connSource = new SqliteConnection())
|
||||||
{
|
{
|
||||||
connSource.ConnectionString = "Data Source=" + sourceDBPath;
|
connSource.ConnectionString = "Data Source=" + sourceDBPath;
|
||||||
|
|
||||||
@@ -1028,11 +1053,12 @@ namespace Vocaluxe.Lib.Database
|
|||||||
}
|
}
|
||||||
#endregion open db
|
#endregion open db
|
||||||
|
|
||||||
using (var cmdSource = new SQLiteCommand(connSource))
|
using (var cmdSource = new SqliteCommand())
|
||||||
{
|
{
|
||||||
|
cmdSource.Connection = connSource;
|
||||||
#region import table scores
|
#region import table scores
|
||||||
cmdSource.CommandText = "SELECT SongID, PlayerName, Score, LineNr, Date, Medley, Duet, ShortSong, Difficulty FROM Scores";
|
cmdSource.CommandText = "SELECT SongID, PlayerName, Score, LineNr, Date, Medley, Duet, ShortSong, Difficulty FROM Scores";
|
||||||
SQLiteDataReader source = cmdSource.ExecuteReader();
|
SqliteDataReader source = cmdSource.ExecuteReader();
|
||||||
if (source == null)
|
if (source == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
+32
-7
@@ -24,6 +24,7 @@ using System.Runtime.CompilerServices;
|
|||||||
using System.Runtime.ExceptionServices;
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using SQLitePCL;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Fonts;
|
using Vocaluxe.Base.Fonts;
|
||||||
using Vocaluxe.Base.Server;
|
using Vocaluxe.Base.Server;
|
||||||
@@ -55,13 +56,24 @@ namespace Vocaluxe
|
|||||||
#endif
|
#endif
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += _AssemblyResolver;
|
AppDomain.CurrentDomain.AssemblyResolve += _AssemblyResolver;
|
||||||
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\"));
|
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\"));
|
||||||
#if ARCH_X86
|
#if ARCH_X86
|
||||||
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\x86\\"));
|
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\x86\\"));
|
||||||
#endif
|
#endif
|
||||||
#if ARCH_X64
|
#if ARCH_X64
|
||||||
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\x64\\"));
|
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\x64\\"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Microsoft.Data.Sqlite (SQLitePCLRaw) native library location
|
||||||
|
#if ARCH_X86
|
||||||
|
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\managed\\runtimes\\win-x86\\native\\"));
|
||||||
|
#endif
|
||||||
|
#if ARCH_X64
|
||||||
|
COSFunctions.AddEnvironmentPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\managed\\runtimes\\win-x64\\native\\"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Make sure SQLitePCL is initialized before any DB usage
|
||||||
|
Batteries_V2.Init();
|
||||||
|
|
||||||
|
|
||||||
// Close program if there is another instance running
|
// Close program if there is another instance running
|
||||||
if (!_EnsureSingleInstance())
|
if (!_EnsureSingleInstance())
|
||||||
@@ -459,14 +471,27 @@ namespace Vocaluxe
|
|||||||
string[] arr = args.Name.Split(new char[] {','});
|
string[] arr = args.Name.Split(new char[] {','});
|
||||||
if (arr.Length > 0)
|
if (arr.Length > 0)
|
||||||
{
|
{
|
||||||
|
string fileName = arr[0] + ".dll";
|
||||||
|
|
||||||
#if ARCH_X86
|
#if ARCH_X86
|
||||||
string path = "x86";
|
string arch = "x86";
|
||||||
|
#endif
|
||||||
|
#if ARCH_X64
|
||||||
|
string arch = "x64";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ARCH_X64
|
string[] probePaths =
|
||||||
string path = "x64";
|
{
|
||||||
#endif
|
Path.Combine(CSettings.ProgramFolder, "libs", "managed", fileName),
|
||||||
path = Path.Combine(CSettings.ProgramFolder, path, arr[0] + ".dll");
|
Path.Combine(CSettings.ProgramFolder, "libs", "managed", arch, fileName),
|
||||||
|
Path.Combine(CSettings.ProgramFolder, "libs", fileName),
|
||||||
|
Path.Combine(CSettings.ProgramFolder, arch, fileName),
|
||||||
|
Path.Combine(CSettings.ProgramFolder, fileName)
|
||||||
|
};
|
||||||
|
|
||||||
|
string path = probePaths.FirstOrDefault(File.Exists);
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
return null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
assembly = Assembly.LoadFrom(path);
|
assembly = Assembly.LoadFrom(path);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Vocaluxe")]
|
[assembly: AssemblyProduct("Vocaluxe")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|||||||
+24
-39
@@ -158,11 +158,11 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.2-beta1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
@@ -174,6 +174,26 @@
|
|||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.XML" />
|
<Reference Include="System.XML" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Data.Sqlite">
|
||||||
|
<Version>10.0.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||||
|
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3">
|
||||||
|
<Version>3.0.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.acinerella" Version="1.0.6" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux'" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.aforgevideo" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.csharpsqlite" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.ffmpeg" Version="1.0.6" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux'" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.gstreamer" Version="1.0.3" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux'" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.gstreamersharp" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.hidapi" Version="1.0.4" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux'" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.opentk" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.portaudiosharp" Version="1.0.3" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.qrcoder" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.slimdx" Version="1.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Base\CBackgroundMusic.cs" />
|
<Compile Include="Base\CBackgroundMusic.cs" />
|
||||||
<Compile Include="Base\CCoverGenerator.cs" />
|
<Compile Include="Base\CCoverGenerator.cs" />
|
||||||
@@ -360,9 +380,6 @@
|
|||||||
<Content Include="Website\locales\tr.json">
|
<Content Include="Website\locales\tr.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<None Include="packages.config">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Doc\Roadmap.txt" />
|
<Content Include="Doc\Roadmap.txt" />
|
||||||
@@ -546,9 +563,6 @@ $(SolutionDir)/.build/linuxPostBuildEvent.sh $(ProjectDir)</PostBuildEvent>
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<x86FolderFilesToMove Include="$(TargetDir)x86\*.*" />
|
<x86FolderFilesToMove Include="$(TargetDir)x86\*.*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<OtherFilesToMove Include="$(TargetDir)System.Data.SQLite.xml;" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Copy SourceFiles="@(RootDLLFilesToMove)" DestinationFiles="@(RootDLLFilesToMove->'$(TargetDir)libs\managed\%(Filename)%(Extension)')" />
|
<Copy SourceFiles="@(RootDLLFilesToMove)" DestinationFiles="@(RootDLLFilesToMove->'$(TargetDir)libs\managed\%(Filename)%(Extension)')" />
|
||||||
<Copy SourceFiles="@(x64FolderFilesToMove)" DestinationFiles="@(x64FolderFilesToMove->'$(TargetDir)libs\managed\x64\%(Filename)%(Extension)')" />
|
<Copy SourceFiles="@(x64FolderFilesToMove)" DestinationFiles="@(x64FolderFilesToMove->'$(TargetDir)libs\managed\x64\%(Filename)%(Extension)')" />
|
||||||
<Copy SourceFiles="@(x86FolderFilesToMove)" DestinationFiles="@(x86FolderFilesToMove->'$(TargetDir)libs\managed\x86\%(Filename)%(Extension)')" />
|
<Copy SourceFiles="@(x86FolderFilesToMove)" DestinationFiles="@(x86FolderFilesToMove->'$(TargetDir)libs\managed\x86\%(Filename)%(Extension)')" />
|
||||||
@@ -559,33 +573,4 @@ $(SolutionDir)/.build/linuxPostBuildEvent.sh $(ProjectDir)</PostBuildEvent>
|
|||||||
<Delete Files="@(OtherFilesToMove)" />
|
<Delete Files="@(OtherFilesToMove)" />
|
||||||
<RemoveDir Directories="$(TargetDir)\x64\;$(TargetDir)\x86\" />
|
<RemoveDir Directories="$(TargetDir)\x64\;$(TargetDir)\x86\" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
</Project>
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Rebuild for automatic package restore. The missing file is {0}.</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.6\build\vocaluxe.dependencies.acinerella.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.acinerella.1.0.6\build\vocaluxe.dependencies.acinerella.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets'))" />
|
|
||||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.6\build\vocaluxe.dependencies.ffmpeg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.ffmpeg.1.0.6\build\vocaluxe.dependencies.ffmpeg.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets'))" />
|
|
||||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets'))" />
|
|
||||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.6\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.6\build\vocaluxe.dependencies.acinerella.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets" Condition="Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.ffmpeg.1.0.6\build\vocaluxe.dependencies.ffmpeg.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.6\build\vocaluxe.dependencies.ffmpeg.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets" Condition="Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets" Condition="Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets" Condition="Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Newtonsoft.Json" version="13.0.2-beta1" targetFramework="net471" />
|
|
||||||
<package id="vocaluxe.dependencies.acinerella" version="1.0.6" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.aforgevideo" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.csharpsqlite" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.6" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.gstreamer" version="1.0.3" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.hidapi" version="1.0.4" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.opentk" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.3" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.qrcoder" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.slimdx" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.sqlite" version="1.0.1" targetFramework="net40" />
|
|
||||||
</packages>
|
|
||||||
+167
-167
@@ -44,11 +44,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Verbose(messageTemplate);
|
_MainLog.Verbose(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -64,11 +64,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -96,18 +96,18 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Verbose( exception, messageTemplate);
|
_MainLog.Verbose( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
if(show)
|
if(show)
|
||||||
ShowLogAssistant(messageTemplate, null);
|
ShowLogAssistant(messageTemplate, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log.
|
/// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -117,11 +117,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -152,11 +152,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Debug(messageTemplate);
|
_MainLog.Debug(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -172,11 +172,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -204,18 +204,18 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Debug( exception, messageTemplate);
|
_MainLog.Debug( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
if(show)
|
if(show)
|
||||||
ShowLogAssistant(messageTemplate, null);
|
ShowLogAssistant(messageTemplate, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log.
|
/// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -225,11 +225,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -260,11 +260,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Information(messageTemplate);
|
_MainLog.Information(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -280,11 +280,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -312,18 +312,18 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Information( exception, messageTemplate);
|
_MainLog.Information( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
if(show)
|
if(show)
|
||||||
ShowLogAssistant(messageTemplate, null);
|
ShowLogAssistant(messageTemplate, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Information level with additional propertyValues and associated exception to the Information log.
|
/// Write an event with the Information level with additional propertyValues and associated exception to the Information log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -333,11 +333,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -368,11 +368,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Warning(messageTemplate);
|
_MainLog.Warning(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -388,11 +388,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -420,18 +420,18 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Warning( exception, messageTemplate);
|
_MainLog.Warning( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
if(show)
|
if(show)
|
||||||
ShowLogAssistant(messageTemplate, null);
|
ShowLogAssistant(messageTemplate, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log.
|
/// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -441,11 +441,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -476,11 +476,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Error(messageTemplate);
|
_MainLog.Error(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -496,11 +496,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -528,18 +528,18 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Error( exception, messageTemplate);
|
_MainLog.Error( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
if(show)
|
if(show)
|
||||||
ShowLogAssistant(messageTemplate, null);
|
ShowLogAssistant(messageTemplate, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Error level with additional propertyValues and associated exception to the Error log.
|
/// Write an event with the Error level with additional propertyValues and associated exception to the Error log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -549,11 +549,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -584,11 +584,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Fatal(string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Fatal(string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Fatal(messageTemplate);
|
_MainLog.Fatal(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -608,11 +608,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Fatal(string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Fatal(string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -644,11 +644,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Fatal(Exception exception, string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Fatal(Exception exception, string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_MainLog.Fatal( exception, messageTemplate);
|
_MainLog.Fatal( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -659,7 +659,7 @@ namespace VocaluxeLib.Log
|
|||||||
Close();
|
Close();
|
||||||
Environment.Exit(Environment.ExitCode);
|
Environment.Exit(Environment.ExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Fatal level with additional propertyValues and associated exception to the Fatal log and TERMINATES the appication.
|
/// Write an event with the Fatal level with additional propertyValues and associated exception to the Fatal log and TERMINATES the appication.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -669,11 +669,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Fatal(Exception exception, string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Fatal(Exception exception, string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -702,25 +702,25 @@ namespace VocaluxeLib.Log
|
|||||||
[SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")]
|
[SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")]
|
||||||
public static class CSongLog
|
public static class CSongLog
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Verbose functions
|
#region Verbose functions
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Verbose level to the Verbose log.
|
/// Write an event with the Verbose level to the Verbose log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Verbose(messageTemplate);
|
_SongLog.Verbose(messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Verbose level with additional propertyValues to the Verbose log.
|
/// Write an event with the Verbose level with additional propertyValues to the Verbose log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -728,11 +728,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -749,7 +749,7 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Verbose level and associated exception to the Verbose log.
|
/// Write an event with the Verbose level and associated exception to the Verbose log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -757,16 +757,16 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Verbose( exception, messageTemplate);
|
_SongLog.Verbose( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log.
|
/// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -775,11 +775,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -796,27 +796,27 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Debug functions
|
#region Debug functions
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Debug level to the Debug log.
|
/// Write an event with the Debug level to the Debug log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Debug(messageTemplate);
|
_SongLog.Debug(messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Debug level with additional propertyValues to the Debug log.
|
/// Write an event with the Debug level with additional propertyValues to the Debug log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -824,11 +824,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -845,7 +845,7 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Debug level and associated exception to the Debug log.
|
/// Write an event with the Debug level and associated exception to the Debug log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -853,16 +853,16 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Debug( exception, messageTemplate);
|
_SongLog.Debug( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log.
|
/// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -871,11 +871,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -892,27 +892,27 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Information functions
|
#region Information functions
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Information level to the Information log.
|
/// Write an event with the Information level to the Information log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Information(messageTemplate);
|
_SongLog.Information(messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Information level with additional propertyValues to the Information log.
|
/// Write an event with the Information level with additional propertyValues to the Information log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -920,11 +920,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -941,7 +941,7 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Information level and associated exception to the Information log.
|
/// Write an event with the Information level and associated exception to the Information log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -949,16 +949,16 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Information( exception, messageTemplate);
|
_SongLog.Information( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Information level with additional propertyValues and associated exception to the Information log.
|
/// Write an event with the Information level with additional propertyValues and associated exception to the Information log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -967,11 +967,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -988,27 +988,27 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Warning functions
|
#region Warning functions
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Warning level to the Warning log.
|
/// Write an event with the Warning level to the Warning log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Warning(messageTemplate);
|
_SongLog.Warning(messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Warning level with additional propertyValues to the Warning log.
|
/// Write an event with the Warning level with additional propertyValues to the Warning log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1016,11 +1016,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -1037,7 +1037,7 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Warning level and associated exception to the Warning log.
|
/// Write an event with the Warning level and associated exception to the Warning log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1045,16 +1045,16 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Warning( exception, messageTemplate);
|
_SongLog.Warning( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log.
|
/// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1063,11 +1063,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -1084,27 +1084,27 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Error functions
|
#region Error functions
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Error level to the Error log.
|
/// Write an event with the Error level to the Error log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Error(messageTemplate);
|
_SongLog.Error(messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Error level with additional propertyValues to the Error log.
|
/// Write an event with the Error level with additional propertyValues to the Error log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1112,11 +1112,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -1133,7 +1133,7 @@ namespace VocaluxeLib.Log
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Error level and associated exception to the Error log.
|
/// Write an event with the Error level and associated exception to the Error log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1141,16 +1141,16 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="messageTemplate">Message template for this event.</param>
|
/// <param name="messageTemplate">Message template for this event.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
_SongLog.Error( exception, messageTemplate);
|
_SongLog.Error( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write an event with the Error level with additional propertyValues and associated exception to the Error log.
|
/// Write an event with the Error level with additional propertyValues and associated exception to the Error log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1159,11 +1159,11 @@ namespace VocaluxeLib.Log
|
|||||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ namespace VocaluxeLib.Log
|
|||||||
<# } #>
|
<# } #>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void <#= LogLevel #>(string messageTemplate, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void <#= LogLevel #>(string messageTemplate, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber}))
|
||||||
{
|
{
|
||||||
<#= Log == "Main"?"_MainLog":"_SongLog" #>.<#= LogLevel #>(messageTemplate);
|
<#= Log == "Main"?"_MainLog":"_SongLog" #>.<#= LogLevel #>(messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -108,11 +108,11 @@ namespace VocaluxeLib.Log
|
|||||||
<# } #>
|
<# } #>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void <#= LogLevel #>(string messageTemplate, object[] propertyValues, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void <#= LogLevel #>(string messageTemplate, object[] propertyValues, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber}))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
@@ -150,11 +150,11 @@ namespace VocaluxeLib.Log
|
|||||||
<# } #>
|
<# } #>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void <#= LogLevel #>(Exception exception, string messageTemplate, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void <#= LogLevel #>(Exception exception, string messageTemplate, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber}))
|
||||||
{
|
{
|
||||||
<#= Log == "Main"?"_MainLog":"_SongLog" #>.<#= LogLevel #>( exception, messageTemplate);
|
<#= Log == "Main"?"_MainLog":"_SongLog" #>.<#= LogLevel #>( exception, messageTemplate);
|
||||||
}
|
}
|
||||||
@@ -181,11 +181,11 @@ namespace VocaluxeLib.Log
|
|||||||
<# } #>
|
<# } #>
|
||||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||||
[MessageTemplateFormatMethod("messageTemplate")]
|
[MessageTemplateFormatMethod("messageTemplate")]
|
||||||
public static void <#= LogLevel #>(Exception exception, string messageTemplate, object[] propertyValues, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
public static void <#= LogLevel #>(Exception exception, string messageTemplate, object[] propertyValues, <#= Log == "Main"?(LogLevel == "Fatal"?"bool show = true, ":"bool show = false, "):"" #>[CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber}))
|
||||||
{
|
{
|
||||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||||
|
|
||||||
|
|||||||
@@ -83,31 +83,18 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Serilog.2.6.0\lib\net46\Serilog.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Serilog.Enrichers.Thread, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Serilog.Sinks.Console, Version=3.1.1.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Serilog.Sinks.Console.3.1.1\lib\net45\Serilog.Sinks.Console.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Serilog.Sinks.File, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Serilog.Sinks.TextWriter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Serilog.Sinks.TextWriter.2.1.0\lib\net45\Serilog.Sinks.TextWriter.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.XML" />
|
<Reference Include="System.XML" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Serilog" Version="4.3.0" />
|
||||||
|
<PackageReference Include="Serilog.Enrichers.Thread" Version="4.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.TextWriter" Version="3.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CEncoding.cs" />
|
<Compile Include="CEncoding.cs" />
|
||||||
<Compile Include="CFading.cs" />
|
<Compile Include="CFading.cs" />
|
||||||
@@ -195,9 +182,6 @@
|
|||||||
<Compile Include="Utils\Player\CSoundPlayer.cs" />
|
<Compile Include="Utils\Player\CSoundPlayer.cs" />
|
||||||
<Compile Include="Xml\SFieldInfo.cs" />
|
<Compile Include="Xml\SFieldInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Log\CLogFunctions.tt">
|
<Content Include="Log\CLogFunctions.tt">
|
||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Serilog" version="2.6.0" targetFramework="net471" />
|
|
||||||
<package id="Serilog.Enrichers.Thread" version="3.0.0" targetFramework="net471" />
|
|
||||||
<package id="Serilog.Sinks.Console" version="3.1.1" targetFramework="net471" />
|
|
||||||
<package id="Serilog.Sinks.File" version="4.0.0" targetFramework="net471" />
|
|
||||||
<package id="Serilog.Sinks.TextWriter" version="2.1.0" targetFramework="net471" />
|
|
||||||
</packages>
|
|
||||||
@@ -48,6 +48,11 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.netfwtypelib" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.dependencies.securitycryptography" Version="1.0.1" />
|
||||||
|
<PackageReference Include="vocaluxe.webserverinitalconfig.dependencies" Version="1.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CConfigHttpApi.cs" />
|
<Compile Include="CConfigHttpApi.cs" />
|
||||||
<Compile Include="HttpApi.cs" />
|
<Compile Include="HttpApi.cs" />
|
||||||
@@ -59,7 +64,6 @@
|
|||||||
<None Include="app.manifest">
|
<None Include="app.manifest">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Vocaluxe.ico" />
|
<Content Include="Vocaluxe.ico" />
|
||||||
@@ -69,17 +73,6 @@
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Rebuild for automatic package restore. The missing file is {0}.</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.securitycryptography.1.0.1\build\vocaluxe.dependencies.securitycryptography.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.securitycryptography.1.0.1\build\vocaluxe.dependencies.securitycryptography.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.netfwtypelib.1.0.1\build\vocaluxe.dependencies.netfwtypelib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.netfwtypelib.1.0.1\build\vocaluxe.dependencies.netfwtypelib.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\vocaluxe.webserverinitalconfig.dependencies.1.0.0\build\vocaluxe.webserverinitalconfig.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.webserverinitalconfig.dependencies.1.0.0\build\vocaluxe.webserverinitalconfig.dependencies.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.securitycryptography.1.0.1\build\vocaluxe.dependencies.securitycryptography.targets" Condition="Exists('..\packages\vocaluxe.dependencies.securitycryptography.1.0.1\build\vocaluxe.dependencies.securitycryptography.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.dependencies.netfwtypelib.1.0.1\build\vocaluxe.dependencies.netfwtypelib.targets" Condition="Exists('..\packages\vocaluxe.dependencies.netfwtypelib.1.0.1\build\vocaluxe.dependencies.netfwtypelib.targets')" />
|
|
||||||
<Import Project="..\packages\vocaluxe.webserverinitalconfig.dependencies.1.0.0\build\vocaluxe.webserverinitalconfig.dependencies.targets" Condition="Exists('..\packages\vocaluxe.webserverinitalconfig.dependencies.1.0.0\build\vocaluxe.webserverinitalconfig.dependencies.targets')" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="vocaluxe.dependencies.netfwtypelib" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.dependencies.securitycryptography" version="1.0.1" targetFramework="net40" />
|
|
||||||
<package id="vocaluxe.webserverinitalconfig.dependencies" version="1.0.0" targetFramework="net40" />
|
|
||||||
</packages>
|
|
||||||
Reference in new issue
Block a user