Compare commits

..
1 Commits
Author SHA1 Message Date
nobody 920d6fe40d This commit was manufactured by cvs2svn to create tag 'MONO_0_95'.
svn path=/tags/MONO_0_95/mono/; revision=28568
2004-05-31 17:51:14 +00:00
1913 changed files with 13538 additions and 57719 deletions

No files matched your search

-61
View File
@@ -1,64 +1,3 @@
Mon Jun 14 18:38:34 CEST 2004 Paolo Molaro <[email protected]>
* configure.in: better explain that --with-nptl is not related to
NPTL, but to __thread support. Set sigaltstack support to off by
default.
2004-06-12 Raja R Harinath <[email protected]>
* Makefile.am (populate-runtime-subdir): Add _tmpinst directory
to the PATH.
2004-06-11 Jackson Harper <[email protected]>
* runtime/net_2_0/Makefile.am:
* runtime/net_1_1/Makefile.am: Remove signing patches
2004-06-11 Jackson Harper <[email protected]>
* man/mono.1: Add documentation for MONO_GAC_PREFIX.
* runtime/net_2_0/Makefile.am:
* runtime/net_1_1/Makefile.am: Sign assemblies before
installing. Do not sign ziplib, npgsql, or nunit assemblies. Sign mscorlib.
2004-06-11 Raja R Harinath <[email protected]>
* Makefile.am (populate-runtime-subdir): New target. Does a
controlled "make install" in the 'mcs/' directory to populate the
'runtime' directory.
(fasterstrap): Use it.
2004-06-10 Raja R Harinath <[email protected]>
* runtime/Makefile.am ($(monoone_DATA),$(monotwo_DATA),$(monobins_DATA)):
Don't copy from prefix. Use $(LN_S) to point to the mcs/ tree.
* runtime/net_1_1/Makefile.am (mscorlib.dll,$(gac_assemblies)):
Use $(LN_S) to point to the mcs/ tree, rather than copying.
* runtime/net_2_0/Makefile.am (mscorlib.dll,$(gac_assemblies)): Likewise.
2004-06-10 Raja R Harinath <[email protected]>
Support the new assembly signing setup in mcs/.
* Makefile.am (mcs-do-basic-build): Pass 'USE_BOOT_COMPILE' to sub-makes.
($(tmpinst)/etc/mono/machine.config): New target.
(tmpinst-dir.stamp): Remove and rewrite into ...
($(tmpinst)/bin/mcs): ... this and ...
($(tmpinst)/bin/mono): ... this. Update to use the in-tree machine.config.
(tmpinst-dir): Rewrite to invoke above $(tmpinst)/... targets directly.
* configure.in (AC_PROG_LN_S): New check to define $(LN_S).
Thu Jun 3 14:39:17 CEST 2004 Paolo Molaro <[email protected]>
* configure.in: libc setting for NetBSD (patch from [email protected]).
2004-06-01 Raja R Harinath <[email protected]>
* Makefile.am (bootstrap,faststrap,fasterstrap): Refactor.
Fix 'faststrap' to be corlib-version-change-safe.
(one-stage-strap,two-stage-strap,three-stage-strap): Remove.
(monolite-bootstrap): Update.
2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* configure.in: fixlets for windows.
+82 -94
View File
@@ -1,5 +1,4 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
@@ -18,16 +17,16 @@ endif
DISTCLEANFILES= mono.pc mint.pc
#
# The following targets are used to compile and install
# The following target is used to compile and install
# mono and mcs without running into the out-of-sync
# problems by doing the compilation in the right order.
#
mcs_topdir=$(top_srcdir)/../mcs
.PHONY: bootstrap faststrap fasterstrap bootstrap-clean bootstrap-check get-monolite-latest monolite-bootstrap
.PHONY: tmpinst-dir tmpinst-mcs-basic-build tmpinst-mcs-short-build tmpinst-mcs-full-build tmpinst-monolite
.PHONY: mono-do-runtime-only mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
.PHONY: tmpinst-dir tmpinst-basic-build tmpinst-short-build tmpinst-full-build
.PHONY: bootstrap faststrap fasterstrap one-stage-strap two-stage-strap three-stage-strap bootstrap-clean bootstrap-check
.PHONY: mono-do-basic-build mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
if USE_JIT
mono_runtime = mono/mini/mono
@@ -35,99 +34,74 @@ else
mono_runtime = mono/interpreter/mint
endif
# Minimal set of directories to build, and files used to run the 'mcs' compiler
MCS_BASIC_DIRS = jay mcs class/corlib class/System
MCS_BASIC_FILES = \
$(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll
bootstrap: three-stage-strap
# Set of directories and files the 'mcs' compiler can use
## We build class/System twice to resolve the cyclic dependency of class/System.XML
MCS_DIRS = $(MCS_BASIC_DIRS) class/System.XML class/System class/Mono.CSharp.Debugger
MCS_FILES = $(MCS_BASIC_FILES) \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll
faststrap: mono-do-basic-build
$(MAKE) two-stage-strap
tmpinst = _tmpinst
fasterstrap: mono-do-basic-build
$(MAKE) one-stage-strap
bootstrap: tmpinst-mcs-basic-build mono-do-runtime-only
$(MAKE) tmpinst-mcs-short-build
$(MAKE) fasterstrap
three-stage-strap: tmpinst-basic-build
$(MAKE) two-stage-strap
faststrap: tmpinst-mcs-short-build
$(MAKE) mono-do-runtime-only
$(MAKE) fasterstrap
two-stage-strap: tmpinst-short-build
$(MAKE) one-stage-strap
.PHONY: populate-runtime-subdir
## *** warning ***: tested only with GNU make
populate-runtime-subdir:
srcdir=`cd $(srcdir) && pwd`; tmpinst=`pwd`/$(tmpinst) ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) \
&& $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime LIBRARY_INSTALL_DIR=$$srcdir/runtime/net_1_1 prefix=$$tmpinst/prefix PROFILE=default install \
&& $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime LIBRARY_INSTALL_DIR=$$srcdir/runtime/net_2_0 prefix=$$tmpinst/prefix PROFILE=net_2_0 install
test -z "`find $(tmpinst)/prefix -name '*.dll'`"
test -z "`find $(tmpinst)/prefix -name '*.exe'`"
set fnord `find $(tmpinst)/prefix -type f | wc -l` ; test "$$2" = 9
rm -rf $(tmpinst)/prefix
fasterstrap: tmpinst-mcs-full-build
$(MAKE) populate-runtime-subdir
one-stage-strap: tmpinst-full-build
rm -f $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
$(MAKE)
bootstrap-clean: clean mcs-do-clean-profiles
bootstrap-check: check mcs-do-run-test
# building with monolite
# (takes advantage of 'make -j': independent subtasks are separate dependencies)
tmpinst-basic-build: mcs-do-basic-build mono-do-basic-build tmpinst-dir
mv -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
_tmpinst/lib
get-monolite-latest:
wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
tmpinst-short-build: mcs-do-short-build
mv -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
_tmpinst/lib
monolite-bootstrap: tmpinst-monolite mono-do-runtime-only
rm -f $(MCS_FILES)
$(MAKE) tmpinst-mcs-short-build
$(MAKE) fasterstrap
# internal targets
tmpinst-mcs-basic-build: mcs-do-basic-build tmpinst-dir
mv -f $(MCS_BASIC_FILES) $(tmpinst)/lib
tmpinst-mcs-short-build: mcs-do-short-build tmpinst-dir
mv -f $(MCS_FILES) $(tmpinst)/lib
tmpinst-mcs-full-build: mcs-do-full-build tmpinst-dir
cp -f $(MCS_FILES) $(tmpinst)/lib
tmpinst-monolite: tmpinst-dir
-rm -f $(tmpinst)/lib/mcs.exe $(tmpinst)/lib/*.dll
-rm -fr $(tmpinst)/monolite-*
srcdir=`cd $(srcdir) && pwd` && cd $(tmpinst) && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
mv -f $(tmpinst)/monolite-*/mcs.exe $(tmpinst)/monolite-*/*.dll $(tmpinst)/lib
rm -fr $(tmpinst)/monolite-*
tmpinst-full-build: mcs-do-full-build
cp -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
_tmpinst/lib
# Build enough of 'mono' to run the stage1 mcs.exe
mono-do-runtime-only: $(CONFIG_HEADER)
for dir in $(libgc_dir) mono data; do \
(cd $$dir && $(MAKE)) || exit 1 ; \
done
mono-do-basic-build: $(CONFIG_HEADER)
if test -z "$(libgc_dir)"; then :; else cd libgc && $(MAKE) ; fi
cd mono && $(MAKE)
mcs-do-basic-build:
rm -f $(MCS_FILES)
for dir in $(MCS_BASIC_DIRS); do \
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default USE_BOOT_COMPILE=yes BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB") || exit 1 ; \
done
# Build stripped down versions of 'mcs', 'mscorlib.dll' and 'System.dll' with installed 'mcs'
## remove System.Xml.dll since it's a soft-dependency of System.dll
mcs-do-basic-build:
rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll
cd $(mcs_topdir)/jay && $(MAKE)
cd $(mcs_topdir)/mcs && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
cd $(mcs_topdir)/class/corlib && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
cd $(mcs_topdir)/class/System && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
mcs-do-short-build:
tmpinst=`cd $(tmpinst) && pwd` ; \
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH; export PATH ; \
for dir in $(MCS_DIRS); do \
for dir in jay mcs class/corlib class/System class/System.XML class/System class/Mono.CSharp.Debugger; do \
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
done
mcs-do-full-build:
tmpinst=`cd $(tmpinst) && pwd` ; \
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) && $(MAKE) all-profiles
@@ -135,30 +109,44 @@ mcs-do-clean-profiles:
cd $(mcs_topdir) && $(MAKE) clean-profiles
mcs-do-run-test: tmpinst-dir
tmpinst=`cd $(tmpinst) && pwd` ; \
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) && $(MAKE) PROFILE=default run-test
tmpinst-dir:
mkdir -p $(tmpinst) $(tmpinst)/bin $(tmpinst)/lib $(tmpinst)/etc/mono
$(MAKE) $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/etc/mono/machine.config
tmpinst-dir.stamp: Makefile.am
set -e ; \
rootme=`pwd`; tmpinst=$$rootme/_tmpinst ; \
mkdir -p $$tmpinst $$tmpinst/bin $$tmpinst/lib ; \
echo '#! /bin/sh' > $$tmpinst/bin/mono ; \
echo 'if test -z "$$MONO_PATH" ; then MONO_PATH="'"$$tmpinst/lib"'"' >> $$tmpinst/bin/mono ; \
echo 'else MONO_PATH=$${MONO_PATH}:"'"$$tmpinst/lib"'" ; fi' >> $$tmpinst/bin/mono ; \
echo 'export MONO_PATH' >> $$tmpinst/bin/mono ; \
echo 'exec "'"$$rootme/libtool"'" --mode=execute "'"$$rootme/$(mono_runtime)"'" "$$@"' >> $$tmpinst/bin/mono ; \
echo '#! /bin/sh' > $$tmpinst/bin/mcs ; \
echo 'exec "'"$$tmpinst/bin/mono"'" "'"$$tmpinst/lib/mcs.exe"'" "$$@"' >> $$tmpinst/bin/mcs ; \
chmod +x $$tmpinst/bin/mono $$tmpinst/bin/mcs
echo "stamp" > $@
$(tmpinst)/bin/mono: $(srcdir)/Makefile.am
echo '#! /bin/sh' > $@
echo 'builddir="'`pwd`'"; tmpinst=$$builddir/$(tmpinst)' >> $@
echo 'if test -z "$$MONO_PATH" ; then MONO_PATH=$$tmpinst/lib; else MONO_PATH=$${MONO_PATH}:$$tmpinst/lib ; fi' >> $@
echo 'MONO_CFG_DIR=$$tmpinst/etc' >> $@
echo 'export MONO_PATH MONO_CFG_DIR' >> $@
echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/$(mono_runtime)" --config "$$builddir/data/config" "$$@"' >> $@
chmod +x $@
tmpinst-dir: tmpinst-dir.stamp
@if test -d _tmpinst; then :; else rm -f tmpinst-dir.stamp; $(MAKE) tmpinst-dir.stamp; fi
$(tmpinst)/bin/mcs: $(srcdir)/Makefile.am
(t=`cd $(tmpinst) && pwd`; echo '#! /bin/sh'; echo 'exec "'"$$t/bin/mono"'" "'"$$t/lib/mcs.exe"'" "$$@"') > $@
chmod +x $@
$(tmpinst)/etc/mono/machine.config: $(srcdir)/data/machine.config
rm -f $@
srcdir=`cd $(srcdir) && pwd`; cd $(tmpinst)/etc/mono && $(LN_S) $$srcdir/data/machine.config machine.config
# building with monolite
get-monolite-latest:
wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
tmpinst-monolite: tmpinst-dir
-rm -f _tmpinst/lib/mcs.exe _tmpinst/lib/*.dll
-rm -fr _tmpinst/monolite-*
srcdir=`cd $(srcdir) && pwd` && cd _tmpinst && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
mv -f _tmpinst/monolite-*/mcs.exe _tmpinst/monolite-*/*.dll _tmpinst/lib
rm -fr _tmpinst/monolite-*
monolite-bootstrap: tmpinst-monolite mono-do-basic-build
rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll Mono.CSharp.Debugger.dll
$(MAKE) two-stage-strap
# Obsolete target -- don't use.
.PHONY: fullbuild
+7 -14
View File
@@ -1,11 +1,9 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,0.96)
AM_INIT_AUTOMAKE(mono,0.95)
AM_MAINTAINER_MODE
AC_PROG_LN_S
dnl
dnl libgc checks
dnl
@@ -54,7 +52,6 @@ case "$host" in
gc_default=boehm
with_nptl=no
with_sigaltstack=no
LN_S=cp
;;
*-*-*netbsd*)
@@ -246,15 +243,14 @@ AC_SUBST(GMODULE_LIBS)
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
# Some systems have broken support, so we allow to disable it.
# This is misnamed: __thread support has no relation to NPTL,
# but people already use it...
AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for __thread support],[],[with_nptl=yes])
# Enable support for NPTL only features like fast thread-local storage
# We can't reliably detect nptl at compile & run time
# so this option will stay until nptl becomes more widespread
AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for NPTL],[],[with_nptl=yes])
# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
# This does not work on some platforms (bug #55253)
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=no])
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
# assembly bundle support, see metadata/make-bundle.pl for more info
AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
@@ -1142,9 +1138,6 @@ case "$host" in
libsuffix=".dylib"
LIBC="libc.dylib"
;;
*-*-*netbsd*)
LIBC="libc.so.12"
;;
esac
AC_SUBST(libsuffix)
@@ -1259,7 +1252,7 @@ echo "
GC: $gc
ICU: $enable_icu
__thread: $with_nptl
NPTL: $with_nptl
SIGALTSTACK: $with_sigaltstack
Engine: $jit_status
2.0 Alpha: $PREVIEW
-15
View File
@@ -35,8 +35,6 @@
type="System.Web.Configuration.CustomErrorsConfigHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="pages"
type="System.Web.Configuration.PagesConfigurationHandler, System.Web, Version=1.0.5000.0, Culture=neutral" />
<section name="clientTarget"
type="System.Web.Configuration.ClientTargetSectionHandler, System.Web, Version=1.0.5000.0, Culture=neutral" />
</sectionGroup>
<sectionGroup name="system.net">
<section name="settings"
@@ -192,19 +190,6 @@
</system.diagnostics>
<system.drawing>
</system.drawing>
<strongNames>
<pubTokenMapping>
<!-- ECMA key -->
<map Token="b77a5c561934e089" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (final) key -->
<map Token="b03f5f7f11d50a3a" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (Web Service Enhancement) key -->
<map Token="31bf3856ad364e35" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- IBM (DB2 Data Provider) key -->
<map Token="7c307b91aa13d208" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
</pubTokenMapping>
</strongNames>
</configuration>
-246
View File
@@ -1,246 +0,0 @@
System.Object
System.Exception
System.ValueType
System.Delegate
System.MulticastDelegate
System.Enum
System.Activator
System.ArgIterator
System.__ComObject
System.TypedReference
System.Security.AllowPartiallyTrustedCallersAttribute
System.Runtime.Serialization.Formatter
System.Runtime.Serialization.FormatterConverter
System.Runtime.Serialization.FormatterServices
System.Runtime.Serialization.ObjectIDGenerator
System.Runtime.Serialization.ObjectManager
System.Reflection.ModuleResolveEventHandler
System.Reflection.Pointer
System.Globalization.CompareInfo
System.Globalization.HebrewCalendar
System.Globalization.HijriCalendar
System.Globalization.JapaneseCalendar
System.Globalization.KoreanCalendar
System.Globalization.SortKey
System.Globalization.StringInfo
System.Globalization.TaiwanCalendar
System.Globalization.TextElementEnumerator
System.Globalization.TextInfo
System.Globalization.ThaiBuddhistCalendar
System.IO.IsolatedStorage.IsolatedStorageFile
System.Reflection.Emit.MethodRental
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
System.Runtime.CompilerServices.CallConvCdecl
System.Runtime.CompilerServices.CallConvStdcall
System.Runtime.CompilerServices.CallConvThiscall
System.Runtime.CompilerServices.CallConvFastcall
System.Runtime.CompilerServices.CustomConstantAttribute
System.Runtime.CompilerServices.DateTimeConstantAttribute
System.Runtime.CompilerServices.DiscardableAttribute
System.Runtime.CompilerServices.DecimalConstantAttribute
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
System.Runtime.CompilerServices.IDispatchConstantAttribute
System.Runtime.CompilerServices.IsVolatile
System.Runtime.CompilerServices.IUnknownConstantAttribute
System.Runtime.CompilerServices.RequiredAttributeAttribute
System.Runtime.InteropServices.ArrayWithOffset
System.Runtime.InteropServices.DispIdAttribute
System.Runtime.InteropServices.ClassInterfaceType
System.Runtime.InteropServices.ClassInterfaceAttribute
System.Runtime.InteropServices.ComVisibleAttribute
System.Runtime.InteropServices.LCIDConversionAttribute
System.Runtime.InteropServices.ComRegisterFunctionAttribute
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
System.Runtime.InteropServices.ProgIdAttribute
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
System.Runtime.InteropServices.IDispatchImplType
System.Runtime.InteropServices.IDispatchImplAttribute
System.Runtime.InteropServices.ComSourceInterfacesAttribute
System.Runtime.InteropServices.ComConversionLossAttribute
System.Runtime.InteropServices.TypeLibTypeFlags
System.Runtime.InteropServices.TypeLibFuncFlags
System.Runtime.InteropServices.TypeLibVarFlags
System.Runtime.InteropServices.TypeLibTypeAttribute
System.Runtime.InteropServices.TypeLibFuncAttribute
System.Runtime.InteropServices.TypeLibVarAttribute
System.Runtime.InteropServices.ComImportAttribute
System.Runtime.InteropServices.PreserveSigAttribute
System.Runtime.InteropServices.ComAliasNameAttribute
System.Runtime.InteropServices.AutomationProxyAttribute
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
System.Runtime.InteropServices.CoClassAttribute
System.Runtime.InteropServices.ComEventInterfaceAttribute
System.Runtime.InteropServices.COMException
System.Runtime.InteropServices.ComMemberType
System.Runtime.InteropServices.CurrencyWrapper
System.Runtime.InteropServices.DispatchWrapper
System.Runtime.InteropServices.ErrorWrapper
System.Runtime.InteropServices.ExtensibleClassFactory
System.Runtime.InteropServices.HandleRef
System.Runtime.InteropServices.InvalidComObjectException
System.Runtime.InteropServices.InvalidOleVariantTypeException
System.Runtime.InteropServices.TypeLibImporterFlags
System.Runtime.InteropServices.ExporterEventKind
System.Runtime.InteropServices.ITypeLibExporterNotifySink
System.Runtime.InteropServices.ITypeLibConverter
System.Runtime.InteropServices.MarshalDirectiveException
System.Runtime.InteropServices.ObjectCreationDelegate
System.Runtime.InteropServices.RuntimeEnvironment
System.Runtime.InteropServices.RegistrationServices
System.Runtime.InteropServices.SafeArrayRankMismatchException
System.Runtime.InteropServices.SafeArrayTypeMismatchException
System.Runtime.InteropServices.SEHException
System.Runtime.InteropServices.TypeLibConverter
System.Runtime.InteropServices.BIND_OPTS
System.Runtime.InteropServices.UCOMIBindCtx
System.Runtime.InteropServices.UCOMIConnectionPointContainer
System.Runtime.InteropServices.UCOMIConnectionPoint
System.Runtime.InteropServices.UCOMIEnumMoniker
System.Runtime.InteropServices.CONNECTDATA
System.Runtime.InteropServices.UCOMIEnumConnections
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
System.Runtime.InteropServices.UCOMIEnumString
System.Runtime.InteropServices.UCOMIEnumVARIANT
System.Runtime.InteropServices.FILETIME
System.Runtime.InteropServices.UCOMIMoniker
System.Runtime.InteropServices.UCOMIPersistFile
System.Runtime.InteropServices.UCOMIRunningObjectTable
System.Runtime.InteropServices.STATSTG
System.Runtime.InteropServices.UCOMIStream
System.Runtime.InteropServices.DESCKIND
System.Runtime.InteropServices.BINDPTR
System.Runtime.InteropServices.UCOMITypeComp
System.Runtime.InteropServices.TYPEKIND
System.Runtime.InteropServices.TYPEFLAGS
System.Runtime.InteropServices.IMPLTYPEFLAGS
System.Runtime.InteropServices.TYPEATTR
System.Runtime.InteropServices.FUNCDESC
System.Runtime.InteropServices.IDLFLAG
System.Runtime.InteropServices.IDLDESC
System.Runtime.InteropServices.PARAMFLAG
System.Runtime.InteropServices.PARAMDESC
System.Runtime.InteropServices.TYPEDESC
System.Runtime.InteropServices.ELEMDESC
System.Runtime.InteropServices.VARDESC
System.Runtime.InteropServices.DISPPARAMS
System.Runtime.InteropServices.EXCEPINFO
System.Runtime.InteropServices.FUNCKIND
System.Runtime.InteropServices.INVOKEKIND
System.Runtime.InteropServices.CALLCONV
System.Runtime.InteropServices.FUNCFLAGS
System.Runtime.InteropServices.VARFLAGS
System.Runtime.InteropServices.UCOMITypeInfo
System.Runtime.InteropServices.SYSKIND
System.Runtime.InteropServices.LIBFLAGS
System.Runtime.InteropServices.TYPELIBATTR
System.Runtime.InteropServices.UCOMITypeLib
System.Runtime.InteropServices.UnknownWrapper
System.Runtime.Remoting.IObjectHandle
System.Runtime.Remoting.IRemotingTypeInfo
System.Runtime.Remoting.IChannelInfo
System.Runtime.Remoting.IEnvoyInfo
System.Runtime.Remoting.RemotingConfiguration
System.Runtime.Remoting.TypeEntry
System.Runtime.Remoting.ActivatedClientTypeEntry
System.Runtime.Remoting.ActivatedServiceTypeEntry
System.Runtime.Remoting.WellKnownClientTypeEntry
System.Runtime.Remoting.WellKnownServiceTypeEntry
System.Runtime.Remoting.RemotingException
System.Runtime.Remoting.ServerException
System.Runtime.Remoting.RemotingTimeoutException
System.Runtime.Remoting.RemotingServices
System.Runtime.Remoting.InternalRemotingServices
System.Runtime.Remoting.SoapServices
System.Runtime.Remoting.Activation.UrlAttribute
System.Runtime.Remoting.Messaging.IMessageSink
System.Runtime.Remoting.Messaging.AsyncResult
System.Runtime.Remoting.Messaging.CallContext
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
System.Runtime.Remoting.Messaging.InternalMessageWrapper
System.Runtime.Remoting.Messaging.IMethodCallMessage
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
System.Runtime.Remoting.Messaging.HeaderHandler
System.Runtime.Remoting.Messaging.IMessageCtrl
System.Runtime.Remoting.Messaging.IRemotingFormatter
System.Runtime.Remoting.Messaging.ReturnMessage
System.Runtime.Remoting.Messaging.MethodCall
System.Runtime.Remoting.Messaging.ConstructionCall
System.Runtime.Remoting.Messaging.MethodResponse
System.Runtime.Remoting.Messaging.ConstructionResponse
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
System.Runtime.Remoting.Messaging.OneWayAttribute
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
System.Runtime.Remoting.Contexts.CrossContextDelegate
System.Runtime.Remoting.Contexts.ContextProperty
System.Runtime.Remoting.Contexts.IContextPropertyActivator
System.Runtime.Remoting.Contexts.IContributeClientContextSink
System.Runtime.Remoting.Contexts.IContributeDynamicSink
System.Runtime.Remoting.Contexts.IContributeEnvoySink
System.Runtime.Remoting.Contexts.IContributeObjectSink
System.Runtime.Remoting.Contexts.IContributeServerContextSink
System.Runtime.Serialization.Formatters.InternalRM
System.Runtime.Serialization.Formatters.InternalST
System.Runtime.Serialization.Formatters.SoapMessage
System.Runtime.Serialization.Formatters.SoapFault
System.Runtime.Serialization.Formatters.ServerFault
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
System.Security.Cryptography.CryptoConfig
System.Security.Cryptography.KeyedHashAlgorithm
System.Security.Cryptography.HMACSHA1
System.Security.Cryptography.MACTripleDES
System.Security.Cryptography.MaskGenerationMethod
System.Security.Cryptography.PasswordDeriveBytes
System.Security.Cryptography.PKCS1MaskGenerationMethod
System.Security.Cryptography.RC2
System.Security.Cryptography.RC2CryptoServiceProvider
System.Security.Cryptography.RSACryptoServiceProvider
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
System.Security.Cryptography.RSAPKCS1SignatureFormatter
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.TripleDES
System.Security.Cryptography.TripleDESCryptoServiceProvider
System.Security.Permissions.EnvironmentPermission
System.Security.Permissions.FileDialogPermission
System.Security.Permissions.IsolatedStorageFilePermission
System.Security.Permissions.PrincipalPermissionAttribute
System.Security.Permissions.SecurityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermission
System.Security.Permissions.ReflectionPermission
System.Security.Permissions.RegistryPermission
System.Security.Permissions.PrincipalPermission
System.Security.Permissions.SiteIdentityPermission
System.Security.Permissions.StrongNameIdentityPermission
System.Security.Permissions.StrongNamePublicKeyBlob
System.Security.Permissions.UIPermission
System.Security.Permissions.UrlIdentityPermission
System.Security.Permissions.ZoneIdentityPermission
System.Security.Policy.ApplicationDirectory
System.Security.Policy.ApplicationDirectoryMembershipCondition
System.Security.Policy.FirstMatchCodeGroup
System.Security.Policy.Hash
System.Security.Policy.HashMembershipCondition
System.Security.Policy.NetCodeGroup
System.Security.Policy.PermissionRequestEvidence
System.Security.Policy.Publisher
System.Security.Policy.PublisherMembershipCondition
System.Security.Policy.Site
System.Security.Policy.SiteMembershipCondition
System.Security.Policy.StrongName
System.Security.Policy.StrongNameMembershipCondition
System.Security.Policy.UnionCodeGroup
System.Security.Policy.Url
System.Security.Policy.UrlMembershipCondition
System.Security.Policy.Zone
System.Security.Policy.ZoneMembershipCondition
System.Security.Principal.WindowsIdentity
System.Security.Principal.WindowsImpersonationContext
System.Security.Principal.WindowsPrincipal
System.Threading.CompressedStack
+20 -28
View File
@@ -238,10 +238,10 @@ Finally, namespaces can be specified using the N: prefix:
Turns off the garbage collection in Mono. This should be only used
for debugging purposes
.TP
.I "MONO_ASPNET_NODELETE"
If set to any value, temporary source files generated by ASP.NET support
classes will not be removed. They will be kept in the user's temporary
directory.
.I "MONO_PATH"
Provides a search path to the runtime where to look for library files.
Directories are separated by the platform path separator (colons on unix). Example:
.B /home/username/lib:/usr/local/mono/lib
.TP
.I "MONO_CFG_DIR"
If set, this variable overrides the default system configuration directory
@@ -269,41 +269,18 @@ Windows I/O Emulation layer, and handles (files, events, mutexes,
pipes) will not be shared across processes. Process creation is also
disabled. This option is only available on Unix.
.TP
.I "MONO_EGD_SOCKET"
For platforms that do not otherwise have a way of obtaining random bytes
this can be set to the name of a file system socket on which an egd or
prngd daemon is listening.
.TP
.I "MONO_EXTERNAL_ENCODINGS"
If set, contains a colon-separated list of text encodings to try when
turning externally-generated text (e.g. command-line arguments or
filenames) into Unicode. The encoding names come from the list
provided by iconv, and the special case "default_locale" which refers
to the current locale's default encoding.
.IP
.TP
When reading externally-generated text strings UTF-8 is tried first,
and then this list is tried in order with the first successful
conversion ending the search. When writing external text (e.g. new
filenames or arguments to new processes) the first item in this list
is used, or UTF-8 if the environment variable is not set.
.TP
.I "MONO_MANAGED_WATCHER"
If set to any value, System.IO.FileSystemWatcher will use the default
managed implementation (slow). If unset, mono will try to use FAM under
Unix systems and native API calls on Windows, falling back to the
managed implementation on error.
.TP
.I "MONO_PATH"
Provides a search path to the runtime where to look for library files.
Directories are separated by the platform path separator (colons on unix). Example:
.B /home/username/lib:/usr/local/mono/lib
.TP
.I "MONO_GAC_PREFIX"
Provides a prefix the runtime uses to look for Global Assembly Caches.
Directories are separated by the platform path separator (colons on
unix). MONO_GAC_PREFIX should point to the top directory of a prefixed
install. Or to the directory provided in the gacutil /gacdir command. Example:
.B /home/username/.mono:/usr/local/mono/
.TP
.I "MONO_SHARED_DIR"
If set its the directory where the ".wapi" handle state is stored.
@@ -319,6 +296,21 @@ new and might have some bugs. Basically we recommend Managed XSLT
solution, but if it contains some blocking bugs, then you can also
use traditional libxslt. If you want to use msxsl:script, you have
to select Managed XSLT.
.TP
.I "MONO_MANAGED_WATCHER"
If set to any value, System.IO.FileSystemWatcher will use the default
managed implementation (slow). If unset, mono will try to use FAM under
Unix systems and native API calls on Windows, falling back to the
managed implementation on error.
.TP
.I "MONO_CODEDOM_NODELETE"
If set to any value, the C# CodeDom compiler will not remove the temporary
source files generated.
.TP
.I "MONO_EGD_SOCKET"
For platforms that do not otherwise have a way of obtaining random bytes
this can be set to the name of a file system socket on which an egd or
prngd daemon is listening.
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
+10 -48
View File
@@ -1,9 +1,8 @@
.\"
.\" sn manual page.
.\" Copyright 2003 Motus Technologies
.\" Copyright 2004 Novell
.\" Author:
.\" Sebastien Pouliot <sebastien@ximian.com>
.\" Sebastien Pouliot (spouliot@motus.com)
.\"
.TH Mono "sn"
.SH NAME
@@ -14,33 +13,24 @@ sn \- Digitally sign/verify/compare strongname on CLR assemblies.
.SH DESCRIPTION
Digitally sign, verify or compare, CLR assemblies using strongnames.
.SH CONFIGURATION OPTIONS
Configuration options are stored in the machine.config configuration file
under /configuration/strongNames.
.TP
.I "-c provider"
Change the default CSP (Crypto Service Provider). Currently not supported
in Mono.
Change the default CSP (Crypto Service Provider).
.TP
.I "-m [y|n]"
Use a machine [y] key container or a user [n] key container. Currently not
supported in Mono.
Use a machine [y] key container or a user [n] key container.
.TP
.I "-Vl"
List the verification options. The list is kept under /configuration/
strongNames/verificationSettings in machine.config.
List the verification options.
.TP
.I "-Vr assembly [userlist]"
Exempt the specified assembly from verification for the specified user list.
Currently not supported by sn, you must edit machine.config manually if you
require this.
.TP
.I "-Vu assembly"
Remove the exemption entry for the specified assembly. Currently not
supported by sn, you must edit machine.config manually if you require this.
Remove the exemption entry for the specified assembly.
.TP
.I "-Vx"
Remove all exemptions entries. Currently not supported by sn, you must edit
machine.config manually if you require this.
Remove all exemptions entries.
.SH CSP RELATED OPTIONS
.TP
.I "-d container"
@@ -72,14 +62,11 @@ Compare if assembly1 and assembly are the same exception for their signature.
This is done by comparing the hash of the metadata of both assembly.
.TP
.I "-k keypair.snk"
Create a new strongname keypair (a 1024 bits RSA keypair) in the specified
file.
Create a new strongname keypair in the specified file.
.TP
.I "-R assembly keypair.snk"
Resign the specified assembly using the specified strongname keypair file
(SNK). You can only sign an assembly with the private key (SNK) that match
the public key inside the assembly (unless it's public key token has been
remapped in machine.config).
(SNK).
.TP
.I "-Rc assembly container"
Resign the specified assembly using the specified strongname container.
@@ -96,10 +83,10 @@ Show the public key from the specified assembly.
.I "-Tp assembly"
Show the public key and the public key token from the specified assembly.
.TP
.I "-v assembly"
.I "-V assembly"
Verify the specified assembly signature.
.TP
.I "-vf assembly"
.I "-Vf assembly"
Verify the specified assembly signature (even if disabled).
.SH HELP OPTIONS
.TP
@@ -117,35 +104,10 @@ Display convertion related help about this tool.
.TP
.I "-h sn", "-? sn"
Display strongname related help about this tool.
.SH CONFIGURATION FILE
.TP
Strongnames configuration is kept in "machine.config" file. Currently two
features can be configured.
.TP
.I "/configuration/strongNames/pubTokenMapping"
This mechanism let Mono remap a public key token, like the ECMA token, to
another public key for verification. This is useful in two scenarios. First
assemblies signed with the "ECMA key" needs to be verified by the "runtime"
key (as the ECMA key isn't a public key). Second, many assemblies are signed
with private keys that Mono can't use (e.g. System.Security.dll assembly).
A new key cannot be used because it should change thr strongname (a new key
pair would have a new public key which would produce a new token). Public
key token remapping is the solution for both problems. Each token must be
configured in a "map" entry similar to this one: <map Token="b77a5c561934e089"
PublicKey="00..." />
.TP
.I "/configuration/strongNames/verificationSettings"
It is often useful during development to use delay signed assemblies.
Normally* the runtime wouldn't allow delay-signed assemblies to be loaded.
This feature allows some delay-signed assemblies (based on their public key
token, optionally assembly name and user name) to be used like they were
fully signed assemblies. [*] Note that Mono 1.0 "runtime" doesn't validate
strongname signatures so this option shouldn't be required in most scenarios.
.SH AUTHOR
Written by Sebastien Pouliot
.SH COPYRIGHT
Copyright (C) 2003 Motus Technologies.
Copyright (C) 2004 Novell.
Released under BSD license.
.SH MAILING LISTS
Visit http://mail.ximian.com/mailman/mono-list for details.
+1 -1
View File
@@ -50,7 +50,7 @@ Specifies the namespace of the XML schema element for which a class or a dataset
Specifies the programming language to use for the generated code. The only supported languages are CS (C#) and VB (Visual Basic.NET).
.TP
.I "/generator:type,assembly" "/g:type,assembly"
Indicates xsd.exe to use custom CodeDomProvider to generate code. The type name must be full name. Assembly name is a local file name that is going to be loaded. The specified Type must have the default constructor.
Indicates xsd.exe to use custom CodeDomProvider to generate code. Type name must be full name. Assembly name is file name that xsd.exe tries to load.
.TP
.I "/outputdir:path" "/o:path"
Specifies the directory where to generate the code or schemas.
-8
View File
@@ -1,11 +1,3 @@
2004-06-14 Raja R Harinath <[email protected]>
* Makefile (all-profiles, clean-profiles): Simplify slightly.
2004-06-05 Atsushi Enomoto <[email protected]>
* Makefile: added target run-test-ondotnet.
2004-05-26 Raja R Harinath <[email protected]>
* nunit20/util/Makefile (EXTRA_DISTFILES): Remove
+4 -6
View File
@@ -19,19 +19,17 @@ test: platform-check profile-check test-recursive #test-local
run-test: run-test-recursive #run-test-local
run-test-ondotnet: run-test-ondotnet-recursive # run-test-ondotnet-local
clean: clean-recursive #clean-local
# fun specialty targets
all-profiles:
$(MAKE) PROFILE=default all
$(MAKE) PROFILE=net_2_0 all
$(MAKE) PROFILE=default all || exit 1 ; \
$(MAKE) PROFILE=net_2_0 all || exit 1 ;
clean-profiles:
$(MAKE) PROFILE=default clean
$(MAKE) PROFILE=net_2_0 clean
$(MAKE) PROFILE=default clean || exit 1 ; \
$(MAKE) PROFILE=net_2_0 clean || exit 1 ;
testcorlib:
@cd class/corlib && $(MAKE) test run-test
+7 -12
View File
@@ -1,12 +1,7 @@
2004-06-11 Anirban Bhattacharjee <banirban@novell.com>
* Makefile: Removed inclusion of rules.make from Makefile for two reasons :
- This Makefile as of now has no dependency on rules.make what so ever
- Because of inclusion of INTENAL_MBAS in rules.make it was causing confliction with existing INTERNAL_MBAS in this makefile and causing lots of tests to fail
2004-05-15 Rafael Teixeira ([email protected])
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries
2004-03-16 Rafael Teixeira ([email protected])
* Test1.vb: corrected mispelling in keyword
* Test.Sources: no misc1.vb or CharacterLiteralsA.vb sources
* ConditionalCompilationC.vb: added some tests with #Const
2004-05-15 Rafael Teixeira (rafaelteixeira@hotmail.com)
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries
2004-03-16 Rafael Teixeira ([email protected])
* Test1.vb: corrected mispelling in keyword
* Test.Sources: no misc1.vb or CharacterLiteralsA.vb sources
* ConditionalCompilationC.vb: added some tests with #Const
+7 -12
View File
@@ -1,12 +1,7 @@
2004-06-11 Anirban Bhattacharjee <banirban@novell.com>
* Makefile: Removed inclusion of rules.make from Makefile for two reasons :
- This Makefile as of now has no dependency on rules.make what so ever
- Because of inclusion of INTENAL_MBAS in rules.make it was causing confliction with existing INTERNAL_MBAS in this makefile and causing lots of tests to fail
2004-05-15 Rafael Teixeira ([email protected])
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries
2004-03-16 Rafael Teixeira ([email protected])
* Test1.vb: corrected mispelling in keyword
* Test.Sources: no misc1.vb or CharacterLiteralsA.vb sources
* ConditionalCompilationC.vb: added some tests with #Const
2004-05-15 Rafael Teixeira (rafaelteixeira@hotmail.com)
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries
2004-03-16 Rafael Teixeira ([email protected])
* Test1.vb: corrected mispelling in keyword
* Test.Sources: no misc1.vb or CharacterLiteralsA.vb sources
* ConditionalCompilationC.vb: added some tests with #Const
-34
View File
@@ -1,34 +0,0 @@
Imports System
Module M
Delegate Sub SD()
sub f()
End sub
Public Delegate Function SF(a as integer) as Integer
Public Function f1(a as integer) as Integer
return a
End Function
Sub Main()
dim d1 as SD
d1 = new SD(AddressOf f)
d1.Invoke()
dim d2 as SD
d2 = AddressOf f
d2.Invoke()
dim d3 as new SD(AddressOf f)
d3.Invoke()
dim d4 as SF
d4 = new SF(AddressOf f1)
Dim i as Integer = d4.Invoke(10)
if i <> 10 then
Throw new System.Exception ("#A1, Unexpected result")
end if
End Sub
End Module
-14
View File
@@ -1,14 +0,0 @@
Imports System
Module M
Delegate Sub SD()
sub f(i as integer)
End sub
Sub Main()
dim d1 as SD
d1= new SD(AddressOf f)
d1.Invoke()
End Sub
End Module
-18
View File
@@ -1,18 +0,0 @@
Imports System
Module M
Delegate Sub SD()
sub f()
End sub
Public Delegate Function SF(a as integer) as Integer
Public Function f1(a as integer) as Integer
return a
End Function
Sub Main()
dim d1 as SD
d1= new SD(AddressOf f1)
d1.Invoke()
End Sub
End Module
-27
View File
@@ -1,27 +0,0 @@
Imports System
Class C
Public Event E
Public Sub S()
RaiseEvent E
End Sub
End Class
Class C1
dim WithEvents x as C = new C()
Sub call_S()
x.S()
End Sub
Sub EH() Handles x.E
Console.WriteLine("event called")
End Sub
End Class
Module M
Sub Main()
dim y as new C1
y.call_S()
End Sub
End Module
-28
View File
@@ -1,28 +0,0 @@
Imports System
Class C
Delegate Sub EH()
Public Event E as EH
Public Sub S()
RaiseEvent E
End Sub
End Class
Class C1
dim WithEvents x as C = new C()
Sub call_S()
x.S()
End Sub
Sub EH() Handles x.E
Console.WriteLine("event called")
End Sub
End Class
Module M
Sub Main()
dim y as new C1
y.call_S()
End Sub
End Module
-30
View File
@@ -1,30 +0,0 @@
Imports System
Class C
Public Event E (ByVal i as integer)
Public Sub S()
RaiseEvent E(10)
End Sub
End Class
Class C1
dim WithEvents x as C = new C()
Sub call_S()
x.S()
End Sub
Sub EH(i as Integer) Handles x.E
Console.WriteLine("event called : " + i)
End Sub
End Class
Module M
Sub Main()
dim y as new C1
y.call_S()
End Sub
End Module
-31
View File
@@ -1,31 +0,0 @@
Imports System
Class C
Delegate Sub EH(ByVal i as integer)
Public Event E as EH
Public Sub S()
RaiseEvent E(10)
End Sub
End Class
Class C1
dim WithEvents x as C = new C()
Sub call_S()
x.S()
End Sub
Sub EH(i as Integer) Handles x.E
Console.WriteLine("event called : " + i)
End Sub
End Class
Module M
Sub Main()
dim y as new C1
y.call_S()
End Sub
End Module
-28
View File
@@ -1,28 +0,0 @@
Imports System
Public Class C
Public Event E()
Sub S()
RaiseEvent E()
End Sub
End Class
Module M
Sub S1()
Dim x As New C()
AddHandler x.E, AddressOf EH
x.S()
End Sub
Sub EH()
Console.WriteLine("Event fired")
End Sub
Sub Main()
S1()
End Sub
End Module
-30
View File
@@ -1,30 +0,0 @@
Imports System
Class C
Delegate Sub EH()
Public Event E as EH
Public Sub S()
RaiseEvent E
End Sub
End Class
Class C1
Sub call_S()
dim x as C = new C()
AddHandler x.E, AddressOf xh
x.S()
End Sub
Sub xh()
Console.WriteLine("event called")
End Sub
End Class
Module M
Sub Main()
dim y as new C1
y.call_S()
End Sub
End Module
+1 -4
View File
@@ -6,10 +6,7 @@ INTERNAL_MBAS = $(TEST_RUNTIME) --debug ../mbas/mbas.exe --stacktrace $(COMPILER
#INTERNAL_MBAS = vbc $(COMPILER_FLAGS)
all: test-compiler-jit
# removed this cause INTERNAL_MBAS now getting set in
# rules.make which is conflicting with this instance of
# INTERNAL_MBAS
#include ../build/rules.make
include ../build/rules.make
DISTFILES = README.tests $(wildcard *.vb)
-21
View File
@@ -1,21 +0,0 @@
Imports system
Module M
private i as integer
protected Property p() as Integer
GET
return i
END GET
SET (val as Integer)
i = val
End SET
End Property
Sub Main()
End Sub
End Module
-17
View File
@@ -1,17 +0,0 @@
Class C1
'property that do not override any other
'property should not be declared 'notoverridable'
Public NotOverridable Property p() as Integer
GET
END GET
SET (val as Integer)
End SET
End Property
End Class
Module OverrideC2
Sub Main()
End Sub
End Module
-19
View File
@@ -1,19 +0,0 @@
Imports system
Module M
private i as integer
public WriteOnly Property p() as Integer
GET
return i
END GET
SET (ByVal val as Integer)
i = val
End SET
End Property
Sub Main()
End Sub
End Module
-19
View File
@@ -1,19 +0,0 @@
Imports system
Module M
private i as integer
public ReadOnly Property p() as Integer
GET
return i
END GET
SET (ByVal val as Integer)
i = val
End SET
End Property
Sub Main()
End Sub
End Module
-11
View File
@@ -1,11 +0,0 @@
Imports system
Module M
private i as integer
public MustOverride Property p() as Integer
Sub Main()
End Sub
End Module
-15
View File
@@ -1,15 +0,0 @@
Imports system
Public Struct s
public MustOverride Property p() as Integer
End Struct
Module M
private i as integer
Sub Main()
End Sub
End Module
-22
View File
@@ -1,22 +0,0 @@
Imports system
Structure S
private i as integer
protected Property p() as Integer
GET
return i
END GET
SET (val as Integer)
i = val
End SET
End Property
End Structure
Module M
Sub Main()
End Sub
End Module
+2 -18
View File
@@ -132,14 +132,7 @@ PropertyA \
PropertyB \
PropertyC \
PropertyD \
PropertyE \
DelegateA \
EventA \
EventB \
EventC \
EventD \
EventE \
EventF
PropertyE
# All negetive test cases which should
# fail during compilation goes here
@@ -288,16 +281,7 @@ EnumC7 \
PropertyC1 \
PropertyC2 \
PropertyC3 \
PropertyC4 \
PropertyC5 \
PropertyC6 \
PropertyC7 \
PropertyC8 \
PropertyC9 \
PropertyC10 \
PropertyC11 \
DelegateC1 \
DelegateC2
PropertyC4
# All negetive test cases which should fail at
# runtime goes here
-104
View File
@@ -1,107 +1,3 @@
2004-06-14 Raja R Harinath <[email protected]>
* platforms/linux.make (PLATFORM_CHANGE_SEPARATOR_CMD): Define to 'cat'.
(PLATFORM_TWEAK_CORLIB_SOURCES): Remove.
(platform-check): Avoid bash-ism.
* library.make: Simplify uses of $(patsubst x,y,$(foo)) to $(foo:x=y).
(core_sourcefile): Rename back to ...
(sourcefile): ... this. Remove creation of redundant intermediate file.
(response): Change test for optimization, now that
PLATFORM_CHANGE_SEPARATOR_CMD is unconditional. Combine with
platform-exclude handling.
(library_CLEAN_FILES): New variable to specify clean:-able files
close to where they're defined.
(test_response, btest_response): Simplify.
* executable.make (response): Change test for optimization.
(executable_CLEAN_FILES): New define.
2004-06-14 Raja R Harinath <[email protected]>
* library.make (uninstall-local): Fix typo.
2004-06-11 Atsushi Enomoto <[email protected]>
* library.make : HAVE_CS_TESTS fixie.
2004-06-11 Raja R Harinath <[email protected]>
* library.make (HAVE_CS_TESTS, HAVE_VB_TESTS): Allow to be
overriden. Useful if the tests sourcefile is generated.
(TEST_COMPILE, BTEST_COMPILE): Allow these to be customized too.
* platforms/win32.make (PLATFORM_TWEAK_CORLIB_SOURCES): Remove.
Support enough features to build mscorlib.dll.
* library.make (core_sourcefile): New renamed from $(sourcefile).
(PLATFORM_excludes): Auto-detecting define that sees if
$(LIBRARY).$(PLATFORM)-excludes file exists.
(sourcefile): New. Possibly-built file that removes
PLATFORM_excluded files from core_sourcefile.
(test_against, test_dep): New. Allow the test assembly to be
built against a different library.
(test_lib): Allow makefile to override the name of the test
assembly.
(LIBRARY_INSTALL_DIR): If defined, switch to using $(INSTALL_LIB)
rather than $(gacutil).
(DISTFILES, dist-local): Use core_sourcefile.
(clean-local): Remove sourcefile if it was generated.
(test_lib, btest_lib): Depend on $(test_dep).
2004-06-10 Gonzalo Paniagua Javier <[email protected]>
* library.make: fixed PLATFORM_CHANGE_SEPARATOR_CHAR on windows.
2004-06-09 Sebastien Pouliot <[email protected]>
* library.make: Added support to fully sign assemblies when doing a
"make install" (thanks to Jackson :-).
2004-06-09 Raja R Harinath <[email protected]>
Do away with stampfiles.
Introduce support for VB test cases.
* library.make (HAVE_CS_TESTS, HAVE_VB_TESTS): New auto-detecting
defines.
(stampfile, test_stampfile): Remove.
(clean-local): Don't mention them.
(test-local, run-test-local, run-test-ondotnet-local):
Make unconditional.
($(makefrag), $(test_makefrag)): Simplify.
($(btest_lib)): New. Support for VB testcases.
2004-06-09 Raja R Harinath <[email protected]>
Partial support for writing Visual Basic source files.
* rules.make (USE_MBAS_FLAGS,BASCOMPILE,INTERNAL_MBAS): New.
* config-default.make (MBAS_FLAGS, DEFAULT_MBAS_FLAGS): New.
* profiles/default.make (MBAS): New.
2004-06-09 Raja R Harinath <[email protected]>
Do away with stampfiles.
* executable.make (stampfile): Remove.
(clean-local): Remove mention of $(stampfile).
(test-local, run-test-local, run-test-ondotnet-local):
Make unconditional. Add dummy rule to prevent other makefiles
from defining rules on these.
($(PROGRAM)): Depend directly on $(BUILT_SOURCES).
($(makefrag)): Simplify.
2004-06-03 Atsushi Enomoto <[email protected]>
* README.makefiles : added description for run-test-ondotnet.
2004-06-03 Atsushi Enomoto <[email protected]>
* Makefile, executable.make, library.make, rules.make :
Added new target "run-test-ondotnet" that works what "run-test"
used to be on windows (i.e. tests our libs under MS.NET).
2004-06-01 Atsushi Enomoto <[email protected]>
* platforms/win32.make : TEST_RUNTIME should be always mono we can't
test our libs against MS.NET runtime. Think about internal call).
2004-05-30 Jackson Harper <[email protected]>
* library.make: Install to 2.0 package if building with the
+1 -1
View File
@@ -2,7 +2,7 @@ thisdir = build
SUBDIRS =
include ../build/rules.make
all-local install-local test-local run-test-local run-test-ondotnet-local clean-local uninstall-local:
all-local install-local test-local run-test-local clean-local uninstall-local:
DISTFILES = \
README.makefiles \
+2 -7
View File
@@ -40,9 +40,6 @@ test-local: my_test_program.exe
run-test-local:
$(RUNTIME) my_test_program.exe
run-test-ondotnet-local:
$(RUNTIME) my_test_program.exe
DISTFILES = myfile.txt my_test_source.cs
dist-local: dist-default
@@ -52,7 +49,7 @@ my_test_program.exe: my_test_source.cs
========================================
Each makefile follows the same pattern: it does some setup, includes
the standard make rules, and provides rules for seven standard targets:
the standard make rules, and provides rules for six standard targets:
all, install, test, run-test, clean, and dist.
"Some setup" is defining two variables: $(thisdir) and
@@ -60,7 +57,7 @@ $(SUBDIRS). $(thisdir) is the directory that the makefile lives in,
relative to the top directory (ie, class/corlib) and $(SUBDIRS)
defines the subdirectories that should be built in.
The seven targets do the following:
The six targets do the following:
* all-local builds whatever someone would expect to be built
when they just type 'make'. Most likely Foo.dll or Foo.exe
@@ -78,8 +75,6 @@ target. The idea is that 'make run-test' from the toplevel should be
able to proceed unsupervised and test everything that can be tested in
such a manner.
* run-test-ondotnet-local is a variant of run-test-local. It is used only to validate if our tests themselves works fine under Microsoft runtime (on Windows). Basically, in this target, we should not use $(TEST_RUNTIME) to test our libraries.
* clean-local removes built files; 'make clean' should leave
only files that go into a distribution tarball. (But it is not necessarily
true that all files that go into a tarball need to be left after a make clean.)
-2
View File
@@ -9,7 +9,6 @@
RUNTIME_FLAGS =
TEST_HARNESS = $(topdir)/class/lib/nunit-console.exe
MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)
MBAS_FLAGS = $(PLATFORM_DEBUG_FLAGS)
LIBRARY_FLAGS = /noconfig
CFLAGS = -g -O2
INSTALL = /usr/bin/install
@@ -21,7 +20,6 @@ prefix = /usr/local
# keep track of the default value
DEFAULT_MCS_FLAGS := $(MCS_FLAGS)
DEFAULT_MBAS_FLAGS := $(MBAS_FLAGS)
# You shouldn't need to set these but might on a
# weird platform.
+30 -16
View File
@@ -8,17 +8,14 @@
base_prog = $(shell basename $(PROGRAM))
sourcefile = $(base_prog).sources
ifeq (cat,$(PLATFORM_CHANGE_SEPARATOR_CMD))
response = $(sourcefile)
else
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
response = $(depsdir)/$(base_prog).response
executable_CLEAN_FILES += $(response)
else
response = $(sourcefile)
endif
stampfile = $(depsdir)/$(base_prog).stamp
makefrag = $(depsdir)/$(base_prog).makefrag
pdb = $(patsubst %.exe,%.pdb,$(PROGRAM))
executable_CLEAN_FILES += $(makefrag) $(pdb)
ifndef PROGRAM_INSTALL_DIR
PROGRAM_INSTALL_DIR = $(prefix)/bin
@@ -34,14 +31,16 @@ uninstall-local:
-rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog)
clean-local:
-rm -f *.exe $(BUILT_SOURCES) $(executable_CLEAN_FILES) $(CLEAN_FILES)
-rm -f *.exe $(BUILT_SOURCES) $(CLEAN_FILES) $(pdb) $(stampfile) $(makefrag)
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
-rm -f $(response)
endif
ifndef HAS_TEST
test-local: $(PROGRAM)
@:
run-test-local:
@:
run-test-ondotnet-local:
@:
endif
DISTFILES = $(sourcefile) $(EXTRA_DISTFILES)
@@ -51,21 +50,36 @@ dist-local: dist-default
$(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
done
# Changing makefile probably means changing the
# sources, so let's be safe and add a Makefile dep
ifndef PROGRAM_COMPILE
PROGRAM_COMPILE = $(CSCOMPILE)
endif
$(PROGRAM): $(makefrag) $(BUILT_SOURCES) $(response)
$(PROGRAM): $(makefrag) $(response) $(stampfile)
$(PROGRAM_COMPILE) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
# warning: embedded tab in the 'echo touch' line
$(makefrag): $(sourcefile)
@echo Creating $@ ...
@sed 's,^,$(PROGRAM): ,' $< > $@
@echo "HAVE_MAKEFRAG = yes" >$@.new
@echo "$(stampfile): $(BUILT_SOURCES) \\" >>[email protected]
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>[email protected]
@cat [email protected] |sed -e '$$s, \\$$,,' >$@
@echo " touch \$$@" >>$@
@rm -rf [email protected]
ifneq ($(response),$(sourcefile))
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
$(response): $(sourcefile)
@echo Creating $@ ...
@( $(PLATFORM_CHANGE_SEPARATOR_CMD) ) <$< >$@
@cat $< |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
-include $(makefrag)
ifndef HAVE_MAKEFRAG
$(stampfile):
touch $@
endif
+69 -151
View File
@@ -9,17 +9,10 @@
# munge in the library name to keep the files from clashing.
sourcefile = $(LIBRARY).sources
PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes)
ifndef PLATFORM_excludes
ifeq (cat,$(PLATFORM_CHANGE_SEPARATOR_CMD))
response = $(sourcefile)
endif
endif
ifndef response
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
response = $(depsdir)/$(PROFILE)_$(LIBRARY).response
library_CLEAN_FILES += $(response)
else
response = $(sourcefile)
endif
ifndef LIBRARY_NAME
@@ -27,52 +20,25 @@ LIBRARY_NAME = $(LIBRARY)
endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
stampfile = $(depsdir)/$(PROFILE)_$(LIBRARY).stamp
the_lib = $(topdir)/class/lib/$(PROFILE)/$(LIBRARY_NAME)
the_pdb = $(the_lib:.dll=.pdb)
library_CLEAN_FILES += $(makefrag) $(the_lib) $(the_pdb)
the_pdb = $(patsubst %.dll,%.pdb,$(the_lib))
ifndef NO_TEST
test_nunit_lib = nunit.framework.dll nunit.core.dll nunit.util.dll
test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/%)
test_nunit_ref = $(test_nunit_dep:%=-r:%)
library_CLEAN_FILES += TestResult.xml
ifndef test_against
test_against = $(the_lib)
test_dep = $(the_lib)
endif
ifndef test_lib
test_lib = $(LIBRARY:.dll=_test.dll)
endif
test_pdb = $(test_lib:.dll=.pdb)
test_lib = $(patsubst %.dll,%_test.dll,$(LIBRARY))
test_pdb = $(patsubst %.dll,%.pdb,$(test_lib))
test_sourcefile = $(test_lib).sources
test_response = $(depsdir)/$(PROFILE)_$(test_lib).response
test_makefrag = $(depsdir)/$(PROFILE)_$(test_lib).makefrag
test_flags = /r:$(test_against) $(test_nunit_ref) $(TEST_MCS_FLAGS)
library_CLEAN_FILES += $(test_lib) $(test_pdb) $(test_response) $(test_makefrag)
ifndef btest_lib
btest_lib = $(LIBRARY:.dll=_btest.dll)
endif
btest_pdb = $(btest_lib:.dll=.pdb)
btest_sourcefile = $(btest_lib).sources
btest_response = $(depsdir)/$(btest_lib).response
btest_makefrag = $(depsdir)/$(btest_lib).makefrag
btest_flags = /r:$(test_against) $(test_nunit_ref) $(TEST_MBAS_FLAGS)
library_CLEAN_FILES += $(btest_lib) $(btest_pdb) $(btest_response) $(btest_makefrag)
ifndef HAVE_CS_TESTS
HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
endif
ifndef HAVE_VB_TESTS
HAVE_VB_TESTS := $(wildcard $(btest_sourcefile))
endif
test_stampfile = $(depsdir)/$(PROFILE)_$(test_lib).stamp
test_nunitfw = $(topdir)/class/lib/$(PROFILE)/nunit.framework.dll
test_nunitcore = $(topdir)/class/lib/$(PROFILE)/nunit.core.dll
test_nunitutil = $(topdir)/class/lib/$(PROFILE)/nunit.util.dll
test_nunit_ref = -r:$(test_nunitfw) -r:$(test_nunitcore) -r:$(test_nunitutil)
test_flags = /r:$(the_lib) $(test_nunit_ref) $(TEST_MCS_FLAGS)
endif
gacutil = $(topdir)/tools/gacutil/gacutil.exe
sn = $(topdir)/tools/security/sn.exe
PACKAGE = 1.0
@@ -82,96 +48,48 @@ endif
all-local: $(the_lib)
install-local: $(the_lib) maybe-sign-lib
ifdef LIBRARY_INSTALL_DIR
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
$(INSTALL_LIB) $(the_lib) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME)
uninstall-local:
-rm -f $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME)
else
install-local: $(gacutil)
$(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(DESTDIR)$(prefix)/lib /package $(PACKAGE)
install-local: $(the_lib) $(gacutil)
$(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(DESTDIR)$(prefix)/lib /package $(PACKAGE)
uninstall-local: $(gacutil)
$(RUNTIME) $(gacutil) /u $(LIBRARY_NAME:.dll=)
$(RUNTIME) $(gacutil) /u $$(basename $(the_lib) .dll) ; \
$(gacutil):
cd $(topdir)/tools/gacutil && $(MAKE)
endif
maybe-sign-lib:
ifndef NO_SIGN_ASSEMBLY
maybe-sign-lib: $(sn)
$(RUNTIME) $(sn) -q -R $(the_lib) $(topdir)/class/mono.snk
endif
$(sn):
cd $(topdir)/tools/security && $(MAKE) sn.exe
cd $(topdir)/tools/gacutil && $(MAKE) || exit 1 ;
clean-local:
-rm -f $(library_CLEAN_FILES) $(CLEAN_FILES)
test-local: $(the_lib)
@:
run-test-local:
@:
run-test-ondotnet-local:
@:
ifndef NO_TEST
$(test_nunit_dep): $(topdir)/build/deps/nunit.stamp
@if test -f $@; then :; else rm -f $<; $(MAKE) $<; fi
$(topdir)/build/deps/nunit.stamp:
cd ${topdir}/nunit20 && $(MAKE)
echo "stamp" >$@
-rm -f $(the_lib) $(makefrag) $(test_lib) \
$(test_makefrag) $(test_response) \
$(stampfile) $(test_stampfile) \
$(the_pdb) $(test_pdb) $(CLEAN_FILES) \
TestResult.xml
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
-rm -rf $(response)
endif
ifdef HAVE_CS_TESTS
ifndef NO_TEST
$(test_nunitfw):
(cd ${topdir}/nunit20 && make)
test-local: $(test_lib)
test-local: $(test_nunitfw) $(the_lib) $(test_lib)
run-test-local: run-test-lib
run-test-lib: test-local
$(TEST_RUNTIME) $(TEST_HARNESS) $(test_lib)
run-test-ondotnet-local: run-test-ondotnet-lib
run-test-ondotnet-lib: test-local
$(TEST_HARNESS) $(test_lib)
endif
ifdef HAVE_VB_TESTS
test-local: $(btest_lib)
run-test-local: run-btest-lib
run-btest-lib: test-local
$(TEST_RUNTIME) $(TEST_HARNESS) $(btest_lib)
run-test-ondotnet-local: run-btest-ondotnet-lib
run-btest-ondotnet-lib: test-local
$(TEST_HARNESS) $(btest_lib)
else
test-local: $(the_lib)
run-test-local:
endif
DISTFILES = $(sourcefile) $(test_sourcefile) $(EXTRA_DISTFILES)
ifdef NO_TEST
TEST_FILES =
ifdef HAVE_CS_TESTS
TEST_FILES += `sed 's,^,Test/,' $(test_sourcefile)`
endif
ifdef HAVE_VB_TESTS
TEST_FILES += `sed 's,^,Test/,' $(btest_sourcefile)`
else
TEST_FILES = `cat $(test_sourcefile) |sed -e 's,^\(.\),Test/\1,'`
endif
dist-local: dist-default
@@ -184,64 +102,64 @@ ifndef LIBRARY_COMPILE
LIBRARY_COMPILE = $(CSCOMPILE)
endif
ifndef TEST_COMPILE
TEST_COMPILE = $(CSCOMPILE)
endif
ifndef BTEST_COMPILE
BTEST_COMPILE = $(BASCOMPILE)
endif
# Fun with dependency tracking
$(the_lib): $(makefrag) $(response)
$(the_lib): $(makefrag) $(stampfile) $(response)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
# warning: embedded tab in the 'echo touch' line
$(makefrag): $(sourcefile)
@echo Creating $@ ...
@sed 's,^,$(the_lib): ,' $< >$@
@echo "HAVE_MAKEFRAG = yes" >[email protected]
@echo "$(stampfile): \\" >>[email protected]
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>[email protected]
@cat [email protected] |sed -e '$$s, \\$$,,' >$@
@echo " touch \$$@" >>$@
@rm -rf [email protected]
ifneq ($(response),$(sourcefile))
$(response): $(sourcefile) $(PLATFORM_excludes)
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
$(response): $(sourcefile)
@echo Creating $@ ...
@sort $(sourcefile) $(PLATFORM_excludes) | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
@cat $< |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
-include $(makefrag)
ifndef HAVE_MAKEFRAG
$(stampfile):
touch $@
endif
# for now, don't give any /lib flags or set MONO_PATH, since we
# give a full path to the assembly.
ifdef HAVE_CS_TESTS
$(test_lib): $(test_makefrag) $(test_dep) $(test_response) $(test_nunit_dep)
$(TEST_COMPILE) /target:library /out:$@ $(test_flags) @$(test_response)
ifndef NO_TEST
$(test_lib): $(test_makefrag) $(the_lib) $(test_response) $(test_stampfile)
$(CSCOMPILE) /target:library /out:$@ $(test_flags) @$(test_response)
$(test_response): $(test_sourcefile)
@echo Creating $@ ...
@sed 's,^,Test/,' $(test_sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
@cat $< |sed -e 's,^\(.\),Test/\1,' |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
else
@cat $< |sed -e 's,^\(.\),Test/\1,' >$@
endif
# warning: embedded tab in the 'echo touch' line
$(test_makefrag): $(test_response)
@echo Creating $@ ...
@sed 's,^,$(test_lib): ,' $< >$@
@echo "HAVE_TEST_MAKEFRAG = yes" >[email protected]
@echo "$(test_stampfile): \\" >>[email protected]
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>[email protected]
@cat [email protected] |sed -e '$$s, \\$$,,' >$@
@echo " touch \$$@" >>$@
@rm -rf [email protected]
-include $(test_makefrag)
endif
ifdef HAVE_VB_TESTS
$(btest_lib): $(btest_makefrag) $(test_dep) $(btest_response) $(test_nunit_dep)
$(BTEST_COMPILE) /target:library /out:$@ $(btest_flags) @$(btest_response)
$(btest_response): $(btest_sourcefile)
@echo Creating $@ ...
@sed 's,^,Test/,' $(btest_sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
$(btest_makefrag): $(btest_response)
@echo Creating $@ ...
@sed 's,^,$(btest_lib): ,' $< >$@
-include $(btest_makefrag)
ifndef HAVE_TEST_MAKEFRAG
$(test_stampfile):
touch $@
endif
+10 -2
View File
@@ -16,20 +16,28 @@ PLATFORM_PATH_SEPARATOR = :
# Define this if this ever will work on Linux
# PLATFORM_MAKE_CORLIB_CMP = yes
# This is for the security permission attribute problem
# on windows
PLATFORM_TWEAK_CORLIB_SOURCES = cat
# This is for changing / to \ on windows
PLATFORM_CHANGE_SEPARATOR_CMD = cat
# Don't define it so we don't needlessly copy the sources
# file. This command is handy for testing:
#
# PLATFORM_CHANGE_SEPARATOR_CMD=sed -e 's,/,/./,g'
hidden_prefix = .
hidden_suffix =
platform-check:
@set fnord $(BOOTSTRAP_MCS) ; if type $$2 >/dev/null 2>&1 ; then :; else \
@if ! type $(BOOTSTRAP_MCS) >/dev/null 2>&1 ; then \
echo "*** You need a C# compiler installed to build MCS. (make sure mcs works from the command line)" ; \
echo "*** Read INSTALL.txt for information on how to bootstrap" ; \
echo "*** a Mono installation." ; \
exit 1 ; \
fi
# I tried this but apparently Make's version strings aren't that
# ... consistent between releases. Whatever.
#
+1 -2
View File
@@ -13,11 +13,10 @@ MCS = $(BOOTSTRAP_MCS)
RESGEN = resgen.exe
PLATFORM_MAKE_CORLIB_CMP = yes
PLATFORM_TWEAK_CORLIB_SOURCES=cat - corlib.dll.win32-excludes |sort |uniq -u
PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
PLATFORM_PATH_SEPARATOR = ;
TEST_RUNTIME = mono
hidden_prefix =
hidden_suffix = .tmp
-3
View File
@@ -16,11 +16,9 @@
ifdef PLATFORM_MONO_NATIVE
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_MCS)
MBAS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_MBAS)
TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) --debug
else
MCS = $(PLATFORM_RUNTIME) $(BOOTSTRAP_MCS) /lib:$(topdir)/class/lib/$(PROFILE)
MBAS = $(PLATFORM_RUNTIME) $(BOOTSTRAP_MBAS) /lib:$(topdir)/class/lib/$(PROFILE)
endif
# nuttzing!
@@ -28,4 +26,3 @@ endif
profile-check:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1
PROFILE_MBAS_FLAGS = -d:NET_1_1 -d:ONLY_1_1
-5
View File
@@ -16,10 +16,8 @@ topdir := $(dots)
VERSION = 0.93
USE_MCS_FLAGS = $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
USE_MBAS_FLAGS = $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
CSCOMPILE = $(MCS) $(USE_MCS_FLAGS)
BASCOMPILE = $(MBAS) $(USE_MBAS_FLAGS)
CCOMPILE = $(CC) $(USE_CFLAGS)
BOOT_COMPILE = $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS)
INSTALL_DATA = $(INSTALL) -m 644
@@ -27,7 +25,6 @@ INSTALL_BIN = $(INSTALL) -m 755
INSTALL_LIB = $(INSTALL_BIN)
MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
INTERNAL_MCS = $(RUNTIME) $(topdir)/mcs/mcs.exe
INTERNAL_MBAS = $(RUNTIME) $(topdir)/mbas/mbas.exe
INTERNAL_GMCS = $(RUNTIME) $(topdir)/gmcs/gmcs.exe
INTERNAL_ILASM = $(RUNTIME) $(topdir)/ilasm/ilasm.exe
INTERNAL_RESGEN = $(RUNTIME) $(topdir)/monoresgen/monoresgen.exe
@@ -127,8 +124,6 @@ test: test-recursive test-local
run-test: run-test-recursive test-local run-test-local
run-test-ondotnet: run-test-ondotnet-recursive test-local run-test-ondotnet-local
clean: clean-recursive clean-local
uninstall: uninstall-recursive uninstall-local
-5
View File
@@ -1,8 +1,3 @@
2004-06-11 Duncan Mak <[email protected]>
* IBM.Data.DB2/IBM.Data.DB2.dll.sources:
* Makefile: Add IBM.Data.DB2.
2004-05-07 Raja R Harinath <[email protected]>
* Makefile (SUBDIRS): Build 'corlib' and first pass of 'System'
@@ -1,8 +1,3 @@
2004-06-07 Atsushi Enomoto <[email protected]>
* RncParser.jay : removed unused code. Fixed LookupNamespace() to
pass atomized name always.
2004-05-31 Atsushi Enomoto <[email protected]>
* RncParser.jay : now error output is disabled.
@@ -85,6 +85,30 @@ namespace Commons.Xml.Relaxng.Rnc
}
}
/*
private RelaxngElementBase ApplyAnnotations (string annotation, RelaxngElementBase element)
{
// Do nothing as yet for annotation.
return element;
}
*/
/*
private RelaxngPatternList ApplyAnnotationsGroup (string annotation, RelaxngPatternList elements)
{
// Do nothing as yet for annotation.
return elements;
}
*/
/*
private RelaxngNameClassList ApplyAnnotationsChoice (string annotation, RelaxngNameClassList elements)
{
// Do nothing as yet for annotation.
return elements;
}
*/
private XmlQualifiedName SplitQName (XmlNamespaceManager nsmgr, string name)
{
int colon = name.IndexOf (':');
@@ -92,8 +116,25 @@ namespace Commons.Xml.Relaxng.Rnc
return new XmlQualifiedName (name, String.Empty);
string local = name.Substring (colon + 1);
string prefix = name.Substring (0, colon);
return new XmlQualifiedName (local, nsmgr.LookupNamespace (nsmgr.NameTable.Get (prefix)));
return new XmlQualifiedName (local, nsmgr.LookupNamespace (prefix));
}
/*
private RelaxngPatternList ConcatList (RelaxngPatternList listL, RelaxngPatternList listR)
{
RelaxngPatternList ret = listL;
if (ret != null) {
foreach (RelaxngPattern p in listR)
ret.Add (p);
} else {
ret = new RelaxngPatternList ();
foreach (RelaxngPattern p in listL)
ret.Add (p);
foreach (RelaxngPattern p in listR)
ret.Add (p);
}
return ret;
}
*/
private void FillElementDefaultNS (RelaxngNameClass nc)
{
@@ -29,9 +29,5 @@ namespace Microsoft.CSharp {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
+1 -1
View File
@@ -219,7 +219,7 @@ public class CP51932 : Encoding
value -= 0x0100;
bytes [posn++] = (byte) (value / 0x5E + 0xA1);
bytes [posn++] = (byte) (value % 0x5E + 0xA1);
//Console.WriteLine ("{0:X04}", ch);
Console.WriteLine ("{0:X04}", ch);
continue;
}
else
@@ -1,23 +1,24 @@
./Assembly/AssemblyInfo.cs
./IBM.Data.DB2/DB2CLIWrapper.cs
./IBM.Data.DB2/DB2ClientUtils.cs
./IBM.Data.DB2/DB2OpenConnection.cs
./IBM.Data.DB2/DB2CLIWrapper.cs
./IBM.Data.DB2/DB2Command.cs
./IBM.Data.DB2/DB2Connection.cs
./IBM.Data.DB2/DB2ConnectionPool.cs
./IBM.Data.DB2/DB2ConnectionSettings.cs
./IBM.Data.DB2/DB2Constants.cs
./IBM.Data.DB2/DB2DataAdapter.cs
./IBM.Data.DB2/DB2DataReader.cs
./IBM.Data.DB2/DB2Environment.cs
./IBM.Data.DB2/DB2Error.cs
./IBM.Data.DB2/DB2ErrorCollection.cs
./IBM.Data.DB2/DB2Error.cs
./IBM.Data.DB2/DB2Exception.cs
./IBM.Data.DB2/DB2InfoMessageEventArgs.cs
./IBM.Data.DB2/DB2Parameter.cs
./IBM.Data.DB2/DB2OpenConnection.cs
./IBM.Data.DB2/DB2ParameterCollection.cs
./IBM.Data.DB2/DB2Parameter.cs
./IBM.Data.DB2/DB2RowUpdatedEventArgs.cs
./IBM.Data.DB2/DB2RowUpdatedEventHandler.cs
./IBM.Data.DB2/DB2RowUpdatingEventArgs.cs
./IBM.Data.DB2/DB2RowUpdatingEventHandler.cs
./IBM.Data.DB2/DB2Transaction.cs
./IBM.Data.DB2/DB2Type.cs
./IBM.Data.DB2/DB2Type.cs
+1 -6
View File
@@ -1,8 +1,3 @@
2004-06-09 Sebastien Pouliot <[email protected]>
* Makefile: Don't sign this assembly as it is fully signed during
compilation (we have the original private key). Thanks to Jackson.
2004-05-28 Duncan Mak <[email protected]>
* SharpZipLib.pub: Added public key.
* SharpZipLib.pub: Added public key.
@@ -7,6 +7,4 @@ LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Xml.dll
NO_TEST = yes
EXTRA_DISTFILES = SharpZipLib.key
NO_SIGN_ASSEMBLY = yes
include ../../build/library.make
+3 -4
View File
@@ -46,13 +46,12 @@ SUBDIRS = \
Novell.Directory.Ldap \
Mono.Security.Win32 \
System.DirectoryServices \
System.Messaging \
System.ServiceProcess \
System.Messaging \
System.ServiceProcess \
System.Drawing.Design \
Mono.Http \
Microsoft.Vsa \
Mono.Cairo \
IBM.Data.DB2
Mono.Cairo
# Microsoft.JScript \
# Starting with Microsoft.Vsa, the libraries above weren't in the
@@ -34,6 +34,5 @@ namespace Microsoft.JScript.Tmp {
{
get { return comment; }
}
}
}
@@ -1,9 +1,3 @@
2004-06-07 Jambunathan K <[email protected]>
* Makefile: Changed to account for error string resources
* Microsoft.VisualBasic.dll.resources: Newly added list of compiled
resources for VB.NET
* Microsoft.VisualBasic.dll.sources: Included newly created VBErrors.cs
2004-4-25 Dennis Hayes <[email protected]>
* Microsoft.VisualBasic.dll.sources: Added internal VBUtils.cs to buld for Mainsoft compatable.
+1 -19
View File
@@ -1,26 +1,8 @@
thisdir = class/Microsoft.VisualBasic
SUBDIRS =
include ../../build/rules.make
LIBRARY = Microsoft.VisualBasic.dll
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll @Microsoft.VisualBasic.dll.resources
LIB_MCS_FLAGS_RESOURCES = $(LIB_MCS_FLAGS)
TXT_RESOURCES = Microsoft.VisualBasic/VBUtils.resources
RESX_RESOURCES =
EXTRA_DISTSFILES = $(TXT_RESOURCES:.resources=.txt) $(RESX_RESOURCES:.resources=.resx)
CLEAN_FILES = $(TXT_RESOURCES) $(RESX_RESOURCES)
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll
include ../../build/library.make
$(the_lib): $(TXT_RESOURCES) $(RESX_RESOURCES)
$(TXT_RESOURCES): %.resources: %.txt
MONO_PATH=$(topdir)/class/lib/$(PROFILE):$$MONO_PATH $(INTERNAL_RESGEN) $<
$(RESX_RESOURCES): %.resources: %.resx
MONO_PATH=$(topdir)/class/lib/$(PROFILE):$$MONO_PATH $(INTERNAL_RESGEN) $<
@@ -1 +0,0 @@
-resource:Microsoft.VisualBasic/VBUtils.resources,Microsoft.VisualBasic.VBUtils.resources
@@ -65,4 +65,3 @@ Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/StringType.cs
Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/TODOAttribute.cs
Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/Utils.cs
Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/VBBinder.cs
Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/VBErrors.cs
@@ -1,25 +1,3 @@
2004-06-11 Gert Driesen <[email protected]>
* Information.cs: use Type.Name property instead of Type.get_Name()
accessor method. This fixes the build on Windows (csc). Reported
as mcs bug #59980.
2004-06-10 Jambunathan K <[email protected]>
* VBUtils.cs: Implemented more GetResourceString() methods
* Information.cs: Completed Information.Err
* ErrObject.cs: Almost entirely merged from Mainsoft's code
All three files need a thorough review.
2004-06-07 Jambunathan <[email protected]>
* VariantType.cs: Minor changes
* VBUtils.txt: Newly created error string resources for VB.NET
* VBUtils.resources: Newly created Compiled error string resources
for VB.NET
* VBUtils.cs: Changes wrt fetching of error string from
newly added resource bundles
* Information.cs: Almost entirely remerged from Mainsoft's code.
Only Err related changes still need to be merged.
2004-05-31 Rafael Teixeira <[email protected]>
* Financial.cs:
Correct IRR and MIRR method signatures and prevent public default constructor, all according to Class Status Page (corcompare)
@@ -10,385 +10,112 @@
//
using System;
using Microsoft.VisualBasic.CompilerServices;
namespace Microsoft.VisualBasic
{
sealed public class ErrObject {
private System.Exception pException;
private int pErl;
private int pNumber;
private string pSource;
private string pDescription;
private string pHelpFile;
private int pHelpContext;
private int pLastDllError;
private bool m_bDontMapException = false;
private bool NumberIsSet = false;
private bool ClearOnCapture = false;
private bool SourceIsSet = false;
private bool DescriptionIsSet = false;
private bool HelpFileIsSet = false;
private bool HelpContextIsSet = false;
public ErrObject()
{
Clear();
}
public void Clear ()
{
pException = null;
pErl = 0;
pNumber = 0;
pSource = "";
pDescription = "";
pHelpFile = "";
pHelpContext = 0;
m_bDontMapException = false;
NumberIsSet = false;
ClearOnCapture = false;
SourceIsSet = false;
DescriptionIsSet = false;
HelpFileIsSet = false;
HelpContextIsSet = false;
ClearOnCapture = true;
}
public void CaptureException (Exception ex)
{
if(ex == pException)
return;
if(ClearOnCapture == true)
Clear();
else
ClearOnCapture = true;
pException = ex;
}
public void CaptureException (Exception ex, int lErl)
{
CaptureException(ex);
pErl = lErl;
}
public Exception CreateException (int Number, String Description)
{
Exception ex;
Clear();
this.Number = Number;
if(Number == 0)
throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", "Number"));
ex = MapNumberToException(pNumber, Description);
this.ClearOnCapture = false;
return ex;
}
private String FilterDefaultMessage(String Msg)
{
if(pException == null)
return Msg;
string Msg1 = Utils.GetResourceString(this.Number);
if(Msg == null || Msg.Length == 0)
return Msg1;
else if(String.CompareOrdinal("Exception from HRESULT: 0x", 0, Msg, 0, System.Math.Min(Msg.Length, 26)) == 0) {
return (Msg1 != null ? Msg1 : Msg);
}
else
return Msg;
}
private Exception MapNumberToException (int Number, String Description)
{
bool Ignored = false;
return ExceptionUtils.BuildException(Number, Description, ref Ignored);
}
// This function needs to be reviewed
private int MapExceptionToNumber (Exception ex)
{
int hResult = 0;
if(ex is ArgumentException) {
hResult = unchecked((int)0x80070057);
}
else if(ex is ArithmeticException) {
if(ex is NotFiniteNumberException) {
if((ex as NotFiniteNumberException).OffendingNumber == 0)
return 11;
else
return 6;
}
else {
hResult = unchecked((int)0x80070216);
}
}
else if(ex is ArrayTypeMismatchException) {
hResult = unchecked((int)0x80131503);
}
// else if(exType.Equals(IndexOutOfRangeException)) {
// hResult = (exType.Equals(IndexOutOfRangeException)).HResult;
// }
else if(ex is InvalidCastException) {
hResult = unchecked((int)0x80004002);
}
else if(ex is NotSupportedException) {
hResult = unchecked((int)0x80131515);
}
else if(ex is NullReferenceException) {
hResult = unchecked((int)0x80004003);
}
else if(ex is UnauthorizedAccessException) {
hResult = unchecked((int)0x80131500);
}
else {
hResult = unchecked((int)0x80004005);
}
hResult = ExceptionUtils.getVBFromDotNet(hResult);
if(hResult != 0 )
return hResult;
else
return 5;
}
private void ParseHelpLink (String HelpLink)
{
int ind;
if(HelpLink == null || HelpLink.Length == 0) {
if(HelpContextIsSet == false)
this.HelpContext = 0;
if (HelpFileIsSet == false)
this.HelpFile = "";
}
else {
ind = HelpLink.IndexOf("#");
if(ind != -1) {
if(HelpContextIsSet == false) {
if(ind < HelpLink.Length)
this.HelpContext = IntegerType.FromString(HelpLink.Substring(ind + 1));
else
this.HelpContext = 0;
}
if (HelpFileIsSet == false)
this.HelpFile = HelpLink.Substring(0, ind);
}
else {
if (HelpContextIsSet == false)
this.HelpContext = 0;
if (!this.HelpFileIsSet)
this.HelpFile = HelpLink;
}
}
}
public int MapErrorNumber (int Number)
{
if(Number > 65535)
throw new ArgumentException(VBUtils.GetResourceString("Argument_InvalidValue1", "Number"));
if(Number >= 0)
return Number;
else
return ExceptionUtils.fromDotNetToVB(Number);
}
private String MakeHelpLink(String HelpFile, int HelpContext)
{
return HelpFile + "#" + StringType.FromInteger(HelpContext);
}
// Declarations
int pHelpContext;
int pLastDllError;
int pNumber;
int pErl;
string pSource;
string pHelpFile;
string pDescription;
System.Exception pException;
// Constructors
// Properties
[MonoTODO]
public void Raise (System.Int32 Number,
[System.Runtime.InteropServices.Optional]
[System.ComponentModel.DefaultValue(null)] System.Object Source,
[System.Runtime.InteropServices.Optional]
[System.ComponentModel.DefaultValue(null)] System.Object Description,
[System.Runtime.InteropServices.Optional]
[System.ComponentModel.DefaultValue(null)] System.Object HelpFile,
[System.Runtime.InteropServices.Optional]
[System.ComponentModel.DefaultValue(null)] System.Object HelpContext)
public System.Int32 HelpContext
{
Exception e;
if(Number == 0)
throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", "Number"));
this.Number = Number;
if(Source != null)
this.Source = StringType.FromObject(Source);
else
this.Source = "";
if(HelpFile != null)
this.HelpFile = StringType.FromObject(HelpFile);
if(HelpContext != null)
this.HelpContext = IntegerType.FromObject(HelpContext);
if(Description != null)
this.Description = StringType.FromObject(Description);
else if (DescriptionIsSet == false)
this.Description = Utils.GetResourceString(pNumber);
e = MapNumberToException(pNumber, pDescription);
e.Source = pSource;
e.HelpLink = MakeHelpLink(pHelpFile, pHelpContext);
ClearOnCapture = false;
throw e;
}
public void SetUnmappedError (int Number)
{
Clear();
this.Number = Number;
ClearOnCapture = false;
}
public System.Exception GetException ()
{
return pException;
}
public System.String Description {
get {
if(DescriptionIsSet)
return pDescription;
if(pException == null)
return "";
if(pException is Exception)
this.Description = FilterDefaultMessage(pException.Message);
else
this.Description = FilterDefaultMessage(pException.Message);
return pDescription;
return pHelpContext;
}
set {
pDescription = value;
DescriptionIsSet = true;
pHelpContext = value;
}
}
[MonoTODO]
public System.Int32 LastDllError {
get {
return pLastDllError;
}
}
[MonoTODO]
public System.Int32 Number {
get {
return pNumber;
}
set {
pNumber = value;
}
}
[MonoTODO]
public System.Int32 Erl {
get {
return pErl;
}
}
public System.Int32 HelpContext
{
get {
if(HelpContextIsSet)
return pHelpContext;
if(pException != null)
{
if(pException is Exception)
ParseHelpLink(pException.HelpLink);
else
ParseHelpLink("");
return this.pHelpContext;
}
return 0;
}
set {
pHelpContext = value;
HelpContextIsSet = true;
}
}
public System.String HelpFile {
get {
if (HelpFileIsSet == true)
return pHelpFile;
if(pException != null) {
if(pException is Exception)
ParseHelpLink((pException as Exception).HelpLink);
else
ParseHelpLink("");
return pHelpFile;
}
return "";
}
set {
pHelpFile = value;
HelpFileIsSet = true;
}
}
[MonoTODO]
public System.Int32 LastDllError {
get {
return 0;
}
}
public System.Int32 Number {
get {
if(NumberIsSet)
return pNumber;
if(pException == null)
return 0;
this.Number = MapExceptionToNumber(pException);
return pNumber;
}
set {
pNumber = MapErrorNumber(value);
NumberIsSet = true;
}
}
[MonoTODO]
public System.String Source {
get {
if(SourceIsSet)
return pSource;
if(pException == null)
return "";
if(pException is Exception)
this.Source = pException.Source;
else
this.Source = "";
return pSource;
}
set {
pSource = value;
SourceIsSet = true;
}
}
[MonoTODO]
public System.String HelpFile {
get {
return pHelpFile;
}
set {
pHelpFile = value;
}
}
[MonoTODO]
public System.String Description {
get {
return pDescription;
}
set {
pDescription = value;
}
}
// Methods
[MonoTODO("We should parse the exception object to obtain VB-like error code. Not a trivial task!")]
internal void SetException (Exception ex)
{
if (pException != ex)
{
pNumber = 0xFFFF;
pSource = ex.Source;
pDescription = ex.Message + "\n" + ex.StackTrace;
}
}
}
}
[MonoTODO]
public System.Exception GetException ()
{
return pException;
}
[MonoTODO]
public void Clear () {
pHelpContext=0;
pLastDllError=0;
pNumber=0;
pErl=0;
pSource="";
pHelpFile="";
pDescription="";
pException= null;
}
[MonoTODO]
public void Raise (System.Int32 Number, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Source, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Description, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpFile, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpContext)
{
throw new NotImplementedException ();
}
// Events
};
}
@@ -12,115 +12,49 @@
//
using System;
using System.Globalization;
namespace Microsoft.VisualBasic
namespace Microsoft.VisualBasic
{
using CompilerServices;
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Information {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static Microsoft.VisualBasic.ErrObject Err () {
return Microsoft.VisualBasic.CompilerServices.ProjectData.Err;
}
[MonoTODO]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Int32 Erl () { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsArray (System.Object VarName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsDate (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsDBNull (System.Object Expression) { throw new NotImplementedException (); }
private static int [] QBColorTable = { 0, 8388608, 32768, 8421376,
128, 8388736, 32896, 12632256,
8421504, 16711680, 65280, 16776960,
255, 16711935, 65535, 16777215 };
public static System.Boolean IsArray (Object VarName)
{
if(VarName == null)
return false;
else
return VarName is Array;
public static System.Boolean IsNothing (System.Object Expression) {
return (Expression == null);
}
public static System.Boolean IsError (Object Expression)
{
if(Expression == null )
return false;
else
return Expression is Exception;
}
public static System.Boolean IsReference (Object Expression)
{
return (false == Expression is ValueType);
}
public static System.Boolean IsDate (System.Object Expression)
{
if(Expression == null)
return false;
else if(Expression is DateTime)
return true;
else if(Expression is String) {
try {
DateTime.Parse((String) Expression);
}
catch (Exception e) {
return false;
}
return true;
}
else
return false;
}
public static System.Boolean IsDBNull (System.Object Expression)
{
if(Expression == null)
return false;
else
return Expression is DBNull;
}
public static System.Boolean IsNothing (System.Object Expression)
{
return (Expression == null);
}
public static System.Int32 RGB (int Red, int Green, int Blue)
{
if(Red < 0)
throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", "Red"));
if(Green < 0)
throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", "Green"));
if(Blue < 0)
throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", "Blue"));
if(Red > 255)
Red = 255;
if(Green > 255)
Green = 255;
if(Blue > 255)
Blue = 255;
return (((Red & 0xFF) << 16) | ((Green & 0xFF) << 8) | ((Blue & 0xFF) << 0));
}
[MonoTODO]
public static System.Boolean IsError (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsReference (System.Object Expression) { throw new NotImplementedException (); }
public static System.Boolean IsNumeric (System.Object Expression)
{
if (Expression == null || Expression is DateTime)
return false;
if(Expression == null || Expression is DateTime)
return false;
if(Expression is Int16 || Expression is Int32 || Expression is Int64 || Expression is Decimal ||
Expression is Single || Expression is Double)
if (Expression is Int16 || Expression is Int32 || Expression is Int64 || Expression is Decimal ||
Expression is Single || Expression is Double)
return true;
try {
if(Expression is string)
if (Expression is string)
Double.Parse(Expression as string);
else
Double.Parse(Expression.ToString());
@@ -130,320 +64,22 @@ namespace Microsoft.VisualBasic
return false;
}
public static System.Int32 QBColor (System.Int32 Color)
{
if(Color < 0 || Color > 15)
throw new ArgumentException(
Utils.GetResourceString("Argument_InvalidValue1", "Color"));
return QBColorTable[Color];
}
public static String VbTypeName(String UrtName)
{
if(UrtName == null)
return null;
String tmpName = UrtName.Trim().ToLower(CultureInfo.InvariantCulture);
if(tmpName.StartsWith("system."))
tmpName = tmpName.Substring(7);
if(tmpName.Equals("object"))
return "Object";
if(tmpName.Equals("int16"))
return "Short";
if(tmpName.Equals("clrint16"))
return "Short";
if(tmpName.Equals("int32"))
return "Integer";
if(tmpName.Equals("clrint32"))
return "Integer";
if(tmpName.Equals("int64"))
return "Long";
if(tmpName.Equals("clrint64"))
return "Long";
if(tmpName.Equals("clrsingle"))
return "Single";
if(tmpName.Equals("single"))
return "Single";
if(tmpName.Equals("double"))
return "Double";
if(tmpName.Equals("clrdouble"))
return "Double";
if(tmpName.Equals("boolean"))
return "Boolean";
if(tmpName.Equals("clrboolean"))
return "Boolean";
if(tmpName.Equals("char"))
return "Char";
if(tmpName.Equals("clrchar"))
return "char";
if(tmpName.Equals("string"))
return "String";
if(tmpName.Equals("java.lang.string"))
return "String";
if(tmpName.Equals("byte"))
return "Byte";
if(tmpName.Equals("clrbyte"))
return "Byte";
if(tmpName.Equals("decimal"))
return "Decimal";
if(tmpName.Equals("datetime"))
return "Date";
return null;
}
public static String TypeNameOfCOMObject (Object obj, Boolean flag)
{
throw new NotImplementedException("Method Microsoft.VisualBasic.Information.TypeNameOfCOMObject() is not supported");
}
public static System.Int32 UBound (System.Array Array,
[System.Runtime.InteropServices.Optional]
[System.ComponentModel.DefaultValue(1)]
System.Int32 Rank)
{
Exception e;
if(Array == null) {
e = new ArgumentNullException(Utils.GetResourceString("Argument_InvalidNullValue1", "Array"));
throw (ArgumentNullException) ExceptionUtils.VbMakeException(e, 9);
}
e = ExceptionUtils.VbMakeException((Exception) new ArgumentNullException(VBUtils.GetResourceString(9)), 9);
if(!IsArray(Array))
{
throw new ArgumentException("Not array arrived to UBound method of Information class");
}
if(Rank < 1 || Rank > Array.Rank)
throw new RankException(Utils.GetResourceString("Argument_InvalidRank1", "Rank"));
return Array.GetUpperBound(Rank);
}
public static System.Int32 LBound (System.Array Array,
[System.Runtime.InteropServices.Optional]
[System.ComponentModel.DefaultValue(1)]
System.Int32 Rank)
{
Exception e;
if(Array == null) {
e = new ArgumentNullException(Utils.GetResourceString("Argument_InvalidNullValue1", "Array"));
throw (ArgumentNullException)ExceptionUtils.VbMakeException(e, 9);
}
if(!IsArray(Array)) {
throw new ArgumentException("Not array arrived to LBound method of Information class");
}
if(Rank < 1 || Rank > Array.Rank)
throw new RankException(Utils.GetResourceString("Argument_InvalidRank1", "Rank"));
return Array.GetLowerBound(Rank);
}
public static Microsoft.VisualBasic.ErrObject Err()
{
return ProjectData.Err;
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Int32 Erl ()
{
return ProjectData.Err.Erl;
}
public static System.String TypeName (System.Object VarName)
{
String name;
Boolean isArray = false;
if(VarName == null)
return "Nothing";
Type type = VarName.GetType();
if(type.IsArray) {
isArray = true;
type = type.GetElementType();
}
if(type.IsEnum)
name = type.Name;
else {
switch(Type.GetTypeCode(type)) {
case TypeCode.DBNull:
name = "DBNull";
break;
case TypeCode.Boolean:
name = "Boolean";
break;
case TypeCode.Char:
name = "Char";
break;
case TypeCode.Byte:
name = "Byte";
break;
case TypeCode.Int16:
name = "Short";
break;
case TypeCode.Int32:
name = "Integer";
break;
case TypeCode.Int64:
name = "Long";
break;
case TypeCode.Single:
name = "Single";
break;
case TypeCode.Double:
name = "Double";
break;
case TypeCode.Decimal:
name = "Decimal";
break;
case TypeCode.DateTime:
name = "Date";
break;
case TypeCode.String:
name = "String";
break;
default :
name = type.Name;
break;
}
// the following is commented even with mainsoft
// if(type.get_IsCOMObject() && name.equals("__ComObject"))
// {
// throw new NotImplementedException("COM Objects unsupported in TypeName of Information");
// }
}
int index = name.IndexOf('+');
if(index >= 0)
name = name.Substring(index + 1);
if(isArray == true) {
int rank = (VarName as Array).Rank;
if(rank == 1)
name = name + "[]";
else {
name = name + "[";
for (int i = 0; i < rank - 1; i++)
name += ',';
name = name + "]";
}
name = Utils.VBFriendlyNameOfTypeName(name);
}
return name;
}
public static System.String SystemTypeName (System.String VbName)
{
String tmpStr = VbName.Trim().ToLower(CultureInfo.InvariantCulture);
if(tmpStr.Equals("object"))
return "System.Object";
if(tmpStr.Equals("short"))
return "System.Int16";
if(tmpStr.Equals("integer"))
return "System.Int32";
if(tmpStr.Equals("single"))
return "System.Single";
if(tmpStr.Equals("double"))
return "System.Double";
if(tmpStr.Equals("date"))
return "System.DateTime";
if(tmpStr.Equals("string"))
return "System.String";
if(tmpStr.Equals("boolean"))
return "System.Boolean";
if(tmpStr.Equals("decimal"))
return "System.Decimal";
if(tmpStr.Equals("byte"))
return "System.Byte";
if(tmpStr.Equals("char"))
return "System.Char";
if(tmpStr.Equals("long"))
return "System.Int64";
return null;
}
[MonoTODO]
public static VariantType VarType(Object VarName)
{
if(VarName == null)
return VariantType.Object;
if(VarName is Exception)
return VariantType.Error;
return varType(VarName.GetType());
}
private static VariantType varType(Type varType)
{
if(varType == null)
return VariantType.Object;
if(varType.IsArray) {
Type type = varType.GetElementType();
if(type.IsArray)
return VariantType.ObjectArray;
int elemVal = (int) Information.varType(type);
return (VariantType)((int)VariantType.Array | elemVal);
}
if(varType.IsEnum)
varType = Enum.GetUnderlyingType(varType);
if(varType == null)
return VariantType.Empty;
switch(Type.GetTypeCode(varType)) {
case TypeCode.Empty:
return VariantType.Empty;
case TypeCode.DBNull:
return VariantType.Null;
case TypeCode.Boolean:
return VariantType.Boolean;
case TypeCode.Char:
return VariantType.Char;
case TypeCode.Byte:
return VariantType.Byte;
case TypeCode.Int16:
return VariantType.Short;
case TypeCode.Int32:
return VariantType.Integer;
case TypeCode.Int64:
return VariantType.Long;
case TypeCode.Single:
return VariantType.Single;
case TypeCode.Double:
return VariantType.Double;
case TypeCode.Decimal:
return VariantType.Decimal;
case TypeCode.DateTime:
return VariantType.Date;
case TypeCode.String:
return VariantType.String;
}
if(varType.IsSubclassOf(typeof(System.Exception)))
return VariantType.Error;
if(varType.IsValueType)
return VariantType.UserDefinedType;
return VariantType.Object;
}
}
public static System.Int32 LBound (System.Array Array, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(1)] System.Int32 Rank) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 UBound (System.Array Array, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(1)] System.Int32 Rank) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String TypeName (System.Object VarName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String SystemTypeName (System.String VbName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String VbTypeName (System.String UrtName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 QBColor (System.Int32 Color) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 RGB (System.Int32 Red, System.Int32 Green, System.Int32 Blue) { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.VariantType VarType (System.Object VarName) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,12 +1,3 @@
2004-06-10 Jambunathan K <[email protected]>
* ProjectData.cs: Remerged from Mainsoft's codebase
2004-06-07 Jambunathan K <[email protected]>
* VBErrors.cs: Newly adopted from Mainsoft's codebase
* Utils.cs: Fixed formatting. Also some minor changes.
* ExceptionUtils.cs: Almost entirely remerged from Mainsoft's
codebase to account for newly added string resources
2004-05-13 Rafael Teixeira <[email protected]>
* Utils.cs:
Finally implement fully method CopyArray
@@ -23,10 +23,6 @@
* This class allows to map VB6 exception number to the .NET exception.
*/
using System;
using System.Collections;
using System.Reflection;
using System.IO;
namespace Microsoft.VisualBasic.CompilerServices {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
@@ -116,220 +112,234 @@ namespace Microsoft.VisualBasic.CompilerServices {
public const int E_INVALIDARG = -2147024809;
public const int CO_E_SERVER_EXEC_FAILURE = -2146959355;
private static Hashtable _dotNetToVBMap = new Hashtable();
private static Hashtable _vbToDotNetClassMap = new Hashtable();
static ExceptionUtils() {
// initializing the hash map that maps vb exception number to .NET exception classes
_vbToDotNetClassMap.Add(VBErrors.ReturnWOGoSub, typeof(InvalidOperationException));
_vbToDotNetClassMap.Add(VBErrors.ResumeWOErr, typeof(InvalidOperationException));
_vbToDotNetClassMap.Add(VBErrors.CantUseNull, typeof(InvalidOperationException));
_vbToDotNetClassMap.Add(VBErrors.DoesntImplementICollection, typeof(InvalidOperationException));
_vbToDotNetClassMap.Add(VBErrors.IllegalFuncCall, typeof(ArgumentException));
_vbToDotNetClassMap.Add(VBErrors.NamedArgsNotSupported, typeof(ArgumentException));
_vbToDotNetClassMap.Add(VBErrors.NamedParamNotFound, typeof(ArgumentException));
_vbToDotNetClassMap.Add(VBErrors.ParameterNotOptional, typeof(ArgumentException));
_vbToDotNetClassMap.Add(VBErrors.OLENoPropOrMethod, typeof(MissingMemberException));
_vbToDotNetClassMap.Add(VBErrors.Overflow, typeof(OverflowException));
_vbToDotNetClassMap.Add(VBErrors.OutOfMemory, typeof(OutOfMemoryException));
_vbToDotNetClassMap.Add(VBErrors.OutOfStrSpace, typeof(OutOfMemoryException));
_vbToDotNetClassMap.Add(VBErrors.OutOfBounds, typeof(IndexOutOfRangeException));
_vbToDotNetClassMap.Add(VBErrors.DivByZero, typeof(DivideByZeroException));
_vbToDotNetClassMap.Add(VBErrors.TypeMismatch, typeof(InvalidCastException));
_vbToDotNetClassMap.Add(VBErrors.OutOfStack, typeof(StackOverflowException));
_vbToDotNetClassMap.Add(VBErrors.DLLLoadErr, typeof(TypeLoadException));
_vbToDotNetClassMap.Add(VBErrors.FileNotFound, typeof(FileNotFoundException));
_vbToDotNetClassMap.Add(VBErrors.EndOfFile, typeof(EndOfStreamException));
_vbToDotNetClassMap.Add(VBErrors.BadFileNameOrNumber, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.BadFileMode, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.IOError, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.FileAlreadyExists, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.FileAlreadyOpen, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.BadRecordLen, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.DiskFull, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.BadRecordNum, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.TooManyFiles, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.DevUnavailable, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.PermissionDenied, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.DiskNotReady, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.DifferentDrive, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.PathFileAccess, typeof(IOException));
_vbToDotNetClassMap.Add(VBErrors.PathNotFound, typeof(FileNotFoundException));
_vbToDotNetClassMap.Add(VBErrors.OLEFileNotFound, typeof(FileNotFoundException));
_vbToDotNetClassMap.Add(VBErrors.ObjNotSet, typeof(NullReferenceException));
_vbToDotNetClassMap.Add(VBErrors.PropertyNotFound, typeof(MissingFieldException));
_vbToDotNetClassMap.Add(VBErrors.CantCreateObject, typeof(Exception));
_vbToDotNetClassMap.Add(VBErrors.ServerNotFound, typeof(Exception));
// initializing the hash map that maps .NET exception number to VB exception number
_dotNetToVBMap.Add(ExceptionUtils.E_NOTIMPL,VBErrors.NotYetImplemented);
_dotNetToVBMap.Add(ExceptionUtils.E_NOINTERFACE,VBErrors.OLENotSupported);
_dotNetToVBMap.Add(ExceptionUtils.E_ABORT,VBErrors.Abort);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_UNKNOWNINTERFACE,VBErrors.OLENoPropOrMethod);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_MEMBERNOTFOUND,VBErrors.OLENoPropOrMethod);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_PARAMNOTFOUND,VBErrors.NamedParamNotFound);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_TYPEMISMATCH,VBErrors.TypeMismatch);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_UNKNOWNNAME,VBErrors.OLENoPropOrMethod);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_NONAMEDARGS,VBErrors.NamedArgsNotSupported);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_BADVARTYPE,VBErrors.InvalidTypeLibVariable);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_OVERFLOW,VBErrors.Overflow);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_BADINDEX,VBErrors.OutOfBounds);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_UNKNOWNLCID,VBErrors.LocaleSettingNotSupported);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_ARRAYISLOCKED,VBErrors.ArrayLocked);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_BADPARAMCOUNT,VBErrors.FuncArityMismatch);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_NOTACOLLECTION,VBErrors.NotEnum);
_dotNetToVBMap.Add(ExceptionUtils.DISP_E_DIVBYZERO,VBErrors.DivByZero);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_BUFFERTOOSMALL,VBErrors.BufferTooSmall);
_dotNetToVBMap.Add(-2147319785,VBErrors.IdentNotMember);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_INVDATAREAD,VBErrors.InvDataRead);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_UNSUPFORMAT,VBErrors.UnsupFormat);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_REGISTRYACCESS,VBErrors.RegistryAccess);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_LIBNOTREGISTERED,VBErrors.LibNotRegistered);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_UNDEFINEDTYPE,VBErrors.UndefinedType);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_QUALIFIEDNAMEDISALLOWED,VBErrors.QualifiedNameDisallowed);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_INVALIDSTATE,VBErrors.InvalidState);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_WRONGTYPEKIND,VBErrors.WrongTypeKind);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_ELEMENTNOTFOUND,VBErrors.ElementNotFound);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_AMBIGUOUSNAME,VBErrors.AmbiguousName);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_NAMECONFLICT,VBErrors.ModNameConflict);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_UNKNOWNLCID,VBErrors.UnknownLcid);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_DLLFUNCTIONNOTFOUND,VBErrors.InvalidDllFunctionName);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_BADMODULEKIND,VBErrors.BadModuleKind);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_SIZETOOBIG,VBErrors.SizeTooBig);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_TYPEMISMATCH,VBErrors.TypeMismatch);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_OUTOFBOUNDS,VBErrors.OutOfBounds);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_IOERROR,VBErrors.TypeMismatch);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_CANTCREATETMPFILE,VBErrors.CantCreateTmpFile);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_CANTLOADLIBRARY,VBErrors.DLLLoadErr);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_INCONSISTENTPROPFUNCS,VBErrors.InconsistentPropFuncs);
_dotNetToVBMap.Add(ExceptionUtils.TYPE_E_CIRCULARTYPE,VBErrors.CircularType);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_INVALIDFUNCTION,VBErrors.BadFunctionId);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_FILENOTFOUND,VBErrors.FileNotFound);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_PATHNOTFOUND,VBErrors.PathNotFound);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_TOOMANYOPENFILES,VBErrors.TooManyFiles);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_ACCESSDENIED,VBErrors.PermissionDenied);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_INVALIDHANDLE,VBErrors.ReadFault);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_INSUFFICIENTMEMORY,VBErrors.OutOfMemory);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_NOMOREFILES,VBErrors.TooManyFiles);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_DISKISWRITEPROTECTED,VBErrors.PermissionDenied);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_SEEKERROR,VBErrors.SeekErr);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_WRITEFAULT,VBErrors.ReadFault);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_READFAULT,VBErrors.ReadFault);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_SHAREVIOLATION,VBErrors.PathFileAccess);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_LOCKVIOLATION,VBErrors.PermissionDenied);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_FILEALREADYEXISTS,VBErrors.PathFileAccess);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_MEDIUMFULL,VBErrors.DiskFull);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_INVALIDHEADER,VBErrors.InvDataRead);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_INVALIDNAME,VBErrors.FileNotFound);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_UNKNOWN,VBErrors.InvDataRead);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_UNIMPLEMENTEDFUNCTION,VBErrors.NotYetImplemented);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_INUSE,VBErrors.PermissionDenied);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_NOTCURRENT,VBErrors.PermissionDenied);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_REVERTED,VBErrors.WriteFault);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_CANTSAVE,VBErrors.IOError);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_OLDFORMAT,VBErrors.UnsupFormat);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_OLDDLL,VBErrors.UnsupFormat);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_SHAREREQUIRED,32789);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_NOTFILEBASEDSTORAGE,VBErrors.UnsupFormat);
_dotNetToVBMap.Add(ExceptionUtils.STG_E_EXTANTMARSHALLINGS,VBErrors.UnsupFormat);
_dotNetToVBMap.Add(ExceptionUtils.CLASS_E_NOTLICENSED,VBErrors.CantCreateObject);
_dotNetToVBMap.Add(ExceptionUtils.REGDB_E_CLASSNOTREG,VBErrors.CantCreateObject);
_dotNetToVBMap.Add(ExceptionUtils.MK_E_UNAVAILABLE,VBErrors.CantCreateObject);
_dotNetToVBMap.Add(ExceptionUtils.MK_E_INVALIDEXTENSION,VBErrors.OLEFileNotFound);
_dotNetToVBMap.Add(ExceptionUtils.MK_E_CANTOPENFILE,VBErrors.OLEFileNotFound);
_dotNetToVBMap.Add(ExceptionUtils.CO_E_CLASSSTRING,VBErrors.CantCreateObject);
_dotNetToVBMap.Add(ExceptionUtils.CO_E_APPNOTFOUND,VBErrors.CantCreateObject);
_dotNetToVBMap.Add(ExceptionUtils.CO_E_APPDIDNTREG,VBErrors.CantCreateObject);
_dotNetToVBMap.Add(ExceptionUtils.E_ACCESSDENIED,VBErrors.PermissionDenied);
_dotNetToVBMap.Add(ExceptionUtils.E_OUTOFMEMORY,VBErrors.OutOfMemory);
_dotNetToVBMap.Add(ExceptionUtils.E_INVALIDARG,VBErrors.IllegalFuncCall);
_dotNetToVBMap.Add(-2147023174,VBErrors.ServerNotFound);
_dotNetToVBMap.Add(ExceptionUtils.CO_E_SERVER_EXEC_FAILURE,VBErrors.CantCreateObject);
// new .NET values
_dotNetToVBMap.Add(-2146233080,VBErrors.OutOfBounds);//IndexOutOfRangeException
_dotNetToVBMap.Add(-2146233065,VBErrors.OutOfBounds);//RankException
_dotNetToVBMap.Add(-2147467261,VBErrors.ObjNotSet);//NullPointerException
_dotNetToVBMap.Add(-2146233066,VBErrors.Overflow);//OverflowException
_dotNetToVBMap.Add(-2146233048,VBErrors.Overflow);//NotFiniteNumberException
_dotNetToVBMap.Add(-2146233067,VBErrors.TypeMismatch);//NotSupportedException
_dotNetToVBMap.Add(-2146233070,VBErrors.OLENoPropOrMethod);//MissingMemberException
_dotNetToVBMap.Add(-2146233053,VBErrors.InvalidDllFunctionName);//EntryPointNotFoundException
_dotNetToVBMap.Add(-2146233054,VBErrors.CantCreateObject);//TypeLoadException
_dotNetToVBMap.Add(-2146233033,VBErrors.TypeMismatch);//FormatException
_dotNetToVBMap.Add(-2147024893,VBErrors.PathNotFound);//DirectoryNotFoundException
_dotNetToVBMap.Add(-2146232800,VBErrors.IOError);//IOException
_dotNetToVBMap.Add(-2147024894,VBErrors.FileNotFound);//FileNotFoundException
//TODO: uncomment and convert
// private static HashMap _dotNetToVBMap = new HashMap();
//
// private static HashMap _vbToDotNetClassMap = new HashMap();
//
// static
// {
// //initializing the hash map that maps vb exception number to .NET exception
// //classes
// _vbToDotNetClassMap.put(new Integer(vbErrors.ReturnWOGoSub),InvalidOperationException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.ResumeWOErr),InvalidOperationException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.CantUseNull),InvalidOperationException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.DoesntImplementICollection),InvalidOperationException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.IllegalFuncCall),ArgumentException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.NamedArgsNotSupported),ArgumentException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.NamedParamNotFound),ArgumentException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.ParameterNotOptional),ArgumentException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.OLENoPropOrMethod),MissingMemberException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.Overflow),OverflowException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.OutOfMemory),OutOfMemoryException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.OutOfStrSpace),OutOfMemoryException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.OutOfBounds),IndexOutOfRangeException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.DivByZero),DivideByZeroException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.TypeMismatch),InvalidCastException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.OutOfStack),StackOverflowException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.DLLLoadErr),TypeLoadException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.FileNotFound),FileNotFoundException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.EndOfFile),EndOfStreamException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.BadFileNameOrNumber),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.BadFileMode),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.IOError),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.FileAlreadyExists),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.FileAlreadyOpen),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.BadRecordLen),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.DiskFull),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.BadRecordNum),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.TooManyFiles),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.DevUnavailable),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.PermissionDenied),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.DiskNotReady),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.DifferentDrive),IOException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.PathFileAccess),IOException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.PathNotFound),FileNotFoundException.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.OLEFileNotFound),FileNotFoundException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.ObjNotSet),NullReferenceException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.PropertyNotFound),MissingFieldException.class);
//
// _vbToDotNetClassMap.put(new Integer(vbErrors.CantCreateObject),system.Exception.class);
// _vbToDotNetClassMap.put(new Integer(vbErrors.ServerNotFound),system.Exception.class);
//
// //initializing the hash map that maps .NET exception number to VB exception
// //number
// _dotNetToVBMap.put(new Integer(ExceptionUtils.E_NOTIMPL),new Integer(vbErrors.NotYetImplemented));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.E_NOINTERFACE),new Integer(vbErrors.OLENotSupported));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.E_ABORT),new Integer(vbErrors.Abort));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_UNKNOWNINTERFACE),new Integer(vbErrors.OLENoPropOrMethod));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_MEMBERNOTFOUND),new Integer(vbErrors.OLENoPropOrMethod));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_PARAMNOTFOUND),new Integer(vbErrors.NamedParamNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_TYPEMISMATCH),new Integer(vbErrors.TypeMismatch));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_UNKNOWNNAME),new Integer(vbErrors.OLENoPropOrMethod));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_NONAMEDARGS),new Integer(vbErrors.NamedArgsNotSupported));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_BADVARTYPE),new Integer(vbErrors.InvalidTypeLibVariable));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_OVERFLOW),new Integer(vbErrors.Overflow));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_BADINDEX),new Integer(vbErrors.OutOfBounds));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_UNKNOWNLCID),new Integer(vbErrors.LocaleSettingNotSupported));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_ARRAYISLOCKED),new Integer(vbErrors.ArrayLocked));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_BADPARAMCOUNT),new Integer(vbErrors.FuncArityMismatch));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_NOTACOLLECTION),new Integer(vbErrors.NotEnum));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.DISP_E_DIVBYZERO),new Integer(vbErrors.DivByZero));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_BUFFERTOOSMALL),new Integer(vbErrors.BufferTooSmall));
// _dotNetToVBMap.put(new Integer(-2147319785),new Integer(vbErrors.IdentNotMember));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_INVDATAREAD),new Integer(vbErrors.InvDataRead));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_UNSUPFORMAT),new Integer(vbErrors.UnsupFormat));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_REGISTRYACCESS),new Integer(vbErrors.RegistryAccess));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_LIBNOTREGISTERED),new Integer(vbErrors.LibNotRegistered));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_UNDEFINEDTYPE),new Integer(vbErrors.UndefinedType));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_QUALIFIEDNAMEDISALLOWED),new Integer(vbErrors.QualifiedNameDisallowed));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_INVALIDSTATE),new Integer(vbErrors.InvalidState));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_WRONGTYPEKIND),new Integer(vbErrors.WrongTypeKind));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_ELEMENTNOTFOUND),new Integer(vbErrors.ElementNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_AMBIGUOUSNAME),new Integer(vbErrors.AmbiguousName));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_NAMECONFLICT),new Integer(vbErrors.ModNameConflict));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_UNKNOWNLCID),new Integer(vbErrors.UnknownLcid));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_DLLFUNCTIONNOTFOUND),new Integer(vbErrors.InvalidDllFunctionName));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_BADMODULEKIND),new Integer(vbErrors.BadModuleKind));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_SIZETOOBIG),new Integer(vbErrors.SizeTooBig));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_TYPEMISMATCH),new Integer(vbErrors.TypeMismatch));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_OUTOFBOUNDS),new Integer(vbErrors.OutOfBounds));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_IOERROR),new Integer(vbErrors.TypeMismatch));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_CANTCREATETMPFILE),new Integer(vbErrors.CantCreateTmpFile));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_CANTLOADLIBRARY),new Integer(vbErrors.DLLLoadErr));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_INCONSISTENTPROPFUNCS),new Integer(vbErrors.InconsistentPropFuncs));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.TYPE_E_CIRCULARTYPE),new Integer(vbErrors.CircularType));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_INVALIDFUNCTION),new Integer(vbErrors.BadFunctionId));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_FILENOTFOUND),new Integer(vbErrors.FileNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_PATHNOTFOUND),new Integer(vbErrors.PathNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_TOOMANYOPENFILES),new Integer(vbErrors.TooManyFiles));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_ACCESSDENIED),new Integer(vbErrors.PermissionDenied));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_INVALIDHANDLE),new Integer(vbErrors.ReadFault));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_INSUFFICIENTMEMORY),new Integer(vbErrors.OutOfMemory));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_NOMOREFILES),new Integer(vbErrors.TooManyFiles));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_DISKISWRITEPROTECTED),new Integer(vbErrors.PermissionDenied));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_SEEKERROR),new Integer(vbErrors.SeekErr));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_WRITEFAULT),new Integer(vbErrors.ReadFault));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_READFAULT),new Integer(vbErrors.ReadFault));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_SHAREVIOLATION),new Integer(vbErrors.PathFileAccess));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_LOCKVIOLATION),new Integer(vbErrors.PermissionDenied));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_FILEALREADYEXISTS),new Integer(vbErrors.PathFileAccess));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_MEDIUMFULL),new Integer(vbErrors.DiskFull));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_INVALIDHEADER),new Integer(vbErrors.InvDataRead));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_INVALIDNAME),new Integer(vbErrors.FileNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_UNKNOWN),new Integer(vbErrors.InvDataRead));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_UNIMPLEMENTEDFUNCTION),new Integer(vbErrors.NotYetImplemented));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_INUSE),new Integer(vbErrors.PermissionDenied));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_NOTCURRENT),new Integer(vbErrors.PermissionDenied));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_REVERTED),new Integer(vbErrors.WriteFault));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_CANTSAVE),new Integer(vbErrors.IOError));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_OLDFORMAT),new Integer(vbErrors.UnsupFormat));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_OLDDLL),new Integer(vbErrors.UnsupFormat));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_SHAREREQUIRED),new Integer(32789));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_NOTFILEBASEDSTORAGE),new Integer(vbErrors.UnsupFormat));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.STG_E_EXTANTMARSHALLINGS),new Integer(vbErrors.UnsupFormat));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.CLASS_E_NOTLICENSED),new Integer(vbErrors.CantCreateObject));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.REGDB_E_CLASSNOTREG),new Integer(vbErrors.CantCreateObject));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.MK_E_UNAVAILABLE),new Integer(vbErrors.CantCreateObject));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.MK_E_INVALIDEXTENSION),new Integer(vbErrors.OLEFileNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.MK_E_CANTOPENFILE),new Integer(vbErrors.OLEFileNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.CO_E_CLASSSTRING),new Integer(vbErrors.CantCreateObject));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.CO_E_APPNOTFOUND),new Integer(vbErrors.CantCreateObject));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.CO_E_APPDIDNTREG),new Integer(vbErrors.CantCreateObject));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.E_ACCESSDENIED),new Integer(vbErrors.PermissionDenied));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.E_OUTOFMEMORY),new Integer(vbErrors.OutOfMemory));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.E_INVALIDARG),new Integer(vbErrors.IllegalFuncCall));
// _dotNetToVBMap.put(new Integer(-2147023174),new Integer(vbErrors.ServerNotFound));
// _dotNetToVBMap.put(new Integer(ExceptionUtils.CO_E_SERVER_EXEC_FAILURE),new Integer(vbErrors.CantCreateObject));
//
// //new .NET values
// _dotNetToVBMap.put(new Integer(-2146233080),new Integer(vbErrors.OutOfBounds));//IndexOutOfRangeException
// _dotNetToVBMap.put(new Integer(-2146233065),new Integer(vbErrors.OutOfBounds));//RankException
// _dotNetToVBMap.put(new Integer(-2147467261),new Integer(vbErrors.ObjNotSet));//NullPointerException
// _dotNetToVBMap.put(new Integer(-2146233066),new Integer(vbErrors.Overflow));//OverflowException
// _dotNetToVBMap.put(new Integer(-2146233048),new Integer(vbErrors.Overflow));//NotFiniteNumberException
// _dotNetToVBMap.put(new Integer(-2146233067),new Integer(vbErrors.TypeMismatch));//NotSupportedException
// _dotNetToVBMap.put(new Integer(-2146233070),new Integer(vbErrors.OLENoPropOrMethod));//MissingMemberException
// _dotNetToVBMap.put(new Integer(-2146233053),new Integer(vbErrors.InvalidDllFunctionName));//EntryPointNotFoundException
// _dotNetToVBMap.put(new Integer(-2146233054),new Integer(vbErrors.CantCreateObject));//TypeLoadException
// _dotNetToVBMap.put(new Integer(-2146233033),new Integer(vbErrors.TypeMismatch));//FormatException
// _dotNetToVBMap.put(new Integer(-2147024893),new Integer(vbErrors.PathNotFound));//DirectoryNotFoundException
// _dotNetToVBMap.put(new Integer(-2146232800),new Integer(vbErrors.IOError));//IOException
// _dotNetToVBMap.put(new Integer(-2147024894),new Integer(vbErrors.FileNotFound));//FileNotFoundException
// }
public static int getVBFromDotNet(int number) {
return (int)-2147467263;
//return (int)_dotNetToVBMap.get(number);//uncomment and convert
}
public static int getVBFromDotNet(int number)
{
return (int) _dotNetToVBMap[number];
}
public static int fromDotNetToVB(int number) {
if (number > 0)
return 0;
if ((number & 536805376) == 655360)
return number & 65535;
//TODO: uncomment and convert
//Integer vbNum = (Integer)_dotNetToVBMap.get(new Integer(number)); //Mainsoft code
// if (vbNum != null)
// return vbNum.intValue();
// else
return number;
if(_dotNetToVBMap.Contains (number))
return (int) _dotNetToVBMap[number];
else
return number;
}
public static Exception BuildException(int number, string description, ref bool VBDefinedError)
{
//TODO:convert
/**
* This method returns relevant .NET exception according to given number,
* with given description as message.
* @param number
* @param description
* @param VBDefinedError
* @return java.lang.Exception
*/
//TODO: is it correct to replace Mainsoft's ClrBoolean with bool?
//public static Exception BuildException(int number, String description, ClrBoolean VBDefinedError) {
public static Exception BuildException(int number, string description, bool VBDefinedError) {
if (number != 0) {
VBDefinedError = true;
Type exceptionType = (Type) _vbToDotNetClassMap[number];
if (exceptionType != null)
{
try
{
ConstructorInfo ci = exceptionType.GetConstructor(new Type [] {typeof(string)});
return (Exception)ci.Invoke(new object[]{description});
}
catch (Exception e)
{
//Here should be Tracing !!!
// Console.WriteLine("Failed to initiate exception in ExceptionUtils.BuildException with number =" + number);
// e.printStackTrace();
}
}
VBDefinedError = false;
//TODO:convert
//VBDefinedError.setValue(ClrBoolean.True);
//Class exceptionClass = (Class)_vbToDotNetClassMap.get(new Integer(number));
//if (exceptionClass != null)
//{
// try
// {
// Constructor ctor = exceptionClass.getConstructor(new Class[] {string.class});
// return (Exception)ctor.newInstance(new object[]{description});
// }
// catch (Exception e)
// {
// //Here should be Tracing !!!
// System.out.println("Failed to initiate exception in ExceptionUtils.BuildException with number =" + number);
// e.printStackTrace();
// }
//}
//VBDefinedError.setValue(ClrBoolean.False);
return new Exception(description);
}
return null;
}
/**
* This method builds description string from resource file, replace given parameter
* in the description string and throws .NET exception according to the given number
@@ -354,21 +364,21 @@ namespace Microsoft.VisualBasic.CompilerServices {
* @param hr
* @return java.lang.Exception
*/
public static Exception VbMakeException(int hr)
{
public static Exception VbMakeException(int hr) {
string str = "";
if (hr > 0 && hr <= 65535) {
str = VBUtils.GetResourceString(hr);
if (str == null)
str = VBUtils.GetResourceString(95);
}
//TODO:convert
//if (hr > 0 && hr <= 65535) {
// str = VBUtils.GetResourceString(hr);
// if (str == null)
// str = VBUtils.GetResourceString(95);
//}
str = "VB error #95 ";
return VbMakeExceptionEx(hr, str);
}
public static Exception VbMakeException(Exception ex, int hr)
{
public static Exception VbMakeException(Exception ex, int hr) {
//TODO: convert
//Information.Err().SetUnmappedError(hr);
return ex;
@@ -380,14 +390,13 @@ namespace Microsoft.VisualBasic.CompilerServices {
* @param sMsg
* @return java.lang.Exception
*/
//TODO: convert
public static Exception VbMakeExceptionEx(int number, string msg) {
//ClrBoolean bool = new ClrBoolean();
bool Bool = false; //new ClrBoolean();
Exception exp;
exp = ExceptionUtils.BuildException(number, msg, ref Bool);
exp = ExceptionUtils.BuildException(number, msg, Bool);
//TODO: convert
// if (bool.getValue() == ClrBoolean.True)
// Information.Err().SetUnmappedError(number);
@@ -16,47 +16,65 @@ using System.Runtime.InteropServices;
namespace Microsoft.VisualBasic.CompilerServices
{
/// <summary>
/// FIXME: Summary description for ProjectData.
/// </summary>
[MonoTODO]
[EditorBrowsable(EditorBrowsableState.Never)]
[StructLayout(LayoutKind.Auto)]
public class ProjectData {
internal static int erl;
internal static Microsoft.VisualBasic.ErrObject pErr = new ErrObject();
public class ProjectData{
internal static System.Exception projectError;
public static void ClearProjectError ()
{
pErr.Clear();
}
internal static int erl;
internal static Microsoft.VisualBasic.ErrObject pErr;
internal static Microsoft.VisualBasic.ErrObject Err
{
get {
get
{
if (pErr==null)
pErr=new ErrObject();
return pErr;
}
set
{
pErr = value;
}
}
public static Exception CreateProjectError(int hr)
/// <summary>
/// FIXME: Summary description for ClearProjectError
/// </summary>
public static void ClearProjectError()
{
pErr.Clear();
return pErr.CreateException(hr, VBUtils.GetResourceString(pErr.MapErrorNumber(hr)));
projectError = null;
erl = 0;
}
public static void SetProjectError(Exception ex)
/// <summary>
/// FIXME: Summary description for SetProjectError
/// </summary>
/// <param name="ex">FIXME: Required. Summary description for ex</param>
[MonoTODO]
public static void SetProjectError(System.Exception ex)
{
pErr.CaptureException(ex);
SetProjectError(ex, 0);
}
public static void SetProjectError(Exception ex, int lErl)
/// <summary>
/// FIXME: Summary description for SetProjectError
/// </summary>
/// <param name="ex">FIXME: Required. Summary description for ex</param>
/// <param name="lErl">FIXME: Required. Summary description for lErl</param>
[MonoTODO]
public static void SetProjectError(System.Exception ex, int lErl)
{
pErr.CaptureException(ex, lErl);
projectError = ex;
erl = lErl;
Err.SetException (ex);
}
/*
[MonoTODO]
@@ -44,134 +44,167 @@ using System;
using System.Globalization;
using System.Text;
using System.Reflection;
using System.Resources;
namespace Microsoft.VisualBasic.CompilerServices {
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Microsoft.VisualBasic.CompilerServices.StandardModule]
public class Utils {
public const int SEVERITY_ERROR = Int32.MinValue;
public const int FACILITY_CONTROL = 655360;
public const int FACILITY_RPC = 65536;
public const int FACILITY_ITF = 262144;
public const int SCODE_FACILITY = 536805376;
public const char chPeriod = '.';
public const char chSpace = ' ';
public const char chIntlSpace = '\u3000';
public const char chZero = '0';
public const char chHyphen = '-';
public const char chPlus = '+';
public const char chNull = '\0';
public const char chLetterA = 'A';
public const char chLetterZ = 'Z';
public const char chColon = ':';
public const char chSlash = '/';
public const char chBackslash = '\\';
public const char chTab = '\t';
public const char chCharH0A = '\n';
public const char chCharH0B = '\t';
public const char chCharH0C = '\f';
public const char chCharH0D = '\r';
public const char chLineFeed = '\n';
public const char chDblQuote = '\"';
//TODO: why is this static, should it be const?
public static char[] m_achIntlSpace = new char[] { ' ', '\u3000' };
public const int SEVERITY_ERROR = Int32.MinValue;
public const int FACILITY_CONTROL = 655360;
public const int FACILITY_RPC = 65536;
public const int FACILITY_ITF = 262144;
public const int SCODE_FACILITY = 536805376;
public const char chPeriod = '.';
public const char chSpace = ' ';
public const char chIntlSpace = '\u3000';
public const char chZero = '0';
public const char chHyphen = '-';
public const char chPlus = '+';
public const char chNull = '\0';
public const char chLetterA = 'A';
public const char chLetterZ = 'Z';
public const char chColon = ':';
public const char chSlash = '/';
public const char chBackslash = '\\';
public const char chTab = '\t';
public const char chCharH0A = '\n';
public const char chCharH0B = '\t';
public const char chCharH0C = '\f';
public const char chCharH0D = '\r';
public const char chLineFeed = '\n';
public const char chDblQuote = '\"';
//TODO: why is this static, should it be const?
public static char[] m_achIntlSpace = new char[] { ' ', '\u3000' };
private const String FILE_NAME = "Microsoft.VisualBasic.VBUtils";
private static ResourceManager RESOURCE_BUNDLE = new ResourceManager(FILE_NAME, Assembly.GetExecutingAssembly()) ;
// public static ResourceManager get_VBAResourceManager() throws NotImplementedException
// {
// throw new NotImplementedException("The method get_VBAResourceManager in class VisualBasic.CompilerServices.Utils is not supported");
// }
public static string GetResourceString(string key)
{
string str = null;
try {
str = RESOURCE_BUNDLE.GetString(key);
}
catch (Exception e) {
str = RESOURCE_BUNDLE.GetString("ID95");
}
return str;
}
public static string GetResourceString(string key, bool notUsed)
{
return GetResourceString(key);
}
public static string GetResourceString (string key,string paramValue)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", paramValue);
return sb.ToString();
}
public static string GetResourceString (string key, string paramValue1, string paramValue2)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", paramValue1);
sb.Replace("|2", paramValue2);
return sb.ToString();
}
public static string GetResourceString (string key, string param1, string param2, string param3)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", param1);
sb.Replace("|2", param2);
sb.Replace("|3", param3);
return sb.ToString();
}
private const string FILE_NAME = "resources.MicrosoftVisualBasic";
//TODO:
//private const ResourceBundle RESOURCE_BUNDLE =
// ResourceBundle.getBundle(FILE_NAME);
public static string GetResourceString (string key, string param1, string param2, string param3,
string param4)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", param1);
sb.Replace("|2", param2);
sb.Replace("|3", param3);
sb.Replace("|4", param4);
return sb.ToString();
}
public static string GetResourceString (int ResourceId)
{
string str = "ID" + ResourceId.ToString();
return GetResourceString(str);
}
// public static ResourceManager get_VBAResourceManager() throws NotImplementedException
// {
// throw new NotImplementedException("The method get_VBAResourceManager in class VisualBasic.CompilerServices.Utils is not supported");
// }
//Mono code
// [MonoTODO ("Used by the Mainsoft people")]
// internal static string GetResourceString (string s)
// {
// return string.Empty;
// }
public static void ThrowException (int hr)
{
throw ExceptionUtils.VbMakeException(hr);
}
[MonoTODO]
public static string GetResourceString(string key) {
string str = null;
//TODO:
str = key;//TODO: Get the resource!
//try {
// //str = RESOURCE_BUNDLE.getString(key);
//}
//catch (MissingResourceException e) {
// //TODO:
// //try {
// // str = RESOURCE_BUNDLE.getString("ID95");
// //}
// //catch (MissingResourceException ex) {
// //}
//}
//if (str == null)
//
//str = RESOURCE_BUNDLE.getString("ID95");
public static bool IsNumericType (Type tc)
{
TypeCode typeCode = Type.GetTypeCode(tc);
return IsNumericTypeCode((int)typeCode);
}
return str;
}
[MonoTODO]
public static string GetResourceString(string key, bool notUsed) {
string str = null;
str = key;//TODO: Get the resource!
//try {
// str = RESOURCE_BUNDLE.getString(key);
//}
//catch (MissingResourceException e) {
//}
return str;
}
public static string GetResourceString(string key, string paramValue) {
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", paramValue);
return sb.ToString();
}
public static string GetResourceString(
string key,
string paramValue1,
string paramValue2) {
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", paramValue1);
sb.Replace("|2", paramValue2);
return sb.ToString();
}
public static string GetResourceString(
string key,
string param1,
string param2,
string param3) {
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", param1);
sb.Replace("|2", param2);
sb.Replace("|3", param3);
return sb.ToString();
}
public static string GetResourceString(
string key,
string param1,
string param2,
string param3,
string param4) {
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", param1);
sb.Replace("|2", param2);
sb.Replace("|3", param3);
sb.Replace("|4", param4);
return sb.ToString();
}
public static string GetResourceString(int ResourceId) {
string str = "ID" + StringType.FromInteger(ResourceId);
return GetResourceString(str);
}
public static void ThrowException(int hr) {
throw ExceptionUtils.VbMakeException(hr);
}
/**
* Method that returns true if given type is numeric type; otherwise false
* @param tc Type to check numerity
* @return true if given type is numeric; otherwise false
*/
public static bool IsNumericType(Type tc) {
TypeCode typeCode = Type.GetTypeCode(tc);
return IsNumericTypeCode((int)typeCode);
}
public static bool IsNumericTypeCode (int i)
{
switch (i) {
case (int)TypeCode.Boolean:
case (int)TypeCode.Byte:
case (int)TypeCode.Int16:
case (int)TypeCode.Int32:
case (int)TypeCode.Int64:
case (int)TypeCode.Double:
case (int)TypeCode.Single:
case (int)TypeCode.Decimal:
return true;
default:
return false;
}
}
public static bool IsNumericTypeCode(int i) {
switch (i) {
case (int)TypeCode.Boolean:
case (int)TypeCode.Byte:
case (int)TypeCode.Int16:
case (int)TypeCode.Int32:
case (int)TypeCode.Int64:
case (int)TypeCode.Double:
case (int)TypeCode.Single:
case (int)TypeCode.Decimal:
return true;
default:
return false;
}
}
/**
* This method change the given string which contains the suffix of array
@@ -180,98 +213,113 @@ namespace Microsoft.VisualBasic.CompilerServices {
* @param sRank the given suffix
* @return string the suffix after the change
*/
private static string changeArraySuffix(string sRank)
{
StringBuilder sb = new StringBuilder(sRank);
char currentChar;
for (int i = sRank.Length-1; i >= 0; i--) {
currentChar = sb[i];
if (currentChar == '(') {
sb.Remove(i,1);
sb.Append(')');
}
else if (currentChar == ')') {
sb.Remove(i,1);
sb.Append('(');
}
else if (currentChar == ',') {
sb.Remove(i,1);
sb.Append(',');
}
}
return sb.ToString();
}
public static string VBFriendlyName (object obj)
{
if (obj == null)
return "Nothing";
Type type = obj.GetType();
return VBFriendlyName(type,obj);
}
public static string VBFriendlyName (Type type)
{
return VBFriendlyNameOfTypeName(type.Name);
}
public static string VBFriendlyName (Type type, object obj)
{
private static string changeArraySuffix(string sRank) {
//StringBuffer sb = new StringBuffer(sRank);
StringBuilder sb = new StringBuilder();
//if (StringStaticWrapper.CompareOrdinal(type.FullName, "System.__ComObject") //java code
if (string.CompareOrdinal(type.FullName, "System.__ComObject") == 0) {
//this shape of if was writen since get_IsCOMObject is not implemented
//yet. in this flow only when the type name is "System.__ComObject" the
//not implementedException is thrown.
//TODO:
//if (type.IsCOMObject)
// Information.TypeNameOfCOMObject(obj, false);
}
return VBFriendlyNameOfTypeName(type.Name);
}
char currentChar;
for (int i = sRank.Length-1; i >= 0; i--) {
currentChar = sb[i];
if (currentChar == '(') {
sb.Remove(i,1);
sb.Append(')');
}
else if (currentChar == ')') {
sb.Remove(i,1);
sb.Append('(');
}
else if (currentChar == ',') {
sb.Remove(i,1);
sb.Append(',');
}
}
return sb.ToString();
}
/**
/**
* This method returns the type name of this object in vb format
* @param obj the given object
* @return string the object's vb type name
* @limit COM Objects is not supported
*/
public static string VBFriendlyName(object obj) {
if (obj == null)
return "Nothing";
Type type = obj.GetType();
return VBFriendlyName(type,obj);
}
/**
* Return the vb name of this type
* @param type the given type
* @return string the vb name of this type
*/
public static string VBFriendlyName(Type type) {
return VBFriendlyNameOfTypeName(type.Name);
}
/**
* Return the vb name of this type.
* @param type the type of the given object
* @param obj the given object
* @return string the vb name of this object
* @limit COM Objects is not supported
*/
public static string VBFriendlyName(Type type, object obj) {
//if (StringStaticWrapper.CompareOrdinal(type.FullName, "System.__ComObject") //java code
if (string.CompareOrdinal(type.FullName, "System.__ComObject") == 0) {
//this shape of if was writen since get_IsCOMObject is not implemented
//yet. in this flow only when the type name is "System.__ComObject" the
//not implementedException is thrown.
//TODO:
//if (type.IsCOMObject)
// Information.TypeNameOfCOMObject(obj, false);
}
return VBFriendlyNameOfTypeName(type.Name);
}
/**
* This method return a Vb representation of the given type name.
* If this is an array it is changed to vb presentation with () instead of
* [].
* @param typename the given type name.
* @return string the vb presentation of the type name
*/
public static string VBFriendlyNameOfTypeName (string typename)
{
string tmpStr = null;
int bracketIndex = 0;
int length = typename.Length - 1;
//if this is array type
if (typename[length] == ']') {
bracketIndex = typename.IndexOf("[");
if (bracketIndex + 1 == length)
tmpStr = "()";
//when there is more than one dimention
else
tmpStr =
typename
.Substring(bracketIndex, length - bracketIndex + 1)
.Replace('[', '(')
.Replace(']', ')');
public static string VBFriendlyNameOfTypeName(string typename) {
string tmpStr = null;
int bracketIndex = 0;
int length = typename.Length - 1;
//if this is array type
if (typename[length] == ']') {
bracketIndex = typename.IndexOf("[");
if (bracketIndex + 1 == length)
tmpStr = "()";
//when there is more than one dimention
else
tmpStr =
typename
.Substring(bracketIndex, length - bracketIndex + 1)
.Replace('[', '(')
.Replace(']', ')');
typename = typename.Substring(0, bracketIndex);
}
typename = typename.Substring(0, bracketIndex);
}
tmpStr = (tmpStr==null) ? "" :changeArraySuffix(tmpStr);
tmpStr = (tmpStr==null) ? "" :changeArraySuffix(tmpStr);
//this method returns the C# equivalent name if this type name is vb unique
//it returns null if the type name is like in C#
string str = Information.VbTypeName(typename);
if (str == null)
str = typename;
return str + tmpStr;
}
//this method returns the C# equivalent name if this type name is vb unique
//it returns null if the type name is like in C#
string str = Information.VbTypeName(typename);
if (str == null)
str = typename;
return str + tmpStr;
}
/**
* This method change the presentation of a number.
@@ -1,174 +0,0 @@
/*
* Copyright (c) 2002-2003 Mainsoft Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
public class VBErrors
{
public const int None = 0;
public const int ReturnWOGoSub = 3;
public const int IllegalFuncCall = 5;
public const int Overflow = 6;
public const int OutOfMemory = 7;
public const int OutOfBounds = 9;
public const int ArrayLocked = 10;
public const int DivByZero = 11;
public const int TypeMismatch = 13;
public const int OutOfStrSpace = 14;
public const int ExprTooComplex = 16;
public const int CantContinue = 17;
public const int UserInterrupt = 18;
public const int ResumeWOErr = 20;
public const int OutOfStack = 28;
public const int UNDONE = 29;
public const int UndefinedProc = 35;
public const int TooManyClients = 47;
public const int DLLLoadErr = 48;
public const int DLLBadCallingConv = 49;
public const int InternalError = 51;
public const int BadFileNameOrNumber = 52;
public const int FileNotFound = 53;
public const int BadFileMode = 54;
public const int FileAlreadyOpen = 55;
public const int IOError = 57;
public const int FileAlreadyExists = 58;
public const int BadRecordLen = 59;
public const int DiskFull = 61;
public const int EndOfFile = 62;
public const int BadRecordNum = 63;
public const int TooManyFiles = 67;
public const int DevUnavailable = 68;
public const int PermissionDenied = 70;
public const int DiskNotReady = 71;
public const int DifferentDrive = 74;
public const int PathFileAccess = 75;
public const int PathNotFound = 76;
public const int ObjNotSet = 91;
public const int IllegalFor = 92;
public const int BadPatStr = 93;
public const int CantUseNull = 94;
public const int UserDefined = 95;
public const int AdviseLimit = 96;
public const int BadCallToFriendFunction = 97;
public const int CantPassPrivateObject = 98;
public const int DLLCallException = 99;
public const int DoesntImplementICollection = 100;
public const int Abort = 287;
public const int InvalidFileFormat = 321;
public const int CantCreateTmpFile = 322;
public const int InvalidResourceFormat = 325;
public const int InvalidPropertyValue = 380;
public const int InvalidPropertyArrayIndex = 381;
public const int SetNotSupportedAtRuntime = 382;
public const int SetNotSupported = 383;
public const int NeedPropertyArrayIndex = 385;
public const int SetNotPermitted = 387;
public const int GetNotSupportedAtRuntime = 393;
public const int GetNotSupported = 394;
public const int PropertyNotFound = 422;
public const int NoSuchControlOrProperty = 423;
public const int NotObject = 424;
public const int CantCreateObject = 429;
public const int OLENotSupported = 430;
public const int OLEFileNotFound = 432;
public const int OLENoPropOrMethod = 438;
public const int OLEAutomationError = 440;
public const int LostTLB = 442;
public const int OLENoDefault = 443;
public const int ActionNotSupported = 445;
public const int NamedArgsNotSupported = 446;
public const int LocaleSettingNotSupported = 447;
public const int NamedParamNotFound = 448;
public const int ParameterNotOptional = 449;
public const int FuncArityMismatch = 450;
public const int NotEnum = 451;
public const int InvalidOrdinal = 452;
public const int InvalidDllFunctionName = 453;
public const int CodeResourceNotFound = 454;
public const int CodeResourceLockError = 455;
public const int DuplicateKey = 457;
public const int InvalidTypeLibVariable = 458;
public const int ObjDoesNotSupportEvents = 459;
public const int InvalidClipboardFormat = 460;
public const int IdentNotMember = 461;
public const int ServerNotFound = 462;
public const int ObjNotRegistered = 463;
public const int InvalidPicture = 481;
public const int PrinterError = 482;
public const int CantSaveFileToTemp = 735;
public const int SearchTextNotFound = 744;
public const int ReplacementsTooLong = 746;
public const int LastTrappable = 746;
public const int NotYetImplemented = 32768;
public const int SeekErr = 32771;
public const int ReadFault = 32772;
public const int WriteFault = 32773;
public const int BadFunctionId = 32774;
public const int FileLockViolation = 32775;
public const int ShareRequired = 32789;
public const int BufferTooSmall = 32790;
public const int InvDataRead = 32792;
public const int UnsupFormat = 32793;
public const int RegistryAccess = 32796;
public const int LibNotRegistered = 32797;
public const int Usage = 32799;
public const int UndefinedType = 32807;
public const int QualifiedNameDisallowed = 32808;
public const int InvalidState = 32809;
public const int WrongTypeKind = 32810;
public const int ElementNotFound = 32811;
public const int AmbiguousName = 32812;
public const int ModNameConflict = 32813;
public const int UnknownLcid = 32814;
public const int BadModuleKind = 35005;
public const int NoContainingLib = 35009;
public const int BadTypeId = 35010;
public const int BadLibId = 35011;
public const int Eof = 35012;
public const int SizeTooBig = 35013;
public const int ExpectedFuncNotModule = 35015;
public const int ExpectedFuncNotRecord = 35016;
public const int ExpectedFuncNotProject = 35017;
public const int ExpectedFuncNotVar = 35018;
public const int ExpectedTypeNotProj = 35019;
public const int UnsuitableFuncPropMatch = 35020;
public const int BrokenLibRef = 35021;
public const int UnsupportedTypeLibFeature = 35022;
public const int ModuleAsType = 35024;
public const int InvalidTypeInfoKind = 35025;
public const int InvalidTypeLibFunction = 35026;
public const int OperationNotAllowedInDll = 40035;
public const int CompileError = 40036;
public const int CantEvalWatch = 40037;
public const int MissingVbaTypeLib = 40038;
public const int UserReset = 40040;
public const int MissingEndBrack = 40041;
public const int IncorrectTypeChar = 40042;
public const int InvalidNumLit = 40043;
public const int IllegalChar = 40044;
public const int IdTooLong = 40045;
public const int StatementTooComplex = 40046;
public const int ExpectedTokens = 40047;
public const int InconsistentPropFuncs = 40067;
public const int CircularType = 40068;
public const int FileNotFoundWithName = 40243;
public const int CantFindDllEntryPoint = 59201;
}
@@ -24,16 +24,17 @@
using System.Globalization;
using System.Text;
using System;
using System.Reflection;
using System.Resources;
namespace Microsoft.VisualBasic {
namespace Microsoft.VisualBasic{
internal class VBUtils {
private static string VB_FILE_NAME = "VBUtils";
private static ResourceManager VB_RESOURCE_BUNDLE = new ResourceManager(typeof(VBUtils));
// private static final String VB_FILE_NAME = "resources.MicrosoftVisualBasic";
// private static final ResourceBundle VB_RESOURCE_BUNDLE =
// ResourceBundle.getBundle(VB_FILE_NAME);
//
// private static final String MAIN_FILE_NAME = "resources.Mscorlib";
// private static final ResourceBundle MAIN_RESOURCE_BUNDLE =
// ResourceBundle.getBundle(MAIN_FILE_NAME);
public static bool isNumber(string str, double[] val)
{
public static bool isNumber(string str, double[] val) {
if (str == null)
str = "";
@@ -56,76 +57,93 @@ namespace Microsoft.VisualBasic {
val[0] = double.Parse(str, NumberStyles.Any, null);
return true;
}
public static string GetResourceString(string key)
{
string str = null;
try {
str = VB_RESOURCE_BUNDLE.GetString(key);
}
catch(Exception e) {
// TODO
}
if (str == null)
str = VB_RESOURCE_BUNDLE.GetString("ID95");
return str;
}
public static string GetResourceString (string key, string paramValue)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", paramValue);
return sb.ToString();
}
public static string GetResourceString (string key, string paramValue1, string paramValue2)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", paramValue1);
sb.Replace("|2", paramValue2);
return sb.ToString();
}
public static string GetResourceString (string key, string param1, string param2, string param3)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", param1);
sb.Replace("|2", param2);
sb.Replace("|3", param3);
return sb.ToString();
}
public static string GetResourceString (string key, string param1, string param2, string param3, string param4)
{
StringBuilder sb = new StringBuilder(GetResourceString(key));
sb.Replace("|1", param1);
sb.Replace("|2", param2);
sb.Replace("|3", param3);
sb.Replace("|4", param4);
return sb.ToString();
}
public static string GetResourceString(int ResourceId)
{
string str = "ID" + ResourceId.ToString();
return GetResourceString(str);
}
public static string GetResourceString(int ResourceId, string param1)
{
string str = "ID" + ResourceId.ToString();
return GetResourceString(str, param1);
}
// public static java.lang.Exception VBException(java.lang.Exception ex, int hr)
// {
// Information.Err().SetUnmappedError(hr);
// return ex;
// }
//
// public static String GetResourceString(String key)
// {
// String str = null;
// try
// {
// str = VB_RESOURCE_BUNDLE.getString(key);
// }
// catch (MissingResourceException e)
// {
//// try
//// {
//// str = MAIN_RESOURCE_BUNDLE.getString(key);
//// }
//// catch (MissingResourceException ex)
//// {
//// }
// }
// if (str == null)
// str = VB_RESOURCE_BUNDLE.getString("ID95");
//
// return str;
// }
//
// public static String GetResourceString(String key, String paramValue)
// {
// StringBuilder sb = new StringBuilder(GetResourceString(key));
// sb.Replace("|1", paramValue);
// return sb.toString();
// }
//
// public static String GetResourceString(
// String key,
// String paramValue1,
// String paramValue2)
// {
// StringBuilder sb = new StringBuilder(GetResourceString(key));
// sb.Replace("|1", paramValue1);
// sb.Replace("|2", paramValue2);
// return sb.toString();
// }
//
// public static String GetResourceString(
// String key,
// String param1,
// String param2,
// String param3)
// {
// StringBuilder sb = new StringBuilder(GetResourceString(key));
// sb.Replace("|1", param1);
// sb.Replace("|2", param2);
// sb.Replace("|3", param3);
// return sb.toString();
// }
//
// public static String GetResourceString(
// String key,
// String param1,
// String param2,
// String param3,
// String param4)
// {
// StringBuilder sb = new StringBuilder(GetResourceString(key));
// sb.Replace("|1", param1);
// sb.Replace("|2", param2);
// sb.Replace("|3", param3);
// sb.Replace("|4", param4);
// return sb.toString();
// }
//
// public static String GetResourceString(int ResourceId)
// {
// String str = "ID" + new Integer(ResourceId).toString();
// return GetResourceString(str);
// }
//
// public static String GetResourceString(int ResourceId, String param1)
// {
// String str = "ID" + new Integer(ResourceId).toString();
// return GetResourceString(str, param1);
// }
//
// public static java.lang.Exception VBException(java.lang.Exception ex, int hr)
// {
// Information.Err().SetUnmappedError(hr);
// return ex;
// }
}
}
@@ -1,162 +0,0 @@
# Standard VB Errors
ID3 = This Error number is obsolete and no longer used.
ID5 = Procedure call or argument is not valid.
ID6 = Overflow.
ID7 = Out of memory.
ID9 = Subscript out of range.
ID10 = This array is fixed or temporarily locked.
ID11 = Division by zero.
ID13 = Type mismatch.
ID14 = Out of string space.
ID16 = Expression too complex.
ID17 = Can't perform requested operation.
ID18 = User interrupt occurred.
ID20 = Resume without error.
ID28 = Out of stack space.
ID35 = Sub or Function not defined.
ID47 = Too many DLL application clients.
ID48 = Error in loading DLL.
ID49 = Bad DLL calling convention.
ID51 = Internal error.
ID52 = Bad file name or number.
ID53 = File not found.
ID54 = Bad file mode.
ID55 = File already open.
ID57 = Device I/O error.
ID58 = File already exists.
ID59 = Bad record length.
ID61 = Disk full.
ID62 = Input past end of file.
ID63 = Bad record number.
ID67 = Too many files.
ID68 = Device unavailable.
ID70 = Permission denied.
ID71 = Disk not ready.
ID74 = Cannot rename with different drive.
ID75 = Path/File access error.
ID76 = Path not found.
ID91 = Object variable or With block variable not set.
ID92 = For loop not initialized.
ID93 = Pattern string is not valid.
ID94 = This Error number is obsolete and no longer used.
ID96 = Unable to sink events of object because the object is already firing events to the maximum number of event receivers that it supports.
ID97 = Cannot call friend function on object that is not an instance of defining class.
ID98 = A property or method call cannot include a reference to a private object, either as an argument or as a return value.
ID100 = Class '|1' does not implement the System.Collections.ICollection interface.
ID321 = File format is not valid.
ID322 = Cannot create necessary temporary file.
ID325 = Format in resource file is not valid.
ID380 = Property value is not valid.
ID381 = Property array index is not valid.
ID382 = Set not supported at runtime.
ID383 = Set not supported (read-only property).
ID385 = Need property array index.
ID387 = Set not permitted.
ID393 = Get not supported at runtime.
ID394 = Get not supported (write-only property).
ID422 = Property not found.
ID423 = Property or method not found.
ID424 = Object required.
ID429 = Cannot create ActiveX component.
ID430 = Class does not support Automation or does not support expected interface.
ID432 = File name or class name not found during Automation operation.
ID438 = Object does not support this property or method.
ID440 = Automation error.
ID442 = Connection to type library or object library for remote process has been lost. Press OK for dialog to remove reference.
ID443 = Automation object does not have a default value.
ID445 = Object does not support this action.
ID446 = Object does not support named arguments.
ID447 = Object does not support current locale setting.
ID448 = Named argument not found.
ID449 = Argument not optional.
ID450 = Wrong number of arguments or property assignment was not valid.
ID451 = Property let procedure not defined and property get procedure did not return an object.
ID452 = Ordinal is not valid.
ID453 = Specified DLL function not found.
ID454 = Code resource not found.
ID455 = Code resource lock error.
ID457 = This key is already associated with an element of this collection.
ID458 = Variable uses an Automation type not supported in Visual Basic.
ID459 = Object or class does not support the set of events.
ID460 = Clipboard format is not valid.
ID461 = Method or data member not found.
ID462 = The remote server machine does not exist or is unavailable.
ID463 = Class not registered on local machine.
ID481 = Picture is not valid.
ID482 = Printer error.
ID735 = Cannot save file to TEMP.
ID744 = Search text not found.
ID746 = Replacements too long.
ID999 = Stop statement encountered.
ID32768 = Feature not yet implemented.
# Common Errors
Argument_InvalidValue = FIXME: Argument_InvalidValue
Argument_InvalidValue1 = Argument |1 is not a valid value.
Argument_InvalidNullValue1 = Argument |1 is Nothing.
# Errors in Information.java
Argument_InvalidRank1 = Argument |1 is not valid for the array.
InvalidCast_FromStringTo = Cast from string |1 to type |2 is not valid.
Argument_PathNullOrEmpty = Argument |1 is Nothing or empty.
FileSystem_PathNotFound1 = Path |1 not found.
Argument_InvalidDateValue1 = Argument |1 cannot be converted to type 'Date'
Argument_GEZero1 = Argument |1 must be greater than or equal to zero
Argument_LengthGTZero1 = Length of argument |1 must be greater than zero.
Argument_MinusOneOrGTZero1 = Argument |1 must be greater than 0 or equal to -1.
Argument_GEMinusOne1 = Argumnet |1 must be greater than or equal to -1.
Argument_IndexLELength2 = Argument |1 must be less than or equal to the length of argument |2.
Argument_InvalidValueType2 = Argument |1 cannot be converted to type |2.
Argument_RangeTwoBytes1 = Argument |1 must be within the range of -32768 to 65535.
# FIXME: Creating temporary resource strings. Fill in meaningful error messages
# Errors in BaseVBFile.java
FileOpenedNoWrite = FIXME: FileOpenedNoWrite
# Errors in FileSystem.java
UseFilePutObject = FIXME: UseFilePutObject
# Errors in Financial.java
Argument_RankEQOne1 = FIXME: Argument_RankEQOne1 |1
Financial_CalcDivByZero = FIXME: Financial_CalcDivByZero
Financial_CannotCalculateNPer = FIXME: Financial_CannotCalculateNPer
PPMT_PerGT0AndLTNPer = FIXME: PPMT_PerGT0AndLTNPer |1
Rate_NPerMustBeGTZero = FIXME: Rate_NPerMustBeGTZero
Financial_CannotCalculateRate = FIXME: Financial_CannotCalculateRate
Financial_LifeNEZero = FIXME: Financial_LifeNEZero
Financial_ArgGTZero1 = FIXME: Financial_ArgGTZero1 |1
Financial_ArgGEZero1 = FIXME: Financial_ArgGEZero1 |1
Financial_PeriodLELife = FIXME: Financial_PeriodLELife
# Errors in FlowControl.java
ForLoop_CommonType3 = FIXME: ForLoop_CommonType3 |1 |2 |3
ForLoop_ConvertToType3 = FIXME: ForLoop_ConvertToType3 |1 |2 |3
Argument_IComparable2 = FIXME: Argument_IComparable2 |1 |2
SyncLockRequiresReferenceType1 = SyncLockRequiresReferenceType1 |1
# Errors in ObjectType.java
NoValidOperator_TwoOperands = FIXME: NoValidOperator_TwoOperands |1 |2
NoValidOperator_OneOperand = FIXME: NoValidOperator_OneOperand |1
NoValidOperator_StringType1 = FIXME: NoValidOperator_StringType1 |1
NoValidOperator_NonStringType1 = FIXME: NoValidOperator_NonStringType |1
InvalidCast_FromTo = Value of type |1 cannot be converted to |2
# Errors in InputVBFile.java
FileSystem_IllegalOutputAccess = FIXME: FileSystem_IllegalOutputAccess
# Errors in OutPutVBFile.java
Argument_UnsupportedIOType1 = FIXME: Argument_UnsupportedIOType1 |1
Argument_UnsupportedArrayDimensions = FIXME: Argument_UnsupportedArrayDimensions
Argument_InvalidFixedLengthString = FIXME: Argument_InvalidFixedLengthString
# Errors in VBFixedArrayAttribute.java
Invalid_VBFixedArray = FIXME: Invalid_VBFixedArray
# Errors in VBFixedStringAttribute.java
Invalid_VBFixedString = FIXME: Invalid_VBFixedString
@@ -27,7 +27,6 @@ namespace Microsoft.VisualBasic {
Char = 18,
Long = 20,
UserDefinedType = 36,
Array = 8192,
ObjectArray = 8201
Array = 8192
};
}
@@ -30,9 +30,5 @@ namespace Microsoft.Web.Services {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
2004-06-02 Martin Baulig <ma[email protected]>
2004-05-23 Ben Maurer <bma[email protected]>
Set version number to 37.
* MonoSymbolWriter.cs (AddLocal), etc: kill more arraylists.
2004-05-23 Ben Maurer <[email protected]>
@@ -52,7 +52,7 @@ namespace Mono.CSharp.Debugger
{
public struct OffsetTable
{
public const int Version = 37;
public const int Version = 36;
public const long Magic = 0x45e82623fd7fa614;
#region This is actually written to the symbol file
@@ -129,13 +129,16 @@ namespace Mono.CSharp.Debugger
}
}
static LocalVariableEntry [] locals_buf = new LocalVariableEntry [20];
int locals_pos = 0;
public LocalVariableEntry[] Locals {
get {
if (_locals == null)
if (locals_pos == 0)
return new LocalVariableEntry [0];
else {
LocalVariableEntry[] retval = new LocalVariableEntry [_locals.Count];
_locals.CopyTo (retval, 0);
LocalVariableEntry[] retval = new LocalVariableEntry [locals_pos];
Array.Copy (locals_buf, retval, locals_pos);
return retval;
}
}
@@ -143,9 +146,12 @@ namespace Mono.CSharp.Debugger
public void AddLocal (string name, FieldAttributes attributes, byte[] signature)
{
if (_locals == null)
_locals = new ArrayList ();
_locals.Add (new LocalVariableEntry (name, attributes, signature, CurrentBlock.Index));
if (locals_pos == locals_buf.Length) {
LocalVariableEntry [] t = new LocalVariableEntry [locals_buf.Length * 2 + 1];
Array.Copy (locals_buf, t, locals_pos);
locals_buf = t;
}
locals_buf [locals_pos ++] = new LocalVariableEntry (name, attributes, signature, CurrentBlock.Index);
}
public MethodBase MethodBase {
-8
View File
@@ -1,11 +1,3 @@
2004-04-25 Jordi Mas i Hernandez <[email protected]>
* Cairo.cs: fixes cairo_current_matrix signature
* Font.cs: fixes internal _create method always returning null
* Graphics.cs: fixes Graphics.Matrix
* Matrix.cs: does not allow matrix objects without a wrapped handle
* Surface.cs: implements Surface.Show
2004-05-26 Miguel de Icaza <[email protected]>
* Mono.Cairo/Cairo.cs: Do not use `extern string' here, as the
+1 -1
View File
@@ -263,7 +263,7 @@ namespace Cairo {
public static extern double cairo_current_miter_limit (IntPtr cr);
[DllImport (CairoImp)]
public static extern void cairo_current_matrix (IntPtr cr, IntPtr matrix);
public static extern void cairo_current_matrix (IntPtr cr, out IntPtr matrix);
[DllImport (CairoImp)]
public static extern IntPtr cairo_current_target_surface (IntPtr cr);
+5 -4
View File
@@ -21,6 +21,7 @@ namespace Cairo {
internal IntPtr _create (string family, FontSlant fcslant, FontWeight fcweight)
{
IntPtr ft_font = IntPtr.Zero;
IntPtr font = IntPtr.Zero;
IntPtr pattern = IntPtr.Zero;
IntPtr library = IntPtr.Zero;
@@ -28,7 +29,7 @@ namespace Cairo {
pattern = FontConfig.FcPatternCreate ();
if (pattern == IntPtr.Zero)
return font;
return ft_font;
FontConfig.FcPatternAddString (pattern, FontConfig.FC_FAMILY, family);
FontConfig.FcPatternAddInteger (pattern, FontConfig.FC_SLANT, (int) fcslant);
@@ -37,12 +38,12 @@ namespace Cairo {
error = FreeType.FT_Init_FreeType (out library);
if (error != 0) {
FontConfig.FcPatternDestroy (pattern);
return font;
return ft_font;
}
font = CairoAPI.cairo_ft_font_create (library, pattern);
if (font == IntPtr.Zero)
return font;
return ft_font;
/*
ft_font = (cairo_ft_font_t *) font;
@@ -55,7 +56,7 @@ namespace Cairo {
0, 0);*/
FontConfig.FcPatternDestroy (pattern);
return font;
return ft_font;
}
+3 -4
View File
@@ -360,10 +360,9 @@ namespace Cairo {
}
get {
IntPtr p = CairoAPI.cairo_matrix_create ();
CairoAPI.cairo_current_matrix (state, p);
Matrix mat = new Cairo.Matrix (p);
return mat;
IntPtr p;
CairoAPI.cairo_current_matrix (state, out p);
return new Cairo.Matrix (p);
}
}
+1 -4
View File
@@ -17,7 +17,7 @@ namespace Cairo {
public class Matrix
{
internal IntPtr matrix = IntPtr.Zero;
internal IntPtr matrix;
public Matrix ()
: this (Create ())
@@ -26,9 +26,6 @@ namespace Cairo {
internal Matrix (IntPtr ptr)
{
if (ptr == IntPtr.Zero)
ptr = Create ();
matrix = ptr;
}
+4 -7
View File
@@ -88,11 +88,6 @@ namespace Cairo {
Dispose (false);
}
public void Show (Graphics gr, int width, int height)
{
CairoAPI.cairo_show_surface (gr.Handle, surface, width, height);
}
void IDisposable.Dispose ()
{
Dispose (true);
@@ -117,7 +112,7 @@ namespace Cairo {
public int Repeat {
set {
CairoAPI.cairo_surface_set_repeat (surface, value);
}
}
}
public Cairo.Matrix Matrix {
@@ -126,8 +121,10 @@ namespace Cairo {
}
get {
IntPtr p = IntPtr.Zero;
IntPtr p;
CairoAPI.cairo_surface_get_matrix (surface, out p);
return new Cairo.Matrix (p);
}
}
-169
View File
@@ -1,169 +0,0 @@
//
//
// Mono.Cairo drawing samples using GTK# as drawing surface
// Autor: Jordi Mas <[email protected]>. Based on work from Owen Taylor
//
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Cairo;
using Gtk;
class GtkCairo
{
static DrawingArea a,b;
static void Main ()
{
Application.Init ();
Gtk.Window w = new Gtk.Window ("Mono.Cairo Circles demo");
a = new CairoGraphic ();
Box box = new HBox (true, 0);
box.Add (a);
w.Add (box);
w.Resize (500,500);
w.ShowAll ();
Application.Run ();
}
}
class CairoGraphic : DrawingArea
{
static readonly double M_PI = 3.14159265358979323846;
static void oval_path (Cairo.Graphics gr, double xc, double yc, double xr, double yr)
{
Matrix matrix = gr.Matrix;
gr.Translate (xc, yc);
gr.Scale (1.0, yr / xr);
gr.MoveTo (xr, 0.0);
gr.Arc (0, 0, xr, 0, 2 * M_PI);
gr.ClosePath ();
gr.Matrix = matrix;
matrix.Destroy();
}
/*
* Draw a red, green, and blue circle equally spaced inside
* the larger circle of radius r at (xc, yc)
*/
static void draw_3circles (Cairo.Graphics gr, double xc, double yc, double radius)
{
double subradius = radius * (2 / 3.0 - 0.1);
gr.SetRGBColor (1, 0, 0);
oval_path (gr,
xc + radius / 3 * Math.Cos (M_PI * (0.5)),
yc - radius / 3 * Math.Sin (M_PI * (0.5)),
subradius, subradius);
gr.Fill ();
gr.SetRGBColor (0, 1, 0);
oval_path (gr,
xc + radius / 3 * Math.Cos (M_PI * (0.5 + 2/.3)),
yc - radius / 3 * Math.Sin (M_PI * (0.5 + 2/.3)),
subradius, subradius);
gr.Fill ();
gr.SetRGBColor (0, 0, 1);
oval_path (gr,
xc + radius / 3 * Math.Cos (M_PI * (0.5 + 4/.3)),
yc - radius / 3 * Math.Sin (M_PI * (0.5 + 4/.3)),
subradius, subradius);
gr.Fill ();
}
static void draw (Cairo.Graphics gr, int width, int height)
{
Surface overlay, punch, circles;
/* Fill the background */
double radius = 0.5 * (width < height ? width : height) - 10;
double xc = width / 2;
double yc = height / 2;
overlay = Surface.CreateSimilar (gr.TargetSurface, Format.ARGB32, width, height);
punch = Surface.CreateSimilar (gr.TargetSurface, Format.A8, width, height);
circles = Surface.CreateSimilar (gr.TargetSurface, Format.ARGB32, width, height);
gr.Save ();
gr.TargetSurface = overlay;
/* Draw a black circle on the overlay
*/
gr.SetRGBColor (0, 0, 0);
oval_path (gr, xc, yc, radius, radius);
gr.Fill ();
gr.Save ();
gr.TargetSurface = punch;
/* Draw 3 circles to the punch surface, then cut
* that out of the main circle in the overlay
*/
draw_3circles (gr, xc, yc, radius);
gr.Restore ();
gr.Operator = Operator.OutReverse;
punch.Show (gr, width, height);
/* Now draw the 3 circles in a subgroup again
* at half intensity, and use OperatorAdd to join up
* without seams.
*/
gr.Save ();
gr.TargetSurface = circles;
gr.Alpha = 0.5;
gr.Operator = Operator.Over;
draw_3circles (gr, xc, yc, radius);
gr.Restore ();
gr.Operator = Operator.Add;
circles.Show (gr, width, height);
gr.Restore ();
overlay.Show (gr, width, height);
/*
cairo_surface_destroy (overlay);
cairo_surface_destroy (punch);
cairo_surface_destroy (circles);
*/
}
protected override bool OnExposeEvent (Gdk.EventExpose args)
{
Gdk.Window win = args.Window;
Gdk.Rectangle area = args.Area;
Cairo.Graphics g = new Cairo.Graphics ();
Gdk.Graphics.CreateDrawable (win, g);
draw (g, 500, 500);
return true;
}
}
@@ -1,3 +0,0 @@
#!/bin/bash
mcs -r:System.Drawing -r:Mono.Cairo -pkg:gtk-sharp circles.cs sysdraw.cs
@@ -1,43 +0,0 @@
//
//
// GDK-X11 interface
//
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Gtk;
using Cairo;
namespace Gdk
{
class Graphics
{
//Use [DllImport("libgdk-win32-2.0-0.dll")] for Win32
[DllImport("libgdk-x11-2.0.so")]
internal static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw);
[DllImport("libgdk-x11-2.0.so")]
internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw);
public static void CreateDrawable (Gdk.Drawable drawable, Cairo.Graphics g)
{
IntPtr x_drawable = IntPtr.Zero;
int x_off = 0, y_off = 0;
if (drawable is Gdk.Window)
((Gdk.Window) drawable).GetInternalPaintInfo(out drawable, out x_off, out y_off);
x_drawable = drawable.Handle;
IntPtr display = gdk_x11_drawable_get_xdisplay (x_drawable);
IntPtr Xdrawable = gdk_x11_drawable_get_xid (x_drawable);
g.SetTargetDrawable (display, Xdrawable);
if (drawable is Gdk.Window)
g.Translate (-(double)x_off,-(double)y_off);
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.MySql {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.PostgreSqlClient {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.SybaseClient {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.SybaseTypes {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.Tds.Protocol {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.TdsClient {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -29,9 +29,5 @@ namespace Mono.Data.TdsTypes {
{
this.comment = comment;
}
public string Comment {
get { return comment; }
}
}
}
@@ -38,8 +38,7 @@ namespace Mono.Http.Modules
if (config == null)
config = (AcceptEncodingConfig) app.Context.GetConfig (configSection);
if (config != null)
config.SetFilter (response, request.Headers ["Accept-Encoding"]);
config.SetFilter (response, request.Headers ["Accept-Encoding"]);
}
}
}
@@ -1,8 +1,3 @@
2004-06-07 Gonzalo Paniagua Javier <[email protected]>
* AcceptEncodingModule.cs: don't cause nullref if there's no
<mono.aspnet> section and the module is loaded.
2004-04-28 Gonzalo Paniagua Javier <[email protected]>
* DigestAuthenticationModule.cs: introduces new overridable method
-6
View File
@@ -1,9 +1,3 @@
2004-06-03 Raja R Harinath <[email protected]>
* Makefile (Mono.Posix/make-map.exe): Depend on $(the_lib) to pick
the name of the library from library.make. This should make it
parallel-make-safe.
2004-04-26 Jackson Harper <[email protected]>
* Makefile: Dont use explicit lib references so the proper lib
+2 -2
View File
@@ -10,8 +10,8 @@ include ../../build/library.make
all-local: Mono.Posix/make-map.exe
Mono.Posix/make-map.exe: Mono.Posix/make-map.cs $(the_lib)
cp $(the_lib) Mono.Posix/
Mono.Posix/make-map.exe: Mono.Posix/make-map.cs ../lib/$(PROFILE)/Mono.Posix.dll
cp ../lib/$(PROFILE)/Mono.Posix.dll Mono.Posix/
ifneq ($(PLATFORM),win32)
$(CSCOMPILE) -out:Mono.Posix/make-map.exe -r:Mono.Posix.dll Mono.Posix/make-map.cs
else
@@ -1,8 +1,3 @@
2004-06-08 Sebastien Pouliot <[email protected]>
* StrongName.cs: Synch with corlib (the new code isn't even compiled)
in Mono.Security assembly.
2004-05-19 Jesper Pedersen <[email protected]>
* PKCS7.cs: Added SignedData.VerifySignature(AsymmetricAlgorithm aa).
@@ -425,22 +425,9 @@ namespace Mono.Security {
}
#if INSIDE_CORLIB
static object lockObject = new object ();
static bool initialized = false;
// We don't want a dependency on StrongNameManager in Mono.Security.dll
static public bool IsAssemblyStrongnamed (string assemblyName)
{
if (!initialized) {
lock (lockObject) {
if (!initialized) {
string config = Environment.GetMachineConfigPath ();
StrongNameManager.LoadConfig (config);
initialized = true;
}
}
}
try {
// this doesn't load the assembly (well it unloads it ;)
// http://weblogs.asp.net/nunitaddin/posts/9991.aspx
@@ -26,3 +26,4 @@ Mono.Security.Protocol.Ntlm/Type1MessageTest.cs
Mono.Security.Protocol.Ntlm/Type2MessageTest.cs
Mono.Security.Protocol.Ntlm/Type3MessageTest.cs
Mono.Security.X509/PKCS12Test.cs
-10
View File
@@ -1,13 +1,3 @@
2004-06-14 Jackson Harper <[email protected]>
* PEAPI.cs: Add new constructor so we can explicitly set the
module name.
2004-06-03 Jackson Harper <[email protected]>
* PEAPI.cs: Do not null terminate byte arrays when writing to the
blob stream.
2004-05-25 Jackson Harper <[email protected]>
* PEAPI.cs: When writing to the blob heap we always set a size.
+3 -7
View File
@@ -4982,8 +4982,9 @@ if (rsrc != null)
if (val == null) {
index = size;
btable [str] = index;
if (prependSize) CompressNum ((uint) str.Length);
if (prependSize) CompressNum ((uint) str.Length+1);
Write (str);
Write ((byte) 0);
size = (uint) Seek (0, SeekOrigin.Current);
} else {
index = (uint) val;
@@ -6025,12 +6026,7 @@ if (rsrc != null)
fileImage = new FileImage(isDLL,outStream);
InitPEFile(name, MakeFileName(null,name,isDLL), hasAssembly);
}
public PEFile(string name, string module_name, bool isDLL, bool hasAssembly, Stream outStream) {
fileImage = new FileImage(isDLL,outStream);
InitPEFile(name, (module_name == null ? MakeFileName(null,name,isDLL) : module_name), hasAssembly);
}
private void InitPEFile(string name, string fName, bool hasAssembly) {
metaData = fileImage.GetMetaData();
thisMod = new Module(fName,metaData);
@@ -1,8 +1,4 @@
2004-06-11 Gert Driesen <[email protected]>
* Consts.cs: Replaced by Consts.cs from System.Messaging
2004-05-15 Gert Driesen <[email protected]>
2004-05-15 Gert Driesen ([email protected])
* Consts.cs: Added
@@ -1,13 +1,14 @@
//
// Consts.cs
//
// Author:
// Authors:
// Umadevi S ([email protected])
// Andreas Nahr ([email protected])
//
// (C) 2003 Andreas Nahr
//
//
// NOTE:
// Ensure that every constant is defined for every version symbol!
// This class is similar to the Consts.cs class at System.Web/Assembly by Andreas Nhar
//
// This class contains constants that are dependent on the defined symbols
@@ -34,24 +35,14 @@ internal sealed class Consts
#if (NET_1_0)
public const string AssemblySystem_Design = "System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Drawing = "System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem = "System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
#elif (NET_2_0)
public const string AssemblySystem_Design = "System.Design, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Drawing = "System.Drawing, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
//#elif (NET_1_1)
#else
// NET_1_1 is seen as default if somebody 'forgets' to specify any of the symbols
// to ensure we are not breaking the build in this case
public const string AssemblySystem_Design = "System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Drawing = "System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// to ensure we are not breaking the build in this case
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem = "System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
#endif
}
@@ -1,9 +1,4 @@
2004-06-11 Gert Driesen <[email protected]>
* System.Configuration.Install.dll.sources: added
stubbed classes
2004-05-15 Gert Driesen <[email protected]>
2004-05-15 Gert Driesen ([email protected])
* System.Configuration.Install.dll.sources: added
Assembly/Consts.cs
@@ -1,7 +1,6 @@
Assembly/AssemblyInfo.cs
Assembly/Locale.cs
Assembly/Consts.cs
System.Configuration.Install/AssemblyInstaller.cs
System.Configuration.Install/IManagedInstaller.cs
System.Configuration.Install/Installer.cs
System.Configuration.Install/InstallException.cs
@@ -10,9 +9,5 @@ System.Configuration.Install/InstallContext.cs
System.Configuration.Install/InstallEventArgs.cs
System.Configuration.Install/InstallerCollection.cs
System.Configuration.Install/InstallEventHandler.cs
System.Configuration.Install/ManagedInstallerClass.cs
System.Configuration.Install/TransactedInstaller.cs
System.Configuration.Install/UninstallAction.cs
System.Configuration.Install/TODOAttribute.cs
System.Diagnostics/EventLogInstaller.cs
System.Diagnostics/PerformanceCounterInstaller.cs
@@ -1,115 +0,0 @@
// System.Configuration.Install.AssemblyInstaller.cs
//
// Author:
// Gert Driesen ([email protected])
//
// (C) Novell
//
using System.Collections;
using System.ComponentModel;
using System.Reflection;
namespace System.Configuration.Install
{
public class AssemblyInstaller : Installer
{
public AssemblyInstaller ()
{
}
public AssemblyInstaller (Assembly assembly, string[] commandLine)
{
_assembly = assembly;
_commandLine = commandLine;
_useNewContext = true;
}
public AssemblyInstaller (string filename, string[] commandLine)
{
Path = System.IO.Path.GetFullPath (filename);
_commandLine = commandLine;
_useNewContext = true;
}
[MonoTODO]
public static void CheckIfInstallable (string assemblyName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override void Commit (IDictionary savedState)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override void Install (IDictionary savedState)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override void Rollback (IDictionary savedState)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override void Uninstall (IDictionary savedState)
{
throw new NotImplementedException ();
}
public Assembly Assembly {
get {
return _assembly;
}
set {
_assembly = value;
}
}
public string[] CommandLine {
get {
return _commandLine;
}
set {
_commandLine = value;
}
}
public override string HelpText {
get {
throw new NotImplementedException ();
}
}
public string Path {
get {
if (_assembly == null)
return null;
return _assembly.Location;
}
set {
if (value == null)
_assembly = null;
_assembly = Assembly.LoadFrom (value);
}
}
public bool UseNewContext {
get {
return _useNewContext;
}
set {
_useNewContext = value;
}
}
private Assembly _assembly;
private string[] _commandLine;
private bool _useNewContext;
}
}
Loaded 100 of 1913 files, more files were not shown because too many files have changed in this diff. Show more