Implement AxHost.InvalidActiveXStateException
authorAlistair Leslie-Hughes <leslie_alistair@hotmail.com>
Tue, 4 Dec 2012 02:58:34 +0000 (13:58 +1100)
committerAlistair Leslie-Hughes <leslie_alistair@hotmail.com>
Fri, 18 Jan 2013 07:33:52 +0000 (18:33 +1100)
mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs

index f8343abb9e555645a58ebb28bf5328212ac38b77..40804df5b0878c1c5b286b97078fe5fba9ee3f62 100644 (file)
@@ -101,19 +101,30 @@ namespace System.Windows.Forms {
                
                #region AxHost.InvalidActiveXStateException  Class
                public class InvalidActiveXStateException : Exception {
+                       private string mName;
+                       private ActiveXInvokeKind mKind;
+
                        public InvalidActiveXStateException ()
                        {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+
                        }
 
                        public InvalidActiveXStateException (string name, ActiveXInvokeKind kind)
                        {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               mName = name;
+                               mKind = kind;
                        }
 
                        public override string ToString ()
                        {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               if(mKind == ActiveXInvokeKind.MethodInvoke)
+                                       return "Invoke:" + mName;
+                               else if(mKind == ActiveXInvokeKind.PropertyGet)
+                                       return "PropertyGet:" + mName;
+                               else if(mKind == ActiveXInvokeKind.PropertySet)
+                                       return "PropertySet:" + mName;
+
+                               return base.ToString();
                        }
                }
                #endregion      // AxHost.InvalidActiveXStateException  Class