In this guide you can find an overview of the floating features functionality: registering and releasing floating features and setting up the Floating Features Watchdog.
As with floating licenses, you can check if a feature is floating using properties for cloud, as well as offline floating features. To start, use the following code to check if a license feature is floating:
Developers will want to know the maximum number of users that can simultaneously use a floating feature and the current number of users using the feature. That can be done with:
You can get information on the floating feature timeout (in minutes) and the point in time until which a registered feature is valid (time of registration + floating feature timeout). After that time, LicenseSpring server will automatically release the feature - if it's not registered again.
Similar to floating licenses, floating features have to be periodically registered on the server for them to take up a floating slot.
Likewise, if you wish to release a feature before its timeout, you can do it like so:
In .NET SDK, ILicenseFeature data is not refreshed after registering and releasing the feature. In order to get updated values like FloatingSlotsInUse and FloatingEndDateTime you have to call ILicense.Features() method again.
Similar to a floating license watchdog, floating features have to initialize the watchdog in order to use its functionalities.
Once set up, you register your floating features just once and the watchdog will make sure they will not expire until you manually release them (don't forget to do that on application shut down, so you don't keep the slots occupied).
You initialize the watchdog like so:
Setting up the watchdog will also start the thread. If you wish to stop automatically extending your floating features, you can stop the watchdog:
And once stoped, it can be restarted again: