AutoRemoveList.1
Designed for events with auto-remove on process shutdown, but can be used with any type of elements. Removing elements during enumeration is allowed (for current element of the enumerator).
Types:
Subscription: SubscriptionAutoSubscription: AutoSubscription
Instance Properties:
count: int - Number of subscription.subscriptions: IEnumerable[Subscription] - Enumerate all subscriptions.
Instance Methods:
subscribe(): AutoSubscription, value T- Subscribe to the list. Similar to
addbut returns auto-remove subscription. This is default member and will be used when you call the object.
- Subscribe to the list. Similar to
add(): Subscription, value T- Add new item. Returns pure subscribtion (or null for duplicit item). Can also be accessed via
+=operator in ROS.
- Add new item. Returns pure subscribtion (or null for duplicit item). Can also be accessed via
remove(): Subscription, value T- Remove item. Returns the subscription on success, null if not found. Can also be accessed via
-=operator in ROS.
- Remove item. Returns the subscription on success, null if not found. Can also be accessed via
clear(): void - Remove all subscriptions.