Initial Move from Azure DevOps to GitHub

This commit is contained in:
Steve Faulkner
2020-05-25 21:30:55 -05:00
commit 36581fb6d9
986 changed files with 195242 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { IResourceProviderClientFactory, IResourceProviderClient } from "./IResourceProviderClient";
import { ResourceProviderClient } from "./ResourceProviderClient";
export class ResourceProviderClientFactory implements IResourceProviderClientFactory<any> {
private cachedClients: { [url: string]: IResourceProviderClient<any> } = {};
constructor(private armEndpoint: string) {}
public getOrCreate(url: string): IResourceProviderClient<any> {
if (!url) {
throw new Error("No resource provider client factory params specified");
}
if (!this.cachedClients[url]) {
this.cachedClients[url] = new ResourceProviderClient(this.armEndpoint);
}
return this.cachedClients[url];
}
}