public Collection<CertificateContext> GetAzureCertificate(string serviceName, string thumbprint, string algorithm)
{
GetAzureCertificateCmdletInfo getAzureCertificateCmdletInfo = new GetAzureCertificateCmdletInfo(serviceName, thumbprint, algorithm);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureCertificateCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
Collection<CertificateContext> certCtxts = new Collection<CertificateContext>();
foreach (PSObject re in result)
{
certCtxts.Add((CertificateContext)re.BaseObject);
}
return certCtxts;
}