- relayserver.zip
- RelayServer
- Application.Shared
- ApplicationClient
- ApplicationObjects
- ApplicationServer
- RelayServer.Shared
- RelayServer.sln
- RelayServer1
- RelayServer2
|
using System;
using System.Collections.Generic;
using System.Text;
using Application.Shared;
namespace ApplicationObjects
{
public class ApplicationObject1 :
MarshalByRefObject,
IApplicationObject1
{
public string FormatTimeStamp(DateTime dt)
{
string text = string.Format("{0:d4}/{1:d2}/{2:d2} {3:d2}:{4:d2}:{5:d2}.{6:d3}",
dt.Year, dt.Month, dt.Day,
dt.Hour, dt.Minute, dt.Second, dt.Millisecond);
Console.WriteLine("FormatTimeStamp: {0}", text);
return text;
}
public void PostTimeStamp(string message)
{
Console.WriteLine("PostTimeStamp: {0}", message);
}
}
public class ApplicationObject2 :
MarshalByRefObject,
IApplicationObject2
{
public void Convert(Input input, out Output output)
{
output = new Output();
output.TimeStamp = DateTime.Now;
output.Result = input.Number / int.Parse(input.Text);
Console.WriteLine("Convert: [Input {0}] [Output {1}]", input, output);
}
}
public class ApplicationObject3 :
MarshalByRefObject,
IApplicationObject3
{
public void SendCallback(Callback cb)
{
DateTime dt = DateTime.Now;
Record rec = cb.GetRecord(dt.ToShortDateString(), dt.Millisecond);
Console.WriteLine("SendCallback: {0} {1}", rec.Number, rec.Number);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a consultant, trainer, software archtect/engineer, since the early 1980s, working in the greater area of Boston, MA, USA.
My work comprises the entire spectrum of software, shrink-wrapped applications, IT client-server, systems and protocol related work, compilers and operating systems, and more ....
I am currently focused on platform development for distributed computing in service oriented data centers.