C# 클래스 Rock.Model.AttendanceCodeService

Data Access/Service class for Rock.Model.AttendanceCode entity types
파일 보기 프로젝트 열기: NewSpring/Rock 1 사용 예제들

공개 메소드들

메소드 설명
GetNew ( int codeLength = 3 ) : AttendanceCode

Returns a new Rock.Model.AttendanceCode comprised of random alpha numeric characters.

GetNew ( int alphaLength = 2, int numericLength = 4, bool isRandomized = true ) : AttendanceCode

Returns a new Rock.Model.AttendanceCode with a specified number of alpha characters followed by another specified number of numeric characters. The numeric character sequence will not repeat for "today" so ensure that you're using a sufficient numericLength otherwise it will be unable to find a unique number. Also note as the issued numeric codes reaches the maximum (from the set of possible), it will take longer and longer to find an unused number.

비공개 메소드들

메소드 설명
GenerateRandomAlphaCode ( int length ) : string

Generates a random (security) code containing only alpha characters.

GenerateRandomCode ( int length ) : string

Generates a random (security) code.

GenerateRandomNumericCode ( int length ) : string

Generates a random (security) code containing only numeric characters.

메소드 상세

GetNew() 공개 정적인 메소드

Returns a new Rock.Model.AttendanceCode comprised of random alpha numeric characters.
public static GetNew ( int codeLength = 3 ) : AttendanceCode
codeLength int A representing the length of the (security) code.
리턴 AttendanceCode

GetNew() 공개 정적인 메소드

Returns a new Rock.Model.AttendanceCode with a specified number of alpha characters followed by another specified number of numeric characters. The numeric character sequence will not repeat for "today" so ensure that you're using a sufficient numericLength otherwise it will be unable to find a unique number. Also note as the issued numeric codes reaches the maximum (from the set of possible), it will take longer and longer to find an unused number.
public static GetNew ( int alphaLength = 2, int numericLength = 4, bool isRandomized = true ) : AttendanceCode
alphaLength int A representing the length of the (alpha) portion of the code.
numericLength int A representing the length of the (digit) portion of the code.
isRandomized bool A that controls whether or not the AttendanceCodes should be generated randomly or in order (starting from the smallest).
리턴 AttendanceCode