using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ServiceModel.Security; namespace HLWebPluginHost.Models { public class AlgorithmClassModel { public int NumOfClasses { get; set; } public List AlgorithmClassList { get; set; } public List AlgorithmClassGetAll() { //returns list of algorithm classes OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient(); sc.ClientCredentials.UserName.UserName = "Gerhard"; sc.ClientCredentials.UserName.Password = "Gerhard"; sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None; var agcList = new List(); OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses(); foreach (OKBService.AlgorithmClass a in ac) { agcList.Add(a); }//foreach return agcList; }//AlgorithmClassGetAll } }