Browse Source

2009-04-21 Atsushi Enomoto <[email protected]>

	* BinaryMessageEncodingBindingElement.cs, ChannelBase.cs,
	  ChannelFactoryBase.cs, WindowsStreamSecurityBindingElement.cs :
	  implement GetProperty<T>(). Return documented objects or null.


svn path=/trunk/mcs/; revision=132235
Atsushi Eno 16 years ago
parent
commit
9191ff0633

+ 3 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs

@@ -111,10 +111,11 @@ namespace System.ServiceModel.Channels
 			return new BinaryMessageEncodingBindingElement (this);
 		}
 
-		[MonoTODO]
 		public override T GetProperty<T> (BindingContext context)
 		{
-			throw new NotImplementedException ();
+			if (typeof (T) == typeof (MessageVersion))
+				return (T) (object) MessageVersion;
+			return null;
 		}
 
 		public override MessageEncoderFactory

+ 6 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog

@@ -1,3 +1,9 @@
+2009-04-21  Atsushi Enomoto  <[email protected]>
+
+	* BinaryMessageEncodingBindingElement.cs, ChannelBase.cs,
+	  ChannelFactoryBase.cs, WindowsStreamSecurityBindingElement.cs :
+	  implement GetProperty<T>(). Return documented objects or null.
+
 2009-04-20  Atsushi Enomoto  <[email protected]>
 
 	* PeerChannelFactory.cs, PeerChannelListener.cs,

+ 1 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelBase.cs

@@ -64,10 +64,9 @@ namespace System.ServiceModel.Channels
 			get { return manager; }
 		}
 
-		[MonoTODO]
 		public virtual T GetProperty<T> () where T : class
 		{
-			throw new NotImplementedException ();
+			return null;
 		}
 
 		protected override void OnClosed ()

+ 1 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelFactoryBase.cs

@@ -133,10 +133,9 @@ namespace System.ServiceModel.Channels
 			get { return send_timeout; }
 		}
 
-		[MonoTODO]
 		public virtual T GetProperty<T> () where T : class
 		{
-			throw new NotImplementedException ();
+			return null;
 		}
 
 		[MonoTODO ("find out what to do here.")]

+ 5 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Channels/WindowsStreamSecurityBindingElement.cs

@@ -88,10 +88,13 @@ namespace System.ServiceModel.Channels
 			return new WindowsStreamSecurityBindingElement (this);
 		}
 
-		[MonoTODO]
 		public override T GetProperty<T> (BindingContext context)
 		{
-			throw new NotImplementedException ();
+			if (typeof (T) == typeof (ISecurityCapabilities))
+				return (T) (object) this;
+			if (typeof (T) == typeof (IdentityVerifier))
+				return (T) (object) IdentityVerifier.CreateDefault ();
+			return null;
 		}
 
 		#region explicit interface implementations