Skip to main content
RSS feed Subscribe to feed


Virtual Columns: Using a CredentialsModel

This example shows how to use the credentials model passed to the prompting UI.

public void CredentialsModelUsage(CredentialsModel model)
    // This is how the CredentialsModel is used byt the 
    // implementor in the prompt UI constructor. 
    // The CredentialsModel is provided to the form 
    // when prompting on the credentials.

    // Set the credentials.
    model.CredentialsService.SetCredentials(model.Key, "myCredentials");

    // Get the credentials.
    string credentials;
    if (model.CredentialsService.TryGetCredentials(model.Key, out credentials))
        // Use credentials.