Rev | Line | |
---|
[4939] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Web;
|
---|
| 5 | using System.ServiceModel.Security;
|
---|
| 6 |
|
---|
| 7 | namespace HLWebPluginHost.Models {
|
---|
| 8 | public class AlgorithmClassModel {
|
---|
| 9 |
|
---|
| 10 | public int NumOfClasses { get; set; }
|
---|
| 11 | public List<OKBService.AlgorithmClass> AlgorithmClassList { get; set; }
|
---|
| 12 |
|
---|
| 13 | public List<OKBService.AlgorithmClass> AlgorithmClassGetAll() {
|
---|
| 14 | //returns list of algorithm classes
|
---|
| 15 | OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient();
|
---|
| 16 | sc.ClientCredentials.UserName.UserName = "Gerhard";
|
---|
| 17 | sc.ClientCredentials.UserName.Password = "Gerhard";
|
---|
| 18 | sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
|
---|
| 19 |
|
---|
| 20 | var agcList = new List<OKBService.AlgorithmClass>();
|
---|
| 21 |
|
---|
| 22 | OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses();
|
---|
| 23 | foreach (OKBService.AlgorithmClass a in ac) {
|
---|
| 24 | agcList.Add(a);
|
---|
| 25 | }//foreach
|
---|
| 26 |
|
---|
| 27 | return agcList;
|
---|
[4952] | 28 | }//AlgorithmClassGetAll
|
---|
| 29 |
|
---|
| 30 |
|
---|
[4939] | 31 | }
|
---|
| 32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.