// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.IO;
Type[] outputTypes;
object inputObj;
ArrayList exceptUris;
- object lockObject;
const string NamespaceUri = "http://www.w3.org/2002/07/decrypt#";
Algorithm = XmlSignature.AlgorithmNamespaces.XmlDecryptionTransform;
encryptedXml = new EncryptedXml ();
exceptUris = new ArrayList ();
- lockObject = new object ();
}
#endregion // Constructors
public override Type[] InputTypes {
get {
- if (inputTypes == null) {
- lock (lockObject) {
- inputTypes = new Type [2] {typeof (System.IO.Stream), typeof (System.Xml.XmlDocument)};
- }
- }
+ if (inputTypes == null)
+ inputTypes = new Type [2] {typeof (System.IO.Stream), typeof (System.Xml.XmlDocument)};
+
return inputTypes;
}
}
public override Type[] OutputTypes {
get {
- if (outputTypes == null) {
- lock (lockObject) {
- outputTypes = new Type [1] {typeof (System.Xml.XmlDocument)};
- }
- }
+ if (outputTypes == null)
+ outputTypes = new Type [1] {typeof (System.Xml.XmlDocument)};
+
return outputTypes;
}
}
public override object GetOutput (Type type)
{
- if (type == Type.GetType ("Stream"))
+ if (type == typeof (Stream))
return GetOutput ();
throw new ArgumentException ("type");
}
[MonoTODO ("verify")]
protected virtual bool IsTargetElement (XmlElement inputElement, string idValue)
{
+ if ((inputElement == null) || (idValue == null))
+ return false;
return (inputElement.Attributes ["id"].Value == idValue);
}
}
}
-#endif