[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/Basic DefaultValueAttribute.cs,NONE,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/Basic DefaultValueAttribute.cs,NONE,1.1 ErrObject.cs,1.2,1.3 |
Date: |
Thu, 22 May 2003 03:25:31 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/Basic
In directory subversions:/tmp/cvs-serv16197/Basic
Modified Files:
ErrObject.cs
Added Files:
DefaultValueAttribute.cs
Log Message:
Continue implementing the VB support library's compiler services.
--- NEW FILE ---
/*
* DefaultValueAttribute.cs - Implementation of the
* "Microsoft.VisualBasic.DefaultValueAttribute" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace Microsoft.VisualBasic
{
// Special class that is recognized by "cscc" to indicate the
// default value for an "optional" parameter, and to then turn
// it into the correct metadata.
[AttributeUsage(AttributeTargets.Parameter)]
internal sealed class DefaultValueAttribute : Attribute
{
// Internal state.
private Object obj;
// Constructor.
public DefaultValueAttribute(bool value)
{
obj = value;
}
public DefaultValueAttribute(byte value)
{
obj = value;
}
public DefaultValueAttribute(char value)
{
obj = value;
}
public DefaultValueAttribute(double value)
{
obj = value;
}
public DefaultValueAttribute(short value)
{
obj = value;
}
public DefaultValueAttribute(int value)
{
obj = value;
}
public DefaultValueAttribute(long value)
{
obj = value;
}
public DefaultValueAttribute(Object value)
{
obj = value;
}
public DefaultValueAttribute(float value)
{
obj = value;
}
public DefaultValueAttribute(String value)
{
obj = value;
}
// Get the attribute's value.
public Object Value
{
get
{
return obj;
}
}
}; // class DefaultValueAttribute
}; // namespace Microsoft.VisualBasic
Index: ErrObject.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Basic/ErrObject.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ErrObject.cs 22 May 2003 02:24:09 -0000 1.2
--- ErrObject.cs 22 May 2003 07:25:29 -0000 1.3
***************
*** 64,67 ****
--- 64,78 ----
}
+ // Set the exception within this error object.
+ internal void SetException(Exception e)
+ {
+ exception = e;
+ }
+ internal void SetException(Exception e, int erl)
+ {
+ exception = e;
+ this.erl = erl;
+ }
+
// Raise a particular error.
public void Raise(int Number,
***************
*** 314,317 ****
--- 325,335 ----
}
+ // Convert a HRESULT value into an error number.
+ [TODO]
+ internal static int HResultToNumber(int hr)
+ {
+ // TODO
+ return hr;
+ }
// Get or set the error's number.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/Basic DefaultValueAttribute.cs,NONE,1.1 ErrObject.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=