Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Models/AlgorithmClassModel.cs @ 5306

Last change on this file since 5306 was 4952, checked in by wtollsch, 14 years ago

#1198 AlgorithmClass/Index.aspx new buttons

File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.ServiceModel.Security;
6
7namespace 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;
28        }//AlgorithmClassGetAll
29
30         
31    }
32}
Note: See TracBrowser for help on using the repository browser.