Exemplo n.º 1
0
 public ProfileCreationUnit(ProfileCreationOptions options, IProfileWizard wizard,
                            Func <string, IDeploymentProfileRepository> depProfileRepoFactory,
                            Func <string, ProjectMetadata> metadataFactory,
                            Func <string, ILaunchSettingsProfileRepository> launchSettingsProfileRepoFactory,
                            Func <string, IUserSecretsManager> userSecretsManagerFactory)
 {
     this.wizard  = wizard;
     this.options = options;
     this.depProfileRepoFactory            = depProfileRepoFactory;
     this.metadataFactory                  = metadataFactory;
     this.launchSettingsProfileRepoFactory = launchSettingsProfileRepoFactory;
     this.userSecretsManagerFactory        = userSecretsManagerFactory;
 }
Exemplo n.º 2
0
        private static string GetUsername(ProfileCreationOptions profileCreationOptions)
        {
            switch (profileCreationOptions.AuthType)
            {
            case AuthType.Classic:
            case AuthType.PrivateKeyFile:
                return(profileCreationOptions.Auth.Split(":").First());

            case AuthType.UserSecrets:
                return(null);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }