Class DicomPresentationContextCollection
Collection of presentation contexts, with unique ID:s.
Inherited Members
Namespace: Dicom.Network
Assembly: cs.temp.dll.dll
Syntax
public class DicomPresentationContextCollection : ICollection<DicomPresentationContext>, IEnumerable<DicomPresentationContext>, IEnumerable
Constructors
DicomPresentationContextCollection()
Initializes a new instance of DicomPresentationContextCollection.
Declaration
public DicomPresentationContextCollection()
Properties
Count
Gets the number of presentation contexts in collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsReadOnly
Gets whether collection is read-only. Is always
false
.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[Byte]
Gets the presentation context associated with id
.
Declaration
public DicomPresentationContext this[byte id] { get; }
Parameters
Type | Name | Description |
---|---|---|
Byte | id | Presentation context ID. |
Property Value
Type | Description |
---|---|
DicomPresentationContext | Presentation context associated with |
Methods
Add(DicomUID, DicomTransferSyntax[])
Initialize and add new presentation context.
Declaration
public void Add(DicomUID abstractSyntax, params DicomTransferSyntax[] transferSyntaxes)
Parameters
Type | Name | Description |
---|---|---|
DicomUID | abstractSyntax | Abstract syntax of the presentation context. |
DicomTransferSyntax[] | transferSyntaxes | Supported transfer syntaxes. |
Add(DicomUID, Nullable<Boolean>, Nullable<Boolean>, DicomTransferSyntax[])
Initialize and add new presentation context.
Declaration
public void Add(DicomUID abstractSyntax, bool? userRole, bool? providerRole, params DicomTransferSyntax[] transferSyntaxes)
Parameters
Type | Name | Description |
---|---|---|
DicomUID | abstractSyntax | Abstract syntax of the presentation context. |
Nullable<Boolean> | userRole | Supports SCU role? |
Nullable<Boolean> | providerRole | Supports SCP role? |
DicomTransferSyntax[] | transferSyntaxes | Supported transfer syntaxes. |
Add(DicomPresentationContext)
Adds an item to the ICollection<T>.
Declaration
public void Add(DicomPresentationContext item)
Parameters
Type | Name | Description |
---|---|---|
DicomPresentationContext | item | The object to add to the ICollection<T>. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The ICollection<T> is read-only. |
AddFromRequest(DicomRequest)
Add presentation contexts obtained from DICOM request.
Declaration
public void AddFromRequest(DicomRequest request)
Parameters
Type | Name | Description |
---|---|---|
DicomRequest | request | Request from which presentation context(s) should be obtained. |
Clear()
Clear all presentation contexts in collection.
Declaration
public void Clear()
Contains(DicomPresentationContext)
Indicates if specified presentation context is contained in collection.
Declaration
public bool Contains(DicomPresentationContext item)
Parameters
Type | Name | Description |
---|---|---|
DicomPresentationContext | item | Presentation context to search for. |
Returns
Type | Description |
---|---|
Boolean | if item is contained in collection, otherwise.
|
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<DicomPresentationContext> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<DicomPresentationContext> | A IEnumerator<T> that can be used to iterate through the collection. |
Remove(DicomPresentationContext)
Removes the first occurrence of a specific object from the ICollection<T>.
Declaration
public bool Remove(DicomPresentationContext item)
Parameters
Type | Name | Description |
---|---|---|
DicomPresentationContext | item | The object to remove from the ICollection<T>. |
Returns
Type | Description |
---|---|
Boolean | true if |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The ICollection<T> is read-only. |
Explicit Interface Implementations
ICollection<DicomPresentationContext>.CopyTo(DicomPresentationContext[], Int32)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
Declaration
void ICollection<DicomPresentationContext>.CopyTo(DicomPresentationContext[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
DicomPresentationContext[] | array | The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing. |
Int32 | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentOutOfRangeException |
|
ArgumentException | The number of elements in the source ICollection<T> is greater than the available space from |