Bump bockbuild.
[mono.git] / mcs / class / System.Security / System.Security.Cryptography.Xml / XmlDsigEnvelopedSignatureTransform.cs
index 818595dd407343e841361b18271e968b22c0dee5..80f3c0db0c3a2df59e144216678f12fc5ca99411 100644 (file)
@@ -44,27 +44,24 @@ namespace System.Security.Cryptography.Xml {
                private bool comments;
                private object inputObj;
 
-               public XmlDsigEnvelopedSignatureTransform () 
+               public XmlDsigEnvelopedSignatureTransform ()
+                       : this (false)
                {
-                       Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
-                       comments = false;
                }
 
                public XmlDsigEnvelopedSignatureTransform (bool includeComments) 
                {
+                       Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform;
                        comments = includeComments;
                }
 
                public override Type[] InputTypes {
                        get {
                                if (input == null) {
-                                       lock (this) {
-                                               // this way the result is cached if called multiple time
-                                               input = new Type [3];
-                                               input[0] = typeof (System.IO.Stream);
-                                               input[1] = typeof (System.Xml.XmlDocument);
-                                               input[2] = typeof (System.Xml.XmlNodeList);
-                                       }
+                                       input = new Type [3];
+                                       input[0] = typeof (System.IO.Stream);
+                                       input[1] = typeof (System.Xml.XmlDocument);
+                                       input[2] = typeof (System.Xml.XmlNodeList);
                                }
                                return input;
                        }
@@ -73,12 +70,9 @@ namespace System.Security.Cryptography.Xml {
                public override Type[] OutputTypes {
                        get {
                                if (output == null) {
-                                       lock (this) {
-                                               // this way the result is cached if called multiple time
-                                               output = new Type [2];
-                                               output [0] = typeof (System.Xml.XmlDocument);
-                                               output [1] = typeof (System.Xml.XmlNodeList);
-                                       }
+                                       output = new Type [2];
+                                       output [0] = typeof (System.Xml.XmlDocument);
+                                       output [1] = typeof (System.Xml.XmlNodeList);
                                }
                                return output;
                        }
@@ -101,9 +95,7 @@ namespace System.Security.Cryptography.Xml {
                        if (inputObj is Stream) {
                                doc = new XmlDocument ();
                                doc.PreserveWhitespace = true;
-#if NET_1_1
                                doc.XmlResolver = GetResolver ();
-#endif
                                doc.Load (new XmlSignatureStreamReader (
                                        new StreamReader (inputObj as Stream)));
                                return GetOutputFromNode (doc, GetNamespaceManager (doc), true);
@@ -160,7 +152,7 @@ namespace System.Security.Cryptography.Xml {
 
                public override object GetOutput (Type type) 
                {
-                       if (type == Type.GetType ("Stream"))
+                       if (type == typeof (Stream))
                                return GetOutput ();
                        throw new ArgumentException ("type");
                }