add CustomInputProvider
This commit is contained in:
parent
f5b71dcb84
commit
445e2b4c06
@ -28,6 +28,11 @@ expect class FileBasedInputProvider : SimpleInputProvider {
|
|||||||
val file: MPPFile
|
val file: MPPFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Serializable(SimpleInputProviderSerializer::class)
|
||||||
|
class CustomInputProvider(private val provider: () -> Input) : SimpleInputProvider {
|
||||||
|
override fun invoke(): Input = provider()
|
||||||
|
}
|
||||||
|
|
||||||
object SimpleInputProviderSerializer : KSerializer<SimpleInputProvider> {
|
object SimpleInputProviderSerializer : KSerializer<SimpleInputProvider> {
|
||||||
private val serializer = ByteArraySerializer()
|
private val serializer = ByteArraySerializer()
|
||||||
override val descriptor: SerialDescriptor
|
override val descriptor: SerialDescriptor
|
||||||
|
Loading…
Reference in New Issue
Block a user