C# Класс GenericServices.GenericServicesConfig

This static class holds the GenericService configuration parts
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

AddToSqlErrorDict() публичный статический Метод

This adds an entry to the SqlErrorDict
public static AddToSqlErrorDict ( int sqlErrorNumber, string errorText ) : void
sqlErrorNumber int
errorText string
Результат void

AddToSqlHandlerDict() публичный статический Метод

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
Результат void

ClearAutoMapperCache() публичный статический Метод

This clears any AutoMapper mappings. Used when Unit Testing to ensure the mappings are newly set up.
public static ClearAutoMapperCache ( ) : void
Результат void

ClearSqlErrorDict() публичный статический Метод

This clears the SqlErrorDict of all entries
public static ClearSqlErrorDict ( ) : void
Результат void

ClearSqlHandlerDict() публичный статический Метод

This clears the SqlHandlerDict of all entries
public static ClearSqlHandlerDict ( ) : void
Результат void