C# Class DataMigration.AbstractBaseExistence

A base class for existence objects that can use a C# HashSet for their implementation. Child classes usually just implement Init() to populate the HashSet, or they can leave it empty; plan-specific existence objects can use this mechanism to implement a first-writer-wins de-duping strategry on feed data items.
Inheritance: IExistence
Mostra file Open project: scoutmedia/DataMigration

Protected Properties

Property Type Description
Values HashSet

Public Methods

Method Description
Add ( string value ) : void

Adds a single value to the IExistence collection.

Exists ( string value ) : bool

Determines if an external value exists in the collection.

Init ( ) : void

This is essentially a two-phase ctor. The sequence of construction is, instantiate the object, then set its properties, then call Init() so it can migrate the property values to their implementation-specific roles. In this abstract class, this method is not implemented (by design). It's up to concrete child classes to implement this, depending on their context.

Method Details

Add() public method

Adds a single value to the IExistence collection.
public Add ( string value ) : void
value string Value.
return void

Exists() public method

Determines if an external value exists in the collection.
public Exists ( string value ) : bool
value string Value to check existence for.
return bool

Init() public method

This is essentially a two-phase ctor. The sequence of construction is, instantiate the object, then set its properties, then call Init() so it can migrate the property values to their implementation-specific roles. In this abstract class, this method is not implemented (by design). It's up to concrete child classes to implement this, depending on their context.
public Init ( ) : void
return void

Property Details

Values protected_oe property

The Values HashSet is used to implement this Exists object.
protected HashSet Values
return HashSet