private bool IsWarningSuppressed(ILogMessage message) { if (message.Level == LogLevel.Warning) { // If the WarningPropertiesCollection is present then test if the warning is suppressed in // project wide no warn if (WarningPropertiesCollection.ApplyProjectWideNoWarnProperties(message, warningProperties: WarningProperties)) { return(true); } else { // Use packagereference warning properties only if the project does not suppress the warning // In packagereference warning properties look at only the package specific ones as all properties are per package reference. IPackLogMessage packLogMessage = message as IPackLogMessage; if (packLogMessage != null) { return(PackageSpecificWarningProperties?.ApplyNoWarnProperties(packLogMessage) == true); } } } return(false); }
public PackagingException(string message, Exception innerException) : base(message, innerException) { _logMessage = PackLogMessage.CreateError(NuGetLogCode.NU5000, message); }
public PackagingException(NuGetLogCode logCode, string message) : base(message) { _logMessage = PackLogMessage.CreateError(logCode, message); }
public PackagingException(NuGetLogCode logCode, string message, Exception innerException) : base(message, innerException) { _logMessage = PackLogMessage.CreateError(message, logCode); }
public PackagingException(string message) : base(message) { _logMessage = PackLogMessage.CreateError(message, NuGetLogCode.NU5000); }