MalwareSourceCode/MSIL/Virus/Win32/N/Virus.Win32.Nimnul.c-d5c6463b93131b3c485115414cf5809e01323986e3d4274a4868222cbb54aa43/CommandLine/CommandLineSwitchException.cs
2022-08-18 06:28:56 -05:00

61 lines
1.8 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Microsoft.Build.CommandLine.CommandLineSwitchException
// 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 CommandLineSwitchException : Exception
{
private string commandLineArg;
private CommandLineSwitchException()
{
}
private CommandLineSwitchException(string message)
: base(message)
{
}
private CommandLineSwitchException(string message, string commandLineArg)
: this(message)
{
this.commandLineArg = commandLineArg;
}
public override string Message
{
get
{
if (this.commandLineArg == null)
return base.Message;
return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceString("InvalidSwitchIndicator", (object) this.commandLineArg);
}
}
internal string CommandLineArg => this.commandLineArg;
internal static void VerifyThrow(
bool condition,
string messageResourceName,
string commandLineArg)
{
if (condition)
return;
CommandLineSwitchException.Throw(messageResourceName, commandLineArg);
}
internal static void Throw(string messageResourceName, string commandLineArg)
{
string message = AssemblyResources.GetString(messageResourceName);
ErrorUtilities.VerifyThrow(message != null, "The resource string must exist.");
throw new CommandLineSwitchException(message, commandLineArg);
}
}
}