public override bool Replicate() { IPage <Transform> transformPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateTeansformsPage(transformPage); while (transformPage.NextPageLink != null) { transformPage = SourceOperations.ListNext(transformPage.NextPageLink); } return(true); }
public override bool Replicate() { IPage <StreamingEndpoint> streamingEndpointsPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateStreamingEndpointsPage(streamingEndpointsPage); while (streamingEndpointsPage.NextPageLink != null) { streamingEndpointsPage = SourceOperations.ListNext(streamingEndpointsPage.NextPageLink); ReplicateStreamingEndpointsPage(streamingEndpointsPage); } return(true); }
public override bool Replicate() { IPage <AccountFilter> sourceAccountFilterPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateAccountFiltersPage(sourceAccountFilterPage); while (sourceAccountFilterPage.NextPageLink != null) { sourceAccountFilterPage = SourceOperations.ListNext(sourceAccountFilterPage.NextPageLink); ReplicateAccountFiltersPage(sourceAccountFilterPage); } return(true); }
public override bool Replicate() { var sourceAssetStreamingLocatorsPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateStreamingLocatorsPage(sourceAssetStreamingLocatorsPage); while (sourceAssetStreamingLocatorsPage.NextPageLink != null) { sourceAssetStreamingLocatorsPage = SourceOperations.ListNext(sourceAssetStreamingLocatorsPage.NextPageLink); ReplicateStreamingLocatorsPage(sourceAssetStreamingLocatorsPage); } return(true); }
public override bool Replicate() { IPage <ContentKeyPolicy> contentKeyPolicyPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateContentKeyPolicyPage(contentKeyPolicyPage); while (contentKeyPolicyPage.NextPageLink != null) { contentKeyPolicyPage = SourceOperations.ListNext(contentKeyPolicyPage.NextPageLink); ReplicateContentKeyPolicyPage(contentKeyPolicyPage); } return(true); }
public override bool Replicate() { IPage <LiveEvent> liveEventsPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateLiveEventsPage(liveEventsPage); while (liveEventsPage.NextPageLink != null) { liveEventsPage = SourceOperations.ListNext(liveEventsPage.NextPageLink); ReplicateLiveEventsPage(liveEventsPage); } return(true); }
public override bool Replicate() { //Loop through all the assets pages in the source and move them to the destination var assetPage = SourceOperations.List(SourceAuth.ResourceGroup, SourceAuth.AccountName); ReplicateAssetPage(assetPage); while (assetPage.NextPageLink != null) { assetPage = SourceOperations.ListNext(assetPage.NextPageLink); ReplicateAssetPage(assetPage); } return(true); }
private void ReplicateContentKeyPolicyPage(IPage <ContentKeyPolicy> contentKeyPolicies) { if (contentKeyPolicies.Any()) { foreach (var contentKeyPolicy in contentKeyPolicies) { Helpers.WriteLine($"Copying content key policy '{contentKeyPolicy.Name}'...", 2); ContentKeyPolicyProperties tempContentKey = SourceOperations.GetPolicyPropertiesWithSecrets(SourceAuth.ResourceGroup, SourceAuth.AccountName, contentKeyPolicy.Name); DestinationOperations.CreateOrUpdate(DestinationAuth.ResourceGroup, DestinationAuth.AccountName, contentKeyPolicy.Name, tempContentKey.Options, tempContentKey.Description); Helpers.WriteLine($"Done", 3); } } else { Helpers.WriteLine($"No content key policies to replicate", 2); } }
public static void Main(string[] args) { StartUp(); Console.WriteLine("Buy low, sell high!"); Console.WriteLine("Enter the stock price source:"); var source = ""; while (source.Length == 0 && !File.Exists(source)) { source = Console.ReadLine(); if (!File.Exists(source)) { Console.WriteLine("Please enter a valid source:"); } } var sourceOps = new SourceOperations(); var stockPrices = sourceOps.GetStockPrices(source); var stockPriceOps = new StockPriceOperations(); var bestTrade = stockPriceOps.GetBestTrade(stockPrices); if (bestTrade == null) { Console.WriteLine("ERROR: unable to calculate the best trade for the given stock prices!"); } else { Console.WriteLine(bestTrade.ToString()); } }
public void Setup() { _sourceOperations = new SourceOperations(new NullLogger <SourceOperations>()); }