///
/// Copyright © 2003-2008 JetBrains s.r.o.
/// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder).
///
using JetBrains.Omea.OpenAPI;
namespace JetBrains.Omea.OpenApiEx
{
///
/// Represents an extension to the Omea Core interface.
///
public interface ICoreEx
{
///
/// Gets the data object that contains various information, such as resource type and property names and IDs for the commonly-used entities.
///
ICoreData Data { get; }
///
/// Gets the Omea Scheduller that executes schedulled tasks.
///
IScheduller Scheduller { get; }
///
/// Gets the Omea Progress Manager that displays the progress for various lengthy operation and provides the means for controlling the way they run.
///
IProgressManager ProgressManager { get; }
///
/// Gets the registered plugin service of the given type.
/// Throws if there's no such registered.
///
/// To get a service for late-binding calls, or register a new service, use the members.
/// Type of the service object.
/// An instance of the service.
TService GetService();
///
/// Gets the registered plugin service of the given type.
/// Returns Null if there's no such registered.
///
/// To get a service for late-binding calls, or register a new service, use the members.
/// Type of the service object.
/// An instance of the service, or Null.
TService TryGetService();
///
/// Gets a resource object factory for the given resource object type.
/// Throws if such is not available.
///
/// Resource object type.
/// The factory.
IResourceObjectFactory GetResourceObjectFactory() where TResourceObject : IResourceObject;
///
/// Registers a new resource object factory.
///
/// Type of the resource objects handled by the factory.
/// The factory object.
void RegisterResourceObjectFactory(IResourceObjectFactory factory) where TResourceObject : IResourceObject;
}
}