Click or drag to resize

RepositoryModeUtilsSetRepositoryMode Method

Sets the database repository mode.

Namespace:  PDTec.IceNet.Sdk.Utils
Assembly:  PDTec.IceNet.Sdk (in PDTec.IceNet.Sdk.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public static void SetRepositoryMode(
	IDatabaseRepository pRepository,
	RepositoryMode mode
)

Parameters

pRepository
Type: PDTec.IceNet.Core.DatabaseIDatabaseRepository
The database repository.
mode
Type: PDTec.IceNet.Core.DatabaseRepositoryMode
The database repository mode.
Remarks

This method contains the transaction scope, in contrast to all other utility methods. This is required because changing the repository mode disables committing all regular pending transactions. Therefore this method should not be called within a transactional context.

After changing the repository mode the current repository instance is no longer valid and should be discarded. Any following repository actions should be performed on a new repository instance.

In order to receive a valid repository instance wait 5 seconds after calling this method before requesting a new repository instance. This allows the internal caches to refresh the repository status.

See Also