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
Afficher le fichier Open project: scoutmedia/DataMigration

Protected Properties

Свойство Type Description
Values HashSet

Méthodes publiques

Méthode 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 méthode

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

Exists() public méthode

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

Init() public méthode

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
Résultat void

Property Details

Values protected_oe property

The Values HashSet is used to implement this Exists object.
protected HashSet Values
Résultat HashSet