using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IPA.Loader
{
///
/// Indicates that a plugin cannot be disabled at runtime. Generally not considered an error, however.
///
[Serializable]
public class CannotRuntimeDisableException : Exception
{
///
/// The plugin that cannot be disabled at runtime.
///
public PluginMetadata Plugin { get; }
///
/// Creates an exception for the given plugin metadata.
///
/// the plugin that cannot be disabled
public CannotRuntimeDisableException(PluginMetadata plugin) : base($"Cannot runtime disable plugin \"{plugin.Name}\" ({plugin.Id})")
=> Plugin = plugin;
///
/// Creates an exception from a serialization context. Not currently implemented.
///
///
///
///
protected CannotRuntimeDisableException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)
{
throw new NotImplementedException();
}
}
}