You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,58 @@
|
||||
namespace System.IO.Compression
|
||||
{
|
||||
using System.Diagnostics;
|
||||
|
||||
internal enum CompressionTracingSwitchLevel {
|
||||
Off = 0,
|
||||
Informational = 1,
|
||||
Verbose = 2
|
||||
}
|
||||
|
||||
// No tracing on Silverlight nor Windows Phone 7.
|
||||
internal class CompressionTracingSwitch
|
||||
#if !FEATURE_NETCORE
|
||||
: Switch
|
||||
#endif // !FEATURE_NETCORE
|
||||
{
|
||||
internal readonly static CompressionTracingSwitch tracingSwitch =
|
||||
new CompressionTracingSwitch("CompressionSwitch", "Compression Library Tracing Switch");
|
||||
|
||||
internal CompressionTracingSwitch(string displayName, string description)
|
||||
#if !FEATURE_NETCORE
|
||||
: base(displayName, description)
|
||||
#endif // !FEATURE_NETCORE
|
||||
{
|
||||
}
|
||||
|
||||
public static bool Verbose {
|
||||
get {
|
||||
#if FEATURE_NETCORE
|
||||
return false;
|
||||
#else
|
||||
return tracingSwitch.SwitchSetting >= (int)CompressionTracingSwitchLevel.Verbose;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Informational {
|
||||
get {
|
||||
#if FEATURE_NETCORE
|
||||
return false;
|
||||
#else
|
||||
return tracingSwitch.SwitchSetting >= (int)CompressionTracingSwitchLevel.Informational;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_TRACING
|
||||
public void SetSwitchSetting(CompressionTracingSwitchLevel level) {
|
||||
if (level < CompressionTracingSwitchLevel.Off || level > CompressionTracingSwitchLevel.Verbose) {
|
||||
throw new ArgumentOutOfRangeException("level");
|
||||
}
|
||||
this.SwitchSetting = (int)level;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user