#if PREVIEW_HANDLER
using System;
namespace ShellExtensions
{
///
/// This class attribute is applied to a Preview Handler to specify registration parameters.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class PreviewHandlerAttribute : Attribute
{
///
/// Creates a new instance of the attribute.
///
/// Name of the Handler
/// Semi-colon-separated list of file extensions supported by the handler.
/// A unique guid used for process isolation.
public PreviewHandlerAttribute(string name, string extensions, string appId)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
Extensions = extensions ?? throw new ArgumentNullException(nameof(extensions));
AppId = appId ?? throw new ArgumentNullException(nameof(appId));
DisableLowILProcessIsolation = false;
}
///
/// Gets the name of the handler.
///
public string Name { get; private set; }
///
/// Gets the semi-colon-separated list of extensions supported by the preview handler.
///
public string Extensions { get; private set; }
///
/// Gets the AppId associated with the handler for use with the surrogate host process.
///
public string AppId { get; private set; }
///
/// Disables low integrity-level process isolation.
/// This should be avoided as it could be a security risk.
///
public bool DisableLowILProcessIsolation { get; set; }
}
}
#endif