Class EnumerableWriter
Class which provides the ability to write to a provided enumerable of many kinds. Instances should be created through CreateFor(Type).
Inherited Members
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public abstract class EnumerableWriter
Constructors
EnumerableWriter()
Class which provides the ability to write to a provided enumerable of many kinds. Instances should be created through CreateFor(Type).
Declaration
protected EnumerableWriter()
Methods
CreateFor(Type)
Creates an EnumerableWriter for the specified type and attempts to detect the type it enumerates over.
Declaration
public static EnumerableWriter CreateFor(Type enumerableType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | enumerableType | Type for the EnumuerableWriter to work with. Must be a recognized Enumerable, or method throws. |
Returns
| Type | Description |
|---|---|
| EnumerableWriter | Will always return an instance of EnumerableWriter |
Write(IEnumerable, object)
Takes an instance of an enumerable and adds data to it. The returned value may be the same instance modified, or it may be a new intance.
Declaration
public abstract IEnumerable Write(IEnumerable enumerableInstance, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable | enumerableInstance | Enumerable instance to modify |
| object | value | Value to add. |
Returns
| Type | Description |
|---|---|
| IEnumerable | A enumerable instance guaranteed to contain the provided value. |