2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2026-05-04 20:58:42 +00:00
This commit is contained in:
2024-05-02 23:44:19 +03:00
parent 145726153f
commit 8a30c92e19
7 changed files with 172 additions and 92 deletions
+4 -4
View File
@@ -74,10 +74,10 @@ class AutoList<T, ST> extends IDestructible with IterableMixin<T> {
}
T? first(bool Function(T element) selector) {
final res = _list.where(selector);
return res.isEmpty ? null : res.first;
}
// T? first(bool Function(T element) selector) {
// final res = _list.where(selector);
// return res.isEmpty ? null : res.first;
// }
/// <summary>
/// Add an array of items to the list
+1 -1
View File
@@ -79,7 +79,7 @@ class KeyList<KT, T> extends IEventHandler with MapMixin<KT, T> {
}
T? first(bool Function(T element) selector) {
final res = _map.where(selector);
final res = _map.values.where(selector);
return res.isEmpty ? null : res.first;
}
+1 -1
View File
@@ -1,6 +1,6 @@
import 'NetworkBuffer.dart';
abstract class INetworkReceiver<T>
abstract mixin class INetworkReceiver<T>
{
void networkClose(T sender);
void networkReceive(T sender, NetworkBuffer buffer);
+1 -1
View File
@@ -31,7 +31,7 @@ import '../Data/PropertyValue.dart';
// old
// abstract class IStore extends IResource
// new
abstract class IStore implements IResource {
abstract mixin class IStore implements IResource {
AsyncReply<IResource?> get(String path);
// AsyncReply<IResource?> retrieve(int iid);
AsyncReply<bool> put(IResource resource);
+2 -2
View File
@@ -45,7 +45,7 @@ class Instance extends IEventHandler {
int _id;
bool _isDestroyed;
bool _isDestroyed = false;
bool get isDestroyed => _isDestroyed;
@@ -482,7 +482,7 @@ class Instance extends IEventHandler {
if (pi.parents.count == 0) break;
p = pi.parents.first;
p = pi.parents.firstOrNull!;
}
return l.join("/");