REORG
This commit is contained in:
parent
8d68ee380a
commit
45514010f2
3505 changed files with 154 additions and 523 deletions
|
|
@ -1,37 +0,0 @@
|
|||
"use strict";
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Subject = void 0;
|
||||
const Utils_1 = require("./Utils");
|
||||
/** Stream implementation to stream items to the server. */
|
||||
class Subject {
|
||||
constructor() {
|
||||
this.observers = [];
|
||||
}
|
||||
next(item) {
|
||||
for (const observer of this.observers) {
|
||||
observer.next(item);
|
||||
}
|
||||
}
|
||||
error(err) {
|
||||
for (const observer of this.observers) {
|
||||
if (observer.error) {
|
||||
observer.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
complete() {
|
||||
for (const observer of this.observers) {
|
||||
if (observer.complete) {
|
||||
observer.complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
subscribe(observer) {
|
||||
this.observers.push(observer);
|
||||
return new Utils_1.SubjectSubscription(this, observer);
|
||||
}
|
||||
}
|
||||
exports.Subject = Subject;
|
||||
//# sourceMappingURL=Subject.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue