Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.Remoting;
- using System.Runtime.Remoting.Channels;
- using System.Runtime.Remoting.Channels.Tcp;
- using System.Text;
- using System.Threading.Tasks;
- class EvaluatorServer
- {
- static void Main(string[] args)
- {
- EvaluatorPlatform();
- }
- static void EvaluatorPlatform()
- {
- TcpChannel tcpChannel = new TcpChannel(9998);
- ChannelServices.RegisterChannel(tcpChannel, true);
- //Type commonInterfaceType = Type.GetType("GradeCalculate");
- RemotingConfiguration.RegisterWellKnownServiceType(typeof(GradeCalculate), "gradecalculator", WellKnownObjectMode.SingleCall);
- System.Console.WriteLine("Server Started...");
- System.Console.ReadLine();
- }
- }
- public class GradeCalculate : MarshalByRefObject
- {
- string serverUsername, serverPassword;
- bool authenticated;
- public bool authenticate(string username, string password)
- {
- serverUsername = "aa";
- serverPassword = "123";
- if (username == serverUsername && password == serverPassword)
- {
- authenticated = true;
- }
- else
- {
- authenticated = false;
- }
- return authenticated;
- }
- public void EnterMarks()
- {
- }
- //public int[] ShowMarksInInputOrder()
- //{
- // return marks;
- //}
- //public static ArtworkData[] GetDataRecords(int UsersID)
- //{
- // ArtworkData[] Labels;
- // Labels = new ArtworkData[3];
- // return Labels;
- //}
- //public void Start()
- //{
- // Console.WriteLine("Started!");
- //}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement