C# 클래스 GenericServices.GenericServicesConfig

This static class holds the GenericService configuration parts
파일 보기 프로젝트 열기: JonPSmith/GenericServices

공개 메소드들

메소드 설명
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