using System; using System.Collections.Generic; using System.Linq; using Chernobyl.Collections.Generic.Event; using Chernobyl.Plugin; namespace Chernobyl.Mathematics { /// /// Services related to Chernobyl.Mathematics. /// public interface IServices : IEventCollection {} /// /// Basic implementation of used to store services /// for Chernobyl.Mathematics. /// public class Services : DecoratingEventList, IServices, IPlugin { /// /// Initializes a new instance of the class. /// public Services(IEventCollection services) { services.Add(this); Add(new Movement.Services()); } } /// /// Extension and utility methods for . /// public static class Extensions { /// /// Returns the services list for Chernobyl.Mathematics. /// /// The list to look into for the /// Chernobyl.Mathematics services list. /// The services list for Chernobyl.Mathematics. public static IEventEnumerable Mathematics(this IEventEnumerable services) { return ((IEnumerable)services).OfType().First(); } } }