public override int GetHashCode() { return(Eip.GetHashCode()); }
private async Task <VpcData> Define() { var availabilityZonesResult = await GetAvailabilityZones.InvokeAsync( null, new InvokeOptions { Provider = _options?.Provider }); var azA = availabilityZonesResult.Names[0]; var azB = availabilityZonesResult.Names[1]; var vpcResourceName = $"{GetResourceName()}"; var vpc = new Vpc( vpcResourceName, new VpcArgs { CidrBlock = $"10.{_args.CidrBlockSegment}.0.0/16", Tags = new InputMap <string> { { "Name", vpcResourceName }, { "pulumi:ResourceName", vpcResourceName } } }, new CustomResourceOptions { Provider = _options?.Provider, Parent = this }); var private0 = AddSubnet(vpcResourceName, vpc, "private", azA, 0, _args.CidrBlockSegment, 0); var private1 = AddSubnet(vpcResourceName, vpc, "private", azB, 1, _args.CidrBlockSegment, 64); var public0 = AddSubnet(vpcResourceName, vpc, "public", azA, 0, _args.CidrBlockSegment, 128); var public1 = AddSubnet(vpcResourceName, vpc, "public", azB, 1, _args.CidrBlockSegment, 192); var ig = new InternetGateway( $"{vpc.GetResourceName()}-ig", new InternetGatewayArgs { VpcId = vpc.Id }, new CustomResourceOptions { Parent = vpc }); new Route($"{public0.RouteTable.GetResourceName()}-ig", new RouteArgs { RouteTableId = public0.RouteTable.Id, DestinationCidrBlock = "0.0.0.0/0", GatewayId = ig.Id }, new CustomResourceOptions { Parent = public0.RouteTable }); new Route($"{public1.RouteTable.GetResourceName()}-ig", new RouteArgs { RouteTableId = public1.RouteTable.Id, DestinationCidrBlock = "0.0.0.0/0", GatewayId = ig.Id }, new CustomResourceOptions { Parent = public1.RouteTable }); var eip0 = new Eip( $"{public0.Subnet.GetResourceName()}-eip", new EipArgs { Vpc = true, Tags = new InputMap <string> { { "Name", $"{public0.Subnet.GetResourceName()}-eip" } } }, new CustomResourceOptions { Parent = public0.Subnet }); var natGateway0 = new NatGateway( $"{public0.Subnet.GetResourceName()}-ng", new NatGatewayArgs { SubnetId = public0.Subnet.Id, AllocationId = eip0.Id, Tags = new InputMap <string> { { "Name", $"{public0.Subnet.GetResourceName()}-ng" } } }, new CustomResourceOptions { Parent = public0.Subnet }); new Route($"{private0.Subnet.GetResourceName()}-nat-0", new RouteArgs { RouteTableId = private0.RouteTable.Id, DestinationCidrBlock = "0.0.0.0/0", NatGatewayId = natGateway0.Id }, new CustomResourceOptions { Parent = private0.Subnet }); var eip1 = new Eip( $"{public1.Subnet.GetResourceName()}-eip", new EipArgs { Vpc = true, Tags = new InputMap <string> { { "Name", $"{public1.Subnet.GetResourceName()}-eip" } } }, new CustomResourceOptions { Parent = public1.Subnet }); var natGateway1 = new NatGateway( $"{public1.Subnet.GetResourceName()}-ng", new NatGatewayArgs { SubnetId = public1.Subnet.Id, AllocationId = eip1.Id, Tags = new InputMap <string> { { "Name", $"{public1.Subnet.GetResourceName()}-ng" } } }, new CustomResourceOptions { Parent = public1.Subnet }); new Route($"{private1.Subnet.GetResourceName()}-nat-1", new RouteArgs { RouteTableId = private1.RouteTable.Id, DestinationCidrBlock = "0.0.0.0/0", NatGatewayId = natGateway1.Id }, new CustomResourceOptions { Parent = private1.Subnet }); return(new VpcData(vpc, private0.Subnet, private1.Subnet, public0.Subnet, public1.Subnet)); }
// Example: // // eax=7ffdb000 ebx=00000000 ecx=00000000 edx=7785f17d esi=00000000 edi=00000000 // eip=777f410c esp=040ef770 ebp=040ef79c iopl=0 nv up ei pl zr na pe nc // cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 // ntdll!DbgBreakPoint: // public override ColorString ToColorString() { if (null == m_colorString) { ConsoleColor color; ColorString cs = new ColorString("eax="); color = GetColorForDiffAgainstBaseline("eax"); cs.Append(Eax.GetColorizedValueString(color)); cs.Append(" ebx="); color = GetColorForDiffAgainstBaseline("ebx"); cs.Append(Ebx.GetColorizedValueString(color)); cs.Append(" ecx="); color = GetColorForDiffAgainstBaseline("ecx"); cs.Append(Ecx.GetColorizedValueString(color)); cs.Append(" edx="); color = GetColorForDiffAgainstBaseline("edx"); cs.Append(Edx.GetColorizedValueString(color)); cs.Append(" esi="); color = GetColorForDiffAgainstBaseline("esi"); cs.Append(Esi.GetColorizedValueString(color)); cs.Append(" edi="); color = GetColorForDiffAgainstBaseline("edi"); cs.Append(Edi.GetColorizedValueString(color)); cs.AppendLine(); cs.Append("eip="); color = GetColorForDiffAgainstBaseline("eip"); cs.Append(Eip.GetColorizedValueString(color)); cs.Append(" esp="); color = GetColorForDiffAgainstBaseline("esp"); cs.Append(Esp.GetColorizedValueString(color)); cs.Append(" ebp="); color = GetColorForDiffAgainstBaseline("ebp"); cs.Append(Ebp.GetColorizedValueString(color)); cs.Append(" iopl="); color = GetColorForDiffAgainstBaseline("iopl"); cs.AppendPushPopFg(color, ((uint)Iopl.Value).ToString("x")); // TODO: cs.AppendLine(" TBD: flags"); cs.Append("cs="); color = GetColorForDiffAgainstBaseline("cs"); cs.AppendPushPopFg(color, ((uint)Cs.Value).ToString("x4")); cs.Append(" ss="); color = GetColorForDiffAgainstBaseline("ss"); cs.AppendPushPopFg(color, ((uint)Ss.Value).ToString("x4")); cs.Append(" ds="); color = GetColorForDiffAgainstBaseline("ds"); cs.AppendPushPopFg(color, ((uint)Ds.Value).ToString("x4")); cs.Append(" es="); color = GetColorForDiffAgainstBaseline("es"); cs.AppendPushPopFg(color, ((uint)Es.Value).ToString("x4")); cs.Append(" fs="); color = GetColorForDiffAgainstBaseline("fs"); cs.AppendPushPopFg(color, ((uint)Fs.Value).ToString("x4")); cs.Append(" gs="); color = GetColorForDiffAgainstBaseline("gs"); cs.AppendPushPopFg(color, ((uint)Gs.Value).ToString("x4")); cs.Append(" efl="); color = GetColorForDiffAgainstBaseline("efl"); cs.Append(Efl.GetColorizedValueString(color)); cs.AppendLine(); cs.Append(DbgProvider.ColorizeSymbol(StackFrame.SymbolName)); if (0 != StackFrame.Displacement) { cs.Append("+0x"); cs.Append(StackFrame.Displacement.ToString("x")); } cs.AppendLine(":"); cs.Append(Disasm(Eip.ValueAsPointer)); m_colorString = cs; } return(m_colorString); } // end ToString()