Skip to main content

DuplicateRuleHandler

  • Namespace: PPDS.Migration.Import.Handlers
  • Assembly: PPDS.Migration
  • Kind: Class
  • Implements: IPostImportHandler, IRecordTransformer

Summary

Handles duplicate rule records during import. Remaps Entity Type Codes during transform and publishes rules after import.

Members

Constructors

DuplicateRuleHandler(IDataverseConnectionPool connectionPool, ILogger<DuplicateRuleHandler> logger)

DuplicateRuleHandler(IDataverseConnectionPool connectionPool, ILogger<DuplicateRuleHandler> logger)

Initializes a new instance of the PPDS.Migration.Import.Handlers.DuplicateRuleHandler class.

  • Param connectionPool: The Dataverse connection pool.

  • Param logger: Optional logger.

Methods

CanHandle

bool CanHandle(string entityLogicalName)

Determines whether this transformer applies to the given entity.

  • Param entityLogicalName: The entity logical name.

  • Returns: True if this transformer handles the entity.

ExecuteAsync

Task ExecuteAsync(string entityLogicalName, ImportContext context, CancellationToken cancellationToken)

Executes post-import processing for the given entity.

  • Param entityLogicalName: The entity logical name.

  • Param context: The import context.

  • Param cancellationToken: The cancellation token.

  • Returns: A task representing the asynchronous operation.

Transform

Entity Transform(Entity record, ImportContext context)

Transforms a record before import.

  • Param record: The record to transform.

  • Param context: The import context.

  • Returns: The transformed record.