using System; namespace Confuser.Core { /// /// Base class of protection phases. /// public abstract class ProtectionPhase { /// /// Initializes a new instance of the class. /// /// The parent component of this phase. public ProtectionPhase(ConfuserComponent parent) { Parent = parent; } /// /// Gets the parent component. /// /// The parent component. public ConfuserComponent Parent { get; private set; } /// /// Gets the targets of protection. /// /// The protection targets. public abstract ProtectionTargets Targets { get; } /// /// Gets the name of the phase. /// /// The name of phase. public abstract string Name { get; } /// /// Gets a value indicating whether this phase process all targets, not just the targets that requires the component. /// /// true if this phase process all targets; otherwise, false. public virtual bool ProcessAll { get { return false; } } /// /// Executes the protection phase. /// /// The working context. /// The parameters of protection. protected internal abstract void Execute(ConfuserContext context, ProtectionParameters parameters); } }