Ejemplo n.º 1
0
        public QueryAllVpcsWorkItemImpl NewQueryAllVpcsWorkItem(Package pkg)
        {
            QueryAllVpcsWorkItemImpl workItem = new QueryAllVpcsWorkItemImpl();

            workItem.Pkg = pkg;
            return(workItem);
        }
Ejemplo n.º 2
0
        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
                        )
                    );
            }
        }