예제 #1
0
 public virtual object GetService(Type type, object key)
 {
     return(DefaultProviderFactoryResolver.GetService(type, key, (Func <ArgumentException, string, object>)((e, n) =>
     {
         throw new ArgumentException(Strings.EntityClient_InvalidStoreProvider((object)n), (Exception)e);
     })));
 }
예제 #2
0
        public IEnumerable <object> GetServices(Type type, object key)
        {
            object service = DefaultProviderFactoryResolver.GetService(type, key, (Func <ArgumentException, string, object>)((e, n) => (object)null));

            if (service == null)
            {
                return(Enumerable.Empty <object>());
            }
            return((IEnumerable <object>) new object[1]
            {
                service
            });
        }