Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

VSTS organization URL helper samples #162

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

willsmythe
Copy link
Collaborator

Samples showing how to properly construct a URL to a VSTS organization (formerly called "account") using either its name (e.g. "Fabrikam") or its GUID identifier.

Example of how to use the new helper:

public async Task DoSomething()
{
    Uri orgUrl = OrganizationUrlHelpers
        .GetConnectionUrl("myOrgName");  // typically resolves to https://myorgname.visualstudio.com

    VssConnection orgConnection = new VssConnection(orgUrl, credentials);

    BuildHttpClient buildClient = orgConnection.GetClient<BuildHttpClient>();
}

@vtbassmatt
Copy link
Member

If you have a moment to retarget this at main, I'd still merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants