[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System/ComponentModel Win32Exception
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System/ComponentModel Win32Exception.cs,1.4,1.5 |
Date: |
Mon, 07 Apr 2003 02:04:00 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System/ComponentModel
In directory subversions:/tmp/cvs-serv11023/System/ComponentModel
Modified Files:
Win32Exception.cs
Log Message:
Add serialization support to exception classes in "System" and "System.Xml".
Index: Win32Exception.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/ComponentModel/Win32Exception.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Win32Exception.cs 5 Apr 2003 00:35:16 -0000 1.4
--- Win32Exception.cs 7 Apr 2003 06:03:57 -0000 1.5
***************
*** 2,6 ****
* Win32Exception.cs - Implementation of
"System.ComponentModel.Win32Exception"
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
* Copyright (C) 2002 Free Software Foundation,Inc.
*
--- 2,6 ----
* Win32Exception.cs - Implementation of
"System.ComponentModel.Win32Exception"
*
! * Copyright (C) 2002, 2003 Southern Storm Software, Pty Ltd.
* Copyright (C) 2002 Free Software Foundation,Inc.
*
***************
*** 22,25 ****
--- 22,26 ----
using System;
using System.Runtime.InteropServices;
+ using System.Runtime.Serialization;
namespace System.ComponentModel
***************
*** 28,31 ****
--- 29,34 ----
public class Win32Exception: ExternalException
{
+ private int nativeErrorCode;
+
[TODO]
public Win32Exception() : base()
***************
*** 37,40 ****
--- 40,44 ----
public Win32Exception(int error) : base()
{
+ nativeErrorCode = error;
HResult = (int)0x80004005;
}
***************
*** 43,46 ****
--- 47,51 ----
public Win32Exception(int error, String message) : base(message)
{
+ nativeErrorCode = error;
HResult = (int)0x80004005;
}
***************
*** 59,68 ****
}
public int NativeErrorCode
{
get
{
! throw new
NotImplementedException("NativeErrorCode");
}
}
--- 64,87 ----
}
+ protected Win32Exception(SerializationInfo info,
+
StreamingContext context)
+ : base(info, context)
+ {
+ nativeErrorCode = info.GetInt32("NativeErrorCode");
+ }
+
public int NativeErrorCode
{
get
{
! return nativeErrorCode;
}
+ }
+
+ public override void GetObjectData(SerializationInfo info,
+
StreamingContext context)
+ {
+ base.GetObjectData(info, context);
+ info.AddValue("NativeErrorCode", nativeErrorCode);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System/ComponentModel Win32Exception.cs,1.4,1.5,
Rhys Weatherley <address@hidden> <=