/// <summary> /// Adds the stack local. /// </summary> /// <param name="type">The type.</param> /// <param name="pinned">if set to <c>true</c> [pinned].</param> /// <returns></returns> public Operand AddStackLocal(MosaType type, bool pinned) { var local = Operand.CreateStackLocal(type, LocalStack.Count, pinned); LocalStack.Add(local); return(local); }
public void NavigateBothTreesUp() { if (GoogleStack.Count <= 1 || LocalStack.Count <= 1) { Console.WriteLine($"Cannot go UP in {(GoogleStack.Count <= 1 ? "Google" : "Local or both")}"); } else { GoogleStack.Pop(); LocalStack.Pop(); } }
public void NavigateBothTreesDown(string nodeName) { if (GoogleStack.Peek() == null || LocalStack.Peek() == null) { Console.WriteLine($"Skip searching because current root doesn't exist in {(GoogleStack.Peek() == null ? "Google" : "Local or both")}"); } else { var googleNode = FindFolderInGoogle(nodeName); GoogleStack.Push(googleNode); var localNode = FindFolderLocally(nodeName); LocalStack.Push(localNode); } }
private static IAmazonSQS GetSqsClient(SqsServiceProviders sqsProviderType, IConfiguration configuration) { IAmazonSQS sqsClient = null; switch (sqsProviderType) { case SqsServiceProviders.Amazon: sqsClient = NativeAwsProvider.GetSqsClient(); break; case SqsServiceProviders.GoAws: sqsClient = new GoAws(configuration).GetSqsClient(); break; case SqsServiceProviders.LocalStack: sqsClient = new LocalStack(configuration).GetSqsClient(); break; default: throw new ArgumentOutOfRangeException(nameof(sqsProviderType)); } return(sqsClient); }
public INode GetCurrentLocalNode() { return(LocalStack.Peek()); }