Show / Hide Table of Contents

Class AggregateDisposable

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

Inheritance
System.Object
AggregateDisposable
Implements
System.IDisposable
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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 System.IDisposables.

Declaration
public AggregateDisposable(IEnumerable<IDisposable> disposables)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.IDisposable> disposables

An enumerable of System.IDisposable instances.

View Source

AggregateDisposable(IDisposable[])

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

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

An array of System.IDisposable instances.

Methods

View Source

Add(IDisposable)

Add an instance of System.IDisposable to the child items.

Declaration
public void Add(IDisposable disposable)
Parameters
Type Name Description
System.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
System.Collections.Generic.IEnumerable<System.IDisposable> disposables

A list of disposables.

View Source

Dispose()

Disposes all child System.IDisposables.

Declaration
public void Dispose()
Exceptions
Type Condition
System.AggregateException

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

Implements

System.IDisposable

Extension Methods

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