import { Injectable } from '@angular/core' ; import { ODataClient } from '../client' ; import { ODataEntitySetService } from './entity-set' ; import { ODataSingletonService } from './singleton' ; @ Injectable ( ) export class ODataServiceFactory { constructor ( protected client ) { } param entitySetName param apiNameOrEntityType entitySet < T > ( entitySetName , apiNameOrEntityType ? ) { return new ( class extends ODataEntitySetService < T > { } ) ( this . client , entitySetName , apiNameOrEntityType ) ; } param singletonName param apiNameOrEntityType singleton < T > ( singletonName , apiNameOrEntityType ? ) { return new ( class extends ODataSingletonService < T > { } ) ( this . client , singletonName , apiNameOrEntityType ) ; } }