using System;
namespace UnityEngine.XR.ARSubsystems
{
///
/// Represents the status of an .
///
///
///
public enum AddReferenceImageJobStatus
{
///
/// No status (for example, because the was default-constructed).
///
None,
///
/// The job is pending.
///
Pending,
///
/// The reference image was added successfully.
///
Success,
///
/// The reference image was not added because it is invalid.
///
ErrorInvalidImage,
///
/// The reference image was not added due to an unknown error.
///
ErrorUnknown,
///
/// The reference image was not added because it was a duplicate.
///
ErrorDuplicateImage,
}
///
/// Extensions to the `enum`.
///
public static class AddReferenceImageJobStatusExtensions
{
///
/// Determines whether the is
/// .
///
/// The being extended.
/// Returns `true` if is .
/// Returns `false` otherwise.
public static bool IsPending(this AddReferenceImageJobStatus status) =>
status == AddReferenceImageJobStatus.Pending;
///
/// Determines whether the has completed (successfully or not).
///
/// The being extended.
/// Returns `true` if is greater than
/// . Returns `false` otherwise.
public static bool IsComplete(this AddReferenceImageJobStatus status) =>
status > AddReferenceImageJobStatus.Pending;
///
/// Determines whether the has completed with an error.
///
/// The being extended.
/// Returns `true` if is greater than or equal to
/// . Returns `false` otherwise.
public static bool IsError(this AddReferenceImageJobStatus status) =>
status >= AddReferenceImageJobStatus.ErrorInvalidImage;
///
/// Determines whether the has completed successfully.
///
/// The being extended.
/// Returns `true` if is .
/// Returns `false` otherwise.
public static bool IsSuccess(this AddReferenceImageJobStatus status) =>
status == AddReferenceImageJobStatus.Success;
}
}