Skip to content

Instantly share code, notes, and snippets.

@ChrisRisner
Created September 9, 2014 20:49
Show Gist options
  • Save ChrisRisner/f920be4c6f884f6afcd3 to your computer and use it in GitHub Desktop.
Save ChrisRisner/f920be4c6f884f6afcd3 to your computer and use it in GitHub Desktop.
UsefulAzure Snippets
foreach (var instance in RoleEnvironment.Roles["RoleName"].Instances)
{
foreach (var endpoint in instance.InstanceEndpoints)
{
endpoints += "instancename: " + endpoint.Key + "\n";
endpoints += "IPEndPoint: " + endpoint.Value.IPEndpoint + "\n";
endpoints += "Protocol: " + endpoint.Value.Protocol + "\n";
endpoints += "PublicIpEnd: " + endpoint.Value.PublicIPEndpoint + "\n";
endpoints += "RoleInstance: " + endpoint.Value.RoleInstance.ToString() + "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment