### File

`src/lib/proxy.remote-method.ts`

### Extends

`BaseRemoteMethod`

### Index

###### Properties
Public executed$ Public executionsInProgress$ Public Readonly injector
###### Methods
Protected Async _call Public Abstract transformParameters Public Async call Public executed Public pauseRefresh Public refresh Public resumeRefresh

### Constructor

`constructor(remoteMethod: BaseRemoteMethod, injector: Injector | null, metadata: BaseRemoteMethodMetadata)`
Defined in src/lib/proxy.remote-method.ts:18
Parameters :
Name | Type | Optional
remoteMethod | `BaseRemoteMethod` | No
injector | `Injector | null` | No
metadata | `BaseRemoteMethodMetadata` | No

### Methods

Protected Async _call
`_call(parameters?: SourceParameter)`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:33`
Parameters :
Name | Type | Optional
parameters | `SourceParameter` | Yes
Returns : `Promise<any>`

Public Abstract transformParameters
`transformParameters(parameters?: SourceParameter)`
Defined in src/lib/proxy.remote-method.ts:31
Parameters :
Name | Type | Optional
parameters | `SourceParameter` | Yes
Returns : `TargetParameter | Promise`

Public Async call
`call(parameters?: Parameter)`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:76`
Parameters :
Name | Type | Optional
parameters | `Parameter` | Yes
Returns : `Promise<ReturnType>`

Public executed
`executed(result: ReturnType)`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:86`
Parameters :
Name | Type | Optional
result | `ReturnType` | No
Returns : `void`

Public pauseRefresh
`pauseRefresh()`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:92`
Returns : `void`

Public refresh
`refresh()`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:100`
Returns : `void`

Public resumeRefresh
`resumeRefresh()`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:96`
Returns : `void`

### Properties

Public executed$
Type : `Subject<ReturnType>`
Default value : `new Subject<ReturnType>()`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:42`

Public executionsInProgress$
Type : `CounterSubject`
Default value : `new CounterSubject()`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:44`

Public Readonly injector
Type : `Injector`
Inherited from `BaseRemoteMethod`
Defined in `BaseRemoteMethod:46`

    import {
      Inject,
      Injectable,
      INJECTOR,
      Injector,
    } from '@angular/core';
    import {
      BaseRemoteMethod,
      BaseRemoteMethodMetadata,
    } from './base.remote-method';
    import {
      REMOTE_METHOD_META_DATA,
      RXAP_PROXY_REMOTE_METHOD_TARGET,
    } from './tokens';

    @Injectable()
    export abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter>
      extends BaseRemoteMethod<ReturnType, SourceParameter> {

      constructor(
        @Inject(RXAP_PROXY_REMOTE_METHOD_TARGET)
        private readonly remoteMethod: BaseRemoteMethod,
        @Inject(INJECTOR)
          injector: Injector | null = null,
        @Inject(REMOTE_METHOD_META_DATA)
          metadata: BaseRemoteMethodMetadata = remoteMethod.metadata,
      ) {
        super(injector, metadata);
      }

      public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;

      protected async _call(parameters?: SourceParameter): Promise<any> {
        return this.remoteMethod.call(await this.transformParameters(parameters));
      }

    }

# results matching ""

# No results matching ""