Property IsRented
IsRented
Provides the current rental status of the resource. If there are multiple reasons why the resource is rented, they will all be listed together.
Declaration
public IObservable<AnnotatedBoolean> IsRented { get; }
Property Value
Type | Description |
---|---|
IObservable<AnnotatedBoolean> |
Implements
Examples
This example demonstrates how to subscribe to the rental status of the resource.
var manager = new SharedResourceRentManager();
manager.IsRented.Subscribe(status =>
{
if (status.Value)
{
Console.WriteLine("Resource is rented for the following reasons: " + status.Annotation);
}
else
{
Console.WriteLine("Resource is not rented.");
}
});