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;
}
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;
}
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);
public override object GetOutput (Type type)
{
- if (type == Type.GetType ("Stream"))
+ if (type == typeof (Stream))
return GetOutput ();
throw new ArgumentException ("type");
}