-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonathan Casarrubias
committed
Sep 30, 2016
1 parent
d9b34a1
commit 92d0dca
Showing
27 changed files
with
201 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { LoopBackConfig } from '../lb.config'; | ||
import { AccessToken, FireLoopRef } from './index'; | ||
import { SocketConnections } from '../sockets/socket.connections'; | ||
|
||
export class FireLoop { | ||
|
||
private socket: any; | ||
private references: any = {}; | ||
|
||
constructor(token: AccessToken) { | ||
this.socket = SocketConnections.getHandler(LoopBackConfig.getPath(), token); | ||
} | ||
|
||
public ref<T>(model: { getModelName(): string }): FireLoopRef<T> { | ||
let name: string = model.getModelName(); | ||
if (this.references[name]) { return this.references[name]; } | ||
this.references[name] = new FireLoopRef<T>(name, this.socket); | ||
return this.references[name]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { LoopBackConfig } from '../lb.config'; | ||
import { AccessToken, FireLoopRef } from './index'; | ||
import { SocketConnections } from '../sockets/socket.connections'; | ||
|
||
export class FireLoop { | ||
|
||
private socket: any; | ||
private references: any = {}; | ||
|
||
constructor(token: AccessToken) { | ||
this.socket = SocketConnections.getHandler(LoopBackConfig.getPath(), token); | ||
} | ||
|
||
public ref<T>(model: { getModelName(): string }): FireLoopRef<T> { | ||
let name: string = model.getModelName(); | ||
if (this.references[name]) { return this.references[name]; } | ||
this.references[name] = new FireLoopRef<T>(name, this.socket); | ||
return this.references[name]; | ||
} | ||
} |
Oops, something went wrong.