2022-08-26 16:48:17 +08:00

22 lines
570 B
TypeScript

import { INetRequest } from "./Core/INetRequest";
import { NetManager } from "./NetManager";
export abstract class NetRequest<TResquest, TResponse> implements INetRequest<TResquest, TResponse> {
abstract get Method(): string;
get MethodBack(): string {
return this.Method;
}
Data: TResquest;
Result: import("./Core/INetResponse").INetResponse<TResponse>;
SendAsync(mask: boolean = false): Iterator<any> {
return NetManager.SendAsync(this, mask);
}
Send() {
NetManager.Send(this);
}
}