Author: atsushi
Date: 2007-07-12 14:21:36 -0400 (Thu, 12 Jul 2007)
New Revision: 81890
Added:
trunk/olive/samples/services/net-msmq-binding/
trunk/olive/samples/services/net-msmq-binding/ChangeLog
trunk/olive/samples/services/net-msmq-binding/Makefile
trunk/olive/samples/services/net-msmq-binding/cleanup-sample.cs
trunk/olive/samples/services/net-msmq-binding/samplecli1.cs
trunk/olive/samples/services/net-msmq-binding/samplesvc1.cs
trunk/olive/samples/services/net-msmq-binding/setup-sample.cs
Log:
2007-07-12 Atsushi Enomoto <[EMAIL PROTECTED]>
* cleanup-sample.cs samplesvc1.cs samplecli1.cs setup-sample.cs
Makefile : initial checkin.
Added: trunk/olive/samples/services/net-msmq-binding/ChangeLog
===================================================================
--- trunk/olive/samples/services/net-msmq-binding/ChangeLog 2007-07-12
18:04:35 UTC (rev 81889)
+++ trunk/olive/samples/services/net-msmq-binding/ChangeLog 2007-07-12
18:21:36 UTC (rev 81890)
@@ -0,0 +1,5 @@
+2007-07-12 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * cleanup-sample.cs samplesvc1.cs samplecli1.cs setup-sample.cs
+ Makefile : initial checkin.
+
Added: trunk/olive/samples/services/net-msmq-binding/Makefile
===================================================================
--- trunk/olive/samples/services/net-msmq-binding/Makefile 2007-07-12
18:04:35 UTC (rev 81889)
+++ trunk/olive/samples/services/net-msmq-binding/Makefile 2007-07-12
18:21:36 UTC (rev 81890)
@@ -0,0 +1,19 @@
+
+PROGRAMS = \
+ setup-sample.exe cleanup-sample.exe \
+ samplesvc1.exe samplecli1.exe
+
+all: $(PROGRAMS)
+
+setup-sample.exe : setup-sample.cs
+ gmcs setup-sample.cs -pkg:dotnet
+cleanup-sample.exe : cleanup-sample.cs
+ gmcs cleanup-sample.cs -pkg:dotnet
+
+samplesvc1.exe : samplesvc1.cs
+ gmcs samplesvc1.cs -pkg:olive
+samplecli1.exe : samplecli1.cs
+ gmcs samplecli1.cs -pkg:olive
+
+clean:
+ rm -rf $(PROGRAMS)
Property changes on: trunk/olive/samples/services/net-msmq-binding/Makefile
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/olive/samples/services/net-msmq-binding/cleanup-sample.cs
===================================================================
--- trunk/olive/samples/services/net-msmq-binding/cleanup-sample.cs
2007-07-12 18:04:35 UTC (rev 81889)
+++ trunk/olive/samples/services/net-msmq-binding/cleanup-sample.cs
2007-07-12 18:21:36 UTC (rev 81890)
@@ -0,0 +1,11 @@
+using System;
+using System.Messaging;
+
+public class Setup
+{
+ public static void Main ()
+ {
+ MessageQueue.Delete (".\\Private$\\monowcftest");
+ }
+}
+
Property changes on:
trunk/olive/samples/services/net-msmq-binding/cleanup-sample.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/olive/samples/services/net-msmq-binding/samplecli1.cs
===================================================================
--- trunk/olive/samples/services/net-msmq-binding/samplecli1.cs 2007-07-12
18:04:35 UTC (rev 81889)
+++ trunk/olive/samples/services/net-msmq-binding/samplecli1.cs 2007-07-12
18:21:36 UTC (rev 81890)
@@ -0,0 +1,35 @@
+using System;
+using System.Net.Security;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+
+public class TestProxy : ClientBase<ITestService>, ITestService
+{
+ public static void Main ()
+ {
+ NetMsmqBinding b = new NetMsmqBinding ();
+ b.ExactlyOnce = false; // non-tx
+ b.Security.Transport.MsmqAuthenticationMode =
+ MsmqAuthenticationMode.None;
+ b.Security.Transport.MsmqProtectionLevel = ProtectionLevel.None;
+ new TestProxy (b, new EndpointAddress
("net.msmq://localhost/private/monowcftest")).SayToNowhere ("test message");
+ }
+
+ public TestProxy (Binding b, EndpointAddress e)
+ : base (b, e)
+ {
+ }
+
+ public void SayToNowhere (string input)
+ {
+ Channel.SayToNowhere (input);
+ }
+}
+
+[ServiceContract]
+public interface ITestService
+{
+ [OperationContract (IsOneWay = true)]
+ void SayToNowhere (string input);
+}
+
Property changes on: trunk/olive/samples/services/net-msmq-binding/samplecli1.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/olive/samples/services/net-msmq-binding/samplesvc1.cs
===================================================================
--- trunk/olive/samples/services/net-msmq-binding/samplesvc1.cs 2007-07-12
18:04:35 UTC (rev 81889)
+++ trunk/olive/samples/services/net-msmq-binding/samplesvc1.cs 2007-07-12
18:21:36 UTC (rev 81890)
@@ -0,0 +1,38 @@
+using System;
+using System.Net.Security;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+
+public class TestService : ITestService
+{
+ public static void Main ()
+ {
+ ServiceHost host = new ServiceHost (typeof (TestService));
+
+ NetMsmqBinding b = new NetMsmqBinding ();
+ b.ExactlyOnce = false; // non-tx
+ b.Security.Transport.MsmqAuthenticationMode =
+ MsmqAuthenticationMode.None;
+ b.Security.Transport.MsmqProtectionLevel = ProtectionLevel.None;
+
+ host.AddServiceEndpoint ("ITestService", b, new Uri
("net.msmq://localhost/private/monowcftest"));
+
+ host.Open ();
+ Console.WriteLine ("Hit [CR] key to close ...");
+ Console.ReadLine ();
+ host.Close ();
+ }
+
+ public void SayToNowhere (string input)
+ {
+ Console.WriteLine (input);
+ }
+}
+
+[ServiceContract]
+public interface ITestService
+{
+ [OperationContract (IsOneWay = true)]
+ void SayToNowhere (string input);
+}
+
Property changes on: trunk/olive/samples/services/net-msmq-binding/samplesvc1.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/olive/samples/services/net-msmq-binding/setup-sample.cs
===================================================================
--- trunk/olive/samples/services/net-msmq-binding/setup-sample.cs
2007-07-12 18:04:35 UTC (rev 81889)
+++ trunk/olive/samples/services/net-msmq-binding/setup-sample.cs
2007-07-12 18:21:36 UTC (rev 81890)
@@ -0,0 +1,13 @@
+using System;
+using System.Messaging;
+
+public class Setup
+{
+ public static void Main ()
+ {
+ string path = ".\\Private$\\monowcftest";
+ if (!MessageQueue.Exists (path))
+ MessageQueue.Create (path);
+ }
+}
+
Property changes on:
trunk/olive/samples/services/net-msmq-binding/setup-sample.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches