-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
1 parent
f662ea8
commit 318db60
Showing
14 changed files
with
786 additions
and
708 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export enum SyncMethod { | ||
GitHubGist = "GitHubGist" | ||
} |
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,6 @@ | ||
export interface ISyncService { | ||
Export(optArgument?: any[]): Promise<void>; | ||
Import(optArgument?: any[]): Promise<void>; | ||
IsConfigured(optArgument?: any[]): Promise<boolean>; | ||
Reset(optArgument?: any[]): Promise<void>; | ||
} |
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { ExtensionContext } from "vscode"; | ||
import Commons from "../commons"; | ||
import { Environment } from "../environmentPath"; | ||
import { WatcherService } from "../service/watcher/watcher.service"; | ||
|
||
export interface IExtensionState { | ||
context?: ExtensionContext; | ||
environment?: Environment; | ||
commons?: Commons; | ||
instanceID: string; | ||
watcher?: WatcherService; | ||
} |
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,16 @@ | ||
import { SyncMethod } from "../enums/syncMethod.enum"; | ||
import { ISyncService } from "../models/ISyncService.model"; | ||
import { IExtensionState } from "../models/state.model"; | ||
import { GistService } from "./github/gist.service"; | ||
|
||
export class FactoryService { | ||
public static CreateSyncService( | ||
state: IExtensionState, | ||
method: string | ||
): ISyncService { | ||
return new this.syncMethods[method](state); | ||
} | ||
private static syncMethods = { | ||
[SyncMethod.GitHubGist]: GistService | ||
}; | ||
} |
Oops, something went wrong.