UserMappingCollection
- Namespace:
PPDS.Migration.Models - Assembly:
PPDS.Migration - Kind: Class
Summary
Collection of user mappings for migrating user references between environments.
Members
Methods
TryGetMappedUserId
bool TryGetMappedUserId(Guid sourceUserId, Guid targetUserId)
Tries to get the mapped user ID for a source user.
Checks PPDS.Migration.Models.UserMappingCollection.Mappings first, then PPDS.Migration.Models.UserMappingCollection.DefaultUserId.
-
Param
sourceUserId: The source user ID. -
Param
targetUserId: The mapped target user ID, orSystem.Guid.Emptyif not found. -
Returns: True if a mapping was found or
PPDS.Migration.Models.UserMappingCollection.DefaultUserIdapplies; false otherwise.
Properties
DefaultUserId
Nullable<Guid> DefaultUserId { get; set; }
Gets or sets the default user ID to use when no mapping is found.
If null, unmapped users are left as-is (unless PPDS.Migration.Models.UserMappingCollection.UseCurrentUserAsDefault is true).
Mappings
Dictionary<Guid, UserMapping> Mappings { get; set; }
Gets or sets the user mappings. Key is source user ID, value is the mapping.
UseCurrentUserAsDefault
bool UseCurrentUserAsDefault { get; set; }
Gets or sets whether to use the current user as the default when no mapping is found.
Checked by import logic; takes precedence over PPDS.Migration.Models.UserMappingCollection.DefaultUserId.