class MAGES::MergerRegistry

Overview

Contains all mergers for the data container. More…

class MergerRegistry
{
public:
    // properties

    MergerRegistry Instance;

    // methods

    void RegisterMerger(IMerger merger);
    object Merge(object obj1, object obj2);
};

Detailed Documentation

Contains all mergers for the data container.

Properties

MergerRegistry Instance

Gets singleton instance of the merger registry.

Methods

void RegisterMerger(IMerger merger)

Registers a merger.

Parameters:

merger

The merger to be registered.

object Merge(object obj1, object obj2)

Merge two objects of the same type.

Parameters:

obj1

The first object.

obj2

The second object.

ArgumentException

Throws exception if objects are of different type.

NotSupportedException

Throws exception if a merger of the requested type is not implemented.

Returns:

The merged object.