Author: atsushi
Date: 2008-02-17 09:44:47 -0500 (Sun, 17 Feb 2008)
New Revision: 95973
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
trunk/olive/class/System.ServiceModel/System.ServiceModel/ExtensionCollection.cs
trunk/olive/class/System.ServiceModel/System.ServiceModel/OperationContext.cs
Log:
2008-02-17 Atsushi Enomoto <[EMAIL PROTECTED]>
* OperationContext.cs : implemented OutgoingMessageHeaders and
OutgoingMessageProperties.
* ExtensionCollection.cs : Pass syncRoot to base.
Implemented Find(), FindAll() and IsReadOnly.
* EndpointDispatcher.cs : after service method call, apply outgoing
headers and properties to the returned message.
Modified: trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
===================================================================
--- trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
2008-02-17 14:43:32 UTC (rev 95972)
+++ trunk/olive/class/System.ServiceModel/System.ServiceModel/ChangeLog
2008-02-17 14:44:47 UTC (rev 95973)
@@ -1,3 +1,10 @@
+2008-02-17 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * OperationContext.cs : implemented OutgoingMessageHeaders and
+ OutgoingMessageProperties.
+ * ExtensionCollection.cs : Pass syncRoot to base.
+ Implemented Find(), FindAll() and IsReadOnly.
+
2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
* EndpointAddress.cs : reject relative Uri.
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel/ExtensionCollection.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel/ExtensionCollection.cs
2008-02-17 14:43:32 UTC (rev 95972)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel/ExtensionCollection.cs
2008-02-17 14:44:47 UTC (rev 95973)
@@ -37,7 +37,6 @@
IEnumerable<IExtension<T>>, IEnumerable
where T : IExtensibleObject<T>
{
- object sync_root;
T owner;
public ExtensionCollection (T owner)
@@ -46,26 +45,30 @@
}
public ExtensionCollection (T owner, object syncRoot)
+ : base (syncRoot)
{
this.owner = owner;
- this.sync_root = syncRoot;
}
- [MonoTODO]
public E Find<E> ()
{
- throw new NotImplementedException ();
+ foreach (IExtension<T> item in this)
+ if (item is E)
+ return (E) (object) item;
+ return default (E);
}
- [MonoTODO]
public Collection<E> FindAll<E> ()
{
- throw new NotImplementedException ();
+ Collection<E> c = new Collection<E> ();
+ foreach (IExtension<T> item in this)
+ if (item is E)
+ c.Add ((E) (object) item);
+ return c;
}
- [MonoTODO]
bool ICollection<IExtension<T>>.IsReadOnly {
- get { throw new NotImplementedException (); }
+ get { return false; }
}
[MonoTODO]
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel/OperationContext.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel/OperationContext.cs
2008-02-17 14:43:32 UTC (rev 95972)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel/OperationContext.cs
2008-02-17 14:44:47 UTC (rev 95973)
@@ -48,6 +48,8 @@
IContextChannel channel;
RequestContext request_ctx;
ExtensionCollection<OperationContext> extensions;
+ MessageHeaders outgoing_headers;
+ MessageProperties outgoing_properties;
public OperationContext (IContextChannel channel)
{
@@ -127,14 +129,20 @@
get { throw new NotImplementedException (); }
}
- [MonoTODO]
public MessageHeaders OutgoingMessageHeaders {
- get { throw new NotImplementedException (); }
+ get {
+ if (outgoing_headers == null)
+ outgoing_headers = new MessageHeaders
(MessageVersion.Default);
+ return outgoing_headers;
+ }
}
- [MonoTODO]
public MessageProperties OutgoingMessageProperties {
- get { throw new NotImplementedException (); }
+ get {
+ if (outgoing_properties == null)
+ outgoing_properties = new
MessageProperties ();
+ return outgoing_properties;
+ }
}
public RequestContext RequestContext {
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
2008-02-17 14:43:32 UTC (rev 95972)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
2008-02-17 14:44:47 UTC (rev 95973)
@@ -1,3 +1,8 @@
+2008-02-17 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * EndpointDispatcher.cs : after service method call, apply outgoing
+ headers and properties to the returned message.
+
2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
* ChannelDispatcher.cs : populate DispatchOperations before applying
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
2008-02-17 14:43:32 UTC (rev 95972)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
2008-02-17 14:44:47 UTC (rev 95973)
@@ -132,7 +132,8 @@
{
ServiceEndpoint se = channel_dispatcher.ServiceEndpoint;
IServiceChannel cch = new ServiceRuntimeChannel (se,
reply);
- using (OperationContextScope scope = new
OperationContextScope (cch)) {
+ OperationContext octx = new OperationContext (cch);
+ using (OperationContextScope scope = new
OperationContextScope (octx)) {
OperationContext.Current.EndpointDispatcher =
this;
RequestContext rc = reply.ReceiveRequest
(se.Binding.ReceiveTimeout);
if (rc == null)
@@ -144,7 +145,7 @@
// to not raise errors instead of replying
// fault at Reply() though ...
try {
- ProcessRequestCore (reply, cch, rc);
+ ProcessRequestCore (reply, cch, octx);
} catch (Exception ex) {
FaultConverter fc =
FaultConverter.GetDefaultFaultConverter (channel_dispatcher.MessageVersion);
Message fault;
@@ -156,8 +157,9 @@
}
}
- void ProcessRequestCore (IReplyChannel reply, IServiceChannel
cch, RequestContext rc)
+ void ProcessRequestCore (IReplyChannel reply, IServiceChannel
cch, OperationContext octx)
{
+ RequestContext rc = octx.RequestContext;
ServiceEndpoint se = channel_dispatcher.ServiceEndpoint;
Message req = rc.RequestMessage;
@@ -196,6 +198,9 @@
if (res == null)
throw new InvalidOperationException
(String.Format ("The operation '{0}' returned a null message.", op.Action));
+ res.Headers.CopyHeadersFrom
(octx.OutgoingMessageHeaders);
+ res.Properties.CopyProperties
(octx.OutgoingMessageProperties);
+
rc.Reply (res, se.Binding.SendTimeout);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches