Simple Indigo Server (Code-based)

Here is the code based version of the Simple service. Like the client, this one uses no config at all;
 
using System;
using System.ServiceModel;
 
namespace Gudge.Samples.SimpleCode {
  [ServiceContract]
  interfaceISimple {
    [OperationContract]
    string Ping(string text);
  }
 
  classService : ISimple {
 
    staticvoid Main(string[] args) {
      BasicProfileBinding b = newBasicProfileBinding();
      Uri u = newUri ( "http://localhost:8080/simple" );
      ServiceHost<Service> sh = newServiceHost<Service>();
      sh.AddEndpoint( typeof(ISimple), b, u);
      sh.Open();
      Console.WriteLine("Press enter to close the service");
      Console.ReadLine();
    }
 
    publicstring Ping(string text) {
      return text;
    }
  }
}

Posted May 11 2005, 07:00 PM by martin-gudgin

Comments

p90x wrote p90x
on 10-08-2008 10:28 AM

Quick Question: Regarding the end date of the 24th, will we need to post our final weight on Christmas day? I should be in town, but I’ m just worried I may forget to get on and post it on the 25th. May help everyone what with all the excitement and different

Add a Comment

(required)  
(optional)
(required)  
Remember Me?