[Mono-list] RegistrationException
Alexander Chan
alexc2649@nyc.rr.com
06 Feb 2003 14:50:37 -0500
--=-0CLNt+benz+mkHs57UbN
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
lluis,
i have implemented the GetObjectData() functionality in RegistrationException.
I am not sure i am doing it right. this is my first time doing something
like this. i am wondering if i am doing it right. i have attched the
class in this email. any help would greatly be appreciated.
alexander chan
--=-0CLNt+benz+mkHs57UbN
Content-Disposition: attachment; filename=RegistrationException.cs
Content-Type: text/plain; name=RegistrationException.cs; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
//
// System.EnterpriseServices.RegistrationException.cs
//
// Author:
// Tim Coleman (tim@timcoleman.com)
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Runtime.Serialization;
namespace System.EnterpriseServices {
[Serializable]
public sealed class RegistrationException : SystemException {
#region Fields
RegistrationErrorInfo[] errorInfo;
#endregion // Fields
#region Constructors
[MonoTODO]
public RegistrationException (string msg)
: base (msg)
{
}
#endregion // Constructors
#region Properties
public RegistrationErrorInfo[] ErrorInfo {
get { return errorInfo; }
}
#endregion // Properties
#region Methods
//the coding of GetObjectdata() is so far written by alexander chan
public override void GetObjectData (SerializationInfo info, StreamingContext ctx)
{
foreach (RegistrationErrorInfo r in errorInfo)
{
info.AddValue("ErrorCode",r.ErrorCode);
info.AddValue("ErrorString",r.ErrorString);
info.AddValue("MajorRef",r.MajorRef);
info.AddValue("MinorRef",r.MinorRef);
info.AddValue("Name",r.Name);
}
}
#endregion // Methods
}
}
--=-0CLNt+benz+mkHs57UbN--