Author: atsushi
Date: 2007-03-07 00:28:52 -0500 (Wed, 07 Mar 2007)
New Revision: 73869
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityRequestContext.cs
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransactionFlowBindingElement.cs
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
Log:
2007-03-07 Atsushi Enomoto <[EMAIL PROTECTED]>
* TransportBindingElement.cs : implemented GetProperty<T>().
* TransactionFlowBindingElement.cs : on building factory or listener,
reject channel types that cannot build.
* SecurityBindingElement.cs : added some TODO comments.
* HttpTransportBindingElement.cs : GetProperty<T>() should rather
delegate to base, not BindingContext.
* SecurityRequestContext.cs : somewhat late decryption.
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
2007-03-07 05:26:08 UTC (rev 73868)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
2007-03-07 05:28:52 UTC (rev 73869)
@@ -1,3 +1,13 @@
+2007-03-07 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * TransportBindingElement.cs : implemented GetProperty<T>().
+ * TransactionFlowBindingElement.cs : on building factory or listener,
+ reject channel types that cannot build.
+ * SecurityBindingElement.cs : added some TODO comments.
+ * HttpTransportBindingElement.cs : GetProperty<T>() should rather
+ delegate to base, not BindingContext.
+ * SecurityRequestContext.cs : somewhat late decryption.
+
2007-03-06 Atsushi Enomoto <[EMAIL PROTECTED]>
* MessageSecurityBindingSupport.cs,
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
2007-03-07 05:26:08 UTC (rev 73868)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
2007-03-07 05:28:52 UTC (rev 73869)
@@ -127,22 +127,16 @@
set { use_default_proxy = value; }
}
- [MonoTODO ("It might return true for session channels depending
on the context.")]
public override bool CanBuildChannelFactory<TChannel> (
BindingContext context)
{
- if (typeof (TChannel) == typeof (IRequestChannel))
- return true;
- return false;
+ return typeof (TChannel) == typeof (IRequestChannel);
}
- [MonoTODO ("It might return true for session channels depending
on the context.")]
public override bool CanBuildChannelListener<TChannel> (
BindingContext context)
{
- if (typeof (TChannel) == typeof (IReplyChannel))
- return true;
- return false;
+ return typeof (TChannel) == typeof (IReplyChannel);
}
public override IChannelFactory<TChannel>
BuildChannelFactory<TChannel> (
@@ -169,7 +163,7 @@
[MonoTODO]
public override T GetProperty<T> (BindingContext context)
{
- return context.GetInnerProperty<T> ();
+ return base.GetProperty<T> (context);
}
[MonoTODO]
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
2007-03-07 05:26:08 UTC (rev 73868)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
2007-03-07 05:28:52 UTC (rev 73869)
@@ -130,11 +130,13 @@
get { return opt_operation; }
}
+ [MonoTODO ("It supports only IRequestSessionChannel")]
public override bool CanBuildChannelFactory<TChannel>
(BindingContext context)
{
return context.CanBuildInnerChannelFactory<TChannel> ();
}
+ [MonoTODO ("It probably supports only IReplySessionChannel")]
public override bool CanBuildChannelListener<TChannel>
(BindingContext context)
{
return context.CanBuildInnerChannelListener<TChannel>
();
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityRequestContext.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityRequestContext.cs
2007-03-07 05:26:08 UTC (rev 73868)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityRequestContext.cs
2007-03-07 05:28:52 UTC (rev 73869)
@@ -56,11 +56,14 @@
this.channel = channel;
security = channel.Source.SecuritySupport;
- msg = new RecipientSecureMessageDecryptor
(source.RequestMessage, security).DecryptMessage ();
}
public override Message RequestMessage {
- get { return msg; }
+ get {
+ if (msg == null)
+ msg = new
RecipientSecureMessageDecryptor (source.RequestMessage,
security).DecryptMessage ();
+ return msg;
+ }
}
public override void Abort ()
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransactionFlowBindingElement.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransactionFlowBindingElement.cs
2007-03-07 05:26:08 UTC (rev 73868)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransactionFlowBindingElement.cs
2007-03-07 05:28:52 UTC (rev 73869)
@@ -65,7 +65,6 @@
throw new NotImplementedException ();
}
- [MonoTODO]
public override bool CanBuildChannelFactory<TChannel>
(BindingContext context)
{
return context.CanBuildInnerChannelFactory<TChannel> ();
@@ -83,6 +82,8 @@
throw new InvalidOperationException ("Set
transaction protocol in prior to build a channel factory.");
if (protocol == TransactionProtocol.Default)
throw new NotSupportedException ("Mono does not
support DTC.");
+ if (!CanBuildChannelFactory<TChannel> (context))
+ throw new ArgumentException (String.Format
("The channel type '{0}' is not supported", typeof (TChannel)));
return new TransactionChannelFactory<TChannel>
(context.BuildInnerChannelFactory<TChannel> (), protocol);
}
@@ -92,6 +93,8 @@
throw new InvalidOperationException ("Set
transaction protocol in prior to build a channel listener.");
if (protocol == TransactionProtocol.Default)
throw new NotSupportedException ("Mono does not
support DTC.");
+ if (!CanBuildChannelListener<TChannel> (context))
+ throw new ArgumentException (String.Format
("The channel type '{0}' is not supported", typeof (TChannel)));
return new TransactionChannelListener<TChannel> (
context.BuildInnerChannelListener<TChannel> (),
protocol);
Modified:
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
===================================================================
---
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
2007-03-07 05:26:08 UTC (rev 73868)
+++
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
2007-03-07 05:28:52 UTC (rev 73869)
@@ -4,7 +4,7 @@
// Author:
// Atsushi Enomoto <[EMAIL PROTECTED]>
//
-// Copyright (C) 2005 Novell, Inc. http://www.novell.com
+// Copyright (C) 2005, 2007 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -31,6 +31,7 @@
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
+using System.Xml;
namespace System.ServiceModel.Channels
{
@@ -70,10 +71,24 @@
public abstract string Scheme { get; }
- [MonoTODO]
public override T GetProperty<T> (BindingContext context)
{
- return context.GetInnerProperty<T> ();
+ T ret = context.GetInnerProperty<T> ();
+ if (ret != default (T))
+ return ret;
+ if (typeof (T) == typeof (XmlDictionaryReaderQuotas)) {
+ XmlDictionaryReaderQuotas q =
+ new XmlDictionaryReaderQuotas ();
+ q.MaxStringContentLength = (int)
MaxReceivedMessageSize;
+ return (T) (object) q;
+ }
+ if (typeof (T) == typeof
(ChannelProtectionRequirements))
+ // blank one, basically it should not be used
+ // for any secure channels (
+ return (T) (object) new
ChannelProtectionRequirements ();
+ if (typeof (T) == typeof (MessageVersion))
+ return (T) (object) MessageVersion.Default;
+ return null;
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches