// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System; using System.Reactive.PlatformServices; namespace System.Reactive.Linq { internal static class QueryServices { private static Lazy s_services = new Lazy(Initialize); public static T GetQueryImpl(T defaultInstance) { return s_services.Value.Extend(defaultInstance); } private static IQueryServices Initialize() { return PlatformEnlightenmentProvider.Current.GetService() ?? new DefaultQueryServices(); } } internal interface IQueryServices { T Extend(T baseImpl); } class DefaultQueryServices : IQueryServices { public T Extend(T baseImpl) { return baseImpl; } } }