[runtime] Remove handler block trampoline code
[mono.git] / mcs / class / System.Security / System.Security.Cryptography.Xml / XmlLicenseTransform.cs
index ee5d4f5d29822639b2b6757aa5c72093c12fc1c0..4cc6e172925aab24ce7c66f5946b06af799a1975 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Xml;
 
 namespace System.Security.Cryptography.Xml {
@@ -37,10 +35,10 @@ namespace System.Security.Cryptography.Xml {
                private IRelDecryptor _decryptor;
                private Type[] inputTypes;
                private Type[] outputTypes;
-               private object lockObject = new object ();
 
                public XmlLicenseTransform ()
                {
+                       Algorithm = XmlSignature.AlgorithmNamespaces.XmlLicenseTransform;
                }
 
                public IRelDecryptor Decryptor {
@@ -50,22 +48,18 @@ namespace System.Security.Cryptography.Xml {
 
                public override Type[] InputTypes {
                        get { 
-                               if (inputTypes == null) {
-                                       lock (lockObject) {
-                                               inputTypes = new Type [1] { typeof (XmlDocument) };
-                                       }
-                               }
+                               if (inputTypes == null)
+                                       inputTypes = new Type [1] { typeof (XmlDocument) };
+
                                return inputTypes;
                        }
                }
 
                public override Type[] OutputTypes {
                        get { 
-                               if (outputTypes == null) {
-                                       lock (lockObject) {
-                                               outputTypes = new Type [1] {typeof (XmlDocument)};
-                                       }
-                               }
+                               if (outputTypes == null)
+                                       outputTypes = new Type [1] {typeof (XmlDocument)};
+
                                return outputTypes;
                        }
                }
@@ -97,8 +91,6 @@ namespace System.Security.Cryptography.Xml {
                [MonoTODO]
                public override void LoadInput (object obj)
                {
-                       if (obj != typeof (XmlDocument))
-                               throw new ArgumentException ("obj");
                        if (_decryptor == null)
                                throw new CryptographicException (Locale.GetText ("missing decryptor"));
                        // TODO: check for <issuer> element
@@ -106,5 +98,3 @@ namespace System.Security.Cryptography.Xml {
                }
        }
 }
-
-#endif