Show / Hide Table of Contents

Class EnumerableWriter

Class which provides the ability to write to a provided enumerable of many kinds. Instances should be created through CreateFor(Type).

Inheritance
Object
EnumerableWriter
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public abstract class EnumerableWriter : Object

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.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top