Table of Contents

Interface IXLElementProtection<T>

Namespace
SlapKit.Excel.Excel
Assembly
SlapKit.Excel.dll
public interface IXLElementProtection<T> : IXLElementProtection, ICloneable where T : struct

Type Parameters

T
Inherited Members
Extension Methods

Properties

AllowedElements

Gets or sets the elements that are allowed to be edited by the user, i.e. those that are not protected.

T AllowedElements { get; set; }

Property Value

T

The allowed elements.

Methods

AllowElement(T, bool)

Adds the specified element to the list of allowed elements. Beware that if you pass through "None", this will have no effect.

IXLElementProtection<T> AllowElement(T element, bool allowed = true)

Parameters

element T

The element to add

allowed bool

Set to true to allow the element or false to disallow the element

Returns

IXLElementProtection<T>

The current protection instance

AllowEverything()

Allows all elements to be edited.

IXLElementProtection<T> AllowEverything()

Returns

IXLElementProtection<T>

AllowNone()

Allows no elements to be edited. Protects all elements.

IXLElementProtection<T> AllowNone()

Returns

IXLElementProtection<T>

CopyFrom(IXLElementProtection<T>)

Copies all the protection settings from a different instance.

IXLElementProtection<T> CopyFrom(IXLElementProtection<T> protectable)

Parameters

protectable IXLElementProtection<T>

The protectable.

Returns

IXLElementProtection<T>

DisallowElement(T)

Removes the element to the list of allowed elements. Beware that if you pass through "None", this will have no effect.

IXLElementProtection<T> DisallowElement(T element)

Parameters

element T

The element to remove

Returns

IXLElementProtection<T>

The current protection instance

Protect(Algorithm)

Protects this instance without a password.

IXLElementProtection<T> Protect(XLProtectionAlgorithm.Algorithm algorithm = Algorithm.SimpleHash)

Parameters

algorithm XLProtectionAlgorithm.Algorithm

The algorithm.

Returns

IXLElementProtection<T>

Protect(string, Algorithm)

Protects this instance using the specified password and password hash algorithm.

IXLElementProtection<T> Protect(string password, XLProtectionAlgorithm.Algorithm algorithm = Algorithm.SimpleHash)

Parameters

password string

The password.

algorithm XLProtectionAlgorithm.Algorithm

The algorithm.

Returns

IXLElementProtection<T>

Unprotect()

Unprotects this instance without a password.

IXLElementProtection<T> Unprotect()

Returns

IXLElementProtection<T>

Unprotect(string)

Unprotects this instance using the specified password.

IXLElementProtection<T> Unprotect(string password)

Parameters

password string

The password.

Returns

IXLElementProtection<T>