Class AuthorizationRules
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Represents a collection of AuthorizationRule.
[CollectionDataContract(Name = "AuthorizationRules", ItemName = "AuthorizationRule", Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
[KnownType(typeof(AuthorizationRule))]
public class AuthorizationRules : ICollection<AuthorizationRule>, IEnumerable<AuthorizationRule>, IEnumerable
- Inheritance
-
AuthorizationRules
- Implements
- Inherited Members
Constructors
AuthorizationRules()
Initializes a new instance of the AuthorizationRules class.
public AuthorizationRules()
AuthorizationRules(IEnumerable<AuthorizationRule>)
Initializes a new instance of the AuthorizationRules class with a list of AuthorizationRule.
public AuthorizationRules(IEnumerable<AuthorizationRule> enumerable)
Parameters
enumerable
IEnumerable<AuthorizationRule>The list of AuthorizationRule.
Fields
Serializer
Specifies the serializer for serializing and deserializing the object.
public static readonly DataContractSerializer Serializer
Field Value
- DataContractSerializer
innerCollection
Specifies the inner collection.
public readonly ICollection<AuthorizationRule> innerCollection
Field Value
Properties
Count
Gets or sets the number of AuthorizationRule contained in the collection.
public int Count { get; }
Property Value
- int
The number of AuthorizationRule contained in the collection.
IsReadOnly
Gets or sets whether the AuthorizationRules is read only.
public bool IsReadOnly { get; }
Property Value
- bool
true if the AuthorizationRules is read only; otherwise, false.
RequiresEncryption
Gets a value that indicates whether the AuthorizationRules requires encryption.
public bool RequiresEncryption { get; }
Property Value
- bool
true if the AuthorizationRules requires encryption; otherwise, false.
Methods
Add(AuthorizationRule)
Adds the specified AuthorizationRule into the collection.
public void Add(AuthorizationRule item)
Parameters
item
AuthorizationRuleThe AuthorizationRule to be added.
Clear()
Clears all elements in the collection.
public void Clear()
Contains(AuthorizationRule)
Determines whether the specified item exists in the collection.
public bool Contains(AuthorizationRule item)
Parameters
item
AuthorizationRuleThe item to search in the collection.
Returns
- bool
true if the specified item is found; otherwise, false.
CopyTo(AuthorizationRule[], int)
Copies the elements into an array starting at the specified array index.
public void CopyTo(AuthorizationRule[] array, int arrayIndex)
Parameters
array
AuthorizationRule[]The array to hold the copied elements.
arrayIndex
intThe zero-based index at which copying starts.
GetEnumerator()
Gets the enumerator that iterates through the collection.
public IEnumerator<AuthorizationRule> GetEnumerator()
Returns
- IEnumerator<AuthorizationRule>
The enumerator that can be used to iterate through the collection.
GetRules(Predicate<AuthorizationRule>)
Gets the sets of AuthorizationRule.
public List<AuthorizationRule> GetRules(Predicate<AuthorizationRule> match)
Parameters
match
Predicate<AuthorizationRule>The authorization rule to match the specified value.
Returns
- List<AuthorizationRule>
The sets of AuthorizationRule that match the specified value.
GetRules(string)
Gets the set of AuthorizationRule that matches the specified value.
public List<AuthorizationRule> GetRules(string claimValue)
Parameters
claimValue
stringThe value to search for.
Returns
- List<AuthorizationRule>
The sets of AuthorizationRule that match the specified value.
HasEqualRuntimeBehavior(AuthorizationRules)
Determines whether the specified AuthorizationRules has equal runtime behavior as this current object.
public bool HasEqualRuntimeBehavior(AuthorizationRules comparand)
Parameters
comparand
AuthorizationRulesThe AuthorizationRules to compare to the current object.
Returns
- bool
true if the they are the equal runtime behavior; otherwise, false.
Remove(AuthorizationRule)
Removes the specified AuthorizationRule from the collection.
public bool Remove(AuthorizationRule item)
Parameters
item
AuthorizationRuleThe item to remove.
Returns
- bool
true if the operation succeeded; otherwise, false.
TryGetSharedAccessAuthorizationRule(string, out SharedAccessAuthorizationRule)
Gets the rule associated with the specified key.
public bool TryGetSharedAccessAuthorizationRule(string keyName, out SharedAccessAuthorizationRule rule)
Parameters
keyName
stringThe name of the key.
rule
SharedAccessAuthorizationRuleThe rule associated with the specified key.
Returns
- bool
true if the AuthorizationRules contains an element with the specified key; otherwise, false.