Class SharedAccessAuthorizationRule
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Defines the authorization rule for shared access operation.
[DataContract(Name = "SharedAccessAuthorizationRule", Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
public class SharedAccessAuthorizationRule : AuthorizationRule
- Inheritance
-
SharedAccessAuthorizationRule
- Inherited Members
Constructors
SharedAccessAuthorizationRule(string, IEnumerable<AccessRights>)
Initializes a new instance of the SharedAccessAuthorizationRule class.
public SharedAccessAuthorizationRule(string keyName, IEnumerable<AccessRights> rights)
Parameters
keyName
stringThe authorization rule key name.
rights
IEnumerable<AccessRights>The list of rights.
SharedAccessAuthorizationRule(string, string, IEnumerable<AccessRights>)
Initializes a new instance of the SharedAccessAuthorizationRule class.
public SharedAccessAuthorizationRule(string keyName, string primaryKey, IEnumerable<AccessRights> rights)
Parameters
keyName
stringThe authorization rule key name.
primaryKey
stringThe primary key for the authorization rule.
rights
IEnumerable<AccessRights>The list of rights.
SharedAccessAuthorizationRule(string, string, string, IEnumerable<AccessRights>)
Initializes a new instance of the SharedAccessAuthorizationRule class.
public SharedAccessAuthorizationRule(string keyName, string primaryKey, string secondaryKey, IEnumerable<AccessRights> rights)
Parameters
keyName
stringThe authorization rule key name.
primaryKey
stringThe primary key for the authorization rule.
secondaryKey
stringThe secondary key for the authorization rule.
rights
IEnumerable<AccessRights>The list of rights.
Fields
Serializer
The serializer associated with the authorization rule.
public static readonly DataContractSerializer Serializer
Field Value
- DataContractSerializer
Properties
KeyName
Gets or sets the authorization rule key name.
public override sealed string KeyName { get; set; }
Property Value
- string
The authorization rule key name.
PrimaryKey
Gets or sets the primary key for the authorization rule.
public string PrimaryKey { get; set; }
Property Value
- string
The primary key for the authorization rule.
SecondaryKey
Gets or sets the secondary key for the authorization rule.
public string SecondaryKey { get; set; }
Property Value
- string
The secondary key for the authorization rule.
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
- bool
true if the specified object is equal to the current object; otherwise, false.
GenerateRandomKey()
Generates the random key for the authorization rule.
public static string GenerateRandomKey()
Returns
- string
The random key for the authorization rule.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
The hash code for this instance.
OnValidate()
Checks the validity of the authorization rule.
protected override void OnValidate()
ValidateRights(IEnumerable<AccessRights>)
Checks the validity of the specified access rights.
protected override void ValidateRights(IEnumerable<AccessRights> value)
Parameters
value
IEnumerable<AccessRights>The access rights to check.