namespace Esiur.Resource; /// /// Lifecycle state of a distributed (remote) resource on the consuming side. Replaces the former /// separate attached/suspended/destroyed booleans with a single explicit state machine. /// public enum ResourceStatus : byte { /// Created as a placeholder; its properties have not been received yet. Pending = 0, /// /// Its own properties have been received and merged, but its dependency graph may still be /// incomplete (e.g. it was used to break a reference cycle). Not yet safe to hand to the /// application as fully ready. /// Attached = 1, /// /// Attached and delivered to the application as part of a fully-attached object graph. This is /// the only state in which a resource — including every resource it depends on — is guaranteed /// ready for application use. /// Published = 2, /// The connection was lost; the resource is awaiting reattachment. Suspended = 3, /// The resource has been detached/destroyed and must not be accessed. Destroyed = 4, }