System.Data.Entity.EntityDescriptorContext.GetService C# (CSharp) Метод

GetService() публичный Метод

Get entity context.
public GetService ( Type serviceType ) : object
serviceType System.Type Type of entity.
Результат object
        public object GetService(Type serviceType)
        {
            if (serviceType.IsGenericType)
            {
                Type definition = serviceType.GetGenericTypeDefinition();
                if (definition == typeof(IEntityContext<>) || definition == typeof(IEntityQueryable<>))
                    return _Builder.GetContext(serviceType.GetGenericArguments()[0]);
                else
                    return null;
            }
            else
            {
                if (typeof(IEntity).IsAssignableFrom(serviceType))
                    return _Builder.GetContext(serviceType);
                else
                    return null;
            }
        }