mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 19:36:11 +00:00
f2ac1ece55
add
76 lines
2.4 KiB
C#
76 lines
2.4 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Microsoft.Build.CommandLine.InitializationException
|
|
// Assembly: MSBuild, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
|
|
// MVID: E42BAB90-704E-4C03-B5C0-D4E3A6B884E3
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Nimnul.c-d5c6463b93131b3c485115414cf5809e01323986e3d4274a4868222cbb54aa43.exe
|
|
|
|
using Microsoft.Build.Shared;
|
|
using System;
|
|
|
|
namespace Microsoft.Build.CommandLine
|
|
{
|
|
internal sealed class InitializationException : Exception
|
|
{
|
|
private string invalidSwitch;
|
|
|
|
private InitializationException()
|
|
{
|
|
}
|
|
|
|
private InitializationException(string message)
|
|
: base(message)
|
|
{
|
|
}
|
|
|
|
private InitializationException(string message, string invalidSwitch)
|
|
: this(message)
|
|
{
|
|
this.invalidSwitch = invalidSwitch;
|
|
}
|
|
|
|
public override string Message
|
|
{
|
|
get
|
|
{
|
|
if (this.invalidSwitch == null)
|
|
return base.Message;
|
|
return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceString("InvalidSwitchIndicator", (object) this.invalidSwitch);
|
|
}
|
|
}
|
|
|
|
internal static void VerifyThrow(bool condition, string messageResourceName) => InitializationException.VerifyThrow(condition, messageResourceName, (string) null);
|
|
|
|
internal static void VerifyThrow(
|
|
bool condition,
|
|
string messageResourceName,
|
|
string invalidSwitch)
|
|
{
|
|
if (condition)
|
|
return;
|
|
InitializationException.Throw(messageResourceName, invalidSwitch, (Exception) null, false);
|
|
}
|
|
|
|
internal static void Throw(
|
|
string messageResourceName,
|
|
string invalidSwitch,
|
|
Exception e,
|
|
bool showStackTrace)
|
|
{
|
|
string unformatted = AssemblyResources.GetString(messageResourceName);
|
|
ErrorUtilities.VerifyThrow(unformatted != null, "The resource string must exist.");
|
|
string message;
|
|
if (showStackTrace)
|
|
message = unformatted + Environment.NewLine + e.ToString();
|
|
else
|
|
message = ResourceUtilities.FormatString(unformatted, e == null ? (object) string.Empty : (object) e.Message);
|
|
InitializationException.Throw(message, invalidSwitch);
|
|
}
|
|
|
|
internal static void Throw(string message, string invalidSwitch)
|
|
{
|
|
ErrorUtilities.VerifyThrow(message != null, "The string must exist.");
|
|
throw new InitializationException(message, invalidSwitch);
|
|
}
|
|
}
|
|
}
|