///
/// 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 System.Collections.Generic;
using JetBrains.Omea.OpenAPI;
namespace JetBrains.Omea.OpenApiEx
{
///
/// An interface for the list of resource objects, accessibly by index and Resource ID.
///
/// The resource object type.
public interface IResourceObjectsList : IList where T : class, IResourceObject
{
///
/// Gets the resource list wrapped by this list.
///
IResourceList Resources { get; }
///
/// Gets a resource object by the database ID of an Omea resource.
/// Throws if there is no such resource in the list.
///
/// The Omea resource database ID.
/// The resource object.
T GetById(int id);
///
/// Gets a resource object by the database ID of an Omea resource.
/// Returns Null if there is no such resource in the list.
///
/// The Omea resource database ID.
/// The resource object, or Null if not found.
T TryGetById(int id);
}
}