2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2025-09-30 19:13:19 +00:00

Static Calling

This commit is contained in:
2022-08-07 23:09:25 +03:00
parent 8eca096b94
commit f5d3ea9ee5
9 changed files with 431 additions and 86 deletions

View File

@@ -126,6 +126,10 @@ class AsyncReply<T> implements Future<T> {
}
AsyncReply<T> timeout(Duration timeLimit, {FutureOr<T?> onTimeout()?}) {
Future.delayed(timeLimit, () {
if (!_resultReady && _exception == null) onTimeout?.call();
});
return this;
}

View File

@@ -1,39 +1,38 @@
enum ExceptionCode
{
HostNotReachable,
AccessDenied,
UserOrTokenNotFound,
ChallengeFailed,
ResourceNotFound,
AttachDenied,
InvalidMethod,
InvokeDenied,
CreateDenied,
AddParentDenied,
AddChildDenied,
ViewAttributeDenied,
UpdateAttributeDenied,
StoreNotFound,
ParentNotFound,
ChildNotFound,
ResourceIsNotStore,
DeleteDenied,
DeleteFailed,
UpdateAttributeFailed,
GetAttributesFailed,
ClearAttributesFailed,
TemplateNotFound,
RenameDenied,
ClassNotFound,
MethodNotFound,
PropertyNotFound,
SetPropertyDenied,
ReadOnlyProperty,
GeneralFailure,
AddToStoreFailed,
NotAttached,
AlreadyListened,
AlreadyUnlistened,
NotListenable
}
enum ExceptionCode {
HostNotReachable,
AccessDenied,
UserOrTokenNotFound,
ChallengeFailed,
ResourceNotFound,
AttachDenied,
InvalidMethod,
InvokeDenied,
CreateDenied,
AddParentDenied,
AddChildDenied,
ViewAttributeDenied,
UpdateAttributeDenied,
StoreNotFound,
ParentNotFound,
ChildNotFound,
ResourceIsNotStore,
DeleteDenied,
DeleteFailed,
UpdateAttributeFailed,
GetAttributesFailed,
ClearAttributesFailed,
TemplateNotFound,
RenameDenied,
ClassNotFound,
MethodNotFound,
PropertyNotFound,
SetPropertyDenied,
ReadOnlyProperty,
GeneralFailure,
AddToStoreFailed,
NotAttached,
AlreadyListened,
AlreadyUnlistened,
NotListenable,
ParseError
}