Class ProtectedOperation
- Namespace
- Microsoft.ServiceHub.Framework.Services
- Assembly
- Microsoft.ServiceHub.Framework.dll
Describes an operation that requires an authorization check.
public class ProtectedOperation : IEquatable<ProtectedOperation>
- Inheritance
-
ProtectedOperation
- Implements
- Inherited Members
Constructors
ProtectedOperation()
Initializes a new instance of the ProtectedOperation class.
[Obsolete("Use a constructor that initializes the properties instead.")]
public ProtectedOperation()
ProtectedOperation(string)
Initializes a new instance of the ProtectedOperation class.
public ProtectedOperation(string operationMoniker)
Parameters
operationMonikerstringthe kind of operation to be performed.
ProtectedOperation(string, int)
Initializes a new instance of the ProtectedOperation class.
public ProtectedOperation(string operationMoniker, int requiredTrustLevel)
Parameters
operationMonikerstringthe kind of operation to be performed.
requiredTrustLevelintthe trust level required for the operation.
Properties
OperationMoniker
Gets or sets the kind of operation to be performed.
public string OperationMoniker { get; set; }
Property Value
Remarks
This may be a semi-human readable string, and is NOT intended for machine interpretation. Processors of this value should consider it an opaque string.
RequiredTrustLevel
Gets or sets the trust level required for the operation.
public int? RequiredTrustLevel { get; set; }
Property Value
- int?
May be null if not applicable (e.g. the OperationMoniker of operation is simply allowed or not, without multiple degrees of trust).
Methods
Equals(ProtectedOperation?)
public virtual bool Equals(ProtectedOperation? other)
Parameters
otherProtectedOperation
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
IsSupersetOf(ProtectedOperation)
Gets a value indicating whether this ProtectedOperation, if granted, implies another ProtectedOperation should also be considered granted.
public virtual bool IsSupersetOf(ProtectedOperation other)
Parameters
otherProtectedOperationThe other operation, which may be a subset of this one.
Returns
Remarks
In the base implementation, a superset is considered true if the OperationMoniker is equal and RequiredTrustLevel is equal or a greater value.