public QueryAllVpcsWorkItemImpl NewQueryAllVpcsWorkItem(Package pkg) { QueryAllVpcsWorkItemImpl workItem = new QueryAllVpcsWorkItemImpl(); workItem.Pkg = pkg; return(workItem); }
public void ProcessQueryAllVpcsWorkItem(QueryAllVpcsWorkItemImpl workItem) { // Get information about all Vpcs IList <Vpc> vpcs = this.AwsRepository.FindVpcAll(); // Process each Vpc in turn foreach (Vpc vpc in vpcs) { // Get additional information for each Vpc bool enableDnsSupport = this.AwsRepository.GetVpcDnsSupportAttribute(vpc.VpcId); bool enableDnsHostnames = this.AwsRepository.GetVpcDnsHostnamesAttribute(vpc.VpcId); // Schedule work item to create the corresponding element this.WorkItemQueue.Enqueue( this.WorkItemFactory.NewCreateVpcModelWorkItem( workItem.Pkg, vpc, enableDnsSupport, enableDnsHostnames ) ); } }