Browse Source

Downgraded to Net45

tags/docs-0.9
RogueException 9 years ago
parent
commit
5c18600a51
11 changed files with 33 additions and 9 deletions
  1. +1
    -1
      src/Discord.Net.Audio.Net5/Discord.Net.Audio.csproj
  2. +1
    -1
      src/Discord.Net.Audio/project.json
  3. +1
    -1
      src/Discord.Net.Commands.Net45/Discord.Net.Commands.csproj
  4. +1
    -1
      src/Discord.Net.Commands/project.json
  5. +1
    -1
      src/Discord.Net.Modules.Net45/Discord.Net.Modules.csproj
  6. +1
    -1
      src/Discord.Net.Modules/project.json
  7. +1
    -1
      src/Discord.Net.Net45/Discord.Net.csproj
  8. +1
    -1
      src/Discord.Net.Net45/packages.config
  9. +12
    -0
      src/Discord.Net/Logging/LogManager.cs
  10. +12
    -0
      src/Discord.Net/Logging/Logger.cs
  11. +1
    -1
      src/Discord.Net/project.json

+ 1
- 1
src/Discord.Net.Audio.Net5/Discord.Net.Audio.csproj View File

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


+ 1
- 1
src/Discord.Net.Audio/project.json View File

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

+ 1
- 1
src/Discord.Net.Commands.Net45/Discord.Net.Commands.csproj View File

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


+ 1
- 1
src/Discord.Net.Commands/project.json View File

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

+ 1
- 1
src/Discord.Net.Modules.Net45/Discord.Net.Modules.csproj View File

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


+ 1
- 1
src/Discord.Net.Modules/project.json View File

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

+ 1
- 1
src/Discord.Net.Net45/Discord.Net.csproj View File

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


+ 1
- 1
src/Discord.Net.Net45/packages.config View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<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" />
</packages>

+ 12
- 0
src/Discord.Net/Logging/LogManager.cs View File

@@ -16,6 +16,7 @@ namespace Discord.Logging
Level = client.Config.LogLevel;
}

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

public void Error(string source, string message, Exception ex = null)
=> Log(LogSeverity.Error, source, message, ex);
#if !NET45
public void Error(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Error, source, message, ex);
#endif
public void Error(string source, Exception ex)
=> Log(LogSeverity.Error, source, (string)null, ex);

public void Warning(string source, string message, Exception ex = null)
=> Log(LogSeverity.Warning, source, message, ex);
#if !NET45
public void Warning(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Warning, source, message, ex);
#endif
public void Warning(string source, Exception ex)
=> Log(LogSeverity.Warning, source, (string)null, ex);

public void Info(string source, string message, Exception ex = null)
=> Log(LogSeverity.Info, source, message, ex);
#if !NET45
public void Info(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Info, source, message, ex);
#endif
public void Info(string source, Exception ex)
=> Log(LogSeverity.Info, source, (string)null, ex);

public void Verbose(string source, string message, Exception ex = null)
=> Log(LogSeverity.Verbose, source, message, ex);
#if !NET45
public void Verbose(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Verbose, source, message, ex);
#endif
public void Verbose(string source, Exception ex)
=> Log(LogSeverity.Verbose, source, (string)null, ex);

public void Debug(string source, string message, Exception ex = null)
=> Log(LogSeverity.Debug, source, message, ex);
#if !NET45
public void Debug(string source, FormattableString message, Exception ex = null)
=> Log(LogSeverity.Debug, source, message, ex);
#endif
public void Debug(string source, Exception ex)
=> Log(LogSeverity.Debug, source, (string)null, ex);



+ 12
- 0
src/Discord.Net/Logging/Logger.cs View File

@@ -17,41 +17,53 @@ namespace Discord.Logging

public void Log(LogSeverity severity, string message, Exception exception = null)
=> _manager.Log(severity, Name, message, exception);
#if !NET45
public void Log(LogSeverity severity, FormattableString message, Exception exception = null)
=> _manager.Log(severity, Name, message, exception);
#endif

public void Error(string message, Exception exception = null)
=> _manager.Error(Name, message, exception);
#if !NET45
public void Error(FormattableString message, Exception exception = null)
=> _manager.Error(Name, message, exception);
#endif
public void Error(Exception exception)
=> _manager.Error(Name, exception);

public void Warning(string message, Exception exception = null)
=> _manager.Warning(Name, message, exception);
#if !NET45
public void Warning(FormattableString message, Exception exception = null)
=> _manager.Warning(Name, message, exception);
#endif
public void Warning(Exception exception)
=> _manager.Warning(Name, exception);

public void Info(string message, Exception exception = null)
=> _manager.Info(Name, message, exception);
#if !NET45
public void Info(FormattableString message, Exception exception = null)
=> _manager.Info(Name, message, exception);
#endif
public void Info(Exception exception)
=> _manager.Info(Name, exception);

public void Verbose(string message, Exception exception = null)
=> _manager.Verbose(Name, message, exception);
#if !NET45
public void Verbose(FormattableString message, Exception exception = null)
=> _manager.Verbose(Name, message, exception);
#endif
public void Verbose(Exception exception)
=> _manager.Verbose(Name, exception);

public void Debug(string message, Exception exception = null)
=> _manager.Debug(Name, message, exception);
#if !NET45
public void Debug(FormattableString message, Exception exception = null)
=> _manager.Debug(Name, message, exception);
#endif
public void Debug(Exception exception)
=> _manager.Debug(Name, exception);
}


+ 1
- 1
src/Discord.Net/project.json View File

@@ -33,7 +33,7 @@
},

"frameworks": {
"net46": {
"net45": {
"dependencies": {
"WebSocket4Net": "0.14.1",
"RestSharp": "105.2.3"


Loading…
Cancel
Save