using System;
using System.Threading.Tasks;
namespace Unity.Services.Core
{
///
/// Central registry for an instance of unity services.
///
public interface IUnityServices
{
///
/// Invoked when initialization completes successfully.
///
event Action Initialized;
///
/// Invoked when initialization fails.
///
event Action InitializeFailed;
///
/// The initialization state of the services instance.
///
ServicesInitializationState State { get; }
///
/// Initialize the services
///
/// The options for the services
/// Return a handle to the asynchronous initialization process.
Task InitializeAsync(InitializationOptions options = null);
///
/// Provides the unique identifier for the services registry or null for the main services.
///
/// The unique identifier for the services registry
string GetIdentifier() { return null; }
///
/// Retrieve a service from the service registry
///
/// The type that was registered for the service
/// The service if available, otherwise null
T GetService();
}
}