Downgraded to Net45

This commit is contained in:
RogueException
2015-12-24 22:35:42 -04:00
parent c3d28ee5b1
commit 5c18600a51
11 changed files with 33 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
<RootNamespace>Discord.Audio</RootNamespace> <RootNamespace>Discord.Audio</RootNamespace>
<AssemblyName>Discord.Net.Audio</AssemblyName> <AssemblyName>Discord.Net.Audio</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseMSBuildEngine>False</UseMSBuildEngine> <UseMSBuildEngine>False</UseMSBuildEngine>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>

View File

@@ -21,7 +21,7 @@
"Discord.Net": "0.9.0-alpha2" "Discord.Net": "0.9.0-alpha2"
}, },
"frameworks": { "frameworks": {
"net46": { }, "net45": { },
"dotnet5.4": { } "dotnet5.4": { }
} }
} }

View File

@@ -10,7 +10,7 @@
<RootNamespace>Discord.Commands</RootNamespace> <RootNamespace>Discord.Commands</RootNamespace>
<AssemblyName>Discord.Net.Commands</AssemblyName> <AssemblyName>Discord.Net.Commands</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseMSBuildEngine>False</UseMSBuildEngine> <UseMSBuildEngine>False</UseMSBuildEngine>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>

View File

@@ -19,7 +19,7 @@
"Discord.Net": "0.9.0-alpha2" "Discord.Net": "0.9.0-alpha2"
}, },
"frameworks": { "frameworks": {
"net46": { }, "net45": { },
"dotnet5.4": { } "dotnet5.4": { }
} }
} }

View File

@@ -10,7 +10,7 @@
<RootNamespace>Discord.Modules</RootNamespace> <RootNamespace>Discord.Modules</RootNamespace>
<AssemblyName>Discord.Net.Modules</AssemblyName> <AssemblyName>Discord.Net.Modules</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseMSBuildEngine>False</UseMSBuildEngine> <UseMSBuildEngine>False</UseMSBuildEngine>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>

View File

@@ -20,7 +20,7 @@
"Discord.Net.Commands": "0.9.0-alpha2" "Discord.Net.Commands": "0.9.0-alpha2"
}, },
"frameworks": { "frameworks": {
"net46": { }, "net45": { },
"dotnet5.4": { } "dotnet5.4": { }
} }
} }

View File

@@ -10,7 +10,7 @@
<RootNamespace>Discord</RootNamespace> <RootNamespace>Discord</RootNamespace>
<AssemblyName>Discord.Net</AssemblyName> <AssemblyName>Discord.Net</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<UseMSBuildEngine>False</UseMSBuildEngine> <UseMSBuildEngine>False</UseMSBuildEngine>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="RestSharp" version="105.2.3" targetFramework="net45" requireReinstallation="true" /> <package id="RestSharp" version="105.2.3" targetFramework="net45" />
<package id="WebSocket4Net" version="0.14.1" targetFramework="net45" /> <package id="WebSocket4Net" version="0.14.1" targetFramework="net45" />
</packages> </packages>

View File

