Show / Hide Table of Contents

Class AggregateDisposable

An aggregate of IDisposables that allows to dispose several disposables in one operation.

Inheritance
object
AggregateDisposable
Implements
IDisposable
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Infrastructure
Assembly: Sartorius.SAF.dll
Syntax
public sealed class AggregateDisposable : IDisposable

Constructors

View Source

AggregateDisposable()

Initializes a new instance of the AggregateDisposable class.

Declaration
public AggregateDisposable()
View Source

AggregateDisposable(IEnumerable<IDisposable>)

Initializes a new instance of the AggregateDisposable class with the specified child IDisposables.

Declaration
public AggregateDisposable(IEnumerable<IDisposable> disposables)
Parameters
Type Name Description
IEnumerable<IDisposable> disposables

An enumerable of IDisposable instances.

View Source

AggregateDisposable(params IDisposable[])

Initializes a new instance of the AggregateDisposable class with the specified child IDisposables.

Declaration
public AggregateDisposable(params IDisposable[] disposables)
Parameters
Type Name Description
IDisposable[] disposables

An array of IDisposable instances.

Methods

View Source

Add(IDisposable)

Add an instance of IDisposable to the child items.

Declaration
public void Add(IDisposable disposable)
Parameters
Type Name Description
IDisposable disposable

A instance.

View Source

AddRange(IEnumerable<IDisposable>)

Add a range of disposables.

Declaration
public void AddRange(IEnumerable<IDisposable> disposables)
Parameters
Type Name Description
IEnumerable<IDisposable> disposables

A list of disposables.

View Source

Dispose()

Disposes all child IDisposables.

Declaration
public void Dispose()
Exceptions
Type Condition
AggregateException

Thrown if more than one of the child disposables throws an exception during Dispose(). If a single child disposable throws an exception this exception gets rethrown.

Implements

IDisposable

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX