C# Class GenericServices.GenericServicesConfig

This static class holds the GenericService configuration parts
Afficher le fichier Open project: JonPSmith/GenericServices

Méthodes publiques

Méthode Description
AddToSqlErrorDict ( int sqlErrorNumber, string errorText ) : void

This adds an entry to the SqlErrorDict

AddToSqlHandlerDict ( int sqlErrorNumber, HandleSqlException errorHandler, bool checkNotAlreadySet = true ) : void

This adds an ErrorHandler to the SqlHandlerDict The ErrorHandler will be called if the specified sql error happens. Note: will throw an exception if an error handler already exists for that sql error number unless the checkNotAlreadySet is set to false

ClearAutoMapperCache ( ) : void

This clears any AutoMapper mappings. Used when Unit Testing to ensure the mappings are newly set up.

ClearSqlErrorDict ( ) : void

This clears the SqlErrorDict of all entries

ClearSqlHandlerDict ( ) : void

This clears the SqlHandlerDict of all entries

Method Details

AddToSqlErrorDict() public static méthode

This adds an entry to the SqlErrorDict
public static AddToSqlErrorDict ( int sqlErrorNumber, string errorText ) : void
sqlErrorNumber int
errorText string
Résultat void

AddToSqlHandlerDict() public static méthode

This adds an ErrorHandler to the SqlHandlerDict The ErrorHandler will be called if the specified sql error happens. Note: will throw an exception if an error handler already exists for that sql error number unless the checkNotAlreadySet is set to false
public static AddToSqlHandlerDict ( int sqlErrorNumber, HandleSqlException errorHandler, bool checkNotAlreadySet = true ) : void
sqlErrorNumber int
errorHandler HandleSqlException Called when given sql error number happens with sql error and entities. /// Should return ValidationError or null if cannot handle the error
checkNotAlreadySet bool
Résultat void

ClearAutoMapperCache() public static méthode

This clears any AutoMapper mappings. Used when Unit Testing to ensure the mappings are newly set up.
public static ClearAutoMapperCache ( ) : void
Résultat void

ClearSqlErrorDict() public static méthode

This clears the SqlErrorDict of all entries
public static ClearSqlErrorDict ( ) : void
Résultat void

ClearSqlHandlerDict() public static méthode

This clears the SqlHandlerDict of all entries
public static ClearSqlHandlerDict ( ) : void
Résultat void