@@ -16,6 +16,7 @@ namespace Discord.Logging
Level = client.Config.LogLevel; Level = client.Config.LogLevel;
} }
#if !NET45
public void Log(LogSeverity severity, string source, FormattableString message, Exception exception = null) public void Log(LogSeverity severity, string source, FormattableString message, Exception exception = null)
{ {
if (severity <= Level) if (severity <= Level)
@@ -24,6 +25,7 @@ namespace Discord.Logging
catch { } //We dont want to log on log errors catch { } //We dont want to log on log errors
} }
} }
#endif
public void Log(LogSeverity severity, string source, string message, Exception exception = null) public void Log(LogSeverity severity, string source, string message, Exception exception = null)
{ {
if (severity <= Level) if (severity <= Level)
@@ -35,36 +37,46 @@ namespace Discord.Logging
public void Error(string source, string message, Exception ex = null) public void Error(string source, string message, Exception ex = null)
=> Log(LogSeverity.Error, source, message, ex); => Log(LogSeverity.Error, source, message, ex);
#if !NET45
public void Error(string source, FormattableString message, Exception ex = null) public void Error(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Error, source, message, ex); => Log(LogSeverity.Error, source, message, ex);
#endif
public void Error(string source, Exception ex) public void Error(string source, Exception ex)
=> Log(LogSeverity.Error, source, (string)null, ex); => Log(LogSeverity.Error, source, (string)null, ex);
public void Warning(string source, string message, Exception ex = null) public void Warning(string source, string message, Exception ex = null)
=> Log(LogSeverity.Warning, source, message, ex); => Log(LogSeverity.Warning, source, message, ex);
#if !NET45
public void Warning(string source, FormattableString message, Exception ex = null) public void Warning(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Warning, source, message, ex); => Log(LogSeverity.Warning, source, message, ex);
#endif
public void Warning(string source, Exception ex) public void Warning(string source, Exception ex)
=> Log(LogSeverity.Warning, source, (string)null, ex); => Log(LogSeverity.Warning, source, (string)null, ex);
public void Info(string source, string message, Exception ex = null) public void Info(string source, string message, Exception ex = null)
=> Log(LogSeverity.Info, source, message, ex); => Log(LogSeverity.Info, source, message, ex);
#if !NET45
public void Info(string source, FormattableString message, Exception ex = null) public void Info(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Info, source, message, ex); => Log(LogSeverity.Info, source, message, ex);
#endif
public void Info(string source, Exception ex) public void Info(string source, Exception ex)
=> Log(LogSeverity.Info, source, (string)null, ex); => Log(LogSeverity.Info, source, (string)null, ex);
public void Verbose(string source, string message, Exception ex = null) public void Verbose(string source, string message, Exception ex = null)
=> Log(LogSeverity.Verbose, source, message, ex); => Log(LogSeverity.Verbose, source, message, ex);
#if !NET45
public void Verbose(string source, FormattableString message, Exception ex = null) public void Verbose(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Verbose, source, message, ex); => Log(LogSeverity.Verbose, source, message, ex);
#endif
public void Verbose(string source, Exception ex) public void Verbose(string source, Exception ex)
=> Log(LogSeverity.Verbose, source, (string)null, ex); => Log(LogSeverity.Verbose, source, (string)null, ex);
public void Debug(string source, string message, Exception ex = null) public void Debug(string source, string message, Exception ex = null)
=> Log(LogSeverity.Debug, source, message, ex); => Log(LogSeverity.Debug, source, message, ex);
#if !NET45
public void Debug(string source, FormattableString message, Exception ex = null) public void Debug(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Debug, source, message, ex); => Log(LogSeverity.Debug, source, message, ex);
#endif
public void Debug(string source, Exception ex) public void Debug(string source, Exception ex)
=> Log(LogSeverity.Debug, source, (string)null, ex); => Log(LogSeverity.Debug, source, (string)null, ex);

View File

@@ -17,41 +17,53 @@ namespace Discord.Logging
public void Log(LogSeverity severity, string message, Exception exception = null) public void Log(LogSeverity severity, string message, Exception exception = null)
=> _manager.Log(severity, Name, message, exception); => _manager.Log(severity, Name, message, exception);
#if !NET45
public void Log(LogSeverity severity, FormattableString message, Exception exception = null) public void Log(LogSeverity severity, FormattableString message, Exception exception = null)
=> _manager.Log(severity, Name, message, exception); => _manager.Log(severity, Name, message, exception);
#endif
public void Error(string message, Exception exception = null) public void Error(string message, Exception exception = null)
=> _manager.Error(Name, message, exception); => _manager.Error(Name, message, exception);
#if !NET45
public void Error(FormattableString message, Exception exception = null) public void Error(FormattableString message, Exception exception = null)
=> _manager.Error(Name, message, exception); => _manager.Error(Name, message, exception);
#endif
public void Error(Exception exception) public void Error(Exception exception)
=> _manager.Error(Name, exception); => _manager.Error(Name, exception);
public void Warning(string message, Exception exception = null) public void Warning(string message, Exception exception = null)
=> _manager.Warning(Name, message, exception); => _manager.Warning(Name, message, exception);
#if !NET45
public void Warning(FormattableString message, Exception exception = null) public void Warning(FormattableString message, Exception exception = null)
=> _manager.Warning(Name, message, exception); => _manager.Warning(Name, message, exception);
#endif
public void Warning(Exception exception) public void Warning(Exception exception)
=> _manager.Warning(Name, exception); => _manager.Warning(Name, exception);
public void Info(string message, Exception exception = null) public void Info(string message, Exception exception = null)
=> _manager.Info(Name, message, exception); => _manager.Info(Name, message, exception);
#if !NET45
public void Info(FormattableString message, Exception exception = null) public void Info(FormattableString message, Exception exception = null)
=> _manager.Info(Name, message, exception); => _manager.Info(Name, message, exception);
#endif
public void Info(Exception exception) public void Info(Exception exception)
=> _manager.Info(Name, exception); => _manager.Info(Name, exception);
public void Verbose(string message, Exception exception = null) public void Verbose(string message, Exception exception = null)
=> _manager.Verbose(Name, message, exception); => _manager.Verbose(Name, message, exception);
#if !NET45
public void Verbose(FormattableString message, Exception exception = null) public void Verbose(FormattableString message, Exception exception = null)
=> _manager.Verbose(Name, message, exception); => _manager.Verbose(Name, message, exception);
#endif
public void Verbose(Exception exception) public void Verbose(Exception exception)
=> _manager.Verbose(Name, exception); => _manager.Verbose(Name, exception);
public void Debug(string message, Exception exception = null) public void Debug(string message, Exception exception = null)
=> _manager.Debug(Name, message, exception); => _manager.Debug(Name, message, exception);
#if !NET45
public void Debug(FormattableString message, Exception exception = null) public void Debug(FormattableString message, Exception exception = null)
=> _manager.Debug(Name, message, exception); => _manager.Debug(Name, message, exception);
#endif
public void Debug(Exception exception) public void Debug(Exception exception)
=> _manager.Debug(Name, exception); => _manager.Debug(Name, exception);
} }

View File

@@ -33,7 +33,7 @@
}, },
"frameworks": { "frameworks": {
"net46": { "net45": {
"dependencies": { "dependencies": {
"WebSocket4Net": "0.14.1", "WebSocket4Net": "0.14.1",
"RestSharp": "105.2.3" "RestSharp": "105.2.3"