Class SharedAccessQueuePolicies
- Namespace
- Microsoft.WindowsAzure.Storage.Queue
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents the collection of shared access policies defined for a queue.
public sealed class SharedAccessQueuePolicies : IDictionary<string, SharedAccessQueuePolicy>, ICollection<KeyValuePair<string, SharedAccessQueuePolicy>>, IEnumerable<KeyValuePair<string, SharedAccessQueuePolicy>>, IEnumerable
- Inheritance
-
SharedAccessQueuePolicies
- Implements
- Inherited Members
Constructors
SharedAccessQueuePolicies()
public SharedAccessQueuePolicies()
Properties
Count
Gets the number of key/SharedAccessQueuePolicy value pairs contained in the shared access policies collection.
public int Count { get; }
Property Value
- int
The number of key/SharedAccessQueuePolicy value pairs contained in the shared access policies collection.
IsReadOnly
Gets a value indicating whether the collection of shared access policies is read-only.
public bool IsReadOnly { get; }
Property Value
- bool
true
if the collection of shared access policies is read-only; otherwise,false
.
this[string]
Gets or sets the SharedAccessQueuePolicy item associated with the specified key.
public SharedAccessQueuePolicy this[string key] { get; set; }
Parameters
key
stringA string containing the key of the value to get or set.
Property Value
- SharedAccessQueuePolicy
The SharedAccessQueuePolicy item associated with the specified key, or
null
if key is not in the shared access policies collection.
Keys
Gets a collection containing the keys in the shared access policies collection.
public ICollection<string> Keys { get; }
Property Value
- ICollection<string>
A collection of strings containing the keys of the shared access policies collection.
Values
Gets a collection containing the values in the shared access policies collection.
public ICollection<SharedAccessQueuePolicy> Values { get; }
Property Value
- ICollection<SharedAccessQueuePolicy>
A collection of SharedAccessQueuePolicy items in the shared access policies collection.
Methods
Add(KeyValuePair<string, SharedAccessQueuePolicy>)
Adds the specified key/SharedAccessQueuePolicy value, stored in a KeyValuePair<TKey, TValue>, to the collection of shared access policies.
public void Add(KeyValuePair<string, SharedAccessQueuePolicy> item)
Parameters
item
KeyValuePair<string, SharedAccessQueuePolicy>The KeyValuePair<TKey, TValue> object, containing a key/SharedAccessQueuePolicy value pair, to add to the shared access policies collection.
Add(string, SharedAccessQueuePolicy)
Adds the specified key and SharedAccessQueuePolicy value to the collection of shared access policies.
public void Add(string key, SharedAccessQueuePolicy value)
Parameters
key
stringA string containing the key of the SharedAccessQueuePolicy value to add.
value
SharedAccessQueuePolicyThe SharedAccessQueuePolicy value to add the collection of shared access policies.
Clear()
Removes all keys and SharedAccessQueuePolicy values from the shared access collection.
public void Clear()
Contains(KeyValuePair<string, SharedAccessQueuePolicy>)
Determines whether the collection of shared access policies contains the key and SharedAccessQueuePolicy value in the specified KeyValuePair<TKey, TValue> object.
public bool Contains(KeyValuePair<string, SharedAccessQueuePolicy> item)
Parameters
item
KeyValuePair<string, SharedAccessQueuePolicy>A KeyValuePair<TKey, TValue> object containing the key and SharedAccessQueuePolicy value to search for.
Returns
- bool
true
if the shared access policies collection contains the specified key/value; otherwise,false
.
ContainsKey(string)
Determines whether the collection of shared access policies contains the specified key.
public bool ContainsKey(string key)
Parameters
key
stringA string containing the key to locate in the collection of shared access policies.
Returns
- bool
true
if the collection of shared access policies contains an element with the specified key; otherwise,false
.
CopyTo(KeyValuePair<string, SharedAccessQueuePolicy>[], int)
Copies each key/SharedAccessQueuePolicy value pair in the shared access policies collection to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(KeyValuePair<string, SharedAccessQueuePolicy>[] array, int arrayIndex)
Parameters
array
KeyValuePair<string, SharedAccessQueuePolicy>[]A one-dimensional array of SharedAccessQueuePolicy objects that serves as the destination for the elements copied from the shared access policies collection.
arrayIndex
intThe zero-based index in
array
at which copying begins.
GetEnumerator()
Returns an enumerator that iterates through the collection of shared access policies.
public IEnumerator<KeyValuePair<string, SharedAccessQueuePolicy>> GetEnumerator()
Returns
- IEnumerator<KeyValuePair<string, SharedAccessQueuePolicy>>
An IEnumerator<T> of type KeyValuePair<TKey, TValue>.
Remove(KeyValuePair<string, SharedAccessQueuePolicy>)
Removes the SharedAccessQueuePolicy value, specified in the KeyValuePair<TKey, TValue> object, from the shared access policies collection.
public bool Remove(KeyValuePair<string, SharedAccessQueuePolicy> item)
Parameters
item
KeyValuePair<string, SharedAccessQueuePolicy>The KeyValuePair<TKey, TValue> object, containing a key and SharedAccessQueuePolicy value, to remove from the shared access policies collection.
Returns
- bool
true
if the item was successfully removed; otherwise,false
.
Remove(string)
Removes the value with the specified key from the shared access policies collection.
public bool Remove(string key)
Parameters
key
stringA string containing the key of the SharedAccessQueuePolicy item to remove.
Returns
- bool
true
if the element is successfully found and removed; otherwise,false
. This method returnsfalse
if the key is not found.
TryGetValue(string, out SharedAccessQueuePolicy)
Gets the SharedAccessQueuePolicy item associated with the specified key.
public bool TryGetValue(string key, out SharedAccessQueuePolicy value)
Parameters
key
stringA string containing the key of the value to get.
value
SharedAccessQueuePolicyThe SharedAccessQueuePolicy item to get.
Returns
- bool
The SharedAccessQueuePolicy item associated with the specified key, if the key is found; otherwise, the default value for the SharedAccessQueuePolicy type.