Interface IXLElementProtection<T>
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
elementTThe element to add
allowedboolSet to
trueto allow the element orfalseto disallow the element
Returns
- IXLElementProtection<T>
The current protection instance
AllowEverything()
Allows all elements to be edited.
IXLElementProtection<T> AllowEverything()
Returns
AllowNone()
Allows no elements to be edited. Protects all elements.
IXLElementProtection<T> AllowNone()
Returns
CopyFrom(IXLElementProtection<T>)
Copies all the protection settings from a different instance.
IXLElementProtection<T> CopyFrom(IXLElementProtection<T> protectable)
Parameters
protectableIXLElementProtection<T>The protectable.
Returns
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
elementTThe 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
algorithmXLProtectionAlgorithm.AlgorithmThe algorithm.
Returns
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
passwordstringThe password.
algorithmXLProtectionAlgorithm.AlgorithmThe algorithm.
Returns
Unprotect()
Unprotects this instance without a password.
IXLElementProtection<T> Unprotect()
Returns
Unprotect(string)
Unprotects this instance using the specified password.
IXLElementProtection<T> Unprotect(string password)
Parameters
passwordstringThe password.