[Tests] Test samples from KEEP
This commit is contained in:
committed by
TeamCityServer
parent
b0a7be72e8
commit
d8faa9686d
+14
@@ -0,0 +1,14 @@
|
||||
class Session(var lastAccess: Any?)
|
||||
interface Transaction {
|
||||
fun loadSession(): Session
|
||||
fun storeSession(session: Session)
|
||||
}
|
||||
|
||||
fun now(): Any? = null
|
||||
|
||||
context(Transaction)
|
||||
fun updateUserSession() {
|
||||
val session = loadSession()
|
||||
session.lastAccess = now()
|
||||
storeSession(session)
|
||||
}
|
||||
Reference in New Issue
Block a user