Class DicomPresentationContextCollection
- Namespace
- FellowOakDicom.Network
- Assembly
- fo-dicom.core.dll
Collection of presentation contexts, with unique ID:s.
public class DicomPresentationContextCollection : ICollection<DicomPresentationContext>, IEnumerable<DicomPresentationContext>, IEnumerable
- Inheritance
-
DicomPresentationContextCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
DicomPresentationContextCollection()
Initializes a new instance of DicomPresentationContextCollection.
public DicomPresentationContextCollection()
Properties
Count
Gets the number of presentation contexts in collection.
public int Count { get; }
Property Value
IsReadOnly
Gets whether collection is read-only. Is always
false
.
public bool IsReadOnly { get; }
Property Value
this[byte]
Gets the presentation context associated with id
.
public DicomPresentationContext this[byte id] { get; }
Parameters
id
bytePresentation context ID.
Property Value
- DicomPresentationContext
Presentation context associated with
id
Methods
Add(DicomUID, params DicomTransferSyntax[])
Initialize and add new presentation context.
public void Add(DicomUID abstractSyntax, params DicomTransferSyntax[] transferSyntaxes)
Parameters
abstractSyntax
DicomUIDAbstract syntax of the presentation context.
transferSyntaxes
DicomTransferSyntax[]Supported transfer syntaxes.
Add(DicomUID, bool?, bool?, params DicomTransferSyntax[])
Initialize and add new presentation context.
public void Add(DicomUID abstractSyntax, bool? userRole, bool? providerRole, params DicomTransferSyntax[] transferSyntaxes)
Parameters
abstractSyntax
DicomUIDAbstract syntax of the presentation context.
userRole
bool?Supports SCU role?
providerRole
bool?Supports SCP role?
transferSyntaxes
DicomTransferSyntax[]Supported transfer syntaxes.
Add(DicomPresentationContext)
Adds an item to the ICollection<T>.
public void Add(DicomPresentationContext item)
Parameters
item
DicomPresentationContextThe object to add to the ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.
AddFromRequest(DicomRequest)
Add presentation contexts obtained from DICOM request.
public void AddFromRequest(DicomRequest request)
Parameters
request
DicomRequestRequest from which presentation context(s) should be obtained.
Clear()
Clear all presentation contexts in collection.
public void Clear()
Contains(DicomPresentationContext)
Indicates if specified presentation context is contained in collection.
public bool Contains(DicomPresentationContext item)
Parameters
item
DicomPresentationContextPresentation context to search for.
Returns
- bool
iftrue
item
is contained in collection,
otherwise.false
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<DicomPresentationContext> GetEnumerator()
Returns
- 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>.
public bool Remove(DicomPresentationContext item)
Parameters
item
DicomPresentationContextThe object to remove from the ICollection<T>.
Returns
- bool
true if
item
was successfully removed from the ICollection<T>; otherwise, false. This method also returns false ifitem
is not found in the original ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.