mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd05ade67b |
No files matched your search
@@ -1,151 +1,3 @@
|
||||
2003-11-26 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add -fno-strict-aliasing to CFLAGS.
|
||||
|
||||
* configure.in: Applied patch from [email protected]. Avoid linking in
|
||||
librt if not neccesary.
|
||||
|
||||
2003-11-24 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Fix signbit check. Fixes #51315.
|
||||
|
||||
2003-11-20 Jackson Harper <[email protected]>
|
||||
|
||||
* data/machine.config: Add OutputCacheModule
|
||||
|
||||
2003-11-19 Jackson Harper <[email protected]>
|
||||
|
||||
* doc/web/team.xml: New email address and job description
|
||||
* doc/web/team/jackson.png: Picture of me debugging...seems appropriate
|
||||
|
||||
2003-11-14 Jackson Harper <[email protected]>
|
||||
|
||||
* Makefile.am: delete mscorlib.dll
|
||||
|
||||
2003-11-12 Jackson Harper <[email protected]>
|
||||
|
||||
* Makefile.am: corlib is now named mscorlib.dll
|
||||
|
||||
2003-11-12 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in acconfig.h: Add check for signbit, which is missing in
|
||||
FreeBSD 4.x.
|
||||
|
||||
2003-11-07 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Remove debugging junk accidently checked in.
|
||||
|
||||
* configure.in: Add new --with-nptl option to enable NPTL only
|
||||
features since auto-detection is not reliable.
|
||||
|
||||
* autogen.sh: Fix previous patch and silence noisy GNU which.
|
||||
|
||||
2003-11-07 Bernie Solomon <[email protected]>
|
||||
|
||||
* autogen.sh: tweak glibtool check so it works
|
||||
if which doesn't set return code properly
|
||||
|
||||
2003-11-07 Zoltan Varga <[email protected]>
|
||||
|
||||
* autogen.sh: Silence noisy GNU which.
|
||||
|
||||
* autogen.sh: Applied patch from Peter Teichman ([email protected]).
|
||||
Use 'glibtool' instead of 'libtool' on OSX.
|
||||
|
||||
2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
|
||||
|
||||
* mono/benchmark/pinvoke.cs: New benchmark for testing the performance
|
||||
of the managed/unmanaged boundary.
|
||||
|
||||
2003-11-06 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in acconfig.h: Add check for __thread keyword in gcc.
|
||||
|
||||
2003-10-29 Dick Porter <[email protected]>
|
||||
|
||||
* man/mono.1: Document MONO_EXTERNAL_ENCODINGS variable
|
||||
|
||||
2003-10-16 Miguel de Icaza <[email protected]>
|
||||
|
||||
* man/mono.1: Document new --trace options
|
||||
|
||||
2003-10-13 Bernie Solomon <[email protected]>
|
||||
|
||||
* configure.in: add hppa support (64bit only)
|
||||
make solaris build work with Forte compiler
|
||||
|
||||
2003-10-13 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Added check for pthread_attr_setstacksize.
|
||||
|
||||
* mono/tests/ChangeLog: New file.
|
||||
|
||||
2003-10-13 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono/tests/Makefile.am: Link the tests with the test driver program
|
||||
used for the mini tests.
|
||||
|
||||
2003-10-10 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono/tests/libtest.c (mono_test_marshal_delegate): Added test for
|
||||
stdcall calling convention.
|
||||
|
||||
2003-10-09 Dick Porter <[email protected]>
|
||||
|
||||
* acconfig.h:
|
||||
* configure.in: Check for ICU availability
|
||||
|
||||
2003-10-09 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/tests/libtest.c: fix after merge of pinvoke2.cs
|
||||
|
||||
2003-10-07 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/tests/Makefile.am mono/tests/libtest.c
|
||||
mono/tests/pinvoke18.cs: new test for bool marshalling.
|
||||
|
||||
2003-10-07 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/scripts/Makefile.am mono/scripts/*.in: fix
|
||||
managed .exe paths so they are found under cygwin.
|
||||
|
||||
2003-10-07 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono/tests/pinvoke2.cs mono/tests/libtest.c: Fix array of structs
|
||||
test.
|
||||
|
||||
2003-10-06 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/tests/pinvoke2.cs mono/tests/pinvoke11.cs
|
||||
mono/tests/libtest.c: Add more pass by value struct
|
||||
tests for platforms with more complex calling conventions
|
||||
(Sparc V9, HPPA 64 bit).
|
||||
|
||||
2003-10-06 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono/tests/pinvoke2.cs mono/tests/libtest.c: Add array of structs
|
||||
marshalling test.
|
||||
|
||||
2003-10-04 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/tests/libtest.c: remove warnings except
|
||||
"no previous prototype"
|
||||
|
||||
2003-10-03 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/tests/libtest.c: (test_lpwstr_marshal) remove undefined
|
||||
behaviour of increment, (mono_test_marshal_char) = should be ==
|
||||
|
||||
2003-09-30 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono/tests/remoting1.cs: Added test for interface casts on
|
||||
TransparentProxies.
|
||||
|
||||
2003-09-24 Bernie Solomon <[email protected]>
|
||||
|
||||
* mono/tests/pinvoke*.cs, delegate4.cs, marshal10.cs, marshal4.cs
|
||||
marshal5.cs: remove .so from DllImport of libtest to aid portability.
|
||||
|
||||
2003-09-08 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Added check for valgrind headers.
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ mcs-tree-safe-build:
|
||||
(cd ../mcs/jay; $(MAKE))
|
||||
(cd ../mcs/mcs; $(MAKE) MCS=mcs)
|
||||
(cd ../mcs/class/corlib; $(MAKE) MCS=mcs)
|
||||
cp ../mcs/class/lib/mscorlib.dll runtime
|
||||
cp ../mcs/class/lib/corlib.dll runtime
|
||||
cp ../mcs/mcs/mcs.exe runtime
|
||||
|
||||
xinstall-runtime:
|
||||
@@ -33,7 +33,7 @@ mcs-rest:
|
||||
(cd ../mcs/class; $(MAKE))
|
||||
|
||||
remove-binaries:
|
||||
rm ../mcs/class/lib/mscorlib.dll ../mcs/mcs/mcs.exe runtime/*dll runtime/*.exe >& /dev/null; echo
|
||||
rm ../mcs/class/lib/corlib.dll ../mcs/mcs/mcs.exe runtime/*dll runtime/*.exe >& /dev/null; echo
|
||||
|
||||
|
||||
win32getdeps:
|
||||
|
||||
@@ -27,6 +27,3 @@
|
||||
#undef HAVE_GC_GCJ_MALLOC
|
||||
#undef WITH_BUNDLE
|
||||
#undef HAVE_GETHOSTBYNAME2_R
|
||||
#undef HAVE_ICU
|
||||
#undef HAVE_KW_THREAD
|
||||
#undef HAVE_SIGNBIT
|
||||
+2
-9
@@ -30,15 +30,8 @@ fi
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if [ -z "$LIBTOOL" ]; then
|
||||
LIBTOOL=`which glibtool 2>/dev/null`
|
||||
if [ ! -x "$LIBTOOL" ]; then
|
||||
LIBTOOL=`which libtool`
|
||||
fi
|
||||
fi
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
|
||||
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed to compile Mono."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
|
||||
@@ -98,7 +91,7 @@ esac
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
${LIBTOOL}ize --force --copy
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
+5
-121
@@ -1,7 +1,7 @@
|
||||
AC_INIT(README)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,0.29)
|
||||
AM_INIT_AUTOMAKE(mono,0.26)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl
|
||||
@@ -74,9 +74,7 @@ case "$host" in
|
||||
;;
|
||||
*-*-hpux*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
|
||||
CFLAGS="$CFLAGS +ESdbgasm"
|
||||
LDFLAGS="$LDFLAGS -z"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
libmono_ldflags="-lpthread"
|
||||
libgc_threads=pthreads
|
||||
@@ -162,18 +160,8 @@ AC_CHECK_SIZEOF(void *, 4)
|
||||
WARN=''
|
||||
if test x"$GCC" = xyes; then
|
||||
WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
|
||||
# The runtime code does not respect ANSI C strict aliasing rules
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
else
|
||||
# The Sun Forte compiler complains about inline functions that access static variables
|
||||
# so disable all inlining.
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
CFLAGS="$CFLAGS -Dinline="
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
CFLAGS="$CFLAGS -g $WARN"
|
||||
CFLAGS="-g $WARN"
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test "x$PKG_CONFIG" = "xno"; then
|
||||
@@ -217,11 +205,6 @@ AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
|
||||
|
||||
# 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 Enable support for NPTL])
|
||||
|
||||
# assembly bundle support, see metadata/make-bundle.pl for more info
|
||||
AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
|
||||
BUNDLE_FILE=$with_bundle
|
||||
@@ -539,7 +522,6 @@ if test x$platform_win32 = xno; then
|
||||
dnl *** Checks for libpthread ***
|
||||
dnl *****************************
|
||||
AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
|
||||
AC_CHECK_HEADERS(pthread.h)
|
||||
AC_CHECK_FUNCS(pthread_mutex_timedlock)
|
||||
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
|
||||
AC_TRY_COMPILE([ #include <pthread.h>], [
|
||||
@@ -552,59 +534,11 @@ if test x$platform_win32 = xno; then
|
||||
AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
|
||||
AC_DEFINE(USE_MONO_MUTEX)
|
||||
])
|
||||
AC_CHECK_FUNCS(pthread_attr_setstacksize)
|
||||
|
||||
dnl ***********************************
|
||||
dnl *** Checks for working __thread ***
|
||||
dnl ***********************************
|
||||
AC_MSG_CHECKING(for working __thread)
|
||||
AC_TRY_RUN([
|
||||
#include <pthread.h>
|
||||
|
||||
__thread int i;
|
||||
static int res1, res2;
|
||||
|
||||
void thread_main (void *arg)
|
||||
{
|
||||
i = arg;
|
||||
sleep (1);
|
||||
if (arg == 1)
|
||||
res1 = (i == arg);
|
||||
else
|
||||
res2 = (i == arg);
|
||||
}
|
||||
|
||||
int main () {
|
||||
pthread_t t1, t2;
|
||||
|
||||
i = 5;
|
||||
|
||||
pthread_create (&t1, NULL, thread_main, 1);
|
||||
pthread_create (&t2, NULL, thread_main, 2);
|
||||
|
||||
pthread_join (t1, NULL);
|
||||
pthread_join (t2, NULL);
|
||||
|
||||
return !(res1 + res2 == 2);
|
||||
}
|
||||
], [
|
||||
if test "x$with_nptl" = "x"; then
|
||||
AC_MSG_RESULT(disabled)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_KW_THREAD)
|
||||
fi
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for semaphore lib ***
|
||||
dnl ********************************
|
||||
# 'Real Time' functions on Solaris
|
||||
# posix4 on Solaris 2.6
|
||||
# pthread (first!) on Linux
|
||||
AC_SEARCH_LIBS(sem_init, pthread rt posix4)
|
||||
AC_CHECK_LIB(rt, sem_init, LIBS="$LIBS -lrt")
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for timezone stuff **
|
||||
@@ -632,39 +566,11 @@ if test x$platform_win32 = xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Checks for math functions ***
|
||||
dnl *********************************
|
||||
LIBS="$LIBS -lm";
|
||||
AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
|
||||
AC_TRY_LINK([#include <math.h>],
|
||||
[ finite(0.0); ],
|
||||
AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)))
|
||||
AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
|
||||
AC_TRY_LINK([#include <math.h>],
|
||||
[ isfinite(0.0); ],
|
||||
AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)))
|
||||
|
||||
dnl ****************************************************************
|
||||
dnl *** Checks for working poll() (macosx defines it but doesn't ***
|
||||
dnl *** have it in the library (duh)) ***
|
||||
dnl ****************************************************************
|
||||
AC_CHECK_FUNCS(poll)
|
||||
|
||||
dnl *************************
|
||||
dnl *** Check for signbit ***
|
||||
dnl *************************
|
||||
AC_MSG_CHECKING(for signbit)
|
||||
AC_TRY_LINK([#include <math.h>], [
|
||||
int s = signbit(1.0);
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SIGNBIT)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
else
|
||||
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
|
||||
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
|
||||
@@ -743,21 +649,6 @@ if test "x$try_shared_handles" != "xyes"; then
|
||||
AC_SUBST(DISABLE_SHARED_HANDLES)
|
||||
fi
|
||||
|
||||
ICU_CFLAGS=""
|
||||
ICU_LIBS=""
|
||||
enable_icu=no
|
||||
AC_PATH_PROG(ICU_CONFIG, icu-config, no)
|
||||
if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
|
||||
AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
|
||||
else
|
||||
enable_icu="yes. Version: `$ICU_CONFIG --version`"
|
||||
AC_DEFINE(HAVE_ICU)
|
||||
ICU_CFLAGS=`$ICU_CONFIG --cppflags`
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags`
|
||||
fi
|
||||
AC_SUBST(ICU_CFLAGS)
|
||||
AC_SUBST(ICU_LIBS)
|
||||
|
||||
TARGET="unknown"
|
||||
ACCESS_UNALIGNED="yes"
|
||||
|
||||
@@ -796,11 +687,6 @@ case "$host" in
|
||||
# m68k-*-linux*)
|
||||
# TARGET=M68K
|
||||
# ;;
|
||||
hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
|
||||
TARGET=HPPA;
|
||||
arch_target=hppa;
|
||||
ACCESS_UNALIGNED="no"
|
||||
;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
|
||||
powerpc-*-sysv* | powerpc-*-darwin*)
|
||||
TARGET=POWERPC;
|
||||
@@ -857,7 +743,6 @@ AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
AM_CONDITIONAL(S390, test x$TARGET = xS390)
|
||||
AM_CONDITIONAL(HPPA, test x$TARGET = xHPPA)
|
||||
|
||||
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
|
||||
|
||||
@@ -881,7 +766,6 @@ mono/os/Makefile
|
||||
mono/os/win32/Makefile
|
||||
mono/os/unix/Makefile
|
||||
mono/arch/x86/Makefile
|
||||
mono/arch/hppa/Makefile
|
||||
mono/arch/ppc/Makefile
|
||||
mono/arch/sparc/Makefile
|
||||
mono/arch/s390/Makefile
|
||||
@@ -911,5 +795,5 @@ mono.spec
|
||||
echo "
|
||||
|
||||
GC: $gc
|
||||
ICU: $enable_icu
|
||||
|
||||
"
|
||||
@@ -1,927 +0,0 @@
|
||||
<%
|
||||
//
|
||||
// DefaultWsdlHelpGenerator.aspx:
|
||||
//
|
||||
// Author:
|
||||
// Lluis Sanchez Gual ([email protected])
|
||||
//
|
||||
// (C) 2003 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
%>
|
||||
|
||||
<%@ Import Namespace="System.Collections" %>
|
||||
<%@ Import Namespace="System.IO" %>
|
||||
<%@ Import Namespace="System.Xml.Serialization" %>
|
||||
<%@ Import Namespace="System.Xml" %>
|
||||
<%@ Import Namespace="System.Xml.Schema" %>
|
||||
<%@ Import Namespace="System.Web.Services.Description" %>
|
||||
<%@ Import Namespace="System" %>
|
||||
<%@ Import Namespace="System.Net" %>
|
||||
<%@ Import Namespace="System.Globalization" %>
|
||||
<%@ Import Namespace="System.Resources" %>
|
||||
<%@ Import Namespace="System.Diagnostics" %>
|
||||
<%@ Import Namespace="System.CodeDom" %>
|
||||
<%@ Import Namespace="System.CodeDom.Compiler" %>
|
||||
<%@ Import Namespace="Microsoft.CSharp" %>
|
||||
<%@ Import Namespace="Microsoft.VisualBasic" %>
|
||||
<%@ Import Namespace="System.Text.RegularExpressions" %>
|
||||
<%@ Assembly name="System.Web.Services" %>
|
||||
<%@ Page debug="true" %>
|
||||
|
||||
<html>
|
||||
<script language="C#" runat="server">
|
||||
|
||||
ServiceDescriptionCollection descriptions;
|
||||
XmlSchemas schemas;
|
||||
|
||||
string WebServiceName;
|
||||
string WebServiceDescription;
|
||||
string PageName;
|
||||
|
||||
string DefaultBinding;
|
||||
ArrayList ServiceProtocols;
|
||||
|
||||
string CurrentOperationName;
|
||||
string CurrentOperationBinding;
|
||||
string OperationDocumentation;
|
||||
string CurrentOperationFormat;
|
||||
bool CurrentOperationSupportsTest;
|
||||
ArrayList InParams;
|
||||
ArrayList OutParams;
|
||||
string CurrentOperationProtocols;
|
||||
int CodeTextColumns = 95;
|
||||
|
||||
void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
descriptions = (ServiceDescriptionCollection) Context.Items["wsdls"];
|
||||
schemas = (XmlSchemas) Context.Items["schemas"];
|
||||
|
||||
ServiceDescription desc = descriptions [0];
|
||||
if (schemas.Count == 0) schemas = desc.Types.Schemas;
|
||||
|
||||
Service service = desc.Services[0];
|
||||
WebServiceName = service.Name;
|
||||
DefaultBinding = desc.Bindings[0].Name;
|
||||
WebServiceDescription = service.Documentation;
|
||||
ServiceProtocols = FindServiceProtocols (null);
|
||||
|
||||
CurrentOperationName = Request.QueryString["op"];
|
||||
CurrentOperationBinding = Request.QueryString["bnd"];
|
||||
if (CurrentOperationName != null) BuildOperationInfo ();
|
||||
|
||||
PageName = HttpUtility.UrlEncode (Path.GetFileName(Request.Path), Encoding.UTF8);
|
||||
|
||||
ArrayList list = new ArrayList ();
|
||||
foreach (ServiceDescription sd in descriptions) {
|
||||
foreach (Binding bin in sd.Bindings)
|
||||
if (bin.Extensions.Find (typeof(SoapBinding)) != null) list.Add (bin);
|
||||
}
|
||||
|
||||
BindingsRepeater.DataSource = list;
|
||||
Page.DataBind();
|
||||
}
|
||||
|
||||
void BuildOperationInfo ()
|
||||
{
|
||||
InParams = new ArrayList ();
|
||||
OutParams = new ArrayList ();
|
||||
|
||||
Binding binding = FindBinding (CurrentOperationBinding);
|
||||
PortType portType = descriptions.GetPortType (binding.Type);
|
||||
Operation oper = FindOperation (portType, CurrentOperationName);
|
||||
|
||||
OperationDocumentation = oper.Documentation;
|
||||
if (OperationDocumentation == null || OperationDocumentation == "")
|
||||
OperationDocumentation = "No additional remarks";
|
||||
|
||||
foreach (OperationMessage opm in oper.Messages)
|
||||
{
|
||||
if (opm is OperationInput)
|
||||
BuildParameters (InParams, opm);
|
||||
else if (opm is OperationOutput)
|
||||
BuildParameters (OutParams, opm);
|
||||
}
|
||||
|
||||
// Protocols supported by the operation
|
||||
CurrentOperationProtocols = "";
|
||||
ArrayList prots = FindServiceProtocols (CurrentOperationName);
|
||||
for (int n=0; n<prots.Count; n++) {
|
||||
if (n != 0) CurrentOperationProtocols += ", ";
|
||||
CurrentOperationProtocols += (string) prots[n];
|
||||
}
|
||||
|
||||
CurrentOperationSupportsTest = prots.Contains ("HttpGet") || prots.Contains ("HttpPost");
|
||||
|
||||
// Operation format
|
||||
OperationBinding obin = FindOperation (binding, CurrentOperationName);
|
||||
if (obin != null)
|
||||
CurrentOperationFormat = GetOperationFormat (obin);
|
||||
|
||||
InputParamsRepeater.DataSource = InParams;
|
||||
InputFormParamsRepeater.DataSource = InParams;
|
||||
OutputParamsRepeater.DataSource = OutParams;
|
||||
}
|
||||
|
||||
void BuildParameters (ArrayList list, OperationMessage opm)
|
||||
{
|
||||
Message msg = descriptions.GetMessage (opm.Message);
|
||||
if (msg.Parts.Count > 0 && msg.Parts[0].Name == "parameters")
|
||||
{
|
||||
MessagePart part = msg.Parts[0];
|
||||
XmlSchemaComplexType ctype;
|
||||
if (part.Element == XmlQualifiedName.Empty)
|
||||
{
|
||||
ctype = (XmlSchemaComplexType) schemas.Find (part.Type, typeof(XmlSchemaComplexType));
|
||||
}
|
||||
else
|
||||
{
|
||||
XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
|
||||
ctype = (XmlSchemaComplexType) elem.SchemaType;
|
||||
}
|
||||
XmlSchemaSequence seq = ctype.Particle as XmlSchemaSequence;
|
||||
if (seq == null) return;
|
||||
|
||||
foreach (XmlSchemaObject ob in seq.Items)
|
||||
{
|
||||
Parameter p = new Parameter();
|
||||
p.Description = "No additional remarks";
|
||||
|
||||
if (ob is XmlSchemaElement)
|
||||
{
|
||||
XmlSchemaElement selem = GetRefElement ((XmlSchemaElement)ob);
|
||||
p.Name = selem.Name;
|
||||
p.Type = selem.SchemaTypeName.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.Name = "Unknown";
|
||||
p.Type = "Unknown";
|
||||
}
|
||||
list.Add (p);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (MessagePart part in msg.Parts)
|
||||
{
|
||||
Parameter p = new Parameter ();
|
||||
p.Description = "No additional remarks";
|
||||
p.Name = part.Name;
|
||||
if (part.Element == XmlQualifiedName.Empty)
|
||||
p.Type = part.Type.Name;
|
||||
else
|
||||
{
|
||||
XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
|
||||
p.Type = elem.SchemaTypeName.Name;
|
||||
}
|
||||
list.Add (p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string GetOperationFormat (OperationBinding obin)
|
||||
{
|
||||
string format = "";
|
||||
SoapOperationBinding sob = obin.Extensions.Find (typeof(SoapOperationBinding)) as SoapOperationBinding;
|
||||
if (sob != null) {
|
||||
format = sob.Style.ToString ();
|
||||
SoapBodyBinding sbb = obin.Input.Extensions.Find (typeof(SoapBodyBinding)) as SoapBodyBinding;
|
||||
if (sbb != null)
|
||||
format += " / " + sbb.Use;
|
||||
}
|
||||
return format;
|
||||
}
|
||||
|
||||
XmlSchemaElement GetRefElement (XmlSchemaElement elem)
|
||||
{
|
||||
if (!elem.RefName.IsEmpty)
|
||||
return (XmlSchemaElement) schemas.Find (elem.RefName, typeof(XmlSchemaElement));
|
||||
else
|
||||
return elem;
|
||||
}
|
||||
|
||||
ArrayList FindServiceProtocols(string operName)
|
||||
{
|
||||
ArrayList table = new ArrayList ();
|
||||
Service service = descriptions[0].Services[0];
|
||||
foreach (Port port in service.Ports)
|
||||
{
|
||||
string prot = null;
|
||||
Binding bin = descriptions.GetBinding (port.Binding);
|
||||
if (bin.Extensions.Find (typeof(SoapBinding)) != null)
|
||||
prot = "Soap";
|
||||
else
|
||||
{
|
||||
HttpBinding hb = (HttpBinding) bin.Extensions.Find (typeof(HttpBinding));
|
||||
if (hb != null && hb.Verb == "POST") prot = "HttpPost";
|
||||
else if (hb != null && hb.Verb == "GET") prot = "HttpGet";
|
||||
}
|
||||
|
||||
if (prot != null && operName != null)
|
||||
{
|
||||
if (FindOperation (bin, operName) == null)
|
||||
prot = null;
|
||||
}
|
||||
|
||||
if (prot != null && !table.Contains (prot))
|
||||
table.Add (prot);
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
Binding FindBinding (string portName)
|
||||
{
|
||||
Service service = descriptions[0].Services[0];
|
||||
foreach (Port port in service.Ports)
|
||||
if (port.Name == portName)
|
||||
return descriptions.GetBinding (port.Binding);
|
||||
return null;
|
||||
}
|
||||
|
||||
Operation FindOperation (PortType portType, string name)
|
||||
{
|
||||
foreach (Operation oper in portType.Operations) {
|
||||
if (oper.Messages.Input.Name != null) {
|
||||
if (oper.Messages.Input.Name == name) return oper;
|
||||
}
|
||||
else
|
||||
if (oper.Name == name) return oper;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
OperationBinding FindOperation (Binding binding, string name)
|
||||
{
|
||||
foreach (OperationBinding oper in binding.Operations) {
|
||||
if (oper.Input.Name != null) {
|
||||
if (oper.Input.Name == name) return oper;
|
||||
}
|
||||
else
|
||||
if (oper.Name == name) return oper;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
string FormatBindingName (string name)
|
||||
{
|
||||
if (name == DefaultBinding) return "Methods";
|
||||
else return "Methods for binding<br>" + name;
|
||||
}
|
||||
|
||||
string GetOpName (object op)
|
||||
{
|
||||
OperationBinding ob = op as OperationBinding;
|
||||
if (ob == null) return "";
|
||||
if (ob.Input.Name != null) return ob.Input.Name;
|
||||
else return ob.Name;
|
||||
}
|
||||
|
||||
bool HasFormResult
|
||||
{
|
||||
get { return Request.QueryString ["ext"] == "testform"; }
|
||||
}
|
||||
|
||||
string GetTestResult ()
|
||||
{
|
||||
if (!HasFormResult) return null;
|
||||
|
||||
bool fill = false;
|
||||
string qs = "";
|
||||
for (int n=0; n<Request.QueryString.Count; n++)
|
||||
{
|
||||
if (fill) {
|
||||
if (qs != "") qs += "&";
|
||||
qs += Request.QueryString.GetKey(n) + "=" + Request.QueryString [n];
|
||||
}
|
||||
if (Request.QueryString.GetKey(n) == "ext") fill = true;
|
||||
}
|
||||
|
||||
string location = null;
|
||||
ServiceDescription desc = descriptions [0];
|
||||
Service service = desc.Services[0];
|
||||
foreach (Port port in service.Ports)
|
||||
if (port.Name == CurrentOperationBinding)
|
||||
{
|
||||
SoapAddressBinding sbi = (SoapAddressBinding) port.Extensions.Find (typeof(SoapAddressBinding));
|
||||
if (sbi != null)
|
||||
location = sbi.Location;
|
||||
}
|
||||
|
||||
if (location == null)
|
||||
return "Could not locate web service";
|
||||
|
||||
try
|
||||
{
|
||||
WebRequest req = WebRequest.Create (location + "/" + CurrentOperationName + "?" + qs);
|
||||
WebResponse resp = req.GetResponse();
|
||||
StreamReader sr = new StreamReader (resp.GetResponseStream());
|
||||
string s = sr.ReadToEnd ();
|
||||
sr.Close ();
|
||||
return "<div class='code-xml'>" + ColorizeXml(WrapText(s,CodeTextColumns)) + "</div>";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string res = "<b style='color:red'>" + ex.Message + "</b>";
|
||||
WebException wex = ex as WebException;
|
||||
if (wex != null)
|
||||
{
|
||||
WebResponse resp = wex.Response;
|
||||
if (resp != null) {
|
||||
StreamReader sr = new StreamReader (resp.GetResponseStream());
|
||||
string s = sr.ReadToEnd ();
|
||||
sr.Close ();
|
||||
res += "<div class='code-xml'>" + ColorizeXml(WrapText(s,CodeTextColumns)) + "</div>";
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Proxy code generation
|
||||
//
|
||||
|
||||
string GetProxyCode ()
|
||||
{
|
||||
CodeNamespace codeNamespace = new CodeNamespace();
|
||||
CodeCompileUnit codeUnit = new CodeCompileUnit();
|
||||
|
||||
codeUnit.Namespaces.Add (codeNamespace);
|
||||
|
||||
ServiceDescriptionImporter importer = new ServiceDescriptionImporter();
|
||||
|
||||
foreach (ServiceDescription sd in descriptions)
|
||||
importer.AddServiceDescription(sd, null, null);
|
||||
|
||||
foreach (XmlSchema sc in schemas)
|
||||
importer.Schemas.Add (sc);
|
||||
|
||||
importer.Import(codeNamespace, codeUnit);
|
||||
|
||||
string langId = Request.QueryString ["lang"];
|
||||
if (langId == null || langId == "") langId = "cs";
|
||||
CodeDomProvider provider = GetProvider (langId);
|
||||
ICodeGenerator generator = provider.CreateGenerator();
|
||||
CodeGeneratorOptions options = new CodeGeneratorOptions();
|
||||
|
||||
StringWriter sw = new StringWriter ();
|
||||
generator.GenerateCodeFromCompileUnit(codeUnit, sw, options);
|
||||
|
||||
return Colorize (WrapText (sw.ToString (), CodeTextColumns), langId);
|
||||
}
|
||||
|
||||
public string CurrentLanguage
|
||||
{
|
||||
get {
|
||||
string langId = Request.QueryString ["lang"];
|
||||
if (langId == null || langId == "") langId = "cs";
|
||||
return langId;
|
||||
}
|
||||
}
|
||||
|
||||
public string CurrentProxytName
|
||||
{
|
||||
get {
|
||||
string lan = CurrentLanguage == "cs" ? "C#" : "Visual Basic";
|
||||
return lan + " Client Proxy";
|
||||
}
|
||||
}
|
||||
|
||||
private CodeDomProvider GetProvider(string langId)
|
||||
{
|
||||
switch (langId.ToUpper())
|
||||
{
|
||||
case "CS": return new CSharpCodeProvider();
|
||||
case "VB": return new VBCodeProvider();
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Document generation
|
||||
//
|
||||
|
||||
string GenerateDocument ()
|
||||
{
|
||||
StringWriter sw = new StringWriter ();
|
||||
|
||||
if (CurrentDocType == "wsdl")
|
||||
descriptions [CurrentDocInd].Write (sw);
|
||||
else if (CurrentDocType == "schema")
|
||||
schemas [CurrentDocInd].Write (sw);
|
||||
|
||||
return Colorize (WrapText (sw.ToString (), CodeTextColumns), "xml");
|
||||
}
|
||||
|
||||
public string CurrentDocType
|
||||
{
|
||||
get { return Request.QueryString ["doctype"] != null ? Request.QueryString ["doctype"] : "wsdl"; }
|
||||
}
|
||||
|
||||
public int CurrentDocInd
|
||||
{
|
||||
get { return Request.QueryString ["docind"] != null ? int.Parse (Request.QueryString ["docind"]) : 0; }
|
||||
}
|
||||
|
||||
public string CurrentDocumentName
|
||||
{
|
||||
get {
|
||||
if (CurrentDocType == "wsdl")
|
||||
return "WSDL document for namespace \"" + descriptions [CurrentDocInd].TargetNamespace + "\"";
|
||||
else
|
||||
return "Xml Schema for namespace \"" + schemas [CurrentDocInd].TargetNamespace + "\"";
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Pages and tabs
|
||||
//
|
||||
|
||||
bool firstTab = true;
|
||||
ArrayList disabledTabs = new ArrayList ();
|
||||
|
||||
string CurrentTab
|
||||
{
|
||||
get { return Request.QueryString["tab"] != null ? Request.QueryString["tab"] : "main" ; }
|
||||
}
|
||||
|
||||
string CurrentPage
|
||||
{
|
||||
get { return Request.QueryString["page"] != null ? Request.QueryString["page"] : "main" ; }
|
||||
}
|
||||
|
||||
void WriteTabs ()
|
||||
{
|
||||
if (CurrentOperationName != null)
|
||||
{
|
||||
WriteTab ("main","Overview");
|
||||
WriteTab ("test","Test Form");
|
||||
WriteTab ("msg","Message Layout");
|
||||
}
|
||||
}
|
||||
|
||||
void WriteTab (string id, string label)
|
||||
{
|
||||
if (!firstTab) Response.Write(" | ");
|
||||
firstTab = false;
|
||||
|
||||
string cname = CurrentTab == id ? "tabLabelOn" : "tabLabelOff";
|
||||
Response.Write ("<a href='" + PageName + "?" + GetPageContext(null) + GetDataContext() + "tab=" + id + "' style='text-decoration:none'>");
|
||||
Response.Write ("<span class='" + cname + "'>" + label + "</span>");
|
||||
Response.Write ("</a>");
|
||||
}
|
||||
|
||||
string GetTabContext (string pag, string tab)
|
||||
{
|
||||
if (tab == null) tab = CurrentTab;
|
||||
if (pag == null) pag = CurrentPage;
|
||||
if (pag != CurrentPage) tab = "main";
|
||||
return "page=" + pag + "&tab=" + tab + "&";
|
||||
}
|
||||
|
||||
string GetPageContext (string pag)
|
||||
{
|
||||
if (pag == null) pag = CurrentPage;
|
||||
return "page=" + pag + "&";
|
||||
}
|
||||
|
||||
class Tab
|
||||
{
|
||||
public string Id;
|
||||
public string Label;
|
||||
}
|
||||
|
||||
//
|
||||
// Syntax coloring
|
||||
//
|
||||
|
||||
static string keywords_cs =
|
||||
"(\\babstract\\b|\\bevent\\b|\\bnew\\b|\\bstruct\\b|\\bas\\b|\\bexplicit\\b|\\bnull\\b|\\bswitch\\b|\\bbase\\b|\\bextern\\b|" +
|
||||
"\\bobject\\b|\\bthis\\b|\\bbool\\b|\\bfalse\\b|\\boperator\\b|\\bthrow\\b|\\bbreak\\b|\\bfinally\\b|\\bout\\b|\\btrue\\b|" +
|
||||
"\\bbyte\\b|\\bfixed\\b|\\boverride\\b|\\btry\\b|\\bcase\\b|\\bfloat\\b|\\bparams\\b|\\btypeof\\b|\\bcatch\\b|\\bfor\\b|" +
|
||||
"\\bprivate\\b|\\buint\\b|\\bchar\\b|\\bforeach\\b|\\bprotected\\b|\\bulong\\b|\\bchecked\\b|\\bgoto\\b|\\bpublic\\b|" +
|
||||
"\\bunchecked\\b|\\bclass\\b|\\bif\\b|\\breadonly\\b|\\bunsafe\\b|\\bconst\\b|\\bimplicit\\b|\\bref\\b|\\bushort\\b|" +
|
||||
"\\bcontinue\\b|\\bin\\b|\\breturn\\b|\\busing\\b|\\bdecimal\\b|\\bint\\b|\\bsbyte\\b|\\bvirtual\\b|\\bdefault\\b|" +
|
||||
"\\binterface\\b|\\bsealed\\b|\\bvolatile\\b|\\bdelegate\\b|\\binternal\\b|\\bshort\\b|\\bvoid\\b|\\bdo\\b|\\bis\\b|" +
|
||||
"\\bsizeof\\b|\\bwhile\\b|\\bdouble\\b|\\block\\b|\\bstackalloc\\b|\\belse\\b|\\blong\\b|\\bstatic\\b|\\benum\\b|" +
|
||||
"\\bnamespace\\b|\\bstring\\b)";
|
||||
|
||||
static string keywords_vb =
|
||||
"(\\bAddHandler\\b|\\bAddressOf\\b|\\bAlias\\b|\\bAnd\\b|\\bAndAlso\\b|\\bAnsi\\b|\\bAs\\b|\\bAssembly\\b|" +
|
||||
"\\bAuto\\b|\\bBoolean\\b|\\bByRef\\b|\\bByte\\b|\\bByVal\\b|\\bCall\\b|\\bCase\\b|\\bCatch\\b|" +
|
||||
"\\bCBool\\b|\\bCByte\\b|\\bCChar\\b|\\bCDate\\b|\\bCDec\\b|\\bCDbl\\b|\\bChar\\b|\\bCInt\\b|" +
|
||||
"\\bClass\\b|\\bCLng\\b|\\bCObj\\b|\\bConst\\b|\\bCShort\\b|\\bCSng\\b|\\bCStr\\b|\\bCType\\b|" +
|
||||
"\\bDate\\b|\\bDecimal\\b|\\bDeclare\\b|\\bDefault\\b|\\bDelegate\\b|\\bDim\\b|\\bDirectCast\\b|\\bDo\\b|" +
|
||||
"\\bDouble\\b|\\bEach\\b|\\bElse\\b|\\bElseIf\\b|\\bEnd\\b|\\bEnum\\b|\\bErase\\b|\\bError\\b|" +
|
||||
"\\bEvent\\b|\\bExit\\b|\\bFalse\\b|\\bFinally\\b|\\bFor\\b|\\bFriend\\b|\\bFunction\\b|\\bGet\\b|" +
|
||||
"\\bGetType\\b|\\bGoSub\\b|\\bGoTo\\b|\\bHandles\\b|\\bIf\\b|\\bImplements\\b|\\bImports\\b|\\bIn\\b|" +
|
||||
"\\bInherits\\b|\\bInteger\\b|\\bInterface\\b|\\bIs\\b|\\bLet\\b|\\bLib\\b|\\bLike\\b|\\bLong\\b|" +
|
||||
"\\bLoop\\b|\\bMe\\b|\\bMod\\b|\\bModule\\b|\\bMustInherit\\b|\\bMustOverride\\b|\\bMyBase\\b|\\bMyClass\\b|" +
|
||||
"\\bNamespace\\b|\\bNew\\b|\\bNext\\b|\\bNot\\b|\\bNothing\\b|\\bNotInheritable\\b|\\bNotOverridable\\b|\\bObject\\b|" +
|
||||
"\\bOn\\b|\\bOption\\b|\\bOptional\\b|\\bOr\\b|\\bOrElse\\b|\\bOverloads\\b|\\bOverridable\\b|\\bOverrides\\b|" +
|
||||
"\\bParamArray\\b|\\bPreserve\\b|\\bPrivate\\b|\\bProperty\\b|\\bProtected\\b|\\bPublic\\b|\\bRaiseEvent\\b|\\bReadOnly\\b|" +
|
||||
"\\bReDim\\b|\\bREM\\b|\\bRemoveHandler\\b|\\bResume\\b|\\bReturn\\b|\\bSelect\\b|\\bSet\\b|\\bShadows\\b|" +
|
||||
"\\bShared\\b|\\bShort\\b|\\bSingle\\b|\\bStatic\\b|\\bStep\\b|\\bStop\\b|\\bString\\b|\\bStructure\\b|" +
|
||||
"\\bSub\\b|\\bSyncLock\\b|\\bThen\\b|\\bThrow\\b|\\bTo\\b|\\bTrue\\b|\\bTry\\b|\\bTypeOf\\b|" +
|
||||
"\\bUnicode\\b|\\bUntil\\b|\\bVariant\\b|\\bWhen\\b|\\bWhile\\b|\\bWith\\b|\\bWithEvents\\b|\\bWriteOnly\\b|\\bXor\\b)";
|
||||
|
||||
string Colorize (string text, string lang)
|
||||
{
|
||||
if (lang == "xml") return ColorizeXml (text);
|
||||
else if (lang == "cs") return ColorizeCs (text);
|
||||
else if (lang == "vb") return ColorizeVb (text);
|
||||
else return text;
|
||||
}
|
||||
|
||||
string ColorizeXml (string text)
|
||||
{
|
||||
text = text.Replace (" ", " ");
|
||||
Regex re = new Regex ("\r\n|\r|\n");
|
||||
text = re.Replace (text, "_br_");
|
||||
|
||||
re = new Regex ("<\\s*(\\/?)\\s*([\\s\\S]*?)\\s*(\\/?)\\s*>");
|
||||
text = re.Replace (text,"{blue:<$1}{maroon:$2}{blue:$3>}");
|
||||
|
||||
re = new Regex ("\\{(\\w*):([\\s\\S]*?)\\}");
|
||||
text = re.Replace (text,"<span style='color:$1'>$2</span>");
|
||||
|
||||
re = new Regex ("\"(.*?)\"");
|
||||
text = re.Replace (text,"\"<span style='color:purple'>$1</span>\"");
|
||||
|
||||
|
||||
text = text.Replace ("\t", " ");
|
||||
text = text.Replace ("_br_", "<br>");
|
||||
return text;
|
||||
}
|
||||
|
||||
string ColorizeCs (string text)
|
||||
{
|
||||
text = text.Replace (" ", " ");
|
||||
|
||||
text = text.Replace ("<", "<");
|
||||
text = text.Replace (">", ">");
|
||||
|
||||
Regex re = new Regex ("\"((((?!\").)|\\\")*?)\"");
|
||||
text = re.Replace (text,"<span style='color:purple'>\"$1\"</span>");
|
||||
|
||||
re = new Regex ("//(((.(?!\"</span>))|\"(((?!\").)*)\"</span>)*)(\r|\n|\r\n)");
|
||||
text = re.Replace (text,"<span style='color:green'>//$1</span><br/>");
|
||||
|
||||
re = new Regex (keywords_cs);
|
||||
text = re.Replace (text,"<span style='color:blue'>$1</span>");
|
||||
|
||||
text = text.Replace ("\t"," ");
|
||||
text = text.Replace ("\n","<br/>");
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
string ColorizeVb (string text)
|
||||
{
|
||||
text = text.Replace (" ", " ");
|
||||
|
||||
/* Regex re = new Regex ("\"((((?!\").)|\\\")*?)\"");
|
||||
text = re.Replace (text,"<span style='color:purple'>\"$1\"</span>");
|
||||
|
||||
re = new Regex ("'(((.(?!\"\\<\\/span\\>))|\"(((?!\").)*)\"\\<\\/span\\>)*)(\r|\n|\r\n)");
|
||||
text = re.Replace (text,"<span style='color:green'>//$1</span><br/>");
|
||||
|
||||
re = new Regex (keywords_vb);
|
||||
text = re.Replace (text,"<span style='color:blue'>$1</span>");
|
||||
*/
|
||||
text = text.Replace ("\t"," ");
|
||||
text = text.Replace ("\n","<br/>");
|
||||
return text;
|
||||
}
|
||||
|
||||
//
|
||||
// Helper methods and classes
|
||||
//
|
||||
|
||||
string GetDataContext ()
|
||||
{
|
||||
return "op=" + CurrentOperationName + "&bnd=" + CurrentOperationBinding + "&";
|
||||
}
|
||||
|
||||
string GetOptionSel (string v1, string v2)
|
||||
{
|
||||
string op = "<option ";
|
||||
if (v1 == v2) op += "selected ";
|
||||
return op + "value='" + v1 + "'>";
|
||||
}
|
||||
|
||||
string WrapText (string text, int maxChars)
|
||||
{
|
||||
text = text.Replace(" />","/>");
|
||||
|
||||
string linspace = null;
|
||||
int lincount = 0;
|
||||
int breakpos = 0;
|
||||
int linstart = 0;
|
||||
bool inquotes = false;
|
||||
char lastc = ' ';
|
||||
string sublineIndent = "";
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder ();
|
||||
for (int n=0; n<text.Length; n++)
|
||||
{
|
||||
char c = text [n];
|
||||
|
||||
if (c=='\r' || c=='\n' || n==text.Length-1)
|
||||
{
|
||||
sb.Append (linspace + sublineIndent + text.Substring (linstart, n-linstart+1));
|
||||
linspace = null;
|
||||
lincount = 0;
|
||||
linstart = n+1;
|
||||
breakpos = linstart;
|
||||
sublineIndent = "";
|
||||
lastc = c;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lastc==',' || lastc=='(')
|
||||
{
|
||||
if (!inquotes) breakpos = n;
|
||||
}
|
||||
|
||||
if (lincount > maxChars && breakpos >= linstart)
|
||||
{
|
||||
if (linspace != null)
|
||||
sb.Append (linspace + sublineIndent);
|
||||
sb.Append (text.Substring (linstart, breakpos-linstart));
|
||||
sb.Append ("\n");
|
||||
sublineIndent = " ";
|
||||
lincount = linspace.Length + sublineIndent.Length + (n-breakpos);
|
||||
linstart = breakpos;
|
||||
}
|
||||
|
||||
if (c==' ' || c=='\t')
|
||||
{
|
||||
if (!inquotes)
|
||||
breakpos = n;
|
||||
}
|
||||
else if (c=='"')
|
||||
{
|
||||
inquotes = !inquotes;
|
||||
}
|
||||
else
|
||||
if (linspace == null) {
|
||||
linspace = text.Substring (linstart, n-linstart);
|
||||
linstart = n;
|
||||
}
|
||||
|
||||
lincount++;
|
||||
lastc = c;
|
||||
}
|
||||
return sb.ToString ();
|
||||
}
|
||||
|
||||
class Parameter
|
||||
{
|
||||
string name;
|
||||
string type;
|
||||
string description;
|
||||
|
||||
public string Name { get { return name; } set { name = value; } }
|
||||
public string Type { get { return type; } set { type = value; } }
|
||||
public string Description { get { return description; } set { description = value; } }
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<head>
|
||||
<title><%=WebServiceName%> Web Service</title>
|
||||
<style type="text/css">
|
||||
BODY { font-family: Arial; margin-left: 20px; margin-top: 20px; font-size: x-small}
|
||||
TABLE { font-size: x-small }
|
||||
.title { color:dimgray; font-family: Arial; font-size:20pt; font-weight:900}
|
||||
.operationTitle { color:dimgray; font-family: Arial; font-size:15pt; font-weight:900}
|
||||
.method { font-size: x-small }
|
||||
.bindingLabel { font-size: x-small; font-weight:bold; color:darkgray; line-height:8pt; display:block; margin-bottom:3px }
|
||||
.label { font-size: small; font-weight:bold; color:darkgray }
|
||||
.paramTable { font-size: x-small }
|
||||
.paramTable TR { background-color: gainsboro }
|
||||
.paramFormTable { font-size: x-small; padding: 10px; background-color: gainsboro }
|
||||
.paramFormTable TR { background-color: gainsboro }
|
||||
.paramInput { border: solid 1px gray }
|
||||
.button {border: solid 1px gray }
|
||||
.smallSeparator { height:3px; overflow:hidden }
|
||||
.panel { background-color:whitesmoke; border: solid 1px silver; border-top: solid 1px silver }
|
||||
.codePanel { background-color: white; font-size:x-small; padding:7px; border:solid 1px silver}
|
||||
.code-xml { font-size:10pt; font-family:courier }
|
||||
.code-cs { font-size:10pt; font-family:courier }
|
||||
.code-vb { font-size:10pt; font-family:courier }
|
||||
.tabLabelOn { font-weight:bold }
|
||||
.tabLabelOff {color: darkgray }
|
||||
A:link { color: black; }
|
||||
A:visited { color: black; }
|
||||
A:active { color: black; }
|
||||
A:hover { color: blue }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function clearForm ()
|
||||
{
|
||||
document.getElementById("testFormResult").style.display="none";
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="title" style="margin-left:20px">
|
||||
<span class="label">Web Service</span><br>
|
||||
<%=WebServiceName%>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
**********************************************************
|
||||
Left panel
|
||||
-->
|
||||
|
||||
<table border="0" width="100%" cellpadding="15px" cellspacing="15px">
|
||||
<tr valign="top"><td width="150px" class="panel">
|
||||
<div style="width:150px"></div>
|
||||
<a class="method" href='<%=PageName%>'>Overview</a><br>
|
||||
<div class="smallSeparator"></div>
|
||||
<a class="method" href='<%=PageName + "?" + GetPageContext("wsdl")%>'>Service Description</a>
|
||||
<div class="smallSeparator"></div>
|
||||
<a class="method" href='<%=PageName + "?" + GetPageContext("proxy")%>'>Client proxy</a>
|
||||
<br><br>
|
||||
<asp:repeater id="BindingsRepeater" runat=server>
|
||||
<itemtemplate name="itemtemplate">
|
||||
<span class="bindingLabel"><%#FormatBindingName(DataBinder.Eval(Container.DataItem, "Name").ToString())%></span>
|
||||
<asp:repeater id="OperationsRepeater" runat=server datasource='<%# ((Binding)Container.DataItem).Operations %>'>
|
||||
<itemtemplate>
|
||||
<a class="method" href="<%#PageName%>?<%#GetTabContext("op",null)%>op=<%#GetOpName(Container.DataItem)%>&bnd=<%#DataBinder.Eval(Container.DataItem, "Binding.Name")%>"><%#GetOpName(Container.DataItem)%></a>
|
||||
<div class="smallSeparator"></div>
|
||||
</itemtemplate>
|
||||
</asp:repeater>
|
||||
<br>
|
||||
</itemtemplate>
|
||||
</asp:repeater>
|
||||
|
||||
</td><td class="panel">
|
||||
|
||||
<% if (CurrentPage == "main") {%>
|
||||
|
||||
<!--
|
||||
**********************************************************
|
||||
Web service overview
|
||||
-->
|
||||
|
||||
<p class="label">Web Service Overview</p>
|
||||
<%#WebServiceDescription%>
|
||||
|
||||
<%} if (CurrentPage == "op") {%>
|
||||
|
||||
<!--
|
||||
**********************************************************
|
||||
Operation description
|
||||
-->
|
||||
|
||||
<span class="operationTitle"><%#CurrentOperationName%></span>
|
||||
<br><br>
|
||||
<% WriteTabs (); %>
|
||||
<br><br><br>
|
||||
|
||||
<% if (CurrentTab == "main") { %>
|
||||
<span class="label">Input Parameters</span>
|
||||
<div class="smallSeparator"></div>
|
||||
<% if (InParams.Count == 0) { %>
|
||||
No input parameters<br>
|
||||
<% } else { %>
|
||||
<table class="paramTable" cellspacing="1" cellpadding="5">
|
||||
<asp:repeater id="InputParamsRepeater" runat=server>
|
||||
<itemtemplate>
|
||||
<tr>
|
||||
<td width="150"><%#DataBinder.Eval(Container.DataItem, "Name")%></td>
|
||||
<td width="150"><%#DataBinder.Eval(Container.DataItem, "Type")%></td>
|
||||
</tr>
|
||||
</itemtemplate>
|
||||
</asp:repeater>
|
||||
</table>
|
||||
<% } %>
|
||||
<br>
|
||||
|
||||
<% if (OutParams.Count > 0) { %>
|
||||
<span class="label">Output Parameters</span>
|
||||
<div class="smallSeparator"></div>
|
||||
<table class="paramTable" cellspacing="1" cellpadding="5">
|
||||
<asp:repeater id="OutputParamsRepeater" runat=server>
|
||||
<itemtemplate>
|
||||
<tr>
|
||||
<td width="150"><%#DataBinder.Eval(Container.DataItem, "Name")%></td>
|
||||
<td width="150"><%#DataBinder.Eval(Container.DataItem, "Type")%></td>
|
||||
</tr>
|
||||
</itemtemplate>
|
||||
</asp:repeater>
|
||||
</table>
|
||||
<br>
|
||||
<% } %>
|
||||
|
||||
<span class="label">Remarks</span>
|
||||
<div class="smallSeparator"></div>
|
||||
<%#OperationDocumentation%>
|
||||
<br><br>
|
||||
<span class="label">Technical information</span>
|
||||
<div class="smallSeparator"></div>
|
||||
Format: <%#CurrentOperationFormat%>
|
||||
<br>Supported protocols: <%#CurrentOperationProtocols%>
|
||||
<% } %>
|
||||
|
||||
<% if (CurrentTab == "test") {
|
||||
if (CurrentOperationSupportsTest) {%>
|
||||
Enter values for the parameters and click the 'Invoke' button to test this method:<br><br>
|
||||
<form action="<%#PageName%>" method="GET">
|
||||
<input type="hidden" name="page" value="<%#CurrentPage%>">
|
||||
<input type="hidden" name="tab" value="<%#CurrentTab%>">
|
||||
<input type="hidden" name="op" value="<%#CurrentOperationName%>">
|
||||
<input type="hidden" name="bnd" value="<%#CurrentOperationBinding%>">
|
||||
<input type="hidden" name="ext" value="testform">
|
||||
<table class="paramFormTable" cellspacing="0" cellpadding="3">
|
||||
<asp:repeater id="InputFormParamsRepeater" runat=server>
|
||||
<itemtemplate>
|
||||
<tr>
|
||||
<td><%#DataBinder.Eval(Container.DataItem, "Name")%>: </td>
|
||||
<td width="150"><input class="paramInput" type="text" size="20" name="<%#DataBinder.Eval(Container.DataItem, "Name")%>"></td>
|
||||
</tr>
|
||||
</itemtemplate>
|
||||
</asp:repeater>
|
||||
<tr><td></td><td><input class="button" type="submit" value="Invoke"> <input class="button" type="button" onclick="clearForm()" value="Clear"></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id="testFormResult" style="display:<%# (HasFormResult?"block":"none") %>">
|
||||
The web service returned the following result:<br/><br/>
|
||||
<div class="codePanel"><%#GetTestResult()%></div>
|
||||
</div>
|
||||
<% } else {%>
|
||||
The test form is not available for this operation because it has parameters with a complex structure.
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% if (CurrentTab == "msg") { %>
|
||||
TODO
|
||||
<% } %>
|
||||
<%}%>
|
||||
|
||||
<% if (CurrentPage == "proxy") {%>
|
||||
<!--
|
||||
**********************************************************
|
||||
Client Proxy
|
||||
-->
|
||||
<form action="<%#PageName%>" name="langForm" method="GET">
|
||||
Select the language for which you want to generate a proxy
|
||||
<input type="hidden" name="page" value="<%#CurrentPage%>">
|
||||
<SELECT name="lang" onchange="langForm.submit()">
|
||||
<%#GetOptionSel("cs",CurrentLanguage)%>C#</option>
|
||||
<%#GetOptionSel("vb",CurrentLanguage)%>Visual Basic</option>
|
||||
</SELECT>
|
||||
|
||||
</form>
|
||||
<br>
|
||||
<span class="label"><%#CurrentProxytName%></span>
|
||||
<a href="<%#PageName + "?code=" + CurrentLanguage%>">Download</a>
|
||||
<br><br>
|
||||
<div class="codePanel">
|
||||
<div class="code-<%#CurrentLanguage%>"><%#GetProxyCode ()%></div>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
<% if (CurrentPage == "wsdl") {%>
|
||||
<!--
|
||||
**********************************************************
|
||||
Service description
|
||||
-->
|
||||
<% if (descriptions.Count > 1 || schemas.Count > 1) {%>
|
||||
The description of this web service is composed by several documents. Click on the document you want to see:
|
||||
|
||||
<ul>
|
||||
<%
|
||||
for (int n=0; n<descriptions.Count; n++)
|
||||
Response.Write ("<li><a href='" + PageName + "?" + GetPageContext(null) + "doctype=wsdl&docind=" + n + "'>WSDL document " + descriptions[n].TargetNamespace + "</a></li>");
|
||||
for (int n=0; n<schemas.Count; n++)
|
||||
Response.Write ("<li><a href='" + PageName + "?" + GetPageContext(null) + "doctype=schema&docind=" + n + "'>Xml Schema " + schemas[n].TargetNamespace + "</a></li>");
|
||||
%>
|
||||
</ul>
|
||||
|
||||
<%} else {%>
|
||||
<%}%>
|
||||
<br>
|
||||
<span class="label"><%#CurrentDocumentName%></span>
|
||||
<a href="<%=PageName + "?" + CurrentDocType + "=" + CurrentDocInd %>">Download</a>
|
||||
<br><br>
|
||||
<div class="codePanel">
|
||||
<div class="code-xml"><%#GenerateDocument ()%></div>
|
||||
</div>
|
||||
|
||||
<%}%>
|
||||
|
||||
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
|
||||
</td>
|
||||
<td withd="20px"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
monodir = $(sysconfdir)/mono
|
||||
|
||||
EXTRA_DIST = config.in machine.config DefaultWsdlHelpGenerator.aspx
|
||||
EXTRA_DIST = config.in machine.config
|
||||
|
||||
mono_DATA = config machine.config DefaultWsdlHelpGenerator.aspx
|
||||
mono_DATA = config machine.config
|
||||
|
||||
@@ -16,5 +16,4 @@
|
||||
<dllmap dll="libglade-2.0-0.dll" target="libglade-2.0.so" />
|
||||
<dllmap dll="oci" target="clntsh" />
|
||||
<dllmap dll="gtkhtml-3.0" target="libgtkhtml-3.0.so.2" />
|
||||
<dllmap dll="db2cli" target="libdb2_36.so"/>
|
||||
</configuration>
|
||||
+7
-71
@@ -3,9 +3,9 @@
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System" />
|
||||
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System" />
|
||||
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSectionHandler, System" allowLocation="false"/>
|
||||
<sectionGroup name="system.web">
|
||||
<section name="httpHandlers"
|
||||
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
|
||||
@@ -23,12 +23,6 @@
|
||||
type="System.Web.SessionState.SessionStateSectionHandler, System.Web" />
|
||||
<section name="webServices"
|
||||
type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler, System.Web.Services" />
|
||||
<section name="webControls"
|
||||
type="System.Web.Configuration.WebControlsSectionHandler, System.Web" />
|
||||
<section name="compilation"
|
||||
type="System.Web.Configuration.CompilationConfigurationHandler, System.Web" />
|
||||
<section name="httpRuntime"
|
||||
type="System.Web.Configuration.HttpRuntimeConfigurationHandler, System.Web" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.net">
|
||||
<section name="settings"
|
||||
@@ -42,7 +36,7 @@
|
||||
<section name="webRequestModules"
|
||||
type="System.Net.Configuration.WebRequestModuleHandler, System" />
|
||||
</sectionGroup>
|
||||
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler" />
|
||||
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler" />
|
||||
</configSections>
|
||||
<system.net>
|
||||
<connectionManagement>
|
||||
@@ -71,13 +65,10 @@
|
||||
<add verb="*" path="*.asmx" validate="false"
|
||||
type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services" />
|
||||
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web" />
|
||||
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting" validate="false" />
|
||||
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting" validate="false" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web" />
|
||||
</httpHandlers>
|
||||
@@ -85,7 +76,6 @@
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web" />
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web" />
|
||||
</httpModules>
|
||||
<authentication mode="Forms">
|
||||
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
|
||||
@@ -95,10 +85,10 @@
|
||||
</forms>
|
||||
</authentication>
|
||||
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
|
||||
<globalization requestEncoding="utf-8"
|
||||
responseEncoding="utf-8"
|
||||
fileEncoding="utf-8"/>
|
||||
<!--
|
||||
<!-- Sample globalization settings
|
||||
<globalization requestEncoding="iso-8859-1"
|
||||
responseEncoding="iso-8859-1"
|
||||
fileEncoding="iso-8859-1"
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
@@ -112,62 +102,8 @@
|
||||
</protocols>
|
||||
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
|
||||
</webServices>
|
||||
<webControls clientScriptsLocation="/web_scripts" />
|
||||
<compilation debug="false" defaultLanguage="c#">
|
||||
<compilers>
|
||||
<compiler language="cs;c#;csharp" extension=".cs" warningLevel="1" compilerOptions=""
|
||||
type="Microsoft.CSharp.CSharpCodeProvider, System" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
|
||||
warningLevel="1" compilerOptions=""
|
||||
type="Microsoft.VisualBasic.VBCodeProvider, System" />
|
||||
</compilers>
|
||||
<assemblies>
|
||||
<!--<add assembly="mscorlib" /> -->
|
||||
<add assembly="System" />
|
||||
<add assembly="System.Xml" />
|
||||
<add assembly="System.Data" />
|
||||
<add assembly="System.Web" />
|
||||
<add assembly="System.Web.Services" />
|
||||
<add assembly="System.Drawing" />
|
||||
<add assembly="*" /> <!-- Add assemblies in bin directory -->
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<httpRuntime executionTimeout="90"
|
||||
maxRequestLength="4096"
|
||||
useFullyQualifiedRedirectUrl="false"
|
||||
minFreeThreads="8"
|
||||
minLocalRequestFreeThreads="4"
|
||||
appRequestQueueLimit="100" />
|
||||
</system.web>
|
||||
|
||||
<system.runtime.remoting>
|
||||
<application>
|
||||
<channels>
|
||||
<channel ref="http client" displayName="http client (delay loaded)" delayLoadAsClientChannel="true" />
|
||||
<channel ref="tcp client" displayName="tcp client (delay loaded)" delayLoadAsClientChannel="true" />
|
||||
</channels>
|
||||
</application>
|
||||
<channels>
|
||||
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting" />
|
||||
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting" />
|
||||
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting" />
|
||||
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting" />
|
||||
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting" />
|
||||
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting" />
|
||||
</channels>
|
||||
<channelSinkProviders>
|
||||
<clientProviders>
|
||||
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting" />
|
||||
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting" />
|
||||
</clientProviders>
|
||||
<serverProviders>
|
||||
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting" />
|
||||
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting" />
|
||||
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting" />
|
||||
</serverProviders>
|
||||
</channelSinkProviders>
|
||||
</system.runtime.remoting>
|
||||
|
||||
<appSettings>
|
||||
<!--<add key="yourkey" value="your value" /> -->
|
||||
<!--<remove key="a key defined higher in the hierarchy" /> -->
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ WEB_FILES= \
|
||||
tds-providers status testing thanks tools \
|
||||
porting anoncvs monodoc-xml winforms
|
||||
|
||||
OTHERS= pending resources-pending todo mono-build.sh mono-build-w32.sh print-stack
|
||||
OTHERS= pending resources-pending todo mono-build.sh mono-build-w32.sh
|
||||
|
||||
EXTRA_DIST = $(WEB_FILES) README $(OTHERS)
|
||||
|
||||
@@ -17,8 +17,8 @@ all-docs: $(WEB_FILES)
|
||||
runtime documentation download faq contributing \
|
||||
resources status > all-docs
|
||||
|
||||
class-status: class-status.in Makefile.am
|
||||
cat class-status.in > class-status
|
||||
class-status: class-status.in pending-classes Makefile.am
|
||||
cat class-status.in pending-classes > class-status
|
||||
|
||||
pending-classes:
|
||||
|
||||
|
||||
+99
-38
@@ -1,22 +1,82 @@
|
||||
* ADO.NET
|
||||
|
||||
** Data Access in Mono
|
||||
<p>Mono's ADO.NET Developers:
|
||||
|
||||
<ul>
|
||||
<li>Today, our goal is to be compatible with .NET 1.0 and .NET 1.1. We also would like
|
||||
to extend data access beyond what is included with .NET 1.0 and .NET 1.1,
|
||||
such as, including access to more databases, such as, PostgreSQL and MySQL,
|
||||
but also provide classes that help in creating data source-agnostic code, such as, Mono.Data.ProviderFactory.</li>
|
||||
<li>In the future, we would like to be compatible with .NET 1.2. This
|
||||
would include features like:
|
||||
<ul>
|
||||
<li><a href="http://longhorn.msdn.microsoft.com/lhsdk/ndp/daconworkingwithobjectspacesarchitecture.aspx">ObjectSpaces</a></li>
|
||||
<li>provide support for hosting Mono languages (C-Sharp, MonoBASIC, etc...)
|
||||
within a DBMS engine, such as, MySQL or PostgreSQL.</li>
|
||||
<li>implement .net 1.2 classes, such as, those found in System.Data.ProviderBase</li>
|
||||
<li>other stuff which can be brought up on the mono-list</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<table border=1>
|
||||
|
||||
<tr>
|
||||
<td><b>Developer</b></td>
|
||||
<td><b>Email</b></td>
|
||||
<td><b>Contribution</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Rodrigo Moya</td>
|
||||
<td>rodrigo -AT-<br> ximian.comNOSPAM</td>
|
||||
<td>ADO.NET coordinator,<br> OLE DB provider,<br> and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Daniel Morgan</td>
|
||||
<td>danmorg -AT-<br> sc.rr.comNOSPAM</td>
|
||||
<td>MySQL, PostgreSQL, <br>Oracle providers,<br> and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tim Coleman</td>
|
||||
<td>tim -AT- <br>timcoleman.comNOSPAM</td>
|
||||
<td>Microsoft SQL Server, <br>Sybase, <br>TDS providers,<br> Oracle,
|
||||
<br>and tests.<br>
|
||||
He has
|
||||
contributed <br>to other parts <br>of Mono too, <br>such as,
|
||||
<br>EnterpriseServices,
|
||||
XML, <br>and WebServices.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Brian Ritchie</td>
|
||||
<td>brianlritchie -AT-<br> hotmail.comNOSPAM</td>
|
||||
<td>ODBC provider <br>and the ProviderFactory <br>in Mono.Data</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Vladimir Vukicevic</td>
|
||||
<td>vladimir -AT-<br> pobox.comNOSPAM</td>
|
||||
<td>SQL Lite provider. <br> He has contributed to GTK# <br>and mPhoto too.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Christopher Bockner</td>
|
||||
<td>cleared -AT-<br> rogers.comNOSPAM</td>
|
||||
<td>IBM DB2 Universal <br>Database provider</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Ville Palo</td>
|
||||
<td>vi64pa -AT-<br> koti.soon.fiNOSPAM</td>
|
||||
<td>XML stuff <br>in System.Data <br>including DataSet <br>
|
||||
and XmlDataDocument, <br>and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Gonzalo Paniagua Javier</td>
|
||||
<td>gonzalo -AT-<br> ximian.comNOSPAM</td>
|
||||
<td>Integration between <br>System.Web and <br>System.Data</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Gaurav Vaish</td>
|
||||
<td>gvaish -AT-<br> iitk.ac.inNOSPAM</td>
|
||||
<td>Web controls</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Phillip Jerkins</td>
|
||||
<td>Phillip.Jerkins -AT-<br> morgankeegan.comNOSPAM</td>
|
||||
<td>Named Instance support <br>in System.Data.SqlClient</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
** Bugs and Feature Requests
|
||||
|
||||
@@ -28,14 +88,14 @@
|
||||
and easy to create
|
||||
one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
<li>Any requests for new features or missing functionality
|
||||
can entered as a bug in Bugzilla too</li>
|
||||
<li>Any RFE (Request For Enhancement) for features missing or new functionality
|
||||
should be entered as a bug in Bugzilla too</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** ADO.NET Data Providers
|
||||
|
||||
<p>Mono has many ADO.NET Data Providers to get you connected:
|
||||
<p>List of ADO.NET Data Providers working in Mono:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/ibmdb2.html">IBM DB2 Universal Database</a></li>
|
||||
@@ -87,38 +147,39 @@
|
||||
<p>Some tools that can be used for ADO.NET and other technologies (ASP.NET, XML, etc).
|
||||
|
||||
<ul>
|
||||
<li><p><b>SQL# command line query tool</b> is a command-line tool to
|
||||
enter and execute SQL statements or
|
||||
execute a batch of SQL commands from a file.
|
||||
<p>It can
|
||||
<li><b>SQL# CLI</b> - a SQL query tool with a command-line interface.
|
||||
It can be used to enter and execute SQL statements or
|
||||
execute a batch of SQL commands from a file. It can
|
||||
be used to test connection strings, connect to various ADO.NET
|
||||
providers, save output to text, html, or xml.
|
||||
<p>The SQL# CLI is distributed with the
|
||||
providers, save output to text, html, or xml. It is a work-in-progress.
|
||||
The SQL# CLI is distributed with the
|
||||
Mono runtime and class libraries as an executable assembly sqlsharp.exe.
|
||||
<p>The source to SQL# CLI can be found in the mcs source at
|
||||
The source to SQL# CLI can be found in the mcs source at
|
||||
mcs/tools/SqlSharp/SqlSharpCli.cs
|
||||
</li>
|
||||
|
||||
<li><p><b>SQL# For GTK#</b> - is a graphical SQL database query tool</b> allows a user
|
||||
to enter SQL commands in a top panel which is a text editor.
|
||||
<p>It has a toolbar and menu for various tasks, such as, executing
|
||||
<li><p><b>SQL# GUI - a graphical SQL query tool</b> allows a user
|
||||
to enter SQL commands in a top panel which is a text editor. It
|
||||
has a toolbar and menu for various tasks, such as, executing
|
||||
SQL commands one-at-a-time or in a batch. The results would appear
|
||||
in a bottom panel in a grid or could be saved to a file (xml, html, csv).
|
||||
<p>Also, the bottom panel would allow logging of SQL command executed.
|
||||
Here is a screenshot of <a href="http://go-mono.com/images/sqlsharp.png">SQL# For GTK#</a> which
|
||||
provides a GUI interface using the <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> toolkit.
|
||||
<p>SQL# For GTK# can be found in mono cvs as sqlsharpgtk.</li>
|
||||
Also, the bottom panel would allow logging of SQL command executed.
|
||||
Currently, there is a <a href="http://go-mono.com/images/sqlsharp.png">SQL# For GTK#</a> which
|
||||
provides a GUI interface using the <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> toolkit. SQL# For GTK#
|
||||
is a work-in-progress and can be found in the mcs source at
|
||||
mcs/tools/SqlSharp/gui/gtk-sharp</li>
|
||||
</ul>
|
||||
|
||||
<p>Tools we would like to have, but they have not been created yet:
|
||||
|
||||
<ul>
|
||||
<li>Mono has an <b>XML Schema Definition tool</b> (xsd.exe).</b>
|
||||
|
||||
<li><b>XML Schema Definition tool</b> <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpconxmlschemadefinitiontoolxsdexe.asp">xsd.exe</a> needs
|
||||
to be created. Maybe this TODO item should be at the System.XML web page instead.
|
||||
|
||||
<ul>
|
||||
<li>This tool
|
||||
would works like the xsd.exe tool included with
|
||||
the .NET Framework. The Xsd.exe tool has the
|
||||
would work like the xsd.exe tool included with
|
||||
the .NET Framework. The Xsd.exe tools has the
|
||||
following uses:
|
||||
<ul>
|
||||
<li><b>XDR to XSD</b> - used to generate an XML schema from an XDR (XML Data Reduced schema) file.
|
||||
@@ -269,7 +330,7 @@
|
||||
Mike Kestner or Rachel Hestilov would be the best people to ask for help on GTK#.
|
||||
|
||||
<p><b>Integration with QT#</b> has not been started. Any information on
|
||||
how this can be done is appreciated. Marcus would be the best
|
||||
how this can be done is appreciated. Adam Treat would be the best
|
||||
person to ask about QT#.
|
||||
|
||||
<p><b>Building System.Data</b>
|
||||
|
||||
+1
-4
@@ -2,7 +2,7 @@
|
||||
|
||||
Anonymous access to the Mono is available currently from three
|
||||
servers (anoncvs-spain-1.go-mono.com,
|
||||
anoncvs-spain-2.go-mono.com and us-anoncvs.go-mono.com).
|
||||
anoncvs-spain-2.go-mono.com and anoncvs-us-1.go-mono.com).
|
||||
|
||||
You can also use `anoncvs.go-mono.com', and that will pick a
|
||||
server automatically for you.
|
||||
@@ -43,9 +43,6 @@
|
||||
Special thanks to Jesus Climent, Rodrigo Moya, Juantomás
|
||||
García and Ismael Olea for making this happen.
|
||||
|
||||
Thanks to Matt Liotta of MontaraSoftware for hosting our
|
||||
US-based AnonCVS server.
|
||||
|
||||
<a name="#mirror">
|
||||
** Becoming an AnonCVS mirror
|
||||
|
||||
|
||||
+11
-17
@@ -13,15 +13,12 @@
|
||||
ASP.NET works either embedded into
|
||||
our XSP server test server or the mod_mono Apache module.
|
||||
|
||||
We are now working on bug fixing and adding missing features
|
||||
We are now working bug fixing and adding missing features
|
||||
after making the whole pipeline compatible with MS.
|
||||
|
||||
Tim started work on the Web Services. After that, Lluis is in
|
||||
charge and has been working hard on them as part of our
|
||||
<a href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=sourcegear">SourceGear</a> contract.
|
||||
|
||||
Web services are now supported and there are some samples in the
|
||||
XSP set of tests.
|
||||
Tim started work on the Web Services. Lluis is in charge of
|
||||
it now and web services are now supported. He also added a web
|
||||
service sample to the XSP server set of tests.
|
||||
|
||||
** Hosting
|
||||
|
||||
@@ -63,23 +60,20 @@
|
||||
<a name="mod_mono">
|
||||
* mod_mono
|
||||
|
||||
This Apache module is available from our <a
|
||||
href="download.html">download page</a>. The <a href="anoncvs.html">
|
||||
cvs</a> module name is mod_mono. It works with both 1.3 and 2.0
|
||||
versions of the <a href="http://httpd.apache.org">apache server</a>.
|
||||
|
||||
It allows apache to serve ASP.NET pages.
|
||||
This Apache module available at <a
|
||||
href="http://www.apacheworld.org/modmono/">ApacheWorld.org</a>
|
||||
hosts the Mono runtime and the Mono's ASP.NET runtime, and
|
||||
allows apache to server asp.net web pages.
|
||||
|
||||
Work is underway to improve it.
|
||||
|
||||
** Controls
|
||||
|
||||
A lot of work has been put in the various classes that
|
||||
implement the controls (UI.HtmlControls and UI.WebControls).
|
||||
They have been coded mostly in the dark, and without being
|
||||
implement the controls (UI.HtmlControls and UI.WebControls),
|
||||
but they have been coded mostly in the dark, and without being
|
||||
able to test them in real life: Gaurav and Leen worked very
|
||||
hard on this namespace. After that, we keep fixing bugs on
|
||||
them.
|
||||
hard on this namespace.
|
||||
|
||||
We can now render all HtmlControls and all WebControls.
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
You can read the aggregates news from the Mono developers in
|
||||
<a href="http://www.go-mono.com/monologue">Monologue</a>. You
|
||||
can also download our aggregator from the <a
|
||||
href="anoncvs.html">AnonCVS</a> server.
|
||||
|
||||
Various Mono contributors maintain blogs, some are listed here:
|
||||
|
||||
<a href="http://codeblogs.ximian.com/blogs/benm/index.rdf"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://codeblogs.ximian.com/blogs/benm/">Ben Maurer</a>
|
||||
<br>
|
||||
<a href="http://ada.fciencias.unam.mx/~olopez/jscript/cesar.rss2"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://ada.fciencias.unam.mx/~olopez/jscript/">Cesar Nataren</a>
|
||||
<br>
|
||||
<a href="http://www.jacksonh.net/jackson/blog/jackson.rss2"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://www.jacksonh.net/jackson/blog/">Jackson Harper</a>
|
||||
<br>
|
||||
<a href="http://primates.ximian.com/~lluis/blog/index.rdf"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://primates.ximian.com/~lluis/blog/">Lluis Sánchez</a>
|
||||
<br>
|
||||
<a href="http://primates.ximian.com/~martin/blog/rss.xml"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://primates.ximian.com/~martin/blog/">Martin Baulig</a>
|
||||
<br>
|
||||
<a href="http://primates.ximian.com/~miguel/miguel2.rss"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://primates.ximian.com/~miguel/activity-log.php">Miguel de Icaza</a>
|
||||
<br>
|
||||
<a href="http://primates.ximian.com/~mkestner/blog/index.rdf"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://primates.ximian.com/~mkestner/blog/">Mike Kestner</a>
|
||||
<br>
|
||||
<a href="http://pages.infinit.net/ctech/poupou.rss"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://pages.infinit.net/ctech/poupou.html">Sebastien Pouliot</a>
|
||||
<br>
|
||||
<a href="http://primates.ximian.com/~gonzalo/mono/blog/index.xml"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://primates.ximian.com/~gonzalo/mono/blog/">Gonzalo Paniagua</a>
|
||||
<br>
|
||||
<a href="http://codeblogs.ximian.com/blogs/ndrochak/index.rdf"><img align="center" src="images/xml.gif"></a>
|
||||
<a href="http://codeblogs.ximian.com/blogs/ndrochak/">Nick Drochak</a>
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
* CVS Access
|
||||
|
||||
Here we describe how one obtains commit access to the Mono CVS
|
||||
repository and the responsibilities that come with that access
|
||||
privilege.
|
||||
|
||||
These only apply to the Mono CVS repository, and not to the <a
|
||||
href="http://forge.novell.com/modules/xfmod/community/?monocomm">Mono
|
||||
Community</a> repositories at Novell Forge.
|
||||
Here we describe how one obtains commit access to the CVS repository
|
||||
and the responsibilities that come with that access privilege.
|
||||
|
||||
** What is CVS?
|
||||
|
||||
@@ -28,13 +23,9 @@
|
||||
mailing lists and/or bugzilla for review.
|
||||
|
||||
If you are not a developer, but want to access the latest sources,
|
||||
please see the <a href="anoncvs.html">AnonCVS</a>
|
||||
instructions. If you are not a direct contributor to Mono,
|
||||
but want to host your .NET or Mono-based project, you can use
|
||||
<a href="forge.html">Novell Forge</a>.
|
||||
please see the <a href="anoncvs.html">AnonCVS</a> instructions.
|
||||
|
||||
|
||||
If you feel you are ready for a CVS account send an e-mail to
|
||||
If you feel you are ready for a CVS account send an e-mail to
|
||||
<a href="mailto:[email protected]">miguel</a> with your public OpenSSH
|
||||
key for this purpose. Please specify if the key was generated with SSH
|
||||
version 1 or version 2. Detailed instructions are below.
|
||||
|
||||
+11
-1
@@ -5,26 +5,36 @@
|
||||
Here is the status of the different assemblies:
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/class-status-corlib.html">corlib</a>: The core library.
|
||||
<li><a href="http://www.go-mono.com/class-status-System.html">System</a>: Extra modules
|
||||
<li><a href="http://www.go-mono.com/class-status-System.html">System</a>.
|
||||
<li><a href="http://www.go-mono.com/class-status-System.Xml.html">System.Xml</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Data.html">System.Data</a>:
|
||||
Database access functionality (also check the <a href="ado-net.html">Mono ADO.NET status</a> pages).
|
||||
|
||||
<li><a href="http://www.go-mono.com/class-status-System.Drawing.html">System.Drawing</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Web.html">System.Web</a>:
|
||||
ASP.NET classes, also check the <a href="asp-net.html">Mono ASP.NET status pages</a>
|
||||
|
||||
<li><a href="http://www.go-mono.com/class-status-System.Web.Services.html">System.Web.Services</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-Microsoft.VisualBasic.html">Microsoft.VisualBasic</a>:
|
||||
Support runtime for Visual Basic applications
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Windows.Forms.html">Windows.Forms</a>:
|
||||
there is also a <a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">mailing
|
||||
list available</a>
|
||||
|
||||
<li><a href="http://www.go-mono.com/class-status-System.EnterpriseServices.html">EnterpriseServices</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Runtime.Serialization.Formatters.Soap.html">System.Runtime.Serialization.Formatters.Soap</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Security.html">System.Security</a>:
|
||||
Xml Signature Security classes, also check the <a href="crypto.html">Cryptography status pages</a>
|
||||
|
||||
+43
-57
@@ -67,8 +67,8 @@
|
||||
(using the Mono.Security.ASN1 class).
|
||||
|
||||
* Software Publisher Certificates (SPC) used by Authenticode
|
||||
(tm) to sign assemblies are supported and <b>minimally</b>
|
||||
validated.
|
||||
(tm) to sign assemblies are supported (extraction from PE
|
||||
files) but <b>not yet</b> validated.
|
||||
|
||||
* Unit tests are generated from a set of existing certificates
|
||||
(about a dozen) each having different properties. Another
|
||||
@@ -77,6 +77,14 @@
|
||||
size and time consideration, i.e. a 7.5Mb C# source file).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Authenticode(tm) support is incomplete. We can extract the
|
||||
certificates from PE files but cannot validate the signature
|
||||
nor the certificate chain (and we're still missing some trust
|
||||
anchors). See Tools section for more information.
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* Except for their structure <b>there are no validation of the
|
||||
@@ -96,8 +104,8 @@
|
||||
continue to evolve to support the security tools.
|
||||
|
||||
* Microsoft implementation of <code>X509Certificate</code> is
|
||||
done by using CryptoAPI (unmanaged code). Based on the
|
||||
exceptions thrown, Authenticode(tm) support is done via COM.
|
||||
done by using CryptoAPI (unmanaged code). From the exceptions
|
||||
thrown Authenticode(tm) support is done via COM.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
@@ -148,10 +156,6 @@
|
||||
* Additional algorithms: MD2, ARCFOUR (required for SSL)
|
||||
* Convertion helpers
|
||||
</ul>
|
||||
*** Namespace: Mono.Security.Protocol.Tls
|
||||
<ul>
|
||||
* An 100% managed TLS implementation from Carlos Guzman Alvarez.
|
||||
</ul>
|
||||
*** Namespace: Mono.Security.X509
|
||||
<ul>
|
||||
* X.509 structures (certificate, CRL...) building and decoding.
|
||||
@@ -164,6 +168,8 @@
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Some part of the work has not yet been commited (still cleaning up).
|
||||
|
||||
* A big part of this assembly is also included inside Mono's
|
||||
corlib. The classes are duplicated in this assembly so the
|
||||
functionalities can be used without a dependency on Mono's
|
||||
@@ -202,8 +208,7 @@
|
||||
algorithms shouldn't be used in new design (MD4 is broken,
|
||||
MD2 and MD5 aren't considered safe for some usage). They are
|
||||
included to preserve interoperability with older applications
|
||||
(e.g. some old, but still valid, X.509 certificates use MD2,
|
||||
MD4 is required for NTLM authentication ...).
|
||||
(e.g. some old, but still valid, X.509 certificates use MD2).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
@@ -242,36 +247,26 @@
|
||||
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a> or
|
||||
other committees.
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security
|
||||
<b>[*] There are some licensing issues to consider before starting to
|
||||
implement WS-Security. All contributors must sign an agreement with
|
||||
Microsoft before commiting anything related to WS-Security into CVS.
|
||||
</b>
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security [*]
|
||||
*** Namespace: Microsoft.Web.Services.Timestamp [*]
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Most WSE 1.0 classes are implemented.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Some classes from System.Security assembly need to be
|
||||
duplicated (and somewhat fixed) in WSE for XMLDSIG.
|
||||
|
||||
* There are still missing classes and <b>many</b> missing
|
||||
unit tests.
|
||||
</ul>
|
||||
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Timestamp
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* This seems complete for WSE 1.0 but some new classes were
|
||||
introduced in WSE 2.0.
|
||||
* Nothing (yet) commited in CVS <b>[*]</b>.
|
||||
</ul>
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security.X509
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* X509Certificate support is complete for both WSE 1.0 and 2.0.
|
||||
* Nothing (yet) commited in CVS. However the classes in this
|
||||
namespace are outside WS-Security scope. So development, for
|
||||
those classes, could be done without signing this agreement.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
@@ -284,9 +279,7 @@
|
||||
*** Notes
|
||||
<ul>
|
||||
* Microsoft has <a href="http://microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&displaylang=en">released</a>
|
||||
a technical preview of WSE 2. <b>Note that WSDK (the technical
|
||||
preview of WSE) had A LOT of changes before it's initial
|
||||
release!</b>
|
||||
a technical preview of WSE 2.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
@@ -299,7 +292,7 @@
|
||||
|
||||
**** Status
|
||||
|
||||
The following tools are complete (or mostly complete):
|
||||
The following tools are complete (mostly complete):
|
||||
<ul>
|
||||
* <code>secutil</code> is a tool to extract certificates and
|
||||
strongnames from assemblies in a format that can be easily
|
||||
@@ -312,16 +305,6 @@
|
||||
* <code>makecert</code> to create X.509 test certificates that
|
||||
can be used (once transformed in SPC) to sign assemblies. It's
|
||||
now possible to generate SSL certificates for web servers.
|
||||
|
||||
* <code>sn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. Current version can create, convert, sign and
|
||||
verify strongnames signatures. Some configuration options
|
||||
are still missing.
|
||||
|
||||
* <code>signcode</code> and <code>chktrust</code> for signing
|
||||
and validating Authenticode(tm) signatures on assemblies (or
|
||||
any PE file) are now working (signature and timestamps) but
|
||||
some options aren't yet supported.
|
||||
</ul>
|
||||
|
||||
Somewhat usable, somewhat incomplete:
|
||||
@@ -331,6 +314,10 @@
|
||||
Windows), while <code>gcertview</code> is the same viewer
|
||||
implemented for GTK# (working on both Windows and Linux).
|
||||
|
||||
* <code>sn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. Current version is limited to creating new keypairs
|
||||
and converting values.
|
||||
|
||||
* <code>monosn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. This tools is part of the runtime (not the class
|
||||
library) and as such is written in C and won't run without Mono.
|
||||
@@ -340,6 +327,11 @@
|
||||
**** TODO
|
||||
The following tools are still missing or largely incomplete:
|
||||
<ul>
|
||||
|
||||
* <code>signcode</code> and <code>chktrust</code> (in progress)
|
||||
for signing and validating Authenticode(tm) signatures on
|
||||
assemblies (or any PE file).
|
||||
|
||||
* Other tools like a, GUI-based, certificate manager...
|
||||
</ul>
|
||||
|
||||
@@ -348,21 +340,15 @@
|
||||
tools are of limited use until supported by the runtime.
|
||||
|
||||
<hr>
|
||||
** References
|
||||
** Other stuff
|
||||
|
||||
<ul>
|
||||
* RSA Laboratories' <a href="http://www.rsasecurity.com/rsalabs/faq/index.html">
|
||||
Frequently Asked Questions</a> About Today's Cryptography, Version 4.1
|
||||
|
||||
* Public-Key Cryptography Standards (<a href="http://www.rsasecurity.com/rsalabs/pkcs/index.html">
|
||||
PKCS</a>)
|
||||
|
||||
* National Institute of Standards and Technology - Federal
|
||||
Information Processing Standards <a href="http://csrc.nist.gov/publications/fips/index.html">
|
||||
NIST FIPS</a>
|
||||
* SSL/TLS for secure communication (a prototype is under way).
|
||||
Some work is already visible in Mono.Security assembly (e.g.
|
||||
RC4, RSAManaged ...).
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
** How to Help
|
||||
|
||||
<ul>
|
||||
@@ -389,4 +375,4 @@
|
||||
informations about the status of the cryptographic classes.
|
||||
|
||||
<hr>
|
||||
Last reviewed: October 26, 2003 (post mono 0.28)
|
||||
Last reviewed: August 9, 2003 (post mono 0.25)
|
||||
+3
-104
@@ -12,106 +12,6 @@
|
||||
href="http://www.go-mono.org/mono-beginning.html">Resources/Beginning
|
||||
section</a>, the <a
|
||||
href="http://www.go-mono.org/faq.html">FAQ</a>.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
<td>
|
||||
<b>Release 0.28</b><br>
|
||||
<a href="archive/mono-0.28.html">Release notes</a><br>
|
||||
Oct 1st, 2003
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="1" cellpadding="3">
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source Code</b>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/mcs-0.28.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.28.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/xsp-0.6.tar.gz">XSP web server (0.6)</a>
|
||||
<li><a href="archive/mod_mono-0.5.tar.gz">Apache Mono module (mod_mono)</a>
|
||||
<li><a href="archive/monodoc-0.7.tar.gz">MonoDoc 0.7</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source RPMs</b><br>
|
||||
(No RPMS for XSP).
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-90-i386/mono-0.28-1.ximian.6.1.src.rpm">mono-0.28-1.src.rpm (RH9)</a>
|
||||
<li><a href="archive/redhat-90-i386/mono-0.28-1.ximian.5.1.src.rpm">mono-0.28-1.src.rpm (RH8)</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<img src="images/redhat-36.gif"><b>Red Hat 9.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-90-i386/mono-0.28-1.ximian.6.1.i386.rpm">mono-0.28-1.ximian.6.1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-90-i386/mono-devel-0.28-1.ximian.6.1.i386.rpm">mono-devel-0.28-1.ximian.6.1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-90-i386/mono-debuginfo-0.28-1.ximian.6.1.i386.rpm">mono-debuginfo-0.28-1.i386.rpm</a>
|
||||
<br>
|
||||
<li><a href="archive/redhat-90-i386/mono-wine-20030318-1.ximian.6.4.i386.rpm">mono-wine-20030318-1.ximian.6.4.i386.rpm</a>
|
||||
<li><a href="archive/redhat-90-i386/mono-wine-debuginfo-20030318-1.ximian.6.4.i386.rpm">mono-wine-debuginfo-20030318-1.ximian.6.4.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<img src="images/redhat-36.gif"><b>Red Hat 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-80-i386/mono-0.28-1.ximian.5.1.i386.rpm">mono-0.28-1.ximian.5.1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-devel-0.28-1.ximian.5.1.i386.rpm">mono-devel-0.28-1.ximian.5.1.i386.rpm</a>
|
||||
<br>
|
||||
<li><a href="archive/redhat-80-i386/mono-wine-20030318-1.ximian.5.3.i386.rpm">mono-wine-20030318-1.ximian.5.3.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<img src="images/mandrake-36.gif"><b>Mandrake 9.1/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/mandrake-91-i586/mono-0.28-1.ximian.6.1.i586.rpm">mono-0.28-1.ximian.6.1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-91-i586/mono-devel-0.28-1.ximian.6.1.i586.rpm">mono-devel-0.28-1.ximian.6.1.i586.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Linux s390</b>
|
||||
<ul>
|
||||
<li><a href="archive/s390/libgc-6.1-1.s390.rpm">libgc-6.1-1.s390.rpm</a>
|
||||
<li><a href="archive/s390/libgc-devel-6.1-1.s390.rpm">libgc-devel-6.1-1.s390.rpm</a>
|
||||
<li><a href="archive/s390/mono-0.28-1.s390.rpm">mono-0.28-1.s390.rpm</a>
|
||||
<li><a href="archive/s390/mono-devel-0.28-1.s390.rpm">mono-devel-0.28-1.s390.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<img src="images/suse-36.gif"><b>SuSE 8.2</b>
|
||||
<ul>
|
||||
<li><a href="archive/suse-82-i586/mono-0.28-1.ximian.7.1.i586.rpm">mono-0.28-1.ximian.7.1.i586.rpm</a>
|
||||
<li><a href="archive/suse-82-i586/mono-devel-0.28-1.ximian.7.1.i586.rpm">mono-devel-0.28-1.ximian.7.1.i586.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<img src="images/windows-36.gif"><b>Windows installer</b>
|
||||
<ul>
|
||||
<li><a href="archive/mono-0.28-win32-1.exe">mono-0.28-win32-1.exe</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
@@ -190,7 +90,7 @@
|
||||
<td bgcolor="#999999">
|
||||
<img src="images/debian-36.gif"><b>Debian</b>
|
||||
<ul>
|
||||
<li><a href="http://www.debianplanet.com/mono/">Debian Packages here.</a>
|
||||
<li><a href="h#ttp://www.debianplanet.com/mono/">Debian Packages here.</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
@@ -218,8 +118,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
</td>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
@@ -240,7 +139,7 @@
|
||||
<li><a href="archive/mono-0.25.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/xsp-0.4.tar.gz">XSP web server (0.4)</a>
|
||||
<li><a href="archive/monodoc-0.5.tar.gz">MonoDoc 0.5</a>
|
||||
<li><a href="archive/gtk-sharp-0.11.tar.gz">Gtk# 0.11</a>
|
||||
<li><a href="archive/gtk-sharp-0.10.tar.gz">Gtk# 0.10</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
* Drawing
|
||||
|
||||
Mono provides two mechanism to draw. The first exposes the
|
||||
Microsoft System.Drawing API and the second exposes the <a
|
||||
href="http://www.cairographics.org">Cairo</a> API.
|
||||
|
||||
* System.Drawing
|
||||
|
||||
The System.Drawing implementation in Mono is designed to be
|
||||
compatible with the Microsoft API. The imaging model is very
|
||||
similar to the PDF 1.4 composition-based imaging model.
|
||||
|
||||
Our implementation is a C# wrapper around the GDI+ C API (also
|
||||
called the "GDI+ Flat API").
|
||||
|
||||
<center>
|
||||
<img src="images/system-drawing.png">
|
||||
</center>
|
||||
|
||||
In Windows Mono uses the GDI+ library that is included
|
||||
with the operating system, while in Unix we provide an
|
||||
implementation of this API which uses Cairo to do the heavy
|
||||
lifting.
|
||||
|
||||
The implementation of GDI+ lives in mcs/class/System.Drawing
|
||||
in the gdiplus directory and requires <a
|
||||
href="http://www.cairographics.org">Cairo</a> to be installed
|
||||
to get the package built.
|
||||
|
||||
The C# code that implement System.Drawing is the same for
|
||||
Windows and Unix builds.
|
||||
|
||||
Since this is an implementation of an existing Microsoft API
|
||||
no architectural changes go here.
|
||||
|
||||
* Mono.Cairo
|
||||
|
||||
The Mono.Cairo.dll assembly exposes the Cairo API to managed
|
||||
applications. The mapping is a pretty straightforward one,
|
||||
and the programming model is very close to the C API.
|
||||
|
||||
This API is still unstable due to the nature of the underlying
|
||||
API being used and will be revisited as Cairo evolves.
|
||||
@@ -120,10 +120,6 @@
|
||||
layer, so in each file where you use pthread.h you should
|
||||
include the <gc/gc.h> file.
|
||||
|
||||
If you can not do this for any reasons, just remember that you
|
||||
can not store pointers to Mono Objects on the stack, you can
|
||||
store them safely in the heap, or in global variables though
|
||||
|
||||
* Exposing C code to the CIL universe
|
||||
|
||||
The Mono runtime provides two mechanisms to expose C code to
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<a href="#basics">Basics</a><br>
|
||||
<a href="#novell">The Novell Role in the Mono project</a><br>
|
||||
<a href="#ximian">The Ximian Role in the Mono project</a><br>
|
||||
<a href="#gnome">Mono and GNOME</a><br>
|
||||
<a href="#gui">Building GUI applications with Mono</a><br>
|
||||
<a href="#msft">Mono and Microsoft</a><br>
|
||||
@@ -87,7 +87,8 @@ A: The ".NET Initiative" is a somewhat nebulous company-wide effort by
|
||||
Microsoft, one part of which is a cross-platform development
|
||||
framework. Mono is an implementation of the development framework,
|
||||
but not an implementation of anything else related to the .NET
|
||||
Initiative, such as Passport or software-as-a-service.
|
||||
Initiative, such as Passport, software-as-a-service, or
|
||||
corporate re-branding.
|
||||
|
||||
Q: What technologies are included in Mono?
|
||||
|
||||
@@ -146,26 +147,49 @@ Q: Will you offer an ECMA-compliant set of class libraries?
|
||||
|
||||
A: Eventually we will. Our current focus is on inter-operating
|
||||
with the Microsoft SDK, but we will also offer an ECMA compliant
|
||||
subset of the libraries.
|
||||
set of libraries.
|
||||
|
||||
Q: What does the name "Mono" mean?
|
||||
|
||||
A: Mono is the word for `monkey' in Spanish. We like monkeys.
|
||||
A: Mono is the word for `monkey' in Spanish. We like monkeys.
|
||||
|
||||
Q: Does Mono work today?
|
||||
Q: Is Mono usable?
|
||||
|
||||
A: The execution engine works on various platforms, we support
|
||||
Just-in-Time and Ahead-of-Time compilations on Intel x86 machines
|
||||
(and soon PowerPC).
|
||||
A: The JIT engine is usable on Intel x86 machines. An interpreter
|
||||
can be used on other non-Intel x86 machines.
|
||||
|
||||
The class libraries are mature enough to run various real
|
||||
applications: our C# compiler, ASP.NET, and Gtk#-based
|
||||
applications.
|
||||
The class libraries are mature enough to run some real applications
|
||||
(the compiler for instance, and every day more and more applications
|
||||
are natively developed with Mono).
|
||||
|
||||
Q: When will you ship Mono?
|
||||
Q: When will you ship it?
|
||||
|
||||
A: Please see the <a href="mono-roadmap.html">Mono Roadmap</a> for
|
||||
more details on the release plans.
|
||||
A: Different parts of Mono will achieve usability at different stages,
|
||||
once we are comfortable with the compiler, we will release "Mono Core",
|
||||
which contains everything needed to develop applications with the base
|
||||
class libraries, this will happen soon and in the meantime you can
|
||||
download daily snapshots of our work. Also the full ASP.NET support is
|
||||
close to completion.
|
||||
|
||||
Other higher level class libraries (ASP.NET, ADO.NET, WinForms) will
|
||||
be released when they become stable.
|
||||
|
||||
Q: When will Mono 1.0 ship?
|
||||
|
||||
A: We are planning on releasing Mono 1.0 (Mono Core) which will ship all the
|
||||
components of Mono that are known to be stable in Q4 2003/Q1 2004.
|
||||
|
||||
This release will lack System.Windows.Forms and
|
||||
Enterprise.Services, as they will not be production ready on this timeframe.
|
||||
|
||||
Mono 1.2 should come in Q2 2004 and include the missing components
|
||||
libraries that will make Mono feature-compatible with .NET 1.0
|
||||
|
||||
Q: What major components will you include in Mono?
|
||||
|
||||
A: Hopefully everything that Microsoft ships on their Framework
|
||||
(ADO.NET, ASP.NET, WinForms), and we encourage third party developers to
|
||||
create reusable components that work on both Mono and Windows.
|
||||
|
||||
Q: How can I contribute?
|
||||
|
||||
@@ -187,26 +211,26 @@ Q: Miguel said once that Mono was being implemented in COBOL. Is that true?.
|
||||
A: No. It was a joke.
|
||||
|
||||
|
||||
<a name="novell"></a>
|
||||
<a name="ximian"></a>
|
||||
|
||||
** The Novell Role in the Mono Project
|
||||
** The Ximian Role in the Mono Project
|
||||
|
||||
Q: Why is Novell working on .NET?
|
||||
Q: Why is Ximian working on .NET?
|
||||
|
||||
A: Novell is interested in providing the best tools for programmers to
|
||||
develop applications for Free Operating Systems.
|
||||
A: Ximian is interested in providing the best tools for programmers to
|
||||
develop applications for Free Operating Systems.
|
||||
|
||||
For more information, read the project <a
|
||||
href="rationale.html">rationale</a> page.
|
||||
|
||||
Q: Will Novell be able to take on a project of this size?
|
||||
Q: Will Ximian be able to take on a project of this size?
|
||||
|
||||
A: Of course not. Novell is a supporter of the Mono project, but the only way
|
||||
A: Of course not. Ximian a supporter of the Mono project, but the only way
|
||||
to implement something of this size is for the entire free software
|
||||
community to get involved. Visit the <a href="contributing.html">contributing</a>
|
||||
page if you'd like to help out.
|
||||
|
||||
Q: What pieces Novell be working on?
|
||||
Q: What pieces will Ximian be working on?
|
||||
|
||||
A: We will devote most of our resources to work on the pieces which are
|
||||
on the critical path to release a development and execution
|
||||
@@ -214,30 +238,25 @@ A: We will devote most of our resources to work on the pieces which are
|
||||
the real world, it will achieve a critical mass of developers to
|
||||
improve it further.
|
||||
|
||||
Q: Will Novell offer Mono commercially?
|
||||
Q: Will Ximian offer Mono commercially?
|
||||
|
||||
A: When Mono is ready to be shipped Ximian will offer a commercial
|
||||
support and services for Mono. Mono components are also
|
||||
available to be licensed commercially. For licensing details,
|
||||
contact <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
support and services for Mono.
|
||||
|
||||
Q: Does Novell provide consulting services around Mono?
|
||||
Q: Does Ximian provide consulting services around Mono?
|
||||
|
||||
A: Yes, Novell does provide consulting services around Mono to
|
||||
A: Yes, Ximian does provide consulting services around Mono to
|
||||
make it suitable to your needs. Porting the runtime engine,
|
||||
customizing it, working on specific classes or tuning the code
|
||||
for your particular needs.
|
||||
|
||||
Please contact <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
for consulting services information.
|
||||
|
||||
Q: Will you wait until Mono is finished?
|
||||
|
||||
A: Mono will ship on various stages as they mature. Some people
|
||||
require only a subset of the technologies, those will ship first,
|
||||
see the <a href="mono-roadmap.html">Mono Roadmap</a> for details
|
||||
require only a subset of the technologies, those will ship first.
|
||||
|
||||
More advanced features will take more time to develop. A support
|
||||
time line will be available in June 2002.
|
||||
|
||||
<a name="gnome"></a>
|
||||
** Mono and GNOME
|
||||
@@ -251,10 +270,6 @@ A: In a number of ways. This project was born out of the need of
|
||||
implement Winforms and the Drawing2D API and are considering
|
||||
GObject support.
|
||||
|
||||
Mono team members work actively on the <a
|
||||
href="http://gtk-sharp.sf.net">Gtk#</a> project: a binding of the
|
||||
GNOME class libraries for .NET and Mono.
|
||||
|
||||
Q: Has the GNOME Foundation or the GNOME team adopted Mono?
|
||||
|
||||
A: Mono is too new to be adopted by those groups. We hope that the
|
||||
@@ -283,8 +298,7 @@ A: Yes, we will provide a set of classes for implementing and using
|
||||
Q: Does Mono depend on GNOME?
|
||||
|
||||
A: No, Mono does not depend on GNOME. We use a few packages produced by
|
||||
the GNOME team like the `glib' library, we also use other
|
||||
third-party open source libraries like Cairo and ICU.
|
||||
the GNOME team like the `glib' library.
|
||||
|
||||
Q: But will I be able to build GNOME applications?
|
||||
|
||||
@@ -292,50 +306,47 @@ A: Yes, we will enable people to write GNOME applications using Mono.
|
||||
|
||||
Q: Do you have C# bindings for GNOME?.
|
||||
|
||||
A: Yes, the <a href="http://gtk-sharp.sf.net">Gtk# project</a>
|
||||
provides bindings for Gtk+, Gdk, Atk, libgnome, libgnomecanvas, and
|
||||
libgnomeui. Other libraries under the GNOME framework will be
|
||||
added on an as-needed (and as-requested) basis.
|
||||
A: Yes, we currently bind libgnome, libgnomecanvas, and libgnomeui --
|
||||
although I dare say I have no idea how functional the bindings are
|
||||
outside of what I tested in the sample app. I imagine other libraries
|
||||
under the GNOME framework will be added on an as-needed (and as-requested)
|
||||
basis...although a truly good bonobo binding will have to wait on the CORBA
|
||||
remoting support which has been started recently.
|
||||
|
||||
<a name="gui"></a>
|
||||
** GUI applications
|
||||
|
||||
Q: Will Mono enable GUI applications to be authored?
|
||||
|
||||
A: Yes, you will be able to build GUI applications. Indeed, that is
|
||||
our main focus. Today you can use Gtk# or #WT to develop GUI
|
||||
applications, and support for Windows.Forms is underway.
|
||||
A: Yes, you will be able to build GUI applications. Indeed, that is our
|
||||
main focus. We will provide both the Windows.Forms API and the Gtk# API.
|
||||
|
||||
Q: What is the difference between Gtk# and System.Windows.Forms?
|
||||
|
||||
A: Gtk# is a set of bindings for the Gtk+ toolkit for C# (and other
|
||||
CIL-enabled languages), it integrates natively with the Gnome
|
||||
desktop. System.Windows.Forms is an API defined by Microsoft to
|
||||
build GUI applications.
|
||||
|
||||
Windows.Forms is currently being implemented on top of a modified
|
||||
version of Wine that can be used as a library: WineLib.
|
||||
CIL-enabled languages). System.Windows.Forms is an API defined
|
||||
by Microsoft to build GUI applications.
|
||||
|
||||
Q: Why not implement System.Windows.Forms on top of Gtk# or Qt#?
|
||||
|
||||
A: Compatibility.
|
||||
A: There are several reasons for this.
|
||||
|
||||
Although it is possible to run simple Windows.Forms applications
|
||||
with the Gtk#-based backend of Windows.Forms, it is very unlikely
|
||||
that the implementation will ever implement everything needed for
|
||||
full compatibility with Windows.Forms.
|
||||
|
||||
The reason is that Windows.Forms is not a complete toolkit, and to
|
||||
work around this problem some of the underlying Win32 foundation is
|
||||
exposed to the programmer in the form of exposing the Windows
|
||||
message handler (WndProc). Any control can override this method.
|
||||
Also developers often P/Invoke into Win32 to get to functionality
|
||||
that was not wrapped.
|
||||
|
||||
To achieve full compatibility, we would have to emulate this, and
|
||||
it would take too long.
|
||||
|
||||
For more details see the <a href="winforms.html">winforms page</a>
|
||||
First of all, Gtk+ and Qt are standard toolkits on Linux, and their
|
||||
proponents want to use their favorite toolkits when writing
|
||||
applications.
|
||||
|
||||
Related to this is the idea that System.Windows.Forms is
|
||||
brain-dead in certain areas, such as internationalization.
|
||||
System.Windows.Forms uses explicit sizes for all controls, as opposed
|
||||
to Gtk+ and Qt which use a box/packing model, which can better deal with
|
||||
the different string lengths different languages will have.
|
||||
|
||||
Next is compatibility. It is not possible to implement
|
||||
System.Windows.Forms on top of Gtk+/Qt and have 100% compatibility,
|
||||
because System.Windows.Forms exposes some Win32-isms, such as the
|
||||
Win32 message loop. In order to maintain compatibility, Wine must be used,
|
||||
and this is being done; see the
|
||||
<a href="/winforms.html">System.Windows.Forms effort page</a>.
|
||||
|
||||
Q: Wine applications do not look like native applications, what are
|
||||
you going to do about this?
|
||||
@@ -363,7 +374,9 @@ A: Gtk# is becoming very usable and you can create applications and
|
||||
|
||||
Q: How can I compile my HelloWorld.cs which uses Gtk#?.
|
||||
|
||||
A: Try: mcs -r:gtk-sharp HelloWorld.cs
|
||||
A: Try: mcs --unsafe -o HelloWorld.exe -r glib-sharp -r pango-sharp -r
|
||||
atk-sharp -r gdk-sharp -r gtk-sharp -r gdk-imaging-sharp
|
||||
HelloWorld.cs
|
||||
|
||||
Q: Is there any way how to connect DataAdapter to some GTK# controls?
|
||||
|
||||
@@ -378,8 +391,9 @@ A: There is a sample file called `DbClient' in gtk-sharp/samples that you
|
||||
|
||||
Q: Do you have an estimate for when Windows.Forms will be released?
|
||||
|
||||
A: The plan currently is aimed at Q3/2004.
|
||||
|
||||
A: We do not know, volunteers are working on this, but there is no set
|
||||
date yet. The current approach is using the Wine Library to implement
|
||||
it.
|
||||
|
||||
Q: Do you have a comparission chart about the various toolkit
|
||||
offerings?
|
||||
@@ -403,7 +417,7 @@ A: There is no high level communication between Ximian and Microsoft
|
||||
Ximian was also invited to participate in the ECMA committee
|
||||
meetings for C# and the CLI.
|
||||
|
||||
Q: Are Microsoft or Corel paying Ximian to do this?
|
||||
Q: Is Microsoft or Corel paying Ximian to do this?
|
||||
|
||||
A: No.
|
||||
|
||||
@@ -619,6 +633,12 @@ A: Yes, with some reservations.
|
||||
all dependent assemblies available on all desired platforms. (How to do so
|
||||
is outside the bounds of this FAQ.)
|
||||
|
||||
For example, since Mono's System.Windows.Forms implementation will use
|
||||
Wine, System.Windows.Forms is only as portable as Wine is. It's possible
|
||||
that Mono may run on a platform, but Wine will not, in which case a
|
||||
System.Windows.Forms app will not run on that platform. This is similarly
|
||||
true for all assemblies that are not 100% managed code.
|
||||
|
||||
Mono must also have an implementation for the .NET assemblies used. For
|
||||
example the System.EnterpriseServices namespace is part of .NET, but it
|
||||
has not been implemented in Mono. Thus, any applications using this
|
||||
@@ -805,8 +825,10 @@ A: MonoDoc is a graphical documentation browser for the Mono class
|
||||
Q: I am having trouble compiling a new version of Mono from CVS, it
|
||||
complains about my runtime being out of sync.
|
||||
|
||||
A: To upgrade your class libraries and compiler, see the
|
||||
INSTALL.txt in the MCS directory.
|
||||
A: Jonathan Pryor has provided the following answer:
|
||||
|
||||
To upgrade your class libraries and compiler, see the See
|
||||
README.building in the MCS directory.
|
||||
|
||||
The single biggest source of confusion seems to be the "Your
|
||||
runtime is out of sync" messages. Realize that this is *normal*
|
||||
@@ -822,18 +844,6 @@ A: To upgrade your class libraries and compiler, see the
|
||||
Once this is done, you can continue building your entire
|
||||
environment.
|
||||
|
||||
For instance you just need to:
|
||||
1.- Upgrade your Mono runtime (you might better do it with the
|
||||
mono-build.sh script available in the <a
|
||||
href="http://www.go-mono.com">download</a> page.
|
||||
2.- Get the latest mono-lite tarball from the daily snapshots
|
||||
<a href="http://www.go-mono.com/daily/">page</a>, unzip and
|
||||
untar and copy all the dll files to your install path lib
|
||||
directory (typically pointed by the $MONO_PATH variable).
|
||||
Copy all the exe files to the install path bin directory.
|
||||
3.- Then checkout or update your mcs CVS copy. Then follow
|
||||
the steps described in mcs/INSTALL.txt.
|
||||
|
||||
Q: Will it be possible to use the CLI features without using byte codes
|
||||
or the JIT?
|
||||
|
||||
@@ -1077,11 +1087,37 @@ A: Yes, Java could target the CLI, Microsoft's J# compiler does that.
|
||||
|
||||
Q: Is it possible to write a JVM byte code to CIL converter?
|
||||
|
||||
A: Yes, this is what <a href="http://weblog.ikvm.net">IKVM</a> does.
|
||||
A: Yes, it is possible. Here are a few starting point:
|
||||
|
||||
<ul>
|
||||
* A byte code representation is really a flattened forest of
|
||||
trees. Look at the Mono JIT engine to see how we compute
|
||||
the basic blocks (this is used to figure out the "trees").
|
||||
|
||||
The forest is just an array of trees.
|
||||
|
||||
Indeed, run the JIT engine with -d (mono -d prog.exe) and
|
||||
you will see how these trees look like.
|
||||
|
||||
You will have to do something similar for Java.
|
||||
|
||||
* Each "forest of trees" has a meaning. This meaning can now
|
||||
be translated into the equivalent "meaning" in CLR-land.
|
||||
</ul>
|
||||
|
||||
See also the <a href="http://weblog.ikvm.net/">IKVM project</a>
|
||||
|
||||
Q: Could mono become a hybrid CIL/java platform?
|
||||
|
||||
A: This can be obtained easily with IKVM.
|
||||
A: No. It is quite far from the philosophy of the project. The idea of Mono
|
||||
is, to have only _one_ VM, on which all can run. And if there existing a
|
||||
binary-converter from Java-.class to IL and if there existing something
|
||||
like J-Sharp on Mono, you can write programs in Java, which than can run
|
||||
on Mono. You do not need two bindings (like your example: GTK-Sharp _and_
|
||||
Java-Gnome). You need only _one_ of it (GTK-Sharp). Thats the idea of Mono.
|
||||
An other point is, that there are no people, who use Open Source-JVMs. They
|
||||
all prefer Suns original. But for Unix there don't exist a .NET-Framework.
|
||||
So it is possible, that in the future Mono is the standard .NET for Unixes.
|
||||
|
||||
Q: Do you plan to implement a Javascript compiler?
|
||||
|
||||
@@ -1122,7 +1158,7 @@ Q: Do you plan to Embrace and Extend .NET?
|
||||
|
||||
A: Embracing a good technology is good. Extending technologies in
|
||||
incompatible ways is bad for the users, so we do not plan on
|
||||
making incompatible changes to the technologies.
|
||||
extending the technologies.
|
||||
|
||||
If you have innovative ideas, and want to create new classes, we
|
||||
encourage you to make those classes operate correctly well in both
|
||||
@@ -1132,11 +1168,6 @@ A: Embracing a good technology is good. Extending technologies in
|
||||
developed either by members of the Mono community, or other
|
||||
groups.
|
||||
|
||||
In some cases, we have found the bits from Microsoft to be
|
||||
incomplete, but we avoid breaking the API, instead we expose the
|
||||
missing functionality in new assemblies (See Mono.Security and
|
||||
System.Security).
|
||||
|
||||
Q: Is there any way I can develop the class libraries using Linux yet?
|
||||
|
||||
A: Yes. Mono has been selfhosting since March 2002.
|
||||
@@ -1168,14 +1199,11 @@ A: Our main intention at Ximian is to be able to develop GNOME
|
||||
|
||||
Q: What operating systems/CPUs do you support
|
||||
|
||||
A: Mono currently runs on Linux, Windows, Solaris, FreeBSD, HP-UX and
|
||||
MacOS X.
|
||||
|
||||
A: Mono currently runs on Linux, Windows, Solaris and FreeBSD.
|
||||
There is a JIT engine available for x86 processors that can
|
||||
generate code and optimizations tailored for a particular CPU.
|
||||
|
||||
Interpreters exist for the SPARC v8, SPARC v9, Itanium, HP-PA,
|
||||
PowerPC and StrongARM CPUs.
|
||||
Interpreters exist for the SPARC, PowerPC and StrongARM CPUs.
|
||||
|
||||
Q: Does Mono run on Windows?
|
||||
|
||||
@@ -1198,6 +1226,17 @@ A: It will depend only if you are using a particular assembly (for
|
||||
in Mono for implementing a `Hello World Enterprise P2P Web
|
||||
Service', you will not need any GNOME components.
|
||||
|
||||
Q: Is anyone working on porting Mono to IA-64?
|
||||
|
||||
A: Nobody is working on such port.
|
||||
|
||||
Q: If I were about to start a Mono port to IA-64,would the same lburg code
|
||||
generator work for IA-64 also? or anything else need to be used for code
|
||||
generation(as the processor architecture is totally different from IA32)
|
||||
|
||||
A: The lburg approach can be use for any processor architecture. But you might
|
||||
think in another better approach.
|
||||
|
||||
Q: Do you plan to port Rhino to C#?.
|
||||
|
||||
A: Eto Demerzal has started a Rhino port to C#.
|
||||
@@ -1217,12 +1256,29 @@ Q: What projects will you reuse or build upon?
|
||||
A: We want to get Mono in the hands of programmers soon. We are
|
||||
interested in reusing existing open source software.
|
||||
|
||||
Q: What about Intel's research JIT framework, ORP?
|
||||
|
||||
A: At this time, we are investigating whether we can use elements of
|
||||
ORP for Mono. ORP is a research JIT engine that has a clearly
|
||||
defined API that splits the JIT from the GC system and the actual
|
||||
byte code implementation.
|
||||
|
||||
We are using some pieces of ORP (Their code generation interface)
|
||||
and we use it as a source of inspiration for optimizations. Paolo
|
||||
and Dietmar consider ORP as being one of the best JIT engines out
|
||||
there (and their research work and papers are very useful if you are
|
||||
interested in JIT technology).
|
||||
|
||||
Q: What about using GNU Lightning?
|
||||
|
||||
A: We are not using GNU Lightning. Our JIT is using an instruction
|
||||
selector based on tree-pattern matching, and a code generation
|
||||
interface that is very tied to the current architecture.
|
||||
|
||||
Q: Will I be able to use Microsoft SQL Server 2000 or will I need to switch
|
||||
to a specific Open Source Database. Will I need to recode?
|
||||
|
||||
A: There is no need to rewrite your code as long as you keep using
|
||||
Microsoft SQL Server. If you want to use an open source database,
|
||||
you might need to make changes to your code.
|
||||
A: There should not be any need to recode.
|
||||
|
||||
Q: What do I need to watch out for when programming in VB.NET so that I'm
|
||||
sure to be able to run those apps on Linux?
|
||||
@@ -1236,7 +1292,7 @@ A: Not making any P/Invoke or DLL calls should and not using anything in
|
||||
Q: Will built-in reporting be supported for crystal reports? This is a
|
||||
heavily used part of our system.
|
||||
|
||||
A: . Crystal Reports are propriety. Someone may try to emulate
|
||||
A: Probably not. Crystal Reports are propriety. Someone may try to emulate
|
||||
the behavior, but no-one has yet volunteered.
|
||||
|
||||
Q: Who about writing to the registry? As I understand it, Linux does not have
|
||||
@@ -1252,22 +1308,19 @@ A: Try to avoid it. Although there would be a emulation for registry in
|
||||
Q: System.Data.SqlClient with FreeTDS, will you port parts of these to C# and
|
||||
use them?
|
||||
|
||||
A: This has been done.
|
||||
A: if their license is compatible with mono's, yes, we'd think about porting
|
||||
them. If not, we'll continue with the plan of using FreeTDS.
|
||||
|
||||
<a name="gcc"></a>
|
||||
** Mono and GCC
|
||||
|
||||
Q: Are you working on a GCC front-end to C#? A GCC back-end that will
|
||||
generate CIL images?
|
||||
generate CIL images? What about making a front-end to GCC that
|
||||
takes CIL images and generates native code?
|
||||
|
||||
A: We would love to see a GCC modification that would generate CIL
|
||||
images, but there is nothing at this point.
|
||||
|
||||
Q: What about making a front-end to GCC that takes CIL images and
|
||||
generates native code?
|
||||
|
||||
A: There is no active work on this area, but Mono already provides
|
||||
pre-compilation services (Ahead-of-Time compilation).
|
||||
A: We are currently seeking volunteers for those projects.
|
||||
Visit the <a href="contributing.html">contributing</a> section if
|
||||
you are interested.
|
||||
|
||||
Q: But would this work around the GPL in the GCC compiler and allow
|
||||
people to work on non-free front-ends?
|
||||
@@ -1275,6 +1328,12 @@ Q: But would this work around the GPL in the GCC compiler and allow
|
||||
A: People can already do this by targeting the JVM byte codes (there
|
||||
are about 130 compilers for various languages that target the JVM).
|
||||
|
||||
Q: Why are you writing a JIT engine instead of a front-end to GCC?
|
||||
|
||||
A: We want the JIT engine and runtime engine because they will be able
|
||||
to execute CIL executables generated on Windows, and so no recompilation
|
||||
will be necessary.
|
||||
|
||||
<a name="performance"></a>
|
||||
** Performance
|
||||
|
||||
@@ -1283,9 +1342,11 @@ Q: How fast will Mono be?
|
||||
A: We can not predict the future, but a conservative estimate is that
|
||||
it would be at least `as fast as other JIT engines'.
|
||||
|
||||
Mono's JIT engine has been recently re-architected, and it provides
|
||||
many new features, and layers suitable for optimization. It is
|
||||
relatively easy to add new optimizations to Mono.
|
||||
We would like to ship various JIT engines with Mono, just like
|
||||
Microsoft has done with their .NET development platform. We could
|
||||
provide a faster, JIT for fast load times but lower performance,
|
||||
and an and an optimizing JIT that would be slower at generating
|
||||
code but produce more optimal output.
|
||||
|
||||
The CIL has some advantages over the Java byte code: it is really
|
||||
an intermediate representation and there are a number of
|
||||
@@ -1435,12 +1496,17 @@ Q: Will Ximian offer certifications on Mono or related technologies?.
|
||||
|
||||
A: It's possible. But there is no plan about this. So the short answer is no.
|
||||
|
||||
Q: Are there any Boehm's GC binaries?
|
||||
|
||||
A: Yes. You can find RPMs <a href="http://java.thn.htu.se/~toor/">here</a>, though
|
||||
if your distribution provides the correct packages, you should use those.
|
||||
The suggested version of the Boehm GC is 6.1.
|
||||
|
||||
Q: How can I report a bug?
|
||||
|
||||
A: The best thing is to track down the bug and provide a simple test
|
||||
to reproduce the bug. You can then add the bug to our bug tracking
|
||||
system. You can use our <a href="bugs.html">Bug Form</a> to enter
|
||||
bugs for the appropriate component.
|
||||
A: The best thing is to track down the bug and provide a simple test to
|
||||
reproduce the bug. You can then add the bug to the
|
||||
<a href="http://bugzilla.ximian.com/enter_bug.cgi">bugtracking system</a>.
|
||||
|
||||
Please provide information about what version of mono you're using
|
||||
and any relevant details to be able to reproduce the bug. Note that
|
||||
@@ -1491,17 +1557,12 @@ Q: Is it possible to use Visual C++ with Mono?.
|
||||
A: It's possible to run VC++ generated apps under Mono, but we do not
|
||||
provide a Manager C++ compiler ourselves.
|
||||
|
||||
Q: Does Mono support generics?.
|
||||
|
||||
A: Mono doesn't support generics currently but a lot of work is being
|
||||
done towards it.
|
||||
|
||||
<a name="problems"></a>
|
||||
** Mono Common Problems
|
||||
|
||||
If you are having problems compiling or running Mono software
|
||||
or if you think that you found a bug, etc. Please visit the
|
||||
<a href="http://monoevo.sf.net/mono-common-problems.html">Mono Common Problems</a> document and try there.
|
||||
<a href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">Mono Common Problems</a> document and try there.
|
||||
|
||||
** Credits
|
||||
|
||||
|
||||
+80
-37
@@ -19,18 +19,19 @@
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Current stable version: 1.0</li>
|
||||
|
||||
<li>Current developement version: 1.5</li>
|
||||
|
||||
<li>The new data provider/driver is written in C# and provides a high-performance native
|
||||
<ul>
|
||||
<li>Currently, it is able to connect to Firebird and Interbase databases
|
||||
and execute commands</li>
|
||||
|
||||
<li>The new data
|
||||
provider/driver is written in C# and provides a high-performance native
|
||||
implementation of the GDS32/API functions. This means that .Net developers
|
||||
will be able to access Firebird databases without the need of Firebird
|
||||
client install</li>
|
||||
@@ -38,31 +39,74 @@
|
||||
<li>In support of the new module, a new mailing list
|
||||
<a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a> has
|
||||
been created. Please use this list for any
|
||||
questions that you may have about the provider</li>
|
||||
questions that you may have about the provider</li>
|
||||
|
||||
<li>Stuff that works:
|
||||
<ul>
|
||||
<li>Currently implemented classes:
|
||||
<ul>
|
||||
<li>Connection and Connection Pooling</li>
|
||||
<li>Command</li>
|
||||
<li>Transaction</li>
|
||||
<li>CommandBuilder</li>
|
||||
<li>DataAdapter</li>
|
||||
<li>DataReader</li>
|
||||
<li>Error</li>
|
||||
<li>ErrorCollection</li>
|
||||
<li>Exception</li>
|
||||
<li>Parameter</li>
|
||||
<li>ParameterCollection</li>
|
||||
<li>Transaction</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** New features & enhancements in 1.5 version
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Better fit to ADO.NET</li>
|
||||
|
||||
<li>New GDS implementation</li>
|
||||
|
||||
<li>Implicit transaction support</li>
|
||||
|
||||
<li>Array datatype support</li>
|
||||
|
||||
<li>Firebird services API support</li>
|
||||
|
||||
<li>Firebird events API support</li>
|
||||
|
||||
<li>Stored procedure calls using Sql Server style</li>
|
||||
|
||||
<li>Support for retrieve database schema information ( FbConnection.GetDbSchema )</li>
|
||||
|
||||
<li>Improved Commandbuilder implementation</li>
|
||||
</ul>
|
||||
|
||||
<li>Bug fixing</li>
|
||||
<li>Improving API reference documentation</li>
|
||||
<li>Full testing with Firebird 1.5</li>
|
||||
<li>Test with Mono ( http://www.go-mono.com )
|
||||
<ul>
|
||||
<li>Status : Started</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Support for array datatype
|
||||
<ul>
|
||||
<li>Status : Started</li>
|
||||
<li>Comments: See Interbase API reference documentation</li>
|
||||
<li>Add new file FbArray.cs for array fields management</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Support for Stored Procs calls that have returns values
|
||||
<ul>
|
||||
<li>Status : Pending.</li>
|
||||
<li>Comments: Modify the isc_dsql_prepare method of GDS implementation for
|
||||
allow to return the output parameters.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Implementation of FbClientPermission and FbClientPermissionAttribute
|
||||
<ul>
|
||||
<li>Status : Pending</li>
|
||||
<li>Comments: See if these are really needed for Firebird</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Improve Logger implementation
|
||||
<ul>
|
||||
<li>Status: Pending</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
@@ -95,13 +139,12 @@
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
|
||||
"User=SYSDBA;" +
|
||||
"Password=masterkey;" +
|
||||
"Dialect=3;" +
|
||||
"Server=localhost";
|
||||
|
||||
string connectionString =
|
||||
"Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
|
||||
"User=SYSDBA;" +
|
||||
"Password=masterkey;" +
|
||||
"Dialect=3;" +
|
||||
"Server=localhost";
|
||||
IDbConnection dbcon = new FbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
@@ -109,7 +152,7 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
object dataValue = reader.GetValue(0);
|
||||
object dataValue = myReader.GetValue(0);
|
||||
string sValue = dataValue.ToString();
|
||||
Console.WriteLine("Value: " + sValue);
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
* Novell Forge
|
||||
|
||||
Novell Forge (<a
|
||||
href="http://forge.novell.com/">http://forge.novell.com/</a>)
|
||||
is a website managed by Novell to promote the development of
|
||||
open source applications and solutions. Novell Forge features
|
||||
communities, akin to foundries on SourceForge.net, which exist
|
||||
for the purpose of facilitating collaboration and information
|
||||
exchange about certain technologies or solutions. At Miguel's
|
||||
request, we have created a Mono community on Novell Forge that
|
||||
is administered by Miguel. This community, located at
|
||||
http://forge.novell.com/modules/xfmod/community/?monocomm,
|
||||
provides a resource for interaction and collaboration on Mono
|
||||
and associated solutions. Each community has the ability to
|
||||
provide forums, mailing lists, FAQs, news, documentation,
|
||||
surveys, sample code, and links to related applications. The
|
||||
Mono community has been created for anyone interested in Mono
|
||||
to use, and the exact set of features offered at the community
|
||||
is determined by Miguel.
|
||||
|
||||
Any individual or group that wishes to provide Mono-based solutions in
|
||||
an open source fashion is encouraged to host their solution on the
|
||||
Novell Forge website, free of charge. Once the project is hosted on
|
||||
Novell Forge, you can send Miguel an e-mail requesting that your project
|
||||
be associated with the Mono project. This promotes a symbiotic
|
||||
relationship where the growth of Mono applications helps to improve
|
||||
Mono, and the growth of Mono likewise helps to increase the visibility
|
||||
and usefulness of your applications.
|
||||
|
||||
* Creating an Account
|
||||
|
||||
A Novell Forge account is required in order to create a project on
|
||||
Novell Forge as well as for certain levels of participation within a
|
||||
community like the Mono community. In order to create an account, do
|
||||
the following:
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Go to http://forge.novell.com/ and click on the "Register" link.
|
||||
|
||||
<li>You will be redirected to the Novell Login page. This one resource
|
||||
is used by all of Novell's websites that require authentication, so if
|
||||
you already have a Novell login you may use that login here. Otherwise,
|
||||
simply create a login account.
|
||||
|
||||
<li>You will be redirected back to the Novell Forge page. Click on the
|
||||
"create my Novell Forge account" link, near the top left of the page.
|
||||
|
||||
<li>A form should be filled in with the correct information for you.
|
||||
If you like, choose an avatar and then submit the form.
|
||||
|
||||
<li>Confirm the creation of your account.
|
||||
</ul>
|
||||
|
||||
|
||||
You should be good to go at this point. Now, to create a project,
|
||||
simply choose the "Start New Project" link from the left menu and follow
|
||||
the steps.
|
||||
|
||||
Novell Forge offers a limited set of context-sensitive help links and a
|
||||
full help section. If you have trouble, go to the help section at
|
||||
http://forge.novell.com/modules/xfmod/help/about.php.
|
||||
|
||||
|
||||
* Important Links:
|
||||
|
||||
Novell Forge - <a href="http://forge.novell.com/">http://forge.novell.com/</a>
|
||||
|
||||
Mono Community - <a href="http://forge.novell.com/modules/xfmod/community/?monocomm">http://forge.novell.com/modules/xfmod/community/?monocomm</a>
|
||||
|
||||
Novell Forge Help - <a href="http://forge.novell.com/modules/xfmod/help/about.php">http://forge.novell.com/modules/xfmod/help/about.php</a>
|
||||
|
||||
@@ -15,13 +15,25 @@
|
||||
<a name="runtime">
|
||||
** Runtime
|
||||
|
||||
We need a verifier that can be run on an executable (assembly)
|
||||
and tells whether the metadata for the executable is correct
|
||||
or not. It should report any anomalies.
|
||||
|
||||
For a list of anomalies in assemblies, check the various assertions
|
||||
that are described on the ECMA documentation.
|
||||
|
||||
This will help test our generated executables and can be also
|
||||
used as an external verifier.
|
||||
|
||||
<a name="classes">
|
||||
** Classes
|
||||
|
||||
<ul>
|
||||
TODO=jxta,The JXTA Peer to Peer foundation
|
||||
* Implement a JXTA protocol implementation:
|
||||
<a href="http://www.jxta.org">http://www.jxta.org</a>
|
||||
|
||||
TODO=camel,Mail API
|
||||
* Implement a Mail API, similar to Camel or JavaMail (Camel has
|
||||
significant architecture features that are required on a real
|
||||
mailer).
|
||||
@@ -33,6 +45,7 @@
|
||||
Such an implementation could be used both with
|
||||
Microsoft .NET and Mono.
|
||||
|
||||
TODO=multimedia
|
||||
* Interfacing to Multimedia systems. You might want
|
||||
to look into the Quicktime API. I know <a
|
||||
href="mailto:[email protected]">Vladimir</a> has
|
||||
@@ -45,10 +58,23 @@
|
||||
|
||||
This list of projects ideas is outdated
|
||||
|
||||
TODO=guavac,Java compiler for .NET
|
||||
* You could take one of the existing Java compilers
|
||||
(Guavac comes to mind as it is so nice) and modify
|
||||
it to generate .NET code rather than JVM byte
|
||||
codes.
|
||||
|
||||
This should be a pretty straightforward task.
|
||||
Guavac has the advantage of being written in C++ and
|
||||
it could be compiled with the Microsoft Managed C++
|
||||
compiler and produce a .NET executable with it.
|
||||
|
||||
TODO=Bonobo,Bonobo for Mono
|
||||
* Once <a href="http://remoting-corba.sourceforge.net/">CORBA</a> is done, implement the Bonobo interfaces
|
||||
to allow people to use Bonobo components in Mono and
|
||||
Mono components with Bonobo. The best of both worlds!
|
||||
|
||||
TODO=moniker,Object Naming System with Monikers
|
||||
* A naming space for Mono. An object naming space is
|
||||
a very powerful tool. Bonobo implements a moniker
|
||||
system that is more powerful than the original
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
You can read our <a href="rationale.html">rationale</a> for
|
||||
this project. If you have questions about the project, please
|
||||
read our list of <a href="faq.html">Frequently Asked
|
||||
Questions</a> or <a href="mailto:[email protected]">contact
|
||||
us.</a> The project <a href="mono-roadmap.html">roadmap</a>.
|
||||
Questions</a> or <a href="mailto:[email protected]">contact us.</a>
|
||||
|
||||
You might also want to <a href="download.html">Download the
|
||||
source</a> for our work so far. Grab a <a
|
||||
@@ -68,7 +67,9 @@
|
||||
</td>
|
||||
<td>
|
||||
Working:<br>
|
||||
Linux/x86, Linux/PPC, S390, StrongARM, SPARC, HPPA, SPARC v9 <br>
|
||||
Linux/x86, Linux/PPC, S390, StrongARM<br>
|
||||
In progress:<br>
|
||||
SPARC.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -141,204 +142,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@item Nov 25th: Gtk# 0.14, System.DirectoryServices
|
||||
|
||||
Gtk# 0.14 has been released, and it is available from <a
|
||||
href="http://gtk-sharp.sf.net">the Gtk# web site</a>.
|
||||
|
||||
Sunil has checked in the implementation of
|
||||
System.DirectoryServices as well as the Novell.Directory.Ldap
|
||||
code into Mono CVS.
|
||||
|
||||
@item Nov 14th: Gtk# 0.13 released.
|
||||
|
||||
Mike Kestner has <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-November/016943.html">announced</a>
|
||||
the release of the <a href="http://gtk-sharp.sf.net">Gtk#</a>
|
||||
GUI toolkit for .NET and Mono.
|
||||
|
||||
@item Nov 13th: Managed LDAP binding for Mono and .NET
|
||||
|
||||
Sunil Kumar at Novell has <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-November/016907.html">announced</a>
|
||||
the availability of a fully managed implementation of LDAP for
|
||||
Mono and the .NET Framework.
|
||||
|
||||
You can obtain the library from <a
|
||||
href="http://forge.novell.com">Novell Forge's</a> <a
|
||||
href="http://forge.novell.com/modules/xfmod/cvs/cvsbrowse.php/ldapcsharp/CsharpLDAP">CSharpLDAP</a>
|
||||
module.
|
||||
|
||||
@item Nov 4th: Mono Roadmap announced.
|
||||
|
||||
The <a href="mono-roadmap.html">Mono Roadmap</a> and <a
|
||||
href="mono-hacking-roadmap.html">Mono Hackers Roadmap</a> have
|
||||
been released.
|
||||
|
||||
@item Oct 28th: Mono Get Together at the PDC. GTK# 0.12 Released.
|
||||
|
||||
We will be getting together at the West Tower Lobby on Tuesday
|
||||
28th at 6pm to talk about the Mono project. You have 24 hours to
|
||||
notify all of your friends, open source buddies and free software
|
||||
folks.
|
||||
|
||||
We will bring Mono t-shirts.
|
||||
|
||||
Mike Kestner released <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> 0.12 today. GTK# source tar balls
|
||||
and RPMs are available. A windows installer was contributed by Johannes Roith.
|
||||
|
||||
@item Oct 26th: Last Minute Mono BOF
|
||||
|
||||
The first in a series of undercover Mono BOFs at the PDC will take
|
||||
place tonight at 7pm on the Academy meeting, in room 411. Come join us
|
||||
to plot the evolution.
|
||||
|
||||
|
||||
@item Oct 25th: GTK# 0.11+ Windows Installer available
|
||||
|
||||
Johannes created a <a href="http://java.thn.htu.se/~toor/gtk-sharp/gtk-sharp-0.11-cvs.exe">Windows Installer for GTK# 0.11+</a> and works
|
||||
with Mono 0.28 for Windows.
|
||||
|
||||
@item Oct 21st: Mono Community at Novell Forge
|
||||
|
||||
Mono Developers that are looking for a public repository for
|
||||
hosting their projects can now use <a
|
||||
href="http://forge.novell.com">Novell Forge's</a> which hosts
|
||||
a <a
|
||||
href="http://forge.novell.com/modules/xfmod/community/?monocomm">Mono
|
||||
Community</a>.
|
||||
|
||||
Novell Forge offers mailing lists, cvs repository, bug
|
||||
tracking and mailing list services and all the other services
|
||||
you expect. Mono will continue to be hosted in our own CVS
|
||||
repository, and using our <a href="anoncvs.html">anonymous CVS
|
||||
servers</a>
|
||||
|
||||
@item Oct 13th: SPARC V9, HPPA, Internationalization, GdiPlus
|
||||
|
||||
Dick Porter has checked in our rewrite of the international
|
||||
substrate in Mono that uses the <a
|
||||
href="http://oss.software.ibm.com/icu/">International
|
||||
Components for Unicode</a> library from IBM. This means that
|
||||
we got CultureInfo support through the whole code base now.
|
||||
|
||||
Alexandre Pigolkine has checked-in the new implementation of
|
||||
System.Drawing. We have now dropped the old implementation
|
||||
with multiple-backends that we had, and replaced it with an
|
||||
implementation that P/Invokes into GDI+. A GDI+
|
||||
implementation on top of <a
|
||||
href="http://www.cairographics.org">Cairo</a> is used on Unix
|
||||
systems. This step vastly simplifies the development and
|
||||
maintenance of System.Drawing.
|
||||
|
||||
There are plenty of updates to Mono as well, we encourage you
|
||||
to read the <a
|
||||
href="http://www.go-mono.com/monologue">Monologue</a> to keep
|
||||
an eye on recent developments.
|
||||
|
||||
Bernie Solomon just <a
|
||||
href="http://lists.ximian.com/archives/public/mono-devel-list/2003-October/002460.html">checked
|
||||
in</a> 64-bit support for SPARC v9 and HPPA into the Mono
|
||||
runtime. This also improves the SPARC-32 support.
|
||||
|
||||
@item Oct 6th: Linux s390 Mono packages available.
|
||||
|
||||
Neale Ferguson has contributed Mono packages for the
|
||||
Linux/s390. You can get them from the <a
|
||||
href="download.html">download</a> page.
|
||||
|
||||
@item Oct 5th: Monologue aggregates Mono Blogs
|
||||
|
||||
You can now read an aggregated view of the <a
|
||||
href="blogs.html">blogs</a> maintained by Mono developers in
|
||||
<a href="http://www.go-mono.com/monologue">Monologue</a>.
|
||||
Monologue is available as an HTML page or as an <a
|
||||
href="monologue/index.rss">RSS feed</a>.
|
||||
|
||||
@item Oct 2nd: Windows packages, MonoDoc 0.7
|
||||
|
||||
Windows packages for Mono 0.28 are now available from our <a
|
||||
href="download.html">download</a> page.
|
||||
|
||||
A new version of MonoDoc has been released. The new version
|
||||
is available <a href="archive/monodoc-0.7.tar.gz">here</a>
|
||||
|
||||
@item Oct 1st: Mono 0.28 has been released.
|
||||
|
||||
Check out the <a
|
||||
href="http://www.go-mono.com/archive/mono-0.28.html">Release
|
||||
notes</a> for details on Mono 0.28. This release marks the
|
||||
completion of the SourceGear project to add web services
|
||||
functionality to Mono and improve its reliability.
|
||||
|
||||
@item Sep 30th: Mono Kick Start book available
|
||||
|
||||
The Mono Kick Start book is now <a
|
||||
href="http://www.amazon.com/exec/obidos/tg/detail/-/0672325799/qid=1064937318/sr=8-1/ref=sr_8_1/103-9624440-8714218?v=glance&s=books&n=507846">available</a>
|
||||
in English. Originally available only in <a
|
||||
href="http://www.amazon.de/exec/obidos/ASIN/3827264928/qid=1050051051/sr=2-1/ref=sr_2_3_1/028-2755135-1623712">German</a>.
|
||||
The book technical review was done by <a
|
||||
href="http://www.maurer-it.com/">Dietmar Maurer</a> JIT
|
||||
architect at the Mono team.
|
||||
|
||||
@item Sep 26th, 2003: DiaCanvas# 0.1 released, Gtk# 0.11 released.
|
||||
|
||||
Mike Kestner has <a
|
||||
href="http://lists.ximian.com/archives/public/gtk-sharp-list/2003-September/002475.html">released</a>
|
||||
a new version of <a href="http://gtk-sharp.sf.net">Gtk#</a>.
|
||||
|
||||
Martin has also
|
||||
<a href="http://mwh.sysrq.dk/programs/announcements/diacanvas-sharp-0.1.0.html">released</a>
|
||||
his binding to <a href="http://diacanvas.sf.net">DiaCanvas</a> for C#.
|
||||
|
||||
@item Sep 16th, 2003: WineLib, Authenticode, Generics, Xslt updates, Wsdl compiler, WSE.
|
||||
|
||||
<b>WineLib:</b> Vladimir has added new libraries to the Wine
|
||||
process, which we will soon bring into our packages: the
|
||||
various Windows common dialogs can now be used (screenshots:
|
||||
<a href="images/colordlg.png">here</a>, <a
|
||||
href="images/fontdlg.png">here</a>, <a
|
||||
href="images/filedlg.png">here</a> and <a
|
||||
href="images/finddlg.png">here</a>.
|
||||
|
||||
Johannes has patches to have Wine track the Gtk theme,
|
||||
screenshot <a href="http://www.sport-huettn.de/jroith/swfsample.png">here</a>
|
||||
|
||||
<b>Security:</b> New authenticode support from Sebastien has
|
||||
been checked into CVS.
|
||||
|
||||
<b>Xslt:</b> Plenty of conformance updates to the managed
|
||||
implementation of Xslt, as well as breaking the libxslt speed
|
||||
barrier. Our managed implementation is now faster than the
|
||||
C-based libxslt that we used before.
|
||||
|
||||
<b>Generics:</b> Work continues on generics support, feel free
|
||||
to try it out. The compiler is currently on a separate
|
||||
directory until we stability it (gmcs) and you need to compile
|
||||
the class libraries with the `generics' profile to try it
|
||||
out. Sample generic programs are included in the CVS module.
|
||||
|
||||
<b>Wsdl:</b> We now have Wsdl support in Mono: a wsdl compiler
|
||||
command line tool, and support on ASP.NET to generate the wsdl
|
||||
file from an .asmx file.
|
||||
|
||||
<b>AOT:</b> Many robustness updates to the ahead-of-time
|
||||
compiler and a new locking and threading system that avoids
|
||||
having "big locks" around the mono kernel, and moves to a
|
||||
fine-grained locking system. The design includes a lattice to
|
||||
avoid deadlocks.
|
||||
|
||||
<b>Dogfooding:</b> We are now running Mono's ASP.NET on
|
||||
go-mono.com to find problems. It is currently hosting our
|
||||
Monodoc documentation. The <a
|
||||
href="http://www.go-mono.com/docs/index.html">Apache module
|
||||
version</a> and the <a href="http://www.go-mono.com:8080/">XSP
|
||||
version</a>.
|
||||
|
||||
<b>WSE:</b> The Web Services Enhancements season has begun.
|
||||
The Microsoft.Web.Services namespace and classes are now
|
||||
checked into CVS.
|
||||
|
||||
@item Sep 1st, 2003: Ice for Mono; XmlSerializer generators; Monodoc progress.
|
||||
|
||||
<b>Ice:</b> Vladimir has checked into CVS (Module ginzu) an
|
||||
|
||||
+1
-29
@@ -13,34 +13,6 @@
|
||||
Notice that the program will need to be compiled with the -g
|
||||
flag and that running with --debug will slow down the execution.
|
||||
|
||||
* Debugging with GDB
|
||||
|
||||
If you use GDB to debug your mono process, you can use the function
|
||||
print_method_from_ip(void *address) to obtain the name of a method
|
||||
given an address.
|
||||
|
||||
For example:
|
||||
|
||||
<pre>
|
||||
(gdb) where
|
||||
#0 ves_icall_System_String_GetHashCode (me=0x80795d0) at string-icalls.c:861
|
||||
#1 0x0817f490 in ?? ()
|
||||
#2 0x0817f42a in ?? ()
|
||||
#3 0x0817f266 in ?? ()
|
||||
#4 0x0817f1a5 in ?? ()
|
||||
</pre>
|
||||
|
||||
You can now use:
|
||||
|
||||
<pre>
|
||||
(gdb) p print_method_from_ip (0x0817f490)
|
||||
IP 0x817f490 at offset 0x28 of method (wrapper managed-to-native) System.String:GetHashCode () (0x817f468 0x817f4a4)
|
||||
$1 = void
|
||||
(gdb) p print_method_from_ip (0x0817f42a)
|
||||
IP 0x817f42a at offset 0x52 of method System.Collections.Hashtable:GetHash (object) (0x817f3d8 0x817f43b)
|
||||
$2 = void
|
||||
</pre>
|
||||
|
||||
* Mono Debugger
|
||||
|
||||
The Mono debugger is written in C# and can debug both managed
|
||||
@@ -66,4 +38,4 @@ $2 = void
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Mono 1.0 assemblies</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Assemblies</h1>
|
||||
<pre>
|
||||
Stable:
|
||||
Commons.RelaxNG
|
||||
Cscompmgd
|
||||
Mono.Data
|
||||
Mono.Data.Tds
|
||||
Mono.Posix
|
||||
Mono.Security
|
||||
Mono.Security.Win32
|
||||
System.Web
|
||||
System.Configuration.Install
|
||||
System.Data
|
||||
System.Data.OracleClient
|
||||
System.DirectoryServices
|
||||
System
|
||||
System.Drawing
|
||||
System.Runtime.Remoting
|
||||
System.Security
|
||||
System.Web.Services
|
||||
System.XML
|
||||
|
||||
Unstable:
|
||||
Accessibility
|
||||
Mono.Cairo
|
||||
Mono.CSharp.Debugger
|
||||
Mono.Data.DB2Client
|
||||
Mono.Data.SqlLite
|
||||
Mono.Data.SybaseClient
|
||||
Mono.GetOptions
|
||||
System.Web.Mobile
|
||||
System.Design
|
||||
System.Drawing.Design
|
||||
System.Windows.Forms
|
||||
Formatters.Soap
|
||||
Mono.Data.TdsClient (older Sybase and MS SQL)
|
||||
|
||||
Missing:
|
||||
System.EnterpriseServices
|
||||
System.Management
|
||||
System.Messaging
|
||||
System.ServiceProcess
|
||||
System.Web.RegularExpressions
|
||||
|
||||
Third party assemblies.
|
||||
ByteFX.Data
|
||||
Npgsql
|
||||
PEAPI
|
||||
SharpZipLib.
|
||||
|
||||
Java integration with IKVM.NET
|
||||
|
||||
</pre>
|
||||
|
||||
<h1>Languages</h1>
|
||||
|
||||
<pre>
|
||||
Stable:
|
||||
C#
|
||||
|
||||
Unstable:
|
||||
VB.NET
|
||||
|
||||
Not ready:
|
||||
JScript
|
||||
</pre>
|
||||
|
||||
<h1>Virtual Machine</h1>
|
||||
|
||||
<pre>
|
||||
JIT, 32 bits:
|
||||
PPC
|
||||
x86
|
||||
|
||||
Interpreter, 32 bits:
|
||||
s390
|
||||
HPPA
|
||||
StrongARM
|
||||
SPARC v8
|
||||
|
||||
Interpreter, 64 bits:
|
||||
ia64
|
||||
SPARC v9
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,271 +0,0 @@
|
||||
<html>
|
||||
<head><title>Mono Hacking Roadmap</title>
|
||||
<style type="text/css">
|
||||
h1 {
|
||||
color: #efefef;
|
||||
font-size: 18pt;
|
||||
font-family: "Trebuchet MS";
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
background: #666666;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
font-family: Verdana,sans-serif;
|
||||
font-weight: bold;
|
||||
margin: 9pt;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding: 3px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 13px;
|
||||
border-bottom: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
h4 {
|
||||
border-bottom: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
body, table {
|
||||
background-color: #ffffff;
|
||||
font-family: Verdana, sans-serif; font-size: 12px;
|
||||
color: black;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin-left: 20%;
|
||||
margin-right: 20%;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
ul li {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h1>
|
||||
Mono Hacking Roadmap
|
||||
<br>
|
||||
|
||||
<font size=1>Miguel de Icaza (<a href="mailto:[email protected]">[email protected]</a>)</font>
|
||||
|
||||
</h1>
|
||||
<p>
|
||||
</center>
|
||||
|
||||
<h3>Introductory notes</h3>
|
||||
|
||||
<p>The intention of this document and the <a
|
||||
href="http://www.go-mono.com/mono-roadmap.html">Mono
|
||||
Roadmap</a> is to be a basis for discussion. I want to build
|
||||
on these two documents, and update as we get more insight into
|
||||
the release process and the technologies we want to ship.
|
||||
|
||||
<h3>Background</h3>
|
||||
|
||||
<p>At the 2003 PDC Microsoft introduced many new technologies,
|
||||
which many of us are very excited about. To me, it underlined
|
||||
the importance of having a roadmap for users of Mono
|
||||
technologies. That way they know precisely what to expect
|
||||
from us when. We have been working on Mono for more than two
|
||||
years, and it is important that we release a stable product to
|
||||
the public.
|
||||
|
||||
<p>We have various degrees of maturity and feature
|
||||
completeness in our code base, and I do not believe that we
|
||||
should aim to be full implementation .NET 1.0 or .NET 1.1 in
|
||||
our 1.0 release, that would just push the release at least for
|
||||
another year . The <a
|
||||
href="http://www.go-mono.com/mono-roadmap.html">Mono
|
||||
Roadmap</a> emphasizes this assumption.
|
||||
|
||||
<p>The 1.0 release is critical for the adoption of Mono on the
|
||||
Linux environment, even if it is not as complete as the
|
||||
Framework, lets get something stable, and fun to people to
|
||||
use.
|
||||
|
||||
<h3>Mono 1.0: missing functionality.</h3>
|
||||
|
||||
<p>For the 1.0 release, there are a number of features that we
|
||||
will have to complete, in no particular order:
|
||||
|
||||
<ul>
|
||||
<li>We need to fix corcompare and our cor-compare
|
||||
pages to support both 1.0 and 1.1 API API compares.
|
||||
|
||||
We might want to move this outside of the Mono site,
|
||||
to reduce the complexity of the HTML hackage, and use
|
||||
ASP.NET to implement this. Bonus points if we use
|
||||
Piers' nice dynamic tree to load the CorCompare data
|
||||
dynamically.
|
||||
|
||||
<li>Global Assembly Cache: Needed to support the
|
||||
parallel installation of .NET 1.0 and 1.1 assemblies,
|
||||
and to fix the various Assembly loading routines.
|
||||
|
||||
<li>PowerPC port.
|
||||
|
||||
<li>ECMA profile: We will like take care of this one
|
||||
at Novell.
|
||||
|
||||
<li>Assembly signing: I do not know what is the state
|
||||
of this feature currently in Mono, maybe Sebastien and
|
||||
Zoltan could give us an update here.
|
||||
|
||||
<li>ASP.NET caching: Non-existant at this point, this
|
||||
needs to be implemented.
|
||||
|
||||
<li>Stability of ASP.NET and Mod_Mono. They are both
|
||||
functional, but they fail under load. Much debugging
|
||||
and testing must go into these components. As we use
|
||||
more of it, we have found more little problems surface
|
||||
on it.
|
||||
|
||||
<li>Codebase audit: Duncan did an audit of Corlib, but
|
||||
we must do an audit of all the assemblies that we we
|
||||
are going to ship, just to get an idea of the major
|
||||
areas missing.
|
||||
</ul>
|
||||
|
||||
<p>The team at Novell will focus on these areas. We of course
|
||||
welcomes the contribution of the rest of the Mono team and
|
||||
encourage the developers to focus on 1.0, to have a solid
|
||||
release, and a solid foundation that can lead to 1.2
|
||||
|
||||
<p>We will use Bugzilla milestones to track these issues.
|
||||
|
||||
<h3>Synchronized releases</h3>
|
||||
|
||||
<p>It would be great if we can ship Mono 1.0 with Gtk# 1.0 and
|
||||
a preview of Monodoc with the early documentation.
|
||||
|
||||
<h3>Alpha components.</h3>
|
||||
|
||||
<p>Various Mono developers are working on areas that will not
|
||||
make it into the 1.0 timeframe: JScript, WSE, VB.NET,
|
||||
Windows.Forms, Generics. We should continue to work on
|
||||
those components, as they will come shortly after, and they
|
||||
are probably more fun to develop than stabilizing the core.
|
||||
|
||||
<h3>New components: Whidbey and Longhorn features</h3>
|
||||
|
||||
<p>Everyone is probably very excited about the new features in
|
||||
the Whidbey release of .NET, and most importantly the Longhorn
|
||||
features. I am sure that many of us will not resist the urge
|
||||
to put some of the new assemblies on CVS.
|
||||
|
||||
<p>We will likely add a profile for those of you that want to
|
||||
work on this, and can not wait to get your hands in the code,
|
||||
although keep in mind that your contributions wont reach the
|
||||
general audience until we successfully ship 1.0.
|
||||
|
||||
<p>The things to keep in mind while adding code which is not
|
||||
in .NET 1.0 and .NET 1.1:
|
||||
|
||||
<ul>
|
||||
<li>Make sure you surround new classes and methods
|
||||
with the appropriate define: NET_1_2 for things
|
||||
available on the .NET 1.2 SDK (Whidbey) and NET_3
|
||||
define for things only available on the Longhorn API.
|
||||
We need this so that these methods do not appear on
|
||||
the 1.0 and 1.1 builds.
|
||||
|
||||
<li>If you add generic types or methods, also surround
|
||||
the method with GENERICS for now, since our compiler
|
||||
can not currently build this code yet. This is
|
||||
redundant with the NET_1_2 define but important.
|
||||
|
||||
<li>For every assembly you update, make sure that you
|
||||
also add the relevant AssemblyInfo versioning
|
||||
information. If possible, when you add methods from
|
||||
.NET 1.2 to the build, also update the AssemblyInfo.cs
|
||||
for the library.
|
||||
</ul>
|
||||
|
||||
<p>There are three areas of new hot features:
|
||||
|
||||
<ul>
|
||||
<li>Class library improvements (Whidbey, Mono 1.2
|
||||
time frames).
|
||||
|
||||
<li>Indigo: They will release this in 2005 or 2006 and
|
||||
wont make it into the 2004 Whidbey .NET 1.2 release.
|
||||
|
||||
<li>Avalon: Definitely a Longhorn-bound feature.
|
||||
</ul>
|
||||
|
||||
<p>Most code that will reach the users in the short time frame
|
||||
(next year) will be related to the Whidbey improvements, so I
|
||||
encourage developers to work on those pieces, as they are the
|
||||
ones that will help Mono the most.
|
||||
|
||||
<h3>ASP.NET 2.0 plans</h3>
|
||||
|
||||
<p>Gonzalo will continue to coordinate this effort; At this
|
||||
time ASP.NET 2.0 features will not make it into Mono 1.0.
|
||||
|
||||
<h3>Avalon plans</h3>
|
||||
|
||||
<p>On the surface Avalaon seems like it uses something like
|
||||
GdiPlus/Cairo for rendering. That was my initial feeling, but
|
||||
it turns out that they had to rewrite everything to have a
|
||||
performing rendering engine, and implement some very advanced
|
||||
rendering features that include compositing with video
|
||||
streams, also their brushes seem to be fairly powerful.
|
||||
|
||||
<p>XAML, a new markup language that binds tags to .NET classes
|
||||
was also presented, but this is the least interesting part. A
|
||||
tiny compiler translates the XAML source files into C# code.
|
||||
The whole process is just like Glade, and should be easy to
|
||||
do.
|
||||
|
||||
<p>The really elaborate parts are the rendering engine, and the
|
||||
composition model for widgets. It is a complete new toolkit,
|
||||
and if we want to implement this one, we will have to have a
|
||||
new toolkit on Unix, incompatible with everything else, maybe
|
||||
stressing the importance of working with other open source
|
||||
projects in defining a cross-toolkit theming strategy to
|
||||
address this particular problem.
|
||||
|
||||
<p>A Mini-Avalon is easy to do, but a complete one will
|
||||
require much interaction with other groups: the Cairo folks
|
||||
are probably the most qualified to assist us.
|
||||
|
||||
<h3>Indigo Plans</h3>
|
||||
|
||||
<p>Indigo is still an early product (<a
|
||||
href="http://msdn.microsoft.com/Longhorn/understanding/pillars/Indigo/default.aspx?pull=/library/en-us/dnlong/html/indigofaq1.asp">FAQ</a>),
|
||||
but it could benefit from continued development of our WSE1
|
||||
and WSE2 components, later to bring some of the code to it.
|
||||
|
||||
<p>Again, since people are visibly excited about this
|
||||
technology, we will lay down in the next few days a framework
|
||||
to contribute to it.
|
||||
|
||||
|
||||
<p>
|
||||
<i>Last Updated: Nov 1st, 2003</i>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,394 +0,0 @@
|
||||
<html>
|
||||
<head><title>Mono Roadmap</title>
|
||||
<style type="text/css">
|
||||
h1 {
|
||||
color: #efefef;
|
||||
font-size: 18pt;
|
||||
font-family: "Trebuchet MS";
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
background: #666666;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
font-family: Verdana,sans-serif;
|
||||
font-weight: bold;
|
||||
margin: 9pt;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding: 3px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 13px;
|
||||
border-bottom: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
h4 {
|
||||
border-bottom: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
body, table {
|
||||
background-color: #ffffff;
|
||||
font-family: Verdana, sans-serif; font-size: 12px;
|
||||
color: black;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin-left: 20%;
|
||||
margin-right: 20%;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
ul li {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<center>
|
||||
<h1>
|
||||
Mono Project Roadmap
|
||||
<br>
|
||||
<font size=1>Miguel de Icaza ([email protected])</font>
|
||||
</h1>
|
||||
<p>
|
||||
</center>
|
||||
|
||||
<h3>Introduction</h3>
|
||||
|
||||
<p>This document describes the high-level roadmap for <a
|
||||
href="http://www.go-mono.com">Mono</a>.
|
||||
|
||||
<p>The Mono project started in 2001 as an effort to implement
|
||||
the .NET Framework to Unix. To bring both the new programming
|
||||
model based on the Common Language Infrastructure and C# as
|
||||
well as helping people migrate their existing knowledge and
|
||||
applications to Unix. Mono today supports a wide variety of
|
||||
operating systems, CPUs and a large chunk of the functionality
|
||||
available in the .NET Framework.
|
||||
|
||||
<p>At the October 2003 PDC conference a number of new
|
||||
technologies were announced. From the Mono release schedule
|
||||
perspective, we should think about these technologies from
|
||||
their release time standpoint, and the features that must be
|
||||
supported.
|
||||
|
||||
<p>This document outlines the roadmap for the Mono project
|
||||
from my perspective: what we can effectively deliver on the
|
||||
dates outlined. Since Mono is a large open source project,
|
||||
things might change and new features can be incorporated
|
||||
into the plan if external sources devote enough attention to
|
||||
those problems.
|
||||
|
||||
<p>This is the timeline:
|
||||
<p>
|
||||
<center>
|
||||
<img src="roadmap.png">
|
||||
</center>
|
||||
|
||||
<h3>Background</h3>
|
||||
|
||||
<p>So far Microsoft has published two versions of the .NET
|
||||
Framework: 1.0 and 1.1, the later with incremental updates to
|
||||
the changes in 1.0
|
||||
|
||||
<p>The Mono project has been tracking some of the
|
||||
improvements available in those two releases, some of the
|
||||
highlights of our work so far are:
|
||||
|
||||
<ul>
|
||||
<li> Core: mscorlib, System, System.Security and
|
||||
System.XML assemblies.
|
||||
|
||||
<li> ADO.NET: System.Data and various other database
|
||||
providers.
|
||||
|
||||
<li> ASP.NET: WebForms and Web Services are
|
||||
supported. Work on WSE1/WSE2 has also started.
|
||||
|
||||
<li> Compilers: C#, VB.NET and various command line tools
|
||||
that are part of the SDK.
|
||||
|
||||
<li> Open Source, Unix and Gnome specific libraries.
|
||||
</ul>
|
||||
|
||||
<p>Other components like Windows.Forms, Directory.Services,
|
||||
Enterprise Services and JScript are being developed but are not
|
||||
as mature as the other components but are under development by
|
||||
various people.
|
||||
|
||||
<p>Some other smaller and less used components do not have yet
|
||||
a Mono equivalent (System.Management, System.Drawing.Design).
|
||||
|
||||
<h3>Mono release strategy</h3>
|
||||
|
||||
<p>The levels of maturity of Mono fluctuate depending on the
|
||||
development effort we have put into it, and the use we have
|
||||
given to them. For example, the virtual machine and the C#
|
||||
compiler very mature, while less commonly used functionality
|
||||
in Mono like Windows.Forms or VB.NET are still under heavy
|
||||
development.
|
||||
|
||||
<p>Our strategy is to release the mature components as Mono
|
||||
1.0, and have upcoming versions of Mono add extra
|
||||
functionality.
|
||||
|
||||
<h3>Mono 1.0 goals</h3>
|
||||
|
||||
<p>The Mono 1.0 release would include the following
|
||||
components:
|
||||
|
||||
<ul>
|
||||
<li>C# compiler.
|
||||
|
||||
<li>VM, with JIT and pre-compiler.
|
||||
|
||||
<li>IL assembler, disassembler.
|
||||
|
||||
<li>Development and security tools.
|
||||
|
||||
<li>Core libraries: mscorlib, System, System.XML.
|
||||
|
||||
<li>System.Data and Mono database providers.
|
||||
|
||||
<li>System.Web: Web applications platform and Apache
|
||||
integration module.
|
||||
|
||||
<li>System.Web.Services: client and server support.
|
||||
|
||||
<li>System.Drawing.
|
||||
|
||||
<li>System.DirectoryServices
|
||||
|
||||
<li>JIT support: x86 and PPC architectures
|
||||
(interpreter available for other architectures).
|
||||
|
||||
<li>ECMA profiles: special build options to build
|
||||
Mono as an implementation of the various ECMA profiles
|
||||
will be available.
|
||||
|
||||
<li>Java integration through IKVM.
|
||||
|
||||
<li>Embedding interface for the runtime.
|
||||
</ul>
|
||||
|
||||
<p>Packaging:
|
||||
|
||||
<ul>
|
||||
<li>mono: will contain the above features implementing
|
||||
the .NET 1.1 API.
|
||||
|
||||
<li>mono-1.0-compat: Will include a build of the
|
||||
libraries with the .NET 1.0 API, this is a
|
||||
compatibility build for people running .NET 1.0
|
||||
applications.
|
||||
|
||||
<li>mono-unstable: Will contain a snapshot of the
|
||||
other technologies under development for developer's
|
||||
convenience, but will be unsupported at this time.
|
||||
These include the Generics edition of the C#
|
||||
compiler.
|
||||
|
||||
<li>mono-ecma: A build that only includes the ECMA
|
||||
components.
|
||||
</ul>
|
||||
|
||||
<p>Release target: Q2/2004.
|
||||
|
||||
<p>Bug fix releases would be done on a monthly basis.
|
||||
|
||||
<p>For a detailed list, see the <a
|
||||
href="mono-1.0.html">mono-1.0 feature list.</a>
|
||||
|
||||
<h3>Microsoft's Whidbey</h3>
|
||||
|
||||
<p>To understand post 1.0 editions of Mono, it is important to
|
||||
put it into perspective with the Microsoft Whidbey product, to
|
||||
be released in 2004.
|
||||
|
||||
<p>The new features in the Whidbey release of the .NET Framework
|
||||
include:
|
||||
|
||||
<ul>
|
||||
<li><b>Generic types</b><br>
|
||||
These introduce changes to the compiler, runtime and
|
||||
class libraries.
|
||||
|
||||
<li><b>ASP.NET 2</b><br>
|
||||
Many tools to simplify web application development:
|
||||
Master pages, new controls for common operations,
|
||||
personalization and themes.
|
||||
|
||||
<li><b>Remoting</b><br>
|
||||
New security channels and version-resistant remoting
|
||||
(good news in the interop department).
|
||||
|
||||
<li><b>XML</b><br>
|
||||
XQuery debuts on this release as well as an improved
|
||||
XmlDocument system based on XPath: XPathDocument.
|
||||
|
||||
<li><b>Networking</b><br>
|
||||
FTP client, Ssl streams.
|
||||
|
||||
<li><b>Console and Serial ports:</b></br>
|
||||
Console terminal input/output is available as well as
|
||||
serial port handling.
|
||||
|
||||
<li><b>Windows.Forms</b><br>
|
||||
Layout containers finally appeared on Windows.Forms as
|
||||
well as various new controls.
|
||||
|
||||
<li><b>ObjectSpaces</b><br>
|
||||
An API for simpler data-base access.
|
||||
</ul>
|
||||
|
||||
<h3>Mono 1.2</h3>
|
||||
|
||||
<p>The Mono team is developing in parallel some features that
|
||||
wont make it to the 1.0 release in stable form. These will be
|
||||
the foundation for the 1.2 release. The focus of this release
|
||||
is to track the core API for the .NET Framework 1.2, but
|
||||
again, only a subset of the total framework will be
|
||||
available.
|
||||
|
||||
<p>Mostly, Mono 1.2 consists of components that were not
|
||||
stable enough for Mono 1.0, but that would be mature at this
|
||||
point, plus the incorporation of some new features from
|
||||
Whidbey. In addition to the Mono 1.0 components, this release
|
||||
will add:
|
||||
|
||||
<ul>
|
||||
<li>Generic types support: C# compiler, execution
|
||||
system and core class libraries.
|
||||
|
||||
<li>ASP.NET 2.0 improvements.
|
||||
|
||||
<li>Remoting improvements from Whidbey.
|
||||
|
||||
<li>System.XML: simpler improvements from Whidbey,
|
||||
lacking the large additions (XQuery for example).
|
||||
|
||||
<li>Console and Serial ports support.
|
||||
|
||||
<li>New compilers: VB.NET and JScript support.
|
||||
|
||||
<li>WSE1/WSE2 implementations.
|
||||
|
||||
<li>System.Windows.Forms officially debuts with .NET
|
||||
1.0 API; 1.2 API available as an unstable addition.
|
||||
</ul>
|
||||
|
||||
<p>This release will by default provide .NET 1.2 APIs, but
|
||||
compatibility libraries for 1.0 and 1.1 will be distributed in
|
||||
the mono-compat package. The unstable components of Mono will
|
||||
be distributed on the `mono-unstable' package, the libraries
|
||||
in this release will be unsupported.
|
||||
|
||||
<p>Release target: Q4/2004.
|
||||
|
||||
<h3>Mono 1.4</h3>
|
||||
|
||||
<p>A refresh update on the Mono 1.2 release containing the
|
||||
missing components from the previous release and complete any
|
||||
under performing pieces. Updates to System.Xml, ASP.NET and
|
||||
Windows.Forms to match the .NET 1.2 API.
|
||||
|
||||
<p>Release target: Q2/2005.
|
||||
|
||||
<h3>Peer projects</h3>
|
||||
|
||||
<p>Other projects like the debugger, the documentation
|
||||
browser, Java integration through IKVM and Gtk# will remain on
|
||||
their own schedules. This page will be updated to contain
|
||||
that information when it becomes available.
|
||||
|
||||
<h3>Unscheduled activities</h3>
|
||||
|
||||
<p>A missing component of Mono is the Code Access Security
|
||||
(CAS). This functionality is not needed in today's Mono as
|
||||
currently Mono is being used to run fully trusted
|
||||
applications, and we are not using it on embedded scenarios
|
||||
where assemblies would have different trust levels.
|
||||
|
||||
<p>This is an important component, but requires three major
|
||||
pieces of work:
|
||||
|
||||
<ul>
|
||||
<li>Runtime support for implementing the security
|
||||
demands.
|
||||
|
||||
<li>A guidelines document outlining what and where
|
||||
must have security demands in place.
|
||||
|
||||
<li>A full audit of our class libraries: method by
|
||||
method
|
||||
</ul>
|
||||
|
||||
<p>All of these are major pieces of work, and we currently
|
||||
have no plans to implement any of those. A volunteer effort might be
|
||||
able to help with the runtime requirements and the document,
|
||||
but until those are done, we are unlikely to start doing any
|
||||
work on the actual class library audit and instrumentation.
|
||||
|
||||
<h3>Mono and WinFX: 2006</h3>
|
||||
|
||||
<p>WinFX is the name given to the new set of libraries that
|
||||
makes up .NET in the Longhorn operating system: the existing
|
||||
.NET set of class libraries, plus the new functionality
|
||||
available in the OS.
|
||||
|
||||
<p>WinFX adds things like storage facilities (WinFS), a
|
||||
new versatile communications stack (Indigo) and a new
|
||||
eye-candy packed GUI programming system (Avalon).
|
||||
|
||||
<p>Although WinFS, Avalon and Indigo are very exciting
|
||||
components, at this time it is too early to tell when those
|
||||
components will be available for Mono. Open source developers
|
||||
will very likely start work on these, but since they are still
|
||||
far from being officially released, they are not in the radar
|
||||
at this point.
|
||||
|
||||
<h3>Unsupported technologies</h3>
|
||||
|
||||
<p>Some technologies are very hard to implement or are being
|
||||
phased out by components in the Longhorn time frame. In some
|
||||
cases, we feel that they are not crucial to the future of the
|
||||
open source desktop.
|
||||
|
||||
<p>System.EnterpriseServices and System.Management come to
|
||||
mind, and we are unlikely to put any resources into the task.
|
||||
We would gladly host the code if someone cares to implement
|
||||
it, but they would likely remain unsupported features of Mono.
|
||||
|
||||
<h3>Mono Developer Strategy</h3>
|
||||
|
||||
<p>Mono Developers should read the <a
|
||||
href="mono-hacking-roadmap.html">Mono Hacking Roadmap</a>
|
||||
|
||||
<h3>Comments</h3>
|
||||
|
||||
<p>Feel free to send your comments or questions the roadmap to
|
||||
<a href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
|
||||
<p>
|
||||
<i>Last Updated: Nov 1st, 2003</i>
|
||||
@@ -283,8 +283,8 @@ mono TestExample.exe
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["firstname"];
|
||||
string LastName = (string) reader["lastname"];
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["firstname"];
|
||||
string LastName = (string) reader["lastname"];
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
@@ -109,8 +109,8 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["firstname"];
|
||||
string LastName = (string) reader["lastname"];
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
+14
-11
@@ -10,7 +10,7 @@
|
||||
|
||||
<li>Works with Oracle 8i</li>
|
||||
|
||||
<li>May work with Oracle 9i</li>
|
||||
<li>Untested, but should work with Oracle 9i</li>
|
||||
|
||||
<li>Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
|
||||
software</li>
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
<li>Created by Daniel Morgan and Tim Coleman</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
@@ -62,12 +64,14 @@
|
||||
|
||||
<li>Handling of various data types need to be added.</li>
|
||||
|
||||
<li>Data Adapter exists, and a DataSet can be filled using it.</li>
|
||||
<li>Data Adapter exists, and a DataSet can be filled using it. The
|
||||
Data Adapter is abstract enough that it should work as expected.</li>
|
||||
|
||||
<li>Lots of missing functionality and bugs.</li>
|
||||
|
||||
<li>Works with SQL# command-line and GTK# versions in cvs. Only works with
|
||||
simple character data though.</li>
|
||||
simple character data though. SQL# For GTK# can only show the results to
|
||||
the TextView because the Data Adapter is not yet available</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -79,8 +83,7 @@
|
||||
<li>transactions (WORKING)</li>
|
||||
<li>Stored Procedures, Functions, and Packages support</li>
|
||||
<li>Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)</li>
|
||||
<li>Support for Oracle 8i (WORKING</li>
|
||||
<li>Support for Oracle 9i (UNKNOWN)</li>
|
||||
<li>Support for Oracle 8i and 9i (UNKNOWN)</li>
|
||||
<li>Support LOBs</li>
|
||||
<li>Support all the data types</li>
|
||||
<li>Implement Connection pooling</li>
|
||||
@@ -93,7 +96,7 @@
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Have access to an Oracle 8i or 9i database or download it from
|
||||
<li>Have access to an Oracle 8i database or download it from
|
||||
<a href="http://www.oracle.com/">Oracle</a>. If you are connecting
|
||||
remotely to an Oracle database, you need the Oracle client software.
|
||||
Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
|
||||
@@ -126,16 +129,16 @@
|
||||
"Data Source=testdb;" +
|
||||
"User ID=scott;" +
|
||||
"Password=tiger;";
|
||||
OracleConnection dbcon = null;
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OracleConnection (connectionString);
|
||||
dbcon.Open ();
|
||||
OracleCommand dbcmd = dbcon.CreateCommand ();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand ();
|
||||
string sql = "SELECT ename, job FROM scott.emp";
|
||||
dbcmd.CommandText = sql;
|
||||
OracleDataReader reader = dbcmd.ExecuteReader ();
|
||||
IDataReader reader = dbcmd.ExecuteReader ();
|
||||
while (reader.Read ()) {
|
||||
string employeeName = (string) reader["ename"];
|
||||
string job = (string) reader["job"];
|
||||
string employeeName = reader["ename"];
|
||||
string job = reader["job"];
|
||||
Console.WriteLine ("Employee Name: {0} Job: {1}",
|
||||
employeeName, job);
|
||||
}
|
||||
|
||||
@@ -94,8 +94,3 @@
|
||||
href="http://citeseer.nj.nec.com/seligmann95incremental.html">
|
||||
Incremental Collection of Mature Objects: Richard Hudson, Eliot Moss</a>
|
||||
|
||||
* Threads
|
||||
|
||||
<a
|
||||
href="http://research.microsoft.com/~birrell/papers/ThreadsCSharp.pdf">
|
||||
Programming with Threads in C#: Andrew Birrell</a>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Currently you can read our plans for <a
|
||||
href="ado-net.html">ADO.NET</a>, <a
|
||||
href="asp-net.html">ASP.NET</a>, <a href="java.html">Java</a> and
|
||||
href="asp-net">ASP.NET</a>, <a href="java.html">Java</a> and
|
||||
<a href="winforms.html">WinForms</a>.
|
||||
|
||||
|
||||
|
||||
+7
-33
@@ -1,30 +1,12 @@
|
||||
* PostgreSQL and Mono
|
||||
* PostgreSQL Data Provider
|
||||
|
||||
When it comes to Mono and PostgreSQL, there are many ways
|
||||
you can handle your data. You have many Mono Data Providers which can be used
|
||||
to access data from a application written for Mono.
|
||||
Then there is the future goal of having the ability to host Mono within PostgreSQL to
|
||||
have the applications run on the server which makes things much faster.
|
||||
|
||||
* Hosting Mono in PostgreSQL
|
||||
|
||||
There is a project to <a href="http://gborg.postgresql.org/project/plmono/projdisplay.php">host Mono within PostgreSQL</a>.
|
||||
|
||||
plMono is a PostgreSQL language using the embedded Mono runtime. It provides support for writing functions in C#, or any other language that supports .NET.
|
||||
|
||||
* Data Providers
|
||||
|
||||
There are many ADO.NET data providers for <a href="http://www.postgresql.org/">PostgreSQL</a>:
|
||||
|
||||
There are two providers created specifically for PostgreSQL included with Mono:
|
||||
There are two ADO.NET data providers for <a href="http://www.postgresql.org/">PostgreSQL</a> in Mono:
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
<ul>
|
||||
<li>included with Mono</li>
|
||||
|
||||
<li>a .NET Managed Data Provider for PostgreSQL</li>
|
||||
<li>a .NET Managed Data Provider for PostgreSQL
|
||||
|
||||
<li>Written in 100% C#</li>
|
||||
|
||||
@@ -43,8 +25,6 @@
|
||||
|
||||
<li>Mono.Data.PostgreSQL (deprecated)
|
||||
<ul>
|
||||
<li>included with Mono</li>
|
||||
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql</li>
|
||||
@@ -57,12 +37,6 @@
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">ByteFX.Data</a> has a provider for PostgreSQL too, but I do not know how well it works with Mono.</li>
|
||||
|
||||
<li>There is another .NET data provider for PostgreSQL named <a href="http://sourceforge.net/projects/pgsqlclient/">PgSqlClient</a>, but I do not know if it works with Mono.</li>
|
||||
|
||||
<li>If none of the above providers meet your needs. There is the ODBC and OLEDB providers included with Mono.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
@@ -476,8 +450,8 @@ mono PostgresTest.exe
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["firstname"];
|
||||
string LastName = (string) reader["lastname"];
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
@@ -560,8 +534,8 @@ mono TestExample.exe
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["firstname"];
|
||||
string LastName = (string) reader["lastname"];
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
** EOG component
|
||||
|
||||
** XmlStorageSystem component
|
||||
|
||||
* Gtk# related projects
|
||||
|
||||
Gnome Canvas Bindings.
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
We are using the Boehm conservative garbage collector.
|
||||
|
||||
The Mono runtime can be used as a stand-alone process, or it
|
||||
can be <a href="embedded-api.html">embedded into applications</a> (see
|
||||
can be <a href="embedded-api">embedded into applications</a> (see
|
||||
the documentation in mono/samples/embed for more details).
|
||||
|
||||
Embedding the Mono runtime allows applications to be extended
|
||||
|
||||
+2
-2
@@ -172,8 +172,8 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["fname"];
|
||||
string LastName = (string) reader["lname"];
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
+3
-3
@@ -82,7 +82,7 @@
|
||||
{
|
||||
string connectionString = "URI=file:SqliteTest.db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SqliteConnection(connectionString);
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
@@ -97,8 +97,8 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader[0];
|
||||
string LastName = (string) reader[1];
|
||||
string FirstName = reader[0];
|
||||
string LastName = reader[1];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
+2
-2
@@ -110,8 +110,8 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["fname"];
|
||||
string LastName = (string) reader["lname"];
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
+2
-2
@@ -115,8 +115,8 @@
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["fname"];
|
||||
string LastName = (string) reader["lname"];
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
|
||||
+1
-6
@@ -1,5 +1,4 @@
|
||||
0,Home,index.html,index.src
|
||||
1,Roadmap,mono-roadmap.html
|
||||
1,FAQ,faq.html,faq.src
|
||||
1,News archive,http://monoevo.sf.net/mwn/archives.html
|
||||
1,Screenshots,screenshots.html,screenshots.src
|
||||
@@ -19,7 +18,6 @@
|
||||
0,Download,download.html,download.src
|
||||
1,CVS access,ccvs.html,ccvs.src
|
||||
1,AnonCVS access,anoncvs.html,anoncvs.src
|
||||
1,Forge,forge.html,forge.src
|
||||
0,Contributing,contributing.html,contributing.src
|
||||
1,Hackers,hackers.html,hackers.src
|
||||
1,Documentation,documentation.html,documentation.src
|
||||
@@ -33,7 +31,6 @@
|
||||
0,Resources,resources.html,resources.src
|
||||
1,Beginning,mono-beginning.html,mono-beginning.src
|
||||
1,Mailing Lists,mailing-lists.html,mailing-lists.src
|
||||
1,Blogs,http://www.go-mono.com/monologue
|
||||
1,Ideas,ideas.html,ideas.src
|
||||
1,Passport,passport.html,passport.src
|
||||
1,Books,books.html,books.src
|
||||
@@ -42,7 +39,6 @@
|
||||
1,Debugging,jit-debug.html,jit-debug.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
1,Drawing,drawing.html,drawing.src
|
||||
2,ProviderFactory,provider-factory.html,provider-factory.src
|
||||
2,Firebird Interbase,firebird.html,firebird.src
|
||||
2,IBM DB2,ibmdb2.html,ibmdb2.src
|
||||
@@ -55,7 +51,6 @@
|
||||
2,SQL Lite,sqlite.html,sqlite.src
|
||||
2,Sybase,sybase.html,sybase.src
|
||||
2,TDS Generic,tdsclient.html,tdsclient.src
|
||||
2,TDS Providers,tds-providers.html,tds-providers.src
|
||||
1,Crypto,crypto.html,crypto.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
@@ -69,7 +64,7 @@
|
||||
1,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,DirectoryServices,class-status-System.DirectoryServices.html,class-status-System.DirectoryServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Cscompmgd,class-status-Cscompmgd.html,class-status-Cscompmgd.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,System.Security,class-status-System.Security.html,class-status-System.Security.src,cm/cormissing.css,cm/cormissing.js
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
*.xml
|
||||
+25
-67
@@ -9,23 +9,30 @@ CORCOMPARE=../../../mcs/tools/corcompare
|
||||
|
||||
OBJECTS= \
|
||||
deploy/ado-net.html \
|
||||
deploy/bugs.html \
|
||||
deploy/provider-factory.html \
|
||||
deploy/mysql.html \
|
||||
deploy/odbc.html \
|
||||
deploy/oledb.html \
|
||||
deploy/oracle.html \
|
||||
deploy/postgresql.html \
|
||||
deploy/sqlclient.html \
|
||||
deploy/sqlite.html \
|
||||
deploy/sybase.html \
|
||||
deploy/tdsclient.html \
|
||||
deploy/anoncvs.html \
|
||||
deploy/asp-net.html \
|
||||
deploy/blogs.html \
|
||||
deploy/books.html \
|
||||
deploy/bugs.html \
|
||||
deploy/contributing.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/drawing.html \
|
||||
deploy/crypto.html \
|
||||
deploy/embedded-api.html \
|
||||
deploy/faq.html \
|
||||
deploy/firebird.html \
|
||||
deploy/forge.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/gtk-sharp.html \
|
||||
deploy/hackers.html \
|
||||
@@ -40,51 +47,26 @@ OBJECTS= \
|
||||
deploy/mbas.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/mono-todo.html \
|
||||
deploy/mono-todo.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/mysql.html \
|
||||
deploy/odbc.html \
|
||||
deploy/oledb.html \
|
||||
deploy/oracle.html \
|
||||
deploy/other.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/postgresql.html \
|
||||
deploy/ppc.html \
|
||||
deploy/provider-factory.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/screenshots.html \
|
||||
deploy/sqlclient.html \
|
||||
deploy/sqlite.html \
|
||||
deploy/status.html \
|
||||
deploy/sybase.html \
|
||||
deploy/tdsclient.html \
|
||||
deploy/tds-providers.html \
|
||||
deploy/team.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html \
|
||||
deploy/class-library.html \
|
||||
deploy/classlib-doc.html \
|
||||
deploy/class-status-corlib.html \
|
||||
deploy/class-status-System.html \
|
||||
deploy/class-status-System.Xml.html \
|
||||
deploy/class-status-System.Data.html \
|
||||
deploy/class-status-System.Security.html \
|
||||
deploy/class-status-System.Web.html \
|
||||
deploy/class-status-System.Web.Services.html \
|
||||
deploy/class-status-System.Drawing.html \
|
||||
deploy/class-status-Microsoft.VisualBasic.html \
|
||||
deploy/class-status-System.Windows.Forms.html \
|
||||
deploy/class-status-System.DirectoryServices.html \
|
||||
deploy/class-status-Cscompmgd.html \
|
||||
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html
|
||||
|
||||
HTML_SOURCES = ../mono-roadmap.html
|
||||
deploy/classlib-doc.html
|
||||
|
||||
#2,Configuration.Install,class-status-System.Configuration.Install.html,class-status-System.Configuration.Install.src,cm/cormissing.css,cm/cormissing.js
|
||||
#2,Runtime.Remoting,class-status-System.Runtime.Remoting.html,class-status-System.Runtime.Remoting.src,cm/cormissing.css,cm/cormissing.js
|
||||
@@ -96,10 +78,9 @@ NON_HTML_SOURCES= \
|
||||
../mono-build.sh \
|
||||
../mono-build-w32.sh
|
||||
|
||||
all: $(OBJECTS) deploy/index.rss ../team
|
||||
all: $(OBJECT) deploy/index.rss ../team
|
||||
perl process.pl commands template.html.in deploy
|
||||
cp $(HTML_SOURCES) deploy
|
||||
test -d deploy/team || mkdir deploy/team
|
||||
-mkdir deploy/team
|
||||
cp team/*png deploy/team
|
||||
|
||||
tutorial: mono-beginning.html.stamp mono-beginning.pdf
|
||||
@@ -128,16 +109,14 @@ render-team-page.exe: render-team-page.cs
|
||||
$(CSC) render-team-page.cs
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(patsubst deploy/%.html,src/%.src, $(OBJECTS)) src/*.xml src/*.html.in ../class-status-* ../class-status infos/*
|
||||
rm -f $(OBJECTS) $(patsubst deploy/%.html,src/%.src, $(OBJECTS)) src/*.xml src/*.html.in ../class-status-* ../class-status
|
||||
|
||||
push:
|
||||
cp -f $(NON_HTML_SOURCES) deploy
|
||||
cp ../mono-roadmap.html deploy
|
||||
#echo scp -P 2200 -r deploy/* [email protected]:/web/cvsmodules/mono
|
||||
#(cd deploy; rsync --verbose --recursive --checksum --update --rsh='ssh' . [email protected]:/web/cvsmodules/mono )
|
||||
(cd deploy; rsync --verbose --recursive --checksum --update --rsh='ssh' . [email protected]:/web/cvsmodules/mono )
|
||||
|
||||
|
||||
push2:
|
||||
scp -r deploy/* primates:public_html/xxx
|
||||
|
||||
@@ -159,41 +138,20 @@ src/%.src: ../% commands template.html.in makefile
|
||||
|
||||
|
||||
.PRECIOUS: src/%.html.in
|
||||
src/%.html.in: src/%.xml transform.exe $(CORCOMPARE)/mono-api.xsl
|
||||
$(RUN_MONO) ./transform.exe $< $(CORCOMPARE)/mono-api.xsl > $@ || (rm -f $@ && exit 1)
|
||||
src/%.html.in: src/%.xml transform.exe $(CORCOMPARE)/cormissing.xsl
|
||||
$(RUN_MONO) ./transform.exe $< $(CORCOMPARE)/cormissing.xsl > $@
|
||||
|
||||
|
||||
.PRECIOUS: infos/%.xml
|
||||
infos/%.xml: ../../../mcs/class/lib/%.dll $(CORCOMPARE)/mono-api-info.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-info.exe $< > $@ || (rm -f $@ && exit 1)
|
||||
|
||||
.PRECIOUS: src/%.xml
|
||||
src/%.xml: infos/%.xml $(CORCOMPARE)/mono-api-diff.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-diff.exe masterinfos/$(notdir $<) $< > $@ || (rm -f $@ && exit 1)
|
||||
src/%.xml: ../../../mcs/class/lib/%.dll $(CORCOMPARE)/CorCompare.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/CorCompare.exe -x $@ $<
|
||||
|
||||
# corlib, corlib...
|
||||
infos/mscorlib.xml: ../../../mcs/class/lib/mscorlib.dll $(CORCOMPARE)/mono-api-info.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-info.exe $(notdir $(basename $<)) > $@ || (rm -f $@ && exit 1)
|
||||
src/corlib.xml: ../../../mcs/class/lib/corlib_cmp.dll $(CORCOMPARE)/CorCompare.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/CorCompare.exe -f corlib -ms mscorlib -x $@ $<
|
||||
|
||||
src/corlib.xml: infos/mscorlib.xml $(CORCOMPARE)/mono-api-diff.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-diff.exe masterinfos/mscorlib.xml $< > $@ || (rm -f $@ && exit 1)
|
||||
|
||||
# System
|
||||
infos/System.xml: ../../../mcs/class/lib/System.dll $(CORCOMPARE)/mono-api-info.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-info.exe $(notdir $(basename $<)) > $@ || (rm -f $@ && exit 1)
|
||||
|
||||
src/System.xml: infos/System.xml $(CORCOMPARE)/mono-api-diff.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-diff.exe masterinfos/System.xml $< > $@ || (rm -f $@ && exit 1)
|
||||
|
||||
# System.Xml
|
||||
infos/System.Xml.xml: ../../../mcs/class/lib/System.Xml.dll $(CORCOMPARE)/mono-api-info.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-info.exe $(notdir $(basename $<)) > $@ || (rm -f $@ && exit 1)
|
||||
|
||||
src/System.Xml.xml: infos/System.Xml.xml $(CORCOMPARE)/mono-api-diff.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-diff.exe masterinfos/System.Xml.xml $< > $@ || (rm -f $@ && exit 1)
|
||||
|
||||
src/System.DirectoryServices.xml: infos/System.DirectoryServices.xml $(CORCOMPARE)/mono-api-diff.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/mono-api-diff.exe masterinfos/System.DirectoryServices.xml $< > $@ || (rm -f $@ && exit 1)
|
||||
src/System.Security.xml: ../../../mcs/class/lib/System.Security_cmp.dll $(CORCOMPARE)/CorCompare.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/CorCompare.exe -f System.Security -ms System.Security -x $@ $<
|
||||
|
||||
../class-status: ../class-status.in
|
||||
cp -f $< $@
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
*.xml
|
||||
@@ -52,7 +52,6 @@ class X {
|
||||
i = c.NewItem ();
|
||||
i.Title = title;
|
||||
i.Link = link;
|
||||
i.PubDate = s.Substring (6, s.IndexOf (":") - 6) + ", 2003";
|
||||
} else {
|
||||
description += "\n" + (s == "\n" ? "<p>" : s);
|
||||
}
|
||||
|
||||
+1
-16
@@ -13,7 +13,7 @@ namespace RSS {
|
||||
public class Item {
|
||||
XmlDocument doc;
|
||||
XmlNode item;
|
||||
XmlText title, link, description, pubdate;
|
||||
XmlText title, link, description;
|
||||
|
||||
public Item (XmlDocument doc, XmlNode item)
|
||||
{
|
||||
@@ -76,21 +76,6 @@ namespace RSS {
|
||||
description.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string PubDate {
|
||||
get {
|
||||
if (pubdate == null)
|
||||
return null;
|
||||
|
||||
return pubdate.Value;
|
||||
}
|
||||
|
||||
set {
|
||||
if (pubdate == null)
|
||||
pubdate = MakeTextElement ("pubDate");
|
||||
pubdate.Value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Channel {
|
||||
|
||||
+6
-88
@@ -648,7 +648,7 @@
|
||||
|
||||
</name>
|
||||
|
||||
<e-mail>jackson@ximian.com</e-mail>
|
||||
<e-mail>jackson@latitudegeo.com</e-mail>
|
||||
|
||||
<image>jackson.png</image>
|
||||
|
||||
@@ -658,12 +658,12 @@
|
||||
|
||||
<tasks>
|
||||
|
||||
<task>Misc Bug fixes</task>
|
||||
|
||||
<task>Cscompmgd</task>
|
||||
|
||||
<task>IL Assembler</task>
|
||||
|
||||
<task>System.Web</task>
|
||||
|
||||
<task>Bug Fix0r</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
</contributor>
|
||||
@@ -678,7 +678,7 @@
|
||||
|
||||
</name>
|
||||
|
||||
<e-mail>ndrochak AT ieee.org</e-mail>
|
||||
<e-mail>ndrochak AT gol.com</e-mail>
|
||||
|
||||
<image>nickd.png</image>
|
||||
|
||||
@@ -1468,86 +1468,4 @@
|
||||
</tasks>
|
||||
|
||||
</contributor>
|
||||
<contributor>
|
||||
|
||||
<name>
|
||||
|
||||
<first-name>Todd</first-name>
|
||||
|
||||
<last-name>Berman</last-name>
|
||||
|
||||
</name>
|
||||
|
||||
<e-mail>[email protected]</e-mail>
|
||||
|
||||
<image>tberman.png</image>
|
||||
|
||||
<location>Toronto, ON, CA</location>
|
||||
|
||||
<organization></organization>
|
||||
|
||||
<description></description>
|
||||
|
||||
<tasks>
|
||||
|
||||
<task>WSE2</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
</contributor>
|
||||
<contributor>
|
||||
|
||||
<name>
|
||||
|
||||
<first-name>Carlos</first-name>
|
||||
|
||||
<last-name>Guzmán Álvarez</last-name>
|
||||
|
||||
</name>
|
||||
|
||||
<e-mail>[email protected]</e-mail>
|
||||
|
||||
<image>none.png</image>
|
||||
|
||||
<location>Vigo, Spain</location>
|
||||
|
||||
<organization></organization>
|
||||
|
||||
<description>Contributor</description>
|
||||
|
||||
<tasks>
|
||||
|
||||
<task>TLS protocol</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
</contributor>
|
||||
|
||||
<contributor>
|
||||
|
||||
<name>
|
||||
|
||||
<first-name>Jordi</first-name>
|
||||
|
||||
<last-name>Mas i Hernàndez</last-name>
|
||||
|
||||
</name>
|
||||
|
||||
<e-mail>[email protected]</e-mail>
|
||||
|
||||
<image>jordi.png</image>
|
||||
|
||||
<location>Barcelona, Spain</location>
|
||||
|
||||
<organization></organization>
|
||||
|
||||
<description>Developer</description>
|
||||
|
||||
<tasks>
|
||||
|
||||
<task>Windows.Forms implementation</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
</contributor>
|
||||
</contributors>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.3 KiB |
@@ -34,10 +34,6 @@
|
||||
a.topmenu:visited { color: #cccccc; }
|
||||
a.topmenu:hover { color: #ee9900; text-decoration: underline; }
|
||||
|
||||
h1 {
|
||||
border-bottom: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
// -->
|
||||
</style>
|
||||
#CSS#
|
||||
@@ -61,8 +57,7 @@
|
||||
<a class="topmenu" href="http://go-mono.com/daily">Daily snapshots</a> |
|
||||
<a class="topmenu" href="screenshots.html">Screenshots</a> |
|
||||
<a class="topmenu" href="http://www.go-mono.com:8080">Documentation</a> |
|
||||
<a class="topmenu" href="bugs.html">Bugs</a> |
|
||||
<a class="topmenu" href="blogs.html">Blogs</a>
|
||||
<a class="topmenu" href="bugs.html">Bugs</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+76
-4
@@ -48,7 +48,7 @@
|
||||
calls to Win32 and we will then just run the result on Unix.
|
||||
|
||||
In terms of integrating visually with the desktop, we are
|
||||
hoping to contribute to the Wine project a mechanism to make
|
||||
hoping to contribute to the Wine project an mechanism to make
|
||||
it use the Gtk+ themes on X11 and Cocoa on MacOS to render the
|
||||
widgets, and get the native look and feel on each of these
|
||||
platforms.
|
||||
@@ -90,7 +90,79 @@
|
||||
|
||||
* System.Drawing
|
||||
|
||||
For details, see the <a
|
||||
href="drawing.html">System.Drawing implementation notes</a>
|
||||
section of the web site.
|
||||
Using existing libraries to implement some of the
|
||||
functionality required:
|
||||
|
||||
<ul>
|
||||
* gdk-pixbuf is a generic image loader that loads an image
|
||||
and leaves it into an RGB buffer. It hides all the details
|
||||
about what image file format is being loaded.
|
||||
|
||||
* Libart is a general framework for rendering RGB/RGBA
|
||||
buffers into RGB buffers and rendering postscript-like paths into
|
||||
RGB/RGBA buffers.
|
||||
</ul>
|
||||
|
||||
We want to use gdk-pixbuf as the image loader for the image
|
||||
classes, and then we need operations to render that into the
|
||||
windowing system (Gtk+, MacOS, etc). But notice how there is
|
||||
very little dependnecies in Gdk-pixbuf on gtk, and libart has
|
||||
none.
|
||||
|
||||
They are pretty independent from a windowing system
|
||||
(gdk-pixbuf comes with some "helper" routines for rendering
|
||||
data into a pixmap and to load pixmaps into RGB buffers).
|
||||
|
||||
A few things to keep in mind:
|
||||
|
||||
<ul>
|
||||
|
||||
* gdk-pixbuf can be used to load images for Gtk+,
|
||||
MacOS X and Windows, it should be pretty portable,
|
||||
although we might need in the future to back-port
|
||||
some new features from Gtk head.
|
||||
|
||||
* Libart is probably only going to be used with X11,
|
||||
as the MacOS X provides the same features in Quartz,
|
||||
and Win32 *probably* has that in GDI+. If not, we
|
||||
should use libart in Win32 as well (or for older
|
||||
Windows systems).
|
||||
</ul>
|
||||
|
||||
* Directory Layout
|
||||
|
||||
<pre>
|
||||
System.Drawing (assembly directory)
|
||||
System.Drawing.Blah
|
||||
Common code for "Blah"
|
||||
Stubs for "Blah" to ease ports.
|
||||
|
||||
Gtk
|
||||
System.Drawing.Blah.
|
||||
Gtk ports of "System.Drawing.Blah"
|
||||
MacOS
|
||||
System.Drawing.Blah
|
||||
MacOS ports of "System.Drawing.Blah"
|
||||
WineLIB
|
||||
System.Drawing.Blah
|
||||
Win32 ports of "System.Drawing.Blah"
|
||||
</pre>
|
||||
|
||||
Notice that there is a proof of concept Gtk-backend for
|
||||
Windows.Forms, but nobody is working on it, and for the
|
||||
reasons stated before it is not a long term strategy.
|
||||
|
||||
* Open questions:
|
||||
|
||||
I believe that the graphics contexts that are used to render
|
||||
can accept either libart-like rendering operations and
|
||||
X11-like rendering operations. This complicates matters, but
|
||||
I am not sure. Someone needs to investigate this.
|
||||
|
||||
* Historical
|
||||
|
||||
Although the original plans were to use Gtk on X and Cocoa on
|
||||
MacOS X, it would be very hard to emulate the event model in
|
||||
which some Winforms applications depend, and it would be very
|
||||
hard to implement the Wndproc method.
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharp.1 oldmono.1 ilasm.1 \
|
||||
cert2spc.1 cilc.1 genxs.1
|
||||
cert2spc.1 cilc.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
.\"
|
||||
.\" chktrust manual page.
|
||||
.\" Copyright 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "chktrust"
|
||||
.SH NAME
|
||||
chktrust \- Check the trust of a PE executable.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B chktrust [options] filename
|
||||
.SH DESCRIPTION
|
||||
Verify if an PE executable (CLR assembly, Win32 EXE or DLL) has a valid
|
||||
Authenticode(r) signature that can be traced back to a trusted certificate
|
||||
authority (CA).
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I "-q", "-quiet"
|
||||
Limited display on console.
|
||||
.TP
|
||||
.I "-v", "-verbose"
|
||||
More details displayed on the console.
|
||||
.TP
|
||||
.I "-help", "-h", "-?", "/?"
|
||||
Display help about this tool.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR signcode(1), makecert(1)
|
||||
-294
@@ -1,294 +0,0 @@
|
||||
.\"
|
||||
.\" genxs manual page.
|
||||
.\" (C) Lluis Sanchez Gual ([email protected])
|
||||
.\"
|
||||
.TH genxs 1
|
||||
.SH NAME
|
||||
genxs \- Mono's Xml Serializer Generator
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B genxs
|
||||
configurationFile [destinationFolder]
|
||||
.SH DESCRIPTION
|
||||
.I genxs
|
||||
is a tool for generating custom XML serialization writers and readers for
|
||||
classes.
|
||||
.PP
|
||||
.I configurationFile
|
||||
is configuration file which specifies several
|
||||
information, such as the class for which to generate the reader and writer, the
|
||||
name and namespace of the classes to generate, and a collection of hooks to
|
||||
apply. By using hooks it is possible to customize the
|
||||
behavior of the serializer without needing to modify the generated file, so you
|
||||
can safely regenerate it if the source class is modified.
|
||||
.PP
|
||||
.I destinationFolder
|
||||
specifies the folder where the files will be generated.
|
||||
.PP
|
||||
.B NOTE:
|
||||
This tool only runs in the Mono runtime, since it uses some internal
|
||||
classes not available in other runtimes.
|
||||
.SH CONFIGURATION FILE FORMAT
|
||||
The configuration file is an xml document based on the following grammar
|
||||
("?" means optional, "*" 0 or more):
|
||||
.PP
|
||||
.nf
|
||||
<configuration>
|
||||
<serializer class="name" assembly="name"> *
|
||||
<reader>name</reader> ?
|
||||
<writer>name</writer> ?
|
||||
<namespace>name</namespace> ?
|
||||
<outFileName>name</outFileName> ?
|
||||
<readerHooks> ?
|
||||
<hook ...> *
|
||||
</readerHooks>
|
||||
<writerHooks> ?
|
||||
<hook ...> *
|
||||
</writerHooks>
|
||||
</serializer>
|
||||
</configuration>
|
||||
.fi
|
||||
.PP
|
||||
A configuration file can have multiple "serializer" elements, each of which
|
||||
specifies the class for which to generate a serializer together with several
|
||||
generation options. The source class is specified in the following attributes:
|
||||
.PP
|
||||
.IP " *" 5
|
||||
.I class
|
||||
: name of the class (including namespace).
|
||||
.IP " *" 5
|
||||
.I assembly
|
||||
: assembly name. It can include the complete path.
|
||||
.PP
|
||||
Generation options are specified in child elements:
|
||||
.PP
|
||||
.IP " *" 5
|
||||
.I reader
|
||||
: name of the reader class.
|
||||
.IP " *" 5
|
||||
.I writer
|
||||
: name of the writer class.
|
||||
.IP " *" 5
|
||||
.I namespace
|
||||
: namespace of the reader and writer classes.
|
||||
.IP " *" 5
|
||||
.I outFileName
|
||||
: name of the generated file.
|
||||
.IP " *" 5
|
||||
.I readerHooks
|
||||
: a list of hooks to apply to the reader.
|
||||
.IP " *" 5
|
||||
.I writerHooks
|
||||
: a list of hooks to apply to the writer.
|
||||
.SH SPECIFYING HOOKS
|
||||
Using hooks you can customize the behavior of readers and writers.
|
||||
A hook specification follows this grammar:
|
||||
.PP
|
||||
.nf
|
||||
<hook type="name">
|
||||
<select> ?
|
||||
<typeName>name</typeName> ?
|
||||
<typeAttribute>name</typeAttribute> *
|
||||
<typeMember>name</typeMember> ?
|
||||
</select>
|
||||
<replace>source code</replace> ?
|
||||
<insertBefore>source code</insertBefore> ?
|
||||
<insertAfter>source code</insertAfter> ?
|
||||
</hook>
|
||||
.fi
|
||||
.PP
|
||||
The "type" attribute specifies the context in which the hook is applied. It can
|
||||
be one of the following:
|
||||
.PP
|
||||
.IP " *" 5
|
||||
.I attributes
|
||||
: hook is applied where attributes are serialized/deserialized.
|
||||
.IP " *" 5
|
||||
.I elements
|
||||
: hook is applied where elements are serialized/deserialized.
|
||||
.IP " *" 5
|
||||
.I unknownAttribute
|
||||
: hook is applied where unknown attributes are processed.
|
||||
.IP " *" 5
|
||||
.I unknownElement
|
||||
: hook is applied where unknown elements are processed.
|
||||
.IP " *" 5
|
||||
.I member
|
||||
: hook is applied where a member is serialized/deserialized.
|
||||
.IP " *" 5
|
||||
.I type
|
||||
: hook is applied for the whole type.
|
||||
.PP
|
||||
The "select" element specifies the classes and members to which the hook has
|
||||
to be added. It can contain the following elements:
|
||||
.PP
|
||||
.IP " *" 5
|
||||
.I typeName
|
||||
: the class with that name will be selected (must include namespace)
|
||||
.IP " *" 5
|
||||
.I typeAttribute
|
||||
: all classes which have that attribute applied will be selected (specify the
|
||||
full attribute class name, including namespace). Several attribute names can be
|
||||
specified.
|
||||
.IP " *" 5
|
||||
.I typeMember
|
||||
: name of the class member for which the hook must be added.
|
||||
.PP
|
||||
The hook source code can be specified using any of the following elements:
|
||||
.PP
|
||||
.IP " *" 5
|
||||
.I replace
|
||||
: the provided source code will replace all serialization/deserialization
|
||||
operations in the hook context.
|
||||
.IP " *" 5
|
||||
.I insertBefore
|
||||
: the source code will be added before the hook context.
|
||||
.IP " *" 5
|
||||
.I insertAfter
|
||||
: the source code will be added after the hook context.
|
||||
.PP
|
||||
When writing the code for a hook you can use some special variables that are
|
||||
defined during the code generation process. The variables are the following:
|
||||
.PP
|
||||
.IP " *" 5
|
||||
.I $TYPE:
|
||||
name of the class being generated, without namespace.
|
||||
.IP " *" 5
|
||||
.I $FULLTYPE:
|
||||
full name of the class being generated, including namespace.
|
||||
.IP " *" 5
|
||||
.I $OBJECT:
|
||||
the object being serialized or deserialized. When using a replace
|
||||
reader hook of type "type", the hook code must assign the deserialized object
|
||||
to this variable.
|
||||
.IP " *" 5
|
||||
-I $ELEMENT:
|
||||
name of the element of the object being serialized/deserialized.
|
||||
.IP " *" 5
|
||||
.I $NAMESPACE:
|
||||
namespace of the element of the object being serialized/deserialized.
|
||||
.IP " *" 5
|
||||
.I $MEMBER:
|
||||
name of the member being serialized/deserialized. Only valid in the "member"
|
||||
context.
|
||||
.SH HOOK EXAMPLES
|
||||
The following example adds a call to a Validate method after the deserialization
|
||||
of any object:
|
||||
.PP
|
||||
.nf
|
||||
<hook type="type">
|
||||
<insertAfter>
|
||||
System.Xml.Schema.XmlSchema.Validate$TYPE ($OBJECT);
|
||||
</insertAfter>
|
||||
</hook>
|
||||
.fi
|
||||
.PP
|
||||
This example specifies the code to be used to deserialize the XmlSchema class:
|
||||
.PP
|
||||
.nf
|
||||
<hook type="type">
|
||||
<select>
|
||||
<typeName>System.Xml.Schema.XmlSchema</typeName>
|
||||
</select>
|
||||
<replace>
|
||||
$OBJECT = System.Xml.Schema.XmlSchema.Read (Reader, null);
|
||||
</replace>
|
||||
</hook>
|
||||
.fi
|
||||
.PP
|
||||
That one specifies the code to be used to read XmlSchema instances:
|
||||
.PP
|
||||
.nf
|
||||
<hook type="type">
|
||||
<select>
|
||||
<typeName>System.Xml.Schema.XmlSchema</typeName>
|
||||
</select>
|
||||
<replace>$OBJECT.Write (Writer);</replace>
|
||||
</hook>
|
||||
.fi
|
||||
.PP
|
||||
With this two hooks the serializer will print some information when serializing
|
||||
the class "MyClass":
|
||||
.PP
|
||||
.nf
|
||||
<hook type="type">
|
||||
<select>
|
||||
<typeName>MyNamespace.MyClass</typeName>
|
||||
</select>
|
||||
<insertBefore>Console.WriteLine ("Serializing MyClass");</replace>
|
||||
<insertAfter>Console.WriteLine ("MyClass serialized");</insertAfter>
|
||||
</hook>
|
||||
<hook type="member">
|
||||
<select>
|
||||
<typeName>MyNamespace.MyClass</typeName>
|
||||
</select>
|
||||
<insertAfter>
|
||||
Console.WriteLine ("Serialized member $MEMBER");
|
||||
</insertAfter>
|
||||
</hook>
|
||||
.fi
|
||||
.PP
|
||||
This hook writes an additional element for all types that have the custom
|
||||
attribute "MyAttribute":
|
||||
.PP
|
||||
.nf
|
||||
<hook type="elements">
|
||||
<select>
|
||||
<typeAttribute>MyNamespace.MyAttribute</typeAttribute>
|
||||
</select>
|
||||
<insertAfter>
|
||||
Writer.WriteStartElement ("privateData");
|
||||
Writer.WriteString ($OBJECT.PrivateData);
|
||||
Writer.WriteEndElement ();
|
||||
</insertAfter>
|
||||
</hook>
|
||||
.fi
|
||||
.SH CONFIGURATION FILE EXAMPLE
|
||||
This is the configuration file used to generate the serializer for ServiceDescription:
|
||||
.PP
|
||||
.nf
|
||||
<configuration>
|
||||
<serializer class="System.Web.Services.Description.ServiceDescription" assembly="System.Web.Services">
|
||||
<reader>ServiceDescriptionReaderBase</reader>
|
||||
<writer>ServiceDescriptionWriterBase</writer>
|
||||
<namespace>System.Web.Services.Description</namespace>
|
||||
<outFileName>ServiceDescriptionSerializerBase.cs</outFileName>
|
||||
<readerHooks>
|
||||
<hook type="unknownElement">
|
||||
<select>
|
||||
<typeAttribute>System.Web.Services.Configuration.XmlFormatExtensionPointAttribute</typeAttribute>
|
||||
</select>
|
||||
<replace>ServiceDescription.ReadExtension (Reader, $OBJECT);</replace>
|
||||
</hook>
|
||||
<hook type="type">
|
||||
<select>
|
||||
<typeName>System.Xml.Schema.XmlSchema</typeName>
|
||||
</select>
|
||||
<replace>$OBJECT = System.Xml.Schema.XmlSchema.Read (Reader, null);</replace>
|
||||
</hook>
|
||||
</readerHooks>
|
||||
<writerHooks>
|
||||
<hook type="elements">
|
||||
<select>
|
||||
<typeAttribute>System.Web.Services.Configuration.XmlFormatExtensionPointAttribute</typeAttribute>
|
||||
</select>
|
||||
<insertBefore>ServiceDescription.WriteExtensions (Writer, $OBJECT);</insertBefore>
|
||||
</hook>
|
||||
<hook type="type">
|
||||
<select>
|
||||
<typeName>System.Xml.Schema.XmlSchema</typeName>
|
||||
</select>
|
||||
<replace>$OBJECT.Write (Writer);</replace>
|
||||
</hook>
|
||||
</writerHooks>
|
||||
</serializer>
|
||||
</configuration>
|
||||
.fi
|
||||
.SH AUTHORS
|
||||
Lluis Sanchez Gual ([email protected])
|
||||
.PP
|
||||
.SH LICENSE
|
||||
GenXS is released under the terms of the GNU GPL.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
mono(1), mcs(1)
|
||||
+1
-6
@@ -9,10 +9,5 @@
|
||||
<manpage name="Sql#" page="sqlsharp.1" />
|
||||
<manpage name="SecUtil" page="secutil.1" />
|
||||
<manpage name="MonoStyle" page="monostyle.1" />
|
||||
<manpage name="genxs" page="genxs.1" />
|
||||
<manpage name="cert2spc" page="cert2spc.1" />
|
||||
<manpage name="makecert" page="makecert.1" />
|
||||
<manpage name="chktrust" page="chktrust.1" />
|
||||
<manpage name="signcode" page="signcode.1" />
|
||||
<manpage name="sn" page="sn.1" />
|
||||
|
||||
</manpages>
|
||||
+9
-65
@@ -168,45 +168,10 @@ breakpoint on the application's main method.
|
||||
Inserts a breakpoint on exceptions. This allows you to debug your
|
||||
application with a native debugger when an exception is thrown.
|
||||
.TP
|
||||
.I "--trace[=expression]"
|
||||
Shows method names as they are invoked. By default all methods are
|
||||
traced.
|
||||
.TP
|
||||
The trace can be customized to include or exclude methods, classes or
|
||||
assemblies. A trace expression is a comma separated list of targets,
|
||||
each target can be prefixed with a minus sign to turn off a particular
|
||||
target. The words `program' and `all' have special meaning.
|
||||
`program' refers to the main program being executed, and `all' means
|
||||
all the method calls.
|
||||
.TP
|
||||
Assemblies are specified by their name, for example, to trace all
|
||||
calls in the System assembly, use:
|
||||
.nf
|
||||
mono --trace=System app.exe
|
||||
.fi
|
||||
Classes are specified with the T: prefix. For example, to trace all
|
||||
calls to the System.String class, use:
|
||||
.nf
|
||||
mono --trace=T:System.String app.exe
|
||||
.fi
|
||||
And individual methods are referenced with the M: prefix, and the
|
||||
standar method notation:
|
||||
.nf
|
||||
mono --trace=M:System.Console.WriteLine app.exe
|
||||
.fi
|
||||
As previously noted, various rules can be specified at once:
|
||||
.nf
|
||||
mono --trace=T:System.String,T:System.Random app.exe
|
||||
.fi
|
||||
You can exclude pieces, the next example traces calls to
|
||||
System.String except for the System.String:Concat method.
|
||||
.nf
|
||||
mono --trace=T:System.String,-M:System.String:Concat
|
||||
.fi
|
||||
Finally, namespaces can be specified using the N: prefix:
|
||||
.nf
|
||||
mono --trace=N:System.Xml
|
||||
.fi
|
||||
.I "--trace"
|
||||
Shows method names as they are invoked.
|
||||
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.I "GC_DONT_GC"
|
||||
@@ -219,10 +184,9 @@ Directories are separated by the platform path separator (colons on unix). Examp
|
||||
.B /home/username/lib:/usr/local/mono/lib
|
||||
.TP
|
||||
.I "MONO_DISABLE_SHM"
|
||||
If this variable is set, it disables the shared memory part of the
|
||||
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.
|
||||
If this variable is set, it disables the Windows I/O Emulation layer,
|
||||
and handles (files, events, mutexes, pipes) will not be shared across
|
||||
processes. This option is only available on Unix.
|
||||
.TP
|
||||
.I "MONO_CFG_DIR"
|
||||
If set, this variable overrides the default system configuration directory
|
||||
@@ -235,27 +199,9 @@ environment variable.
|
||||
.TP
|
||||
.I "MONO_DEBUG"
|
||||
If set, enables some features of the runtime useful for debugging.
|
||||
|
||||
Currently it only makes the runtime display the stack traces for all the
|
||||
threads running and exit. It may not exit cleanly. Use at your own risk.
|
||||
.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.
|
||||
.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_SHARED_DIR"
|
||||
If set its the directory where the ".wapi" handle state is stored.
|
||||
This is the directory where the Windows I/O Emulation layer stores its
|
||||
shared state data (files, events, mutexes, pipes). By default Mono
|
||||
will store the ".wapi" directory in the users's home directory.
|
||||
.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
|
||||
@@ -271,8 +217,6 @@ Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR mcs(1), mint(1), monodis(1), mono-config(5).
|
||||
.PP
|
||||
For ASP.NET-related documentation, see the xsp(1) manual page
|
||||
.BR mcs(1), mint(1), monodis(1), mono-config(5)
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
.\"
|
||||
.\" signcode manual page.
|
||||
.\" Copyright 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "signcode"
|
||||
.SH NAME
|
||||
signcode \- Digitally sign an PE executable using an X.509 certificate.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B signcode [options] filename
|
||||
.SH DESCRIPTION
|
||||
Digitally sign an PE executable (CLR assembly, Win32 EXE or DLL) using an
|
||||
X.509 certificate and it's associated private key. The signature is compatible
|
||||
with Authenticode(r) and can be validated with chktrust.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I "-spc spcfile"
|
||||
The Software Publisher File (spc) that contains the X.509 certificate chain
|
||||
used to digitally sign the PE executable.
|
||||
.TP
|
||||
.I "-v pvkfile"
|
||||
The Private Key File (pvk) that contains the private key used to digitally
|
||||
sign the PE executable. This private key must match the public key inside the
|
||||
publisher X.509 certificate.
|
||||
.TP
|
||||
.I "-a md5 | sha1"
|
||||
The hash algorithm used in the digital signature of the PE executable. The
|
||||
default algorithm is MD5.
|
||||
.TP
|
||||
.I "-$ individual | commercial"
|
||||
Add information about the publisher, i.e. if the signature is generated by an
|
||||
individual or a commercial entity.
|
||||
.TP
|
||||
.I "-n description"
|
||||
Add a textual description of the signed file.
|
||||
.TP
|
||||
.I "-i url"
|
||||
Add a URL associated to the publisher or the signed file.
|
||||
.TP
|
||||
.I "-t url"
|
||||
URL to a timestamp service to countersign the PE executable. Countersignature
|
||||
is required if you want the PE executable signature to be valid after the
|
||||
publisher certificate expires. The countersignature proves that the publisher
|
||||
had a valid (non-expired) certificate when the PE executable was signed.
|
||||
.TP
|
||||
.I "-tr #"
|
||||
Number of retries to get a timestamp for the countersignature.
|
||||
.TP
|
||||
.I "-td #"
|
||||
Delay (in seconds) between the retries to get a timestamp for the countersignature.
|
||||
.TP
|
||||
.I "-k name"
|
||||
CryptoAPI key container name (when not using -v).
|
||||
.TP
|
||||
.I "-p name"
|
||||
CryptoAPI provider name (when not using -v).
|
||||
.TP
|
||||
.I "-y #"
|
||||
CryptoAPI provider type (when not using -v or -p).
|
||||
.TP
|
||||
.I "-ky signature | exchange | #"
|
||||
CryptoAPI key type (when not using -v).
|
||||
.TP
|
||||
.I "-r localMachine | currentUser"
|
||||
CryptoAPI key location (when not using -v).
|
||||
.TP
|
||||
.I "-help", "-h", "-?", "/?"
|
||||
Display help about this tool.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR chktrust(1), makecert(1), cert2spc(1)
|
||||
@@ -1,117 +0,0 @@
|
||||
.\"
|
||||
.\" sn manual page.
|
||||
.\" Copyright 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "sn"
|
||||
.SH NAME
|
||||
sn \- Digitally sign/verify/compare strongname on CLR assemblies.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B sn [-q | -quiet] [options] [parameters]
|
||||
.SH DESCRIPTION
|
||||
Digitally sign, verify or compare, CLR assemblies using strongnames.
|
||||
.SH CONFIGURATION OPTIONS
|
||||
.TP
|
||||
.I "-c provider"
|
||||
Change the default CSP (Crypto Service Provider).
|
||||
.TP
|
||||
.I "-m [y|n]"
|
||||
Use a machine [y] key container or a user [n] key container.
|
||||
.TP
|
||||
.I "-Vl"
|
||||
List the verification options.
|
||||
.TP
|
||||
.I "-Vr assembly [userlist]"
|
||||
Exempt the specified assembly from verification for the specified user list.
|
||||
.TP
|
||||
.I "-Vu assembly"
|
||||
Remove the exemption entry for the specified assembly.
|
||||
.TP
|
||||
.I "-Vx"
|
||||
Remove all exemptions entries.
|
||||
.SH CSP RELATED OPTIONS
|
||||
.TP
|
||||
.I "-d container"
|
||||
Delete the keypair present in the specified key container.
|
||||
.TP
|
||||
.I "-i keypair.snk container"
|
||||
Import the specified strongname file into the specified container.
|
||||
.TP
|
||||
.I "-pc container publickey"
|
||||
Export the public key from the specified CSP container to the specified file.
|
||||
.SH CONVERTION OPTIONS
|
||||
.TP
|
||||
.I "-e assembly output.pub"
|
||||
Export the assembly public key to the specified output file.
|
||||
.TP
|
||||
.I "-p keypair.snk output.pub"
|
||||
Export the public key from the specified strongname key file (SNK) to the
|
||||
specified output file.
|
||||
.TP
|
||||
.I "-o input output.txt"
|
||||
Convert the input file to a CSV file (using decimal).
|
||||
.TP
|
||||
.I "-oh input output.txt"
|
||||
Convert the input file to a CSV file (using hexadecimal).
|
||||
.SH STRONGNAME SIGNING OPTIONS
|
||||
.TP
|
||||
.I "-D assembly1 assembly2"
|
||||
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 in the specified file.
|
||||
.TP
|
||||
.I "-R assembly keypair.snk"
|
||||
Resign the specified assembly using the specified strongname keypair file
|
||||
(SNK).
|
||||
.TP
|
||||
.I "-Rc assembly container"
|
||||
Resign the specified assembly using the specified strongname container.
|
||||
.TP
|
||||
.I "-t file"
|
||||
Show the public key from the specified file.
|
||||
.TP
|
||||
.I "-tp file"
|
||||
Show the public key and the public key token from the specified file.
|
||||
.TP
|
||||
.I "-T assembly"
|
||||
Show the public key from the specified assembly.
|
||||
.TP
|
||||
.I "-Tp assembly"
|
||||
Show the public key and the public key token from the specified assembly.
|
||||
.TP
|
||||
.I "-V assembly"
|
||||
Verify the specified assembly signature.
|
||||
.TP
|
||||
.I "-Vf assembly"
|
||||
Verify the specified assembly signature (even if disabled).
|
||||
.SH HELP OPTIONS
|
||||
.TP
|
||||
.I "-h", "-?"
|
||||
Display basic help about this tool.
|
||||
.TP
|
||||
.I "-h config", "-? config"
|
||||
Display configuration related help about this tool.
|
||||
.TP
|
||||
.I "-h csp", "-? csp"
|
||||
Display Cryptographic Service Provider related help about this tool.
|
||||
.TP
|
||||
.I "-h convert", "-? convert"
|
||||
Display convertion related help about this tool.
|
||||
.TP
|
||||
.I "-h sn", "-? sn"
|
||||
Display strongname related help about this tool.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR secutil(1)
|
||||
@@ -1,8 +1,3 @@
|
||||
2003-10-28 Jackson Harper <[email protected]>
|
||||
|
||||
* INSTALL.txt: Tell users where to find monocharges, do not
|
||||
reference README.building.
|
||||
|
||||
2003-07-22 Peter Williams <[email protected]>
|
||||
|
||||
* README: INSTALL.txt, not INSTALL.
|
||||
|
||||
+3
-18
@@ -20,7 +20,7 @@ following command:
|
||||
make fullbuild
|
||||
|
||||
That will build and install the code in a single pass. The
|
||||
compilation is bundled with the build due to dependencies on the class
|
||||
compilation is bundled with the build due to depedencies on the class
|
||||
libraries on the runtime.
|
||||
|
||||
Build Features for Developers.
|
||||
@@ -29,8 +29,8 @@ Build Features for Developers.
|
||||
These instructions apply to both Linux and Windows. To build this
|
||||
package, you must already have a C# compiler installed. This means
|
||||
that to build on Linux, you need to get a distribution of the MCS
|
||||
binaries; these are called monocharges. They can be found at
|
||||
www.go-mono.com/daily. On Windows, you can just use the
|
||||
binaries; these are called monocharges. See README.building for
|
||||
information on where to get them. On Windows, you can just use the
|
||||
Microsoft compiler. You also need GNU make to build the software (on
|
||||
Windows, you will need for example the Cygwin environment setup).
|
||||
|
||||
@@ -55,21 +55,6 @@ If you get "corlib out of sync" errors, try
|
||||
|
||||
The difference between the two modes is explained farther down.
|
||||
|
||||
Troubleshooting
|
||||
===============
|
||||
|
||||
Occasionally, something in the compiler or runtime changes enough that
|
||||
an existing installation cannot complete a full build from cvs. In this case,
|
||||
go to http://go-mono.com/daily and download a monocharge or monolite tarball.
|
||||
Unpack and copy the .dlls to $prefix/lib and .exes to $prefix/bin/. Then
|
||||
you should be able to complete the build normally (i.e. using make fullbuild).
|
||||
|
||||
wget http://go-mono.com/daily/monolite-20031028.tar.gz
|
||||
tar -zxvf monolite-20031028.tar.gz
|
||||
cd monolite-20031028
|
||||
cp *.exe /usr/local/bin/.
|
||||
cp *.dll /usr/local/lib/.
|
||||
|
||||
Monocharges
|
||||
===========
|
||||
|
||||
|
||||
+2
-4
@@ -9,8 +9,6 @@ all: platform-check profile-check all-recursive #all-local
|
||||
|
||||
install: platform-check profile-check install-recursive #install-local
|
||||
|
||||
uninstall: platform-check profile-check uninstall-recursive #uninstall-local
|
||||
|
||||
test: platform-check profile-check test-recursive #test-local
|
||||
|
||||
run-test: run-test-recursive #run-test-local
|
||||
@@ -73,8 +71,8 @@ distcheck:
|
||||
$(MAKE) dist-tarball || exit 1 ; \
|
||||
mv $(package) Distcheck-MCS ; \
|
||||
(cd Distcheck-MCS && \
|
||||
$(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
|
||||
$(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
|
||||
make prefix=$(prefix) && make test && make install DESTDIR="$$destdir" && \
|
||||
make clean && make dist || exit 1) || exit 1 ; \
|
||||
mv Distcheck-MCS $(package) ; \
|
||||
tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
|
||||
rm $(package)/$(package).tar.gz ; \
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
This contains the Mono C# compiler as well as the Mono runtime
|
||||
library.
|
||||
|
||||
|
||||
@@ -1,23 +1,3 @@
|
||||
2003-11-12 Jackson Harper <[email protected]>
|
||||
|
||||
* rules.make:
|
||||
* platforms/linux.make: corlib name is now mscorlib.
|
||||
|
||||
2003-11-09 Ben Maurer <[email protected]>
|
||||
|
||||
* profiles/generics.make: add the -2 flag.
|
||||
|
||||
2003-10-28 Jackson Harper <[email protected]>
|
||||
|
||||
* platforms/linux.make: Tell users to read INSTALL.txt not the
|
||||
non-existant README.building.
|
||||
|
||||
2003-10-22 Dick Porter <[email protected]>
|
||||
|
||||
* platforms/win32.make:
|
||||
* platforms/linux.make:
|
||||
* rules.make: Added RESGEN platform-specific tool.
|
||||
|
||||
2003-08-03 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* config-default.make: the /nowarn arguments are now set on a per
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ thisdir = build
|
||||
SUBDIRS =
|
||||
include ../build/rules.make
|
||||
|
||||
all-local install-local test-local run-test-local clean-local uninstall-local:
|
||||
all-local install-local test-local run-test-local clean-local:
|
||||
|
||||
DISTFILES = \
|
||||
README.makefiles \
|
||||
|
||||
@@ -23,9 +23,6 @@ install-local: $(PROGRAM)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
|
||||
$(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(prefix)/bin
|
||||
|
||||
uninstall-local:
|
||||
-rm -f $(DESTDIR)$(prefix)/bin/$(base_prog)
|
||||
|
||||
clean-local:
|
||||
-rm -f *.exe $(BUILT_SOURCES) $(CLEAN_FILES) $(pdb) $(stampfile) $(makefrag)
|
||||
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
|
||||
|
||||
@@ -35,9 +35,6 @@ install-local: $(the_lib)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
|
||||
$(INSTALL_LIB) $(the_lib) $(DESTDIR)$(prefix)/lib
|
||||
|
||||
uninstall-local:
|
||||
-rm -f $(DESTDIR)$(prefix)/lib/$(LIBRARY)
|
||||
|
||||
clean-local:
|
||||
-rm -f $(the_lib) $(makefrag) $(test_lib) \
|
||||
$(test_makefrag) $(test_response) \
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
PLATFORM_DEBUG_FLAGS = -g
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_CORLIB = corlib.dll
|
||||
|
||||
BOOTSTRAP_MCS = mcs
|
||||
RESGEN = monoresgen
|
||||
|
||||
# Define this if this ever will work on Linux
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
@@ -30,7 +29,7 @@ hidden_suffix =
|
||||
platform-check:
|
||||
@if ! type $(BOOTSTRAP_MCS) >/dev/null 2>&1 ; then \
|
||||
echo "*** You need a C# compiler installed to build MCS." ; \
|
||||
echo "*** Read INSTALL.txt for information on how to bootstrap" ; \
|
||||
echo "*** Read README.building for information on how to bootstrap" ; \
|
||||
echo "*** a Mono installation." ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
|
||||
@@ -10,7 +10,6 @@ PLATFORM_CORLIB = mscorlib.dll
|
||||
|
||||
BOOTSTRAP_MCS = csc.exe
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
RESGEN = resgen.exe
|
||||
|
||||
PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
PLATFORM_TWEAK_CORLIB_SOURCES=cat - corlib.dll.win32-excludes |sort |uniq -u
|
||||
|
||||
@@ -25,4 +25,5 @@ endif
|
||||
|
||||
profile-check:
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_1_2 -2
|
||||
# Causes some build errors
|
||||
PROFILE_MCS_FLAGS = -d:GENERICS -d:NET_1_1
|
||||
@@ -13,7 +13,7 @@
|
||||
dots := $(shell echo $(thisdir) |sed -e 's,[^./][^/]*,..,g')
|
||||
topdir := $(dots)
|
||||
|
||||
VERSION = 0.28.99
|
||||
VERSION = 0.26.99
|
||||
|
||||
USE_MCS_FLAGS = $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
|
||||
@@ -25,7 +25,7 @@ INSTALL_BIN = $(INSTALL) -m 755
|
||||
INSTALL_LIB = $(INSTALL_BIN)
|
||||
MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
|
||||
INTERNAL_MCS = $(RUNTIME) $(topdir)/mcs/mcs.exe
|
||||
corlib = mscorlib.dll
|
||||
corlib = corlib.dll
|
||||
|
||||
depsdir = $(topdir)/build/deps
|
||||
distdir = $(dots)/$(package)/$(thisdir)
|
||||
@@ -43,7 +43,6 @@ export MKINSTALLDIRS
|
||||
export TEST_HARNESS
|
||||
export BOOTSTRAP_MCS
|
||||
export DESTDIR
|
||||
export RESGEN
|
||||
|
||||
# Get this so the platform.make platform-check rule doesn't become the
|
||||
# default target
|
||||
@@ -121,8 +120,6 @@ run-test: run-test-recursive test-local run-test-local
|
||||
|
||||
clean: clean-recursive clean-local
|
||||
|
||||
uninstall: uninstall-recursive uninstall-local
|
||||
|
||||
endif
|
||||
|
||||
# Can only do this from the top dir
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("ByteFX.Data.dll")]
|
||||
[assembly: AssemblyDescription("ADO.Net drivers for MySql & PostgreSQL")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ByteFX, Inc.")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright 2002-2003, ByteFX, Inc.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("0.7.4.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("..\\..\\bytefx.snk")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("ByteFX.Data.dll")]
|
||||
[assembly: AssemblyDescription("ADO.Net drivers for MySQL & PostgreSQL")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ByteFX, Inc.")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright 2002, ByteFX, Inc.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
@@ -1,35 +1,20 @@
|
||||
./AssemblyInfo.cs
|
||||
./Common/BitStream.cs
|
||||
./Common/DBConnectionString.cs
|
||||
./Common/DBParametersEditor.cs
|
||||
./Common/Connection.cs
|
||||
./Common/ConnectionString.cs
|
||||
./Common/Field.cs
|
||||
./Common/HuffmanTree.cs
|
||||
./Common/Inflater.cs
|
||||
./Common/NamedPipeStream.cs
|
||||
./Common/Security.cs
|
||||
./Common/SqlCommandEditorDlg.cs
|
||||
./Common/SqlCommandTextEditor.cs
|
||||
./Common/StringUtility.cs
|
||||
./Common/Version.cs
|
||||
./Common/MultiHostStream.cs
|
||||
./mysqlclient/CharSetMap.cs
|
||||
./mysqlclient/CommandBuilder.cs
|
||||
./mysqlclient/command.cs
|
||||
./mysqlclient/Connection.cs
|
||||
./mysqlclient/ConnectionInternal.cs
|
||||
./mysqlclient/ConnectionString.cs
|
||||
./mysqlclient/dataadapter.cs
|
||||
./mysqlclient/datareader.cs
|
||||
./mysqlclient/Driver.cs
|
||||
./mysqlclient/Exception.cs
|
||||
./mysqlclient/Field.cs
|
||||
./mysqlclient/MysqlDefs.cs
|
||||
./mysqlclient/MySqlHelper.cs
|
||||
./mysqlclient/MySqlPool.cs
|
||||
./mysqlclient/MySqlPoolManager.cs
|
||||
./mysqlclient/MySqlStream.cs
|
||||
./mysqlclient/Packet.cs
|
||||
./mysqlclient/command.cs
|
||||
./mysqlclient/dataadapter.cs
|
||||
./mysqlclient/datareader.cs
|
||||
./mysqlclient/parameter.cs
|
||||
./mysqlclient/parameter_collection.cs
|
||||
./mysqlclient/transcaction.cs
|
||||
./mysqlclient/Designers/EditConnectionString.cs
|
||||
./mysqlclient/Designers/MySqlConnectionDesign.cs
|
||||
@@ -1,7 +1,3 @@
|
||||
2003-10-06 Nick Drochak <[email protected]>
|
||||
|
||||
* AssemblyInfo.cs: Fix the build by ignoring assembly signing for now.
|
||||
|
||||
2003-03-15 Daniel Morgan <[email protected]>
|
||||
|
||||
* mysqlclient/datareader.cs: in GetSchemaTable(),
|
||||
|
||||
@@ -1,288 +1,22 @@
|
||||
11/30/2003
|
||||
MySql - Fixed ConnectionSTring editor dialog (thanks marco p (pomarc))
|
||||
Common - UserId now supported in connection strings (thanks Jeff Neeley)
|
||||
MySql - Attempting to create a parameter that is not input throws an exception (thanks Ryan Gregg)
|
||||
|
||||
11/29/2003
|
||||
MySql - Added much documentation
|
||||
|
||||
11/26/2003
|
||||
MySql - checked in new MultiHostStream capability. Big thanks to Dan Guisinger for this. he originally submitted the code and idea of supporting multiple machines on the connect string.
|
||||
|
||||
11/25/2003
|
||||
MySql - Added alot of documentation. Still alot to do.
|
||||
|
||||
11/24/2003
|
||||
MySql - Fixed speed issue with 0.73
|
||||
|
||||
11/14/2003
|
||||
MySql - changed to Thread.Sleep(0) in MySqlDataStream to help optimize the case where it doesn't need to wait (thanks Todd German)
|
||||
11/1/2003
|
||||
MySql - Prepopulating the idlepools to MinPoolSize
|
||||
|
||||
10/31/2003
|
||||
MySql - Fixed MySqlPool deadlock condition as well as stupid bug where CreateNewPooledConnection
|
||||
was not ever adding new connections to the pool.
|
||||
Also fixed MySqlStream.ReadBytes and ReadByte to not use TicksPerSecond which does not appear
|
||||
to always be right.
|
||||
(thanks Matthew J. Peddlesden)
|
||||
MySql - Fix for precision and scale (thanks Matthew J. Peddlesden)
|
||||
|
||||
10/28/2003
|
||||
MySql - Added Thread.Sleep(1) to stream reading methods to be more cpu friendly (thanks Sean McGinnis)
|
||||
|
||||
10/24/2003
|
||||
MySql - Fixed problem where ExecuteReader would sometime return null (thanks Lloyd Dupont )
|
||||
|
||||
10/17/2003
|
||||
MySql - Fixed major bug with null field handling (thanks Naucki)
|
||||
|
||||
10/15/2003
|
||||
MySql - enclosed queries for max_allowed_packet and characterset inside try catch (and set defaults)
|
||||
MySql - fixed problem where socket was not getting closed properly (thanks Steve!)
|
||||
|
||||
10/14/2003
|
||||
MySql - Fixed problem where ExecuteNonQuery was not always returning the right value
|
||||
|
||||
10/13/2003
|
||||
MySql - Fixed InternalConnection to not use @@session.max_allowed_packet but use @@max_allowed_packet. (Thanks Miguel)
|
||||
|
||||
10/12/2003
|
||||
MySql - Added many new XML doc lines
|
||||
|
||||
10/10/2003
|
||||
MySql - Fixed sql parsing to not send empty queries (thanks Rory)
|
||||
MySql - Fixed problem where the reader was not unpeeking the packet on close
|
||||
MySql - Fixed problem where user variables were not being handled (thanks Sami Vaaraniemi)
|
||||
MySql - Fixed loop checking in the MySqlPool (thanks Steve M. Brown)
|
||||
|
||||
10/7/2003
|
||||
MySql - Fixed ParameterCollection.Add method to match SqlClient (thanks Joshua Mouch)
|
||||
Common & MySql - Fixed ConnectionSTring parsing to handle no and yes for boolean and not lowercase values (thanks Naucki)
|
||||
|
||||
10/3/2003
|
||||
MySql - Added InternalConnection class, changes to pooling
|
||||
Common - Implemented Persist Security Info
|
||||
|
||||
9/26/2003
|
||||
Common - Added security.cs and version.cs to project
|
||||
|
||||
9/25/2003
|
||||
MySql - Fixed DateTime handling in Parameter.cs (thanks Burkhard Perkens-Golomb)
|
||||
MySql - Fixed parameter serialization where some types would throw a cast exception
|
||||
MySql - Fixed DataReader to convert all returned values to prevent casting errors (thanks Keith Murray)
|
||||
MySql - Added code to Command.ExecuteReader to return null if the initial SQL command throws an exception (thanks Burkhard Perkens-Golomb)
|
||||
|
||||
9/24/2003
|
||||
MySql - Fixed ExecuteScalar bug introduced with restructure
|
||||
|
||||
9/23/2003
|
||||
MySql - Restructure to allow for LOCAL DATA INFILE and better sequencing of packets
|
||||
MySql - Fixed several bugs related to restructure.
|
||||
|
||||
9/10/2003
|
||||
MySql - Early work done to support more secure passwords in Mysql 4.1. Old passwords in 4.1 not supported yet
|
||||
|
||||
8/22/2003
|
||||
MySql- Parameters appearing after system parameters are now handled correctly (Adam M. (adammil))
|
||||
MySql - strings can now be assigned directly to blob fields (Adam M.)
|
||||
|
||||
8/20/2003
|
||||
MySql - Fixed float parameters (thanks Pent)
|
||||
|
||||
8/7/2003
|
||||
MySql - Improved Parameter ctor and ParameterCollection.Add methods to better match SqlClient (thx Joshua Mouch )
|
||||
MySql - Corrected Connection.CreateCommand to return a MySqlCommand type
|
||||
MySql - Fixed connection string designer dialog box problem (thanks Abraham Guyt)
|
||||
|
||||
7/24/2003
|
||||
MySql - Fixed problem with sending commands not always reading the response packet (thanks Joshua Mouch )
|
||||
MySql - Fixed parameter serialization where some blobs types were not being handled (thanks Sean McGinnis )
|
||||
|
||||
7/22/2003
|
||||
MySql - Removed spurious MessageBox.show from DataReader code (thanks Joshua Mouch )
|
||||
|
||||
7/17/2003
|
||||
MySql - Fixed a nasty bug in the split sql code (thanks everyone! :-) )
|
||||
|
||||
*************Released 0.71***********************
|
||||
7/15/2003
|
||||
MySql - Fixed bug in MySqlStream where too much data could attempt to be read (thanks Peter Belbin)
|
||||
|
||||
7/11/2003
|
||||
MySql - Implemented HasRows (thanks Nash Pherson)
|
||||
MySql - Fixed bug where tables with more than 252 columns cause an exception ( thanks Joshua Kessler )
|
||||
MySql - Fixed bug where SQL statements ending in ; would cause a problem ( thanks Shane Krueger )
|
||||
MySql - Fixed bug in driver where error messsages were getting truncated by 1 character (thanks Shane Krueger)
|
||||
|
||||
7/6/2003
|
||||
========MySql===============
|
||||
* Made MySqlException serializable (thanks Mathias Hasselmann)
|
||||
|
||||
========PgSql===============
|
||||
* Made PgSqlException serializable (thanks Mathias Hasselmann)
|
||||
|
||||
***********Released 0.70*********************
|
||||
|
||||
6/25/2003
|
||||
========MySql===============
|
||||
* Updated some of the character code pages to be more accurate
|
||||
* Fixed problem where readers could be opened on connections that had readers open
|
||||
* Release of 0.70
|
||||
|
||||
6/20/2003
|
||||
========MySql===============
|
||||
* Moved test to separate assembly MySqlClientTests
|
||||
|
||||
6/19/2003
|
||||
========MySql===============
|
||||
* Fixed stupid problem in driver with sequence out of order (Thanks Peter Belbin)
|
||||
|
||||
6/18/2003
|
||||
========MySql===============
|
||||
* Added some pipe tests
|
||||
* Increased default max pool size to 50
|
||||
* Compiles with Mono 0-24
|
||||
|
||||
6/17/2003
|
||||
========MySql===============
|
||||
* Fixed connection and data reader dispose problems
|
||||
* Added String datatype handling to parameter serialization
|
||||
|
||||
6/13/2003
|
||||
========MySql===============
|
||||
* Fixed sequence problem in driver that occured after thrown exception
|
||||
(thanks Burkhard Perkens-Golomb)
|
||||
|
||||
6/10/2003
|
||||
========MySql===============
|
||||
* Added support for CommandBehavior.SingleRow to DataReader
|
||||
* Fixed command sql processing so quotes are better handled (thanks Theo Spears)
|
||||
|
||||
6/9/2003
|
||||
========MySQL===============
|
||||
* Fixed parsing of double, single, and decimal values to account for non-English separators.
|
||||
You still have to use the right syntax if you using hard coded sql, but if you use parameters
|
||||
the code will convert floating point types to use '.' appropriately internal both into the server
|
||||
and out.
|
||||
[ Thanks anonymous ]
|
||||
* Added MySqlStream class to simplify timeOuts and driver coding.
|
||||
* Fixed DataReader so that it is closed properly when the associated connection is closed.
|
||||
[thanks smishra]
|
||||
* Made client more SqlClient compliant so that DataReaders have to be closed before the connection
|
||||
can be used to run another command
|
||||
* Improved DBNull.Value handling in the fields
|
||||
* Added several unit tests
|
||||
* Fixed MySqlException so that the base class is actually called :-o
|
||||
* Improved driver coding
|
||||
|
||||
=============PgSql=================
|
||||
* Too many changes to document. Still basic structuring of driver. Driver not really usable yet.
|
||||
|
||||
|
||||
|
||||
5/28/2003
|
||||
* Fixed bug where NextResult was returning false on the last resultset
|
||||
* Added more tests for MySQL
|
||||
* Improved casting problems by equating unsigned 32bit values to Int64 and usigned 16bit values to Int32, etc
|
||||
|
||||
5/6/2003
|
||||
* Added new ctor for MySqlParameter for (name, type, size, srccol)
|
||||
* Fixed bug in MySqlDataReader where it didn't check for null fieldlist before returning field count
|
||||
|
||||
4/23/2003
|
||||
* Started adding MySqlClient unit tests (added MySqlClient/Tests folder and some test cases)
|
||||
* Fixed some things in Connection String handling
|
||||
|
||||
4/7/2003
|
||||
* Moved INIT_DB to MySqlPool. I may move it again, this is in preparation of the conference.
|
||||
|
||||
4/6/2003
|
||||
* Fixed bug inside CommandBuilder that prevented inserts from happening properly
|
||||
* Reworked some of the internals so that all three execute methods of Command worked properly
|
||||
* FIxed many small bugs found during benchmarking
|
||||
|
||||
4/5/2003
|
||||
* The first cut of CoonectionPooling is working. "min pool size" and "max pool size" are respected.
|
||||
|
||||
4/3/2003
|
||||
* Work to enable multiple resultsets to be returned
|
||||
* Character sets are handled much more intelligently now. The driver queries MySQL at startup for the default character set.
|
||||
That character set is then used for conversions if that code page can be loaded. If not, then the default code
|
||||
page for the current OS is used.
|
||||
|
||||
3/31/2003
|
||||
* Added code to save the inferred type in the name,value ctor of Parameter
|
||||
* Also, inferred type if value of null parameter is changed using Value property
|
||||
* Converted all files to use proper Camel case. MySQL is now MySql in all files. PgSQL is now PgSql
|
||||
* Added attribute to PgSql code to prevent designer from trying to show
|
||||
|
||||
3/17/2003
|
||||
* Added MySQLDbType property to Parameter object and added proper conversion code to convert from DbType to MySQLDbType)
|
||||
* Removed unused ObjectToString method from MySQLParameter.cs
|
||||
* Fixed Add(..) method in ParameterCollection so that it doesn't use Add(name, value) instead.
|
||||
* Fixed IndexOf and Contains in ParameterCollection to be aware that parameter names are now stored without @
|
||||
* Fixed Command.ConvertSQLToBytes so it only allows characters that can be in MySQL variable names
|
||||
* Fixed DataReader and Field so that blob fields read their data from Field.cs and GetBytes works right
|
||||
* Added simple query builder editor to CommandText property of MySQLCommand
|
||||
* Fixed CommandBuilder and Parameter serialization to account for Parameters not storing @ in their names
|
||||
* Removed MySQLFieldType enum from Field.cs. Now using MySQLDbType enum
|
||||
|
||||
3/15/2003
|
||||
* Added Designer attribute to several classes to prevent designer view when using VS.Net
|
||||
|
||||
3/13/2003
|
||||
* Fixed Initial catalog typo in ConnectionString designer
|
||||
* Removed 3 parameter ctor for MySQLParameter that conflicted with (name, type, value)
|
||||
* changed MySQLParameter so paramName is now stored without leading @ (this fixed null inserts when using designer)
|
||||
* Changed TypeConverter for MySQLParameter to use the ctor with all properties
|
||||
|
||||
0.68
|
||||
========================================================================
|
||||
Note that this build has not been checked out with Mono.
|
||||
|
||||
3/10/2003
|
||||
* Fixed sequence issue in driver
|
||||
|
||||
3/9/2003
|
||||
* Added DbParametersEditor to make parameter editing more like SqlClient
|
||||
* Fixed Command class so that parameters can be edited using the designer
|
||||
|
||||
3/7/2003
|
||||
* Update connection string designer to support Use Compression flag
|
||||
|
||||
2/15/2003
|
||||
* Fixed string encoding so that European characters like ä will work correctly
|
||||
|
||||
2/9/2003
|
||||
* Creating base classes to aid in building new data providers
|
||||
* Added support for UID key in connection string
|
||||
|
||||
2/10/2003
|
||||
* Field, parameter, command now using DBNull.Value instead of null
|
||||
* CommandBuilder using DBNull.Value
|
||||
* CommandBuilder now builds insert command correctly when an auto_insert field is not present
|
||||
* Field now uses typeof keyword to return System.Types (performance)
|
||||
|
||||
0.65
|
||||
====================
|
||||
* MySQLCommandBuilder now implemented
|
||||
* Transaction support now implemented (not all table types support this)
|
||||
* GetSchemaTable fixed to not use xsd (for Mono)
|
||||
* Driver is now Mono-compatible!!
|
||||
* TIME data type now supported
|
||||
* More work to improve Timestamp data type handling
|
||||
* Changed signatures of all classes to match corresponding SqlClient classes
|
||||
|
||||
0.60
|
||||
======================
|
||||
* Protocol compression using SharpZipLib (www.icsharpcode.net)
|
||||
* Named pipes on Windows now working properly
|
||||
* Work done to improve Timestamp data type handling
|
||||
* Implemented IEnumerable on DataReader so DataGrid would work
|
||||
|
||||
0.50
|
||||
======================
|
||||
* Speed increased dramatically by removing bugging network sync code
|
||||
* Driver no longer buffers rows of data (more ADO.Net compliant)
|
||||
* Conversion bugs related to TIMESTAMP and DATETIME fields fixed
|
||||
0.65
|
||||
====================
|
||||
* MySQLCommandBuilder now implemented
|
||||
* Transaction support now implemented (not all table types support this)
|
||||
* GetSchemaTable fixed to not use xsd (for Mono)
|
||||
* Driver is now Mono-compatible!!
|
||||
* TIME data type now supported
|
||||
* More work to improve Timestamp data type handling
|
||||
* Changed signatures of all classes to match corresponding SqlClient classes
|
||||
|
||||
0.60
|
||||
======================
|
||||
* Protocol compression using SharpZipLib (www.icsharpcode.net)
|
||||
* Named pipes on Windows now working properly
|
||||
* Work done to improve Timestamp data type handling
|
||||
* Implemented IEnumerable on DataReader so DataGrid would work
|
||||
|
||||
0.50
|
||||
======================
|
||||
* Speed increased dramatically by removing bugging network sync code
|
||||
* Driver no longer buffers rows of data (more ADO.Net compliant)
|
||||
* Conversion bugs related to TIMESTAMP and DATETIME fields fixed
|
||||
@@ -1,53 +1,54 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for BitStream.
|
||||
/// </summary>
|
||||
public class BitStream : MemoryStream
|
||||
{
|
||||
private byte[] _input;
|
||||
private int _start;
|
||||
private int _end;
|
||||
private int _bitindex;
|
||||
private uint _bitbuffer;
|
||||
private int _bits_in_buffer;
|
||||
|
||||
public BitStream(byte[] input, int index, int len)
|
||||
{
|
||||
_bitindex = 0;
|
||||
_bitbuffer = 0;
|
||||
_bits_in_buffer = 0;
|
||||
_input = input;
|
||||
_start = index;
|
||||
_end = _start + len;
|
||||
}
|
||||
|
||||
public int GetBits(int numbits)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int PeekBits(int numbits)
|
||||
{
|
||||
int val=0;
|
||||
|
||||
int index=_start;
|
||||
while (numbits > 0)
|
||||
{
|
||||
val = (val << 8) | _input[index++];
|
||||
numbits -= 8;
|
||||
}
|
||||
|
||||
while (_bits_in_buffer < numbits)
|
||||
{
|
||||
if (_start == _end)
|
||||
throw new Exception("Out of bits");
|
||||
byte b = _input[_start++];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for BitStream.
|
||||
/// </summary>
|
||||
public class BitStream : MemoryStream
|
||||
{
|
||||
private byte[] _input;
|
||||
private int _start;
|
||||
private int _end;
|
||||
private int _bitindex;
|
||||
private uint _bitbuffer;
|
||||
private int _bits_in_buffer;
|
||||
|
||||
public BitStream(byte[] input, int index, int len)
|
||||
{
|
||||
_bitindex = 0;
|
||||
_bitbuffer = 0;
|
||||
_bits_in_buffer = 0;
|
||||
_input = input;
|
||||
_start = index;
|
||||
_end = _start + len;
|
||||
}
|
||||
|
||||
public int GetBits(int numbits)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int PeekBits(int numbits)
|
||||
{
|
||||
int val=0;
|
||||
int numbytes=0;
|
||||
|
||||
int index=_start;
|
||||
while (numbits > 0)
|
||||
{
|
||||
val = (val << 8) | _input[index++];
|
||||
numbits -= 8;
|
||||
}
|
||||
|
||||
while (_bits_in_buffer < numbits)
|
||||
{
|
||||
if (_start == _end)
|
||||
throw new Exception("Out of bits");
|
||||
byte b = _input[_start++];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,129 +1,107 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Connection.
|
||||
/// </summary>
|
||||
[ToolboxItem(false)]
|
||||
[System.ComponentModel.DesignerCategory("Code")]
|
||||
public class Connection : Component
|
||||
{
|
||||
internal ConnectionString connString;
|
||||
internal ConnectionState state;
|
||||
internal IDataReader reader = null;
|
||||
|
||||
|
||||
public Connection(System.ComponentModel.IContainer container)
|
||||
{
|
||||
/// <summary>
|
||||
/// Required for Windows.Forms Class Composition Designer support
|
||||
/// </summary>
|
||||
container.Add(this);
|
||||
Init();
|
||||
}
|
||||
|
||||
public Connection()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
protected void Init()
|
||||
{
|
||||
state = ConnectionState.Closed;
|
||||
}
|
||||
|
||||
|
||||
[Browsable(true)]
|
||||
public string DataSource
|
||||
{
|
||||
get
|
||||
{
|
||||
String s = connString["data source"];
|
||||
if (s == null || s.Length == 0)
|
||||
return "localhost";
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public string User
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = connString["user id"];
|
||||
if (s == null)
|
||||
s = "";
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public string Password
|
||||
{
|
||||
get
|
||||
{
|
||||
string pwd = connString["password"];
|
||||
if (pwd == null)
|
||||
pwd = "";
|
||||
return pwd;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
public int ConnectionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
// Returns the connection time-out value set in the connection
|
||||
// string. Zero indicates an indefinite time-out period.
|
||||
if (connString == null)
|
||||
return 30;
|
||||
return connString.GetIntOption("connection timeout", 30);
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
public string Database
|
||||
{
|
||||
get
|
||||
{
|
||||
// Returns an initial database as set in the connection string.
|
||||
// An empty string indicates not set - do not return a null reference.
|
||||
return connString["database"];
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public ConnectionState State
|
||||
{
|
||||
get { return state; }
|
||||
}
|
||||
|
||||
internal IDataReader Reader
|
||||
{
|
||||
get { return reader; }
|
||||
set { reader = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Connection.
|
||||
/// </summary>
|
||||
[ToolboxItem(false)]
|
||||
public class Connection : Component
|
||||
{
|
||||
protected StringDictionary m_ConnSettings = new StringDictionary();
|
||||
protected string m_ConnString;
|
||||
internal ConnectionState m_State;
|
||||
|
||||
|
||||
public Connection(System.ComponentModel.IContainer container)
|
||||
{
|
||||
/// <summary>
|
||||
/// Required for Windows.Forms Class Composition Designer support
|
||||
/// </summary>
|
||||
container.Add(this);
|
||||
Init();
|
||||
}
|
||||
|
||||
public Connection()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
protected void Init()
|
||||
{
|
||||
m_State = ConnectionState.Closed;
|
||||
}
|
||||
|
||||
|
||||
[Browsable(true)]
|
||||
public string DataSource
|
||||
{
|
||||
get
|
||||
{
|
||||
String s = m_ConnSettings["data source"];
|
||||
if (s == null)
|
||||
s = m_ConnSettings["server"];
|
||||
if (s == null || s.Length == 0)
|
||||
return "localhost";
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public string User
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = m_ConnSettings["user id"];
|
||||
if (s == null)
|
||||
s = "";
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public string Password
|
||||
{
|
||||
get
|
||||
{
|
||||
string pwd = m_ConnSettings["password"];
|
||||
if (pwd == null)
|
||||
pwd = "";
|
||||
return pwd;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
public int ConnectionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
// Returns the connection time-out value set in the connection
|
||||
// string. Zero indicates an indefinite time-out period.
|
||||
if (m_ConnSettings == null)
|
||||
return 30;
|
||||
return Convert.ToInt32(m_ConnSettings["connection timeout"]);
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
public string Database
|
||||
{
|
||||
get
|
||||
{
|
||||
// Returns an initial database as set in the connection string.
|
||||
// An empty string indicates not set - do not return a null reference.
|
||||
return m_ConnSettings["database"];
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public ConnectionState State
|
||||
{
|
||||
get { return m_State; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,185 +1,101 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Utility.
|
||||
/// </summary>
|
||||
internal class ConnectionString
|
||||
{
|
||||
private StringDictionary elements;
|
||||
private string connString;
|
||||
|
||||
public ConnectionString(string connString)
|
||||
{
|
||||
this.connString = connString;
|
||||
elements = new StringDictionary();
|
||||
Parse( connString );
|
||||
}
|
||||
|
||||
public string Value
|
||||
{
|
||||
get { return connString; }
|
||||
}
|
||||
|
||||
public string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
string val = elements[key];
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
public int GetIntOption( string key, int defaultvalue )
|
||||
{
|
||||
string val = this[ key ];
|
||||
if (null == val) return defaultvalue;
|
||||
return Convert.ToInt32( val );
|
||||
}
|
||||
|
||||
public bool GetBoolOption( string key, bool defaultvalue )
|
||||
{
|
||||
string val = this[ key ];
|
||||
if (null == val) return defaultvalue;
|
||||
val = val.ToLower();
|
||||
if (val == "true" || val == "yes") return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Contains( string key )
|
||||
{
|
||||
return elements.ContainsKey(key);
|
||||
}
|
||||
|
||||
public bool Equals( ConnectionString obj )
|
||||
{
|
||||
foreach (string key in elements.Keys)
|
||||
{
|
||||
if (! obj.Contains(key)) return false;
|
||||
if ( ! this[key].Equals( obj[key] )) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public bool PoolingEquals( ConnectionString obj )
|
||||
{
|
||||
foreach (string key in elements.Keys)
|
||||
{
|
||||
// these connection string elements only affect pooling
|
||||
// so we don't check them when making sure connection strings
|
||||
// are alike
|
||||
if (key.Equals("connection lifetime")) continue;
|
||||
if (key.Equals("connection reset")) continue;
|
||||
if (key.Equals("enlist")) continue;
|
||||
if (key.Equals("max pool size")) continue;
|
||||
if (key.Equals("min pool size")) continue;
|
||||
if (key.Equals("pooling")) continue;
|
||||
|
||||
if (! obj.Contains(key)) return false;
|
||||
if ( ! this[key].Equals( obj[key] )) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public void Parse( String s )
|
||||
{
|
||||
String[] keyvalues = s.Split( ';' );
|
||||
String[] newkeyvalues = new String[keyvalues.Length];
|
||||
int x = 0;
|
||||
|
||||
elements.Clear();
|
||||
|
||||
// first run through the array and check for any keys that
|
||||
// have ; in their value
|
||||
foreach (String keyvalue in keyvalues)
|
||||
{
|
||||
// check for trailing ; at the end of the connection string
|
||||
if (keyvalue.Length == 0) continue;
|
||||
|
||||
// this value has an '=' sign so we are ok
|
||||
if (keyvalue.IndexOf('=') >= 0)
|
||||
{
|
||||
newkeyvalues[x++] = keyvalue;
|
||||
}
|
||||
else
|
||||
{
|
||||
newkeyvalues[x-1] += ";";
|
||||
newkeyvalues[x-1] += keyvalue;
|
||||
}
|
||||
}
|
||||
|
||||
// now we run through our normalized key-values, splitting on equals
|
||||
for (int y=0; y < x; y++)
|
||||
{
|
||||
String[] parts = newkeyvalues[y].Split( '=' );
|
||||
|
||||
// first trim off any space and lowercase the key
|
||||
parts[0] = parts[0].Trim().ToLower();
|
||||
parts[1] = parts[1].Trim();
|
||||
|
||||
// normalize the keys going in. We want to support the same synonyms that
|
||||
// SqlClient supports
|
||||
switch (parts[0])
|
||||
{
|
||||
case "uid": parts[0] = "user id"; break;
|
||||
case "pwd": parts[0] = "password"; break;
|
||||
case "user": parts[0] = "user id"; break;
|
||||
case "initial catalog": parts[0] = "database"; break;
|
||||
case "server": parts[0] = "data source"; break;
|
||||
}
|
||||
|
||||
// we also want to clear off any quotes
|
||||
String newvalue = parts[1].Trim( '\'' );
|
||||
if (newvalue.Length == parts[1].Length)
|
||||
{
|
||||
newvalue = parts[1].Trim('"');
|
||||
}
|
||||
parts[1] = newvalue;
|
||||
|
||||
// make sure we don't get dupliate keys
|
||||
if (elements.ContainsKey(parts[0]))
|
||||
{
|
||||
throw new ArgumentException("Duplicate key in connection string", parts[0]);
|
||||
}
|
||||
|
||||
elements.Add( parts[0], parts[1] );
|
||||
|
||||
// now put the correct parsed string into the connection string !! (AG 4/8/2003)
|
||||
connString="";
|
||||
foreach(string key in elements.Keys)
|
||||
{
|
||||
connString=connString+key+"="+elements[key]+"; ";
|
||||
}
|
||||
connString=connString.Substring(0,connString.Length-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Utility.
|
||||
/// </summary>
|
||||
public class ConnectionString
|
||||
{
|
||||
public ConnectionString()
|
||||
{
|
||||
//
|
||||
// TODO: Add constructor logic here
|
||||
//
|
||||
}
|
||||
|
||||
public static StringDictionary ParseConnectString( String s )
|
||||
{
|
||||
String[] keyvalues = s.Split( ';' );
|
||||
String[] newkeyvalues = new String[keyvalues.Length];
|
||||
int x = 0;
|
||||
|
||||
// first run through the array and check for any keys that
|
||||
// have ; in their value
|
||||
foreach (String keyvalue in keyvalues)
|
||||
{
|
||||
// check for trailing ; at the end of the connection string
|
||||
if (keyvalue.Length == 0) continue;
|
||||
|
||||
// this value has an '=' sign so we are ok
|
||||
if (keyvalue.IndexOf('=') >= 0)
|
||||
{
|
||||
newkeyvalues[x++] = keyvalue;
|
||||
}
|
||||
else
|
||||
{
|
||||
newkeyvalues[x-1] += ";";
|
||||
newkeyvalues[x-1] += keyvalue;
|
||||
}
|
||||
}
|
||||
|
||||
StringDictionary dict = new StringDictionary();
|
||||
|
||||
// now we run through our normalized key-values, splitting on equals
|
||||
for (int y=0; y < x; y++)
|
||||
{
|
||||
String[] parts = newkeyvalues[y].Split( '=' );
|
||||
parts[0] = parts[0].ToLower();
|
||||
|
||||
// normalize the keys going in
|
||||
if (parts[0].Equals("pwd")) parts[0] = "password";
|
||||
if (parts[0].Equals("uid")) parts[0] = "user id";
|
||||
if (parts[0].Equals("initial catalog")) parts[0] = "database";
|
||||
|
||||
// we also want to clear off any quotes
|
||||
// first trim off any space
|
||||
parts[1] = parts[1].Trim();
|
||||
String newvalue = parts[1].Trim( '\'' );
|
||||
if (newvalue.Length == parts[1].Length)
|
||||
{
|
||||
newvalue = parts[1].Trim('"');
|
||||
}
|
||||
parts[1] = newvalue;
|
||||
|
||||
// make sure we don't get dupliate keys
|
||||
if (dict.ContainsKey(parts[0]))
|
||||
{
|
||||
throw new ArgumentException("Duplicate key in connection string", parts[0]);
|
||||
}
|
||||
|
||||
dict.Add( parts[0], parts[1] );
|
||||
}
|
||||
|
||||
// now make sure we have some reasonable defaults for keys not present
|
||||
if (! dict.ContainsKey("connection timeout"))
|
||||
{
|
||||
dict.Add("connection timeout", "15");
|
||||
}
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Utility.
|
||||
/// </summary>
|
||||
internal class DBConnectionString
|
||||
{
|
||||
protected Hashtable keyValues = new Hashtable();
|
||||
protected string connectString;
|
||||
protected string host;
|
||||
protected string username;
|
||||
protected string password;
|
||||
protected string database;
|
||||
protected int connectTimeout;
|
||||
protected int port;
|
||||
protected int maxPoolSize;
|
||||
protected int minPoolSize;
|
||||
protected int connectLifetime;
|
||||
protected bool pooling;
|
||||
protected bool persistSecurityInfo;
|
||||
|
||||
public DBConnectionString()
|
||||
{
|
||||
persistSecurityInfo = false;
|
||||
}
|
||||
|
||||
public DBConnectionString(string connectString) : this()
|
||||
{
|
||||
this.connectString = connectString;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public string Host
|
||||
{
|
||||
get { return host; }
|
||||
}
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return username; }
|
||||
}
|
||||
|
||||
public string Password
|
||||
{
|
||||
get { return password; }
|
||||
}
|
||||
|
||||
public int ConnectTimeout
|
||||
{
|
||||
get { return connectTimeout; }
|
||||
}
|
||||
|
||||
public string Database
|
||||
{
|
||||
get { return database; }
|
||||
}
|
||||
|
||||
public int Port
|
||||
{
|
||||
get { return port; }
|
||||
}
|
||||
|
||||
public int MaxPoolSize
|
||||
{
|
||||
get { return maxPoolSize; }
|
||||
}
|
||||
|
||||
public int MinPoolSize
|
||||
{
|
||||
get { return minPoolSize; }
|
||||
}
|
||||
|
||||
public bool Pooling
|
||||
{
|
||||
get { return pooling; }
|
||||
}
|
||||
|
||||
public int ConnectionLifetime
|
||||
{
|
||||
get { return connectLifetime; }
|
||||
}
|
||||
|
||||
public string ConnectString
|
||||
{
|
||||
get { return GetConnectionString(); }
|
||||
set { connectString = value; Parse(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private string GetConnectionString()
|
||||
{
|
||||
StringBuilder str = new StringBuilder();
|
||||
|
||||
foreach ( string key in keyValues.Keys)
|
||||
{
|
||||
if ((key.ToLower() == "pwd" || key.ToLower() == "password") &&
|
||||
!persistSecurityInfo) continue;
|
||||
str.AppendFormat("{0}={1};", key, keyValues[key]);
|
||||
}
|
||||
|
||||
if (str.Length > 0)
|
||||
str.Remove( str.Length-1, 1 );
|
||||
|
||||
return str.ToString();
|
||||
}
|
||||
|
||||
protected virtual void ConnectionParameterParsed(string key, string value)
|
||||
{
|
||||
switch (key.ToLower())
|
||||
{
|
||||
case "persist security info":
|
||||
if (value.ToLower() == "no" || value.ToLower() == "false")
|
||||
persistSecurityInfo = false;
|
||||
else
|
||||
persistSecurityInfo = true;
|
||||
break;
|
||||
|
||||
case "uid":
|
||||
case "username":
|
||||
case "user id":
|
||||
case "user name":
|
||||
case "userid":
|
||||
username = value;
|
||||
break;
|
||||
|
||||
case "password":
|
||||
case "pwd":
|
||||
password = value;
|
||||
break;
|
||||
|
||||
case "host":
|
||||
case "server":
|
||||
case "data source":
|
||||
case "datasource":
|
||||
case "address":
|
||||
case "addr":
|
||||
case "network address":
|
||||
host = value;
|
||||
break;
|
||||
|
||||
case "initial catalog":
|
||||
case "database":
|
||||
database = value;
|
||||
break;
|
||||
|
||||
case "connection timeout":
|
||||
case "connect timeout":
|
||||
connectTimeout = Int32.Parse( value );
|
||||
break;
|
||||
|
||||
case "port":
|
||||
port = Int32.Parse( value );
|
||||
break;
|
||||
|
||||
case "pooling":
|
||||
if (value.ToLower() == "no" || value.ToLower() == "false")
|
||||
pooling = false;
|
||||
else
|
||||
pooling = true;
|
||||
break;
|
||||
|
||||
case "min pool size":
|
||||
minPoolSize = Int32.Parse(value);
|
||||
break;
|
||||
|
||||
case "max pool size":
|
||||
maxPoolSize = Int32.Parse(value);
|
||||
break;
|
||||
|
||||
case "connection lifetime":
|
||||
connectLifetime = Int32.Parse(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Parse()
|
||||
{
|
||||
String[] keyvalues = connectString.Split( ';' );
|
||||
String[] newkeyvalues = new String[keyvalues.Length];
|
||||
int x = 0;
|
||||
|
||||
// first run through the array and check for any keys that
|
||||
// have ; in their value
|
||||
foreach (String keyvalue in keyvalues)
|
||||
{
|
||||
// check for trailing ; at the end of the connection string
|
||||
if (keyvalue.Length == 0) continue;
|
||||
|
||||
// this value has an '=' sign so we are ok
|
||||
if (keyvalue.IndexOf('=') >= 0)
|
||||
{
|
||||
newkeyvalues[x++] = keyvalue;
|
||||
}
|
||||
else
|
||||
{
|
||||
newkeyvalues[x-1] += ";";
|
||||
newkeyvalues[x-1] += keyvalue;
|
||||
}
|
||||
}
|
||||
|
||||
keyValues.Clear();
|
||||
|
||||
// now we run through our normalized key-values, splitting on equals
|
||||
for (int y=0; y < x; y++)
|
||||
{
|
||||
String[] parts = newkeyvalues[y].Split( '=' );
|
||||
|
||||
// first trim off any space and lowercase the key
|
||||
parts[0] = parts[0].Trim().ToLower();
|
||||
parts[1] = parts[1].Trim();
|
||||
|
||||
// we also want to clear off any quotes
|
||||
parts[0] = parts[0].Trim('\'', '"');
|
||||
parts[1] = parts[1].Trim('\'', '"');
|
||||
|
||||
ConnectionParameterParsed( parts[0], parts[1] );
|
||||
keyValues.Add( parts[0], parts[1] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.Design;
|
||||
using ByteFX.Data.MySqlClient;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DBParametersEditor.
|
||||
/// </summary>
|
||||
internal class DBParametersEditor : CollectionEditor
|
||||
{
|
||||
public DBParametersEditor(Type t) : base(t)
|
||||
{
|
||||
}
|
||||
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
object[] items = base.GetItems(null);
|
||||
|
||||
int i = 1;
|
||||
while (true)
|
||||
{
|
||||
bool found = false;
|
||||
foreach (object obj in items)
|
||||
{
|
||||
MySqlParameter p = (MySqlParameter)obj;
|
||||
if (p.ParameterName.Equals( "parameter" + i ))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (! found) break;
|
||||
i ++;
|
||||
}
|
||||
|
||||
MySqlParameter parm = new MySqlParameter("parameter"+i, MySqlDbType.VarChar);
|
||||
return parm;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,51 +1,47 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Field.
|
||||
/// </summary>
|
||||
internal class Field
|
||||
{
|
||||
/* protected SqlByte byteValue;
|
||||
protected SqlDateTime dateValue;
|
||||
protected SqlString stringValue;
|
||||
protected SqlInt32 int32Value;
|
||||
protected SqlInt64 int64Value;
|
||||
protected SqlDouble doubleValue;
|
||||
protected SqlSingle singleValue;
|
||||
protected SqlMoney moneyValue;
|
||||
protected SqlDecimal decimalValue;
|
||||
protected SqlBinary binaryValue;*/
|
||||
protected object value;
|
||||
|
||||
protected string tableName;
|
||||
protected string colName;
|
||||
protected int colLen;
|
||||
protected DbType dbType;
|
||||
protected bool hasValue;
|
||||
|
||||
public Field()
|
||||
{
|
||||
hasValue = false;
|
||||
}
|
||||
|
||||
public string ColumnName
|
||||
{
|
||||
get { return colName; }
|
||||
}
|
||||
|
||||
public int ColumnLength
|
||||
{
|
||||
get { return colLen; }
|
||||
}
|
||||
|
||||
public string TableName
|
||||
{
|
||||
get { return tableName; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Field.
|
||||
/// </summary>
|
||||
internal class Field
|
||||
{
|
||||
protected SqlDateTime m_DateTime;
|
||||
protected SqlString m_StringValue;
|
||||
protected SqlInt64 m_IntValue;
|
||||
protected SqlDouble m_DoubleValue;
|
||||
protected SqlSingle m_SingleValue;
|
||||
protected SqlMoney m_MoneyValue;
|
||||
protected SqlDecimal m_DecimalValue;
|
||||
protected SqlBinary m_BinaryValue;
|
||||
|
||||
protected string m_TableName;
|
||||
protected string m_ColName;
|
||||
protected int m_ColLen;
|
||||
protected DbType m_DbType;
|
||||
protected bool m_HasValue;
|
||||
|
||||
public Field()
|
||||
{
|
||||
m_HasValue = false;
|
||||
}
|
||||
|
||||
public string ColumnName
|
||||
{
|
||||
get { return m_ColName; }
|
||||
}
|
||||
|
||||
public int ColumnLength
|
||||
{
|
||||
get { return m_ColLen; }
|
||||
}
|
||||
|
||||
public string TableName
|
||||
{
|
||||
get { return m_TableName; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,76 +1,76 @@
|
||||
using System;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for HuffmanTree.
|
||||
/// </summary>
|
||||
public class HuffmanTree
|
||||
{
|
||||
const int MAX_BITS = 15;
|
||||
int[] codes;
|
||||
|
||||
public HuffmanTree(bool lit)
|
||||
{
|
||||
if (lit)
|
||||
BuildLitTree();
|
||||
else
|
||||
BuildLenTree();
|
||||
}
|
||||
|
||||
private void BuildLitTree()
|
||||
{
|
||||
codes = new int[288];
|
||||
|
||||
// fill the code slots with code lengths first
|
||||
for (int x=0; x < 144; x++)
|
||||
codes[x] = 8;
|
||||
for (int x=144; x < 256; x++)
|
||||
codes[x] = 9;
|
||||
for (int x=256; x < 280; x++)
|
||||
codes[x] = 7;
|
||||
for (int x=280; x < 288; x++)
|
||||
codes[x] = 8;
|
||||
|
||||
BuildTreeCommon();
|
||||
}
|
||||
|
||||
|
||||
private void BuildLenTree()
|
||||
{
|
||||
BuildTreeCommon();
|
||||
}
|
||||
|
||||
private void BuildTreeCommon()
|
||||
{
|
||||
int[] codecounts = new int[MAX_BITS];
|
||||
int[] codebase = new int[MAX_BITS];
|
||||
|
||||
for (int i = 0; i < codes.Length; i++)
|
||||
{
|
||||
int bit_len = codes[i];
|
||||
if (bit_len > 0)
|
||||
codecounts[bit_len]++;
|
||||
}
|
||||
|
||||
// now we compute the intial value for each code length
|
||||
int code = 0;
|
||||
codecounts[0] = 0;
|
||||
for (int bits = 1; bits <= MAX_BITS; bits++)
|
||||
{
|
||||
code = (code + codecounts[bits-1]) << 1;
|
||||
codebase[bits] = code;
|
||||
}
|
||||
|
||||
// next we assign numerical values to each code
|
||||
for (int x=0; x <= codes.Length; x++)
|
||||
{
|
||||
if (codes[x] == 0) continue;
|
||||
int blen = codes[x];
|
||||
codes[x] = codebase[ blen ];
|
||||
codebase[ blen ] ++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for HuffmanTree.
|
||||
/// </summary>
|
||||
public class HuffmanTree
|
||||
{
|
||||
const int MAX_BITS = 15;
|
||||
int[] codes;
|
||||
|
||||
public HuffmanTree(bool lit)
|
||||
{
|
||||
if (lit)
|
||||
BuildLitTree();
|
||||
else
|
||||
BuildLenTree();
|
||||
}
|
||||
|
||||
private void BuildLitTree()
|
||||
{
|
||||
codes = new int[288];
|
||||
|
||||
// fill the code slots with code lengths first
|
||||
for (int x=0; x < 144; x++)
|
||||
codes[x] = 8;
|
||||
for (int x=144; x < 256; x++)
|
||||
codes[x] = 9;
|
||||
for (int x=256; x < 280; x++)
|
||||
codes[x] = 7;
|
||||
for (int x=280; x < 288; x++)
|
||||
codes[x] = 8;
|
||||
|
||||
BuildTreeCommon();
|
||||
}
|
||||
|
||||
|
||||
private void BuildLenTree()
|
||||
{
|
||||
BuildTreeCommon();
|
||||
}
|
||||
|
||||
private void BuildTreeCommon()
|
||||
{
|
||||
int[] codecounts = new int[MAX_BITS];
|
||||
int[] codebase = new int[MAX_BITS];
|
||||
|
||||
for (int i = 0; i < codes.Length; i++)
|
||||
{
|
||||
int bit_len = codes[i];
|
||||
if (bit_len > 0)
|
||||
codecounts[bit_len]++;
|
||||
}
|
||||
|
||||
// now we compute the intial value for each code length
|
||||
int code = 0;
|
||||
codecounts[0] = 0;
|
||||
for (int bits = 1; bits <= MAX_BITS; bits++)
|
||||
{
|
||||
code = (code + codecounts[bits-1]) << 1;
|
||||
codebase[bits] = code;
|
||||
}
|
||||
|
||||
// next we assign numerical values to each code
|
||||
for (int x=0; x <= codes.Length; x++)
|
||||
{
|
||||
if (codes[x] == 0) continue;
|
||||
int blen = codes[x];
|
||||
codes[x] = codebase[ blen ];
|
||||
codebase[ blen ] ++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Inflater.
|
||||
/// </summary>
|
||||
public class Inflater
|
||||
{
|
||||
private BitStream _input;
|
||||
|
||||
public Inflater()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetInput(byte[] input, int offset, int len)
|
||||
{
|
||||
_input = new BitStream(input, offset, len);
|
||||
}
|
||||
|
||||
public void Inflate(byte[] output, int offset, int size)
|
||||
{
|
||||
byte cmf = (byte)_input.GetBits(8);
|
||||
byte flag = (byte)_input.GetBits(8);
|
||||
|
||||
if ((cmf & 0x0f) != 8)
|
||||
throw new Exception("Only deflate format data is supported");
|
||||
|
||||
if (((cmf*256+flag) % 31) != 0)
|
||||
throw new Exception("Data is not in proper deflate format");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Inflater.
|
||||
/// </summary>
|
||||
public class Inflater
|
||||
{
|
||||
private BitStream _input;
|
||||
|
||||
public Inflater()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetInput(byte[] input, int offset, int len)
|
||||
{
|
||||
_input = new BitStream(input, offset, len);
|
||||
}
|
||||
|
||||
public void Inflate(byte[] output, int offset, int size)
|
||||
{
|
||||
byte cmf = (byte)_input.GetBits(8);
|
||||
byte flag = (byte)_input.GetBits(8);
|
||||
|
||||
if ((cmf & 0x0f) != 8)
|
||||
throw new Exception("Only deflate format data is supported");
|
||||
|
||||
if (((cmf*256+flag) % 31) != 0)
|
||||
throw new Exception("Data is not in proper deflate format");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
internal enum MultiHostStreamErrorType
|
||||
{
|
||||
Connecting,
|
||||
Reading,
|
||||
Writing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for MultiHostStream.
|
||||
/// </summary>
|
||||
internal abstract class MultiHostStream : Stream
|
||||
{
|
||||
protected Stream stream;
|
||||
protected int readTimeOut;
|
||||
protected Exception baseException;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new MultiHostStream object with the given parameters
|
||||
/// </summary>
|
||||
/// <param name="hostList"></param>
|
||||
/// <param name="port"></param>
|
||||
/// <param name="readTimeOut"></param>
|
||||
/// <param name="connectTimeOut"></param>
|
||||
public MultiHostStream(string hostList, int port, int readTimeOut, int connectTimeOut)
|
||||
{
|
||||
this.readTimeOut = readTimeOut;
|
||||
ProcessHosts( hostList, port, connectTimeOut );
|
||||
}
|
||||
|
||||
protected abstract void TimeOut(MultiHostStreamErrorType error);
|
||||
protected abstract void Error(string msg);
|
||||
protected abstract bool CreateStream( IPAddress ip, string host, int port );
|
||||
protected abstract bool DataAvailable
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
private void ProcessHosts( string hostList, int port, int connectTimeOut )
|
||||
{
|
||||
int startTime = Environment.TickCount;
|
||||
|
||||
int toTicks = connectTimeOut * 1000;
|
||||
//
|
||||
// Host name can contain multiple hosts, seperated by &.
|
||||
string [] dnsHosts = hostList.Split('&');
|
||||
Hashtable ips = new Hashtable();
|
||||
|
||||
//
|
||||
// Each host name specified may contain multiple IP addresses
|
||||
// Lets look at the DNS entries for each host name
|
||||
foreach(string h in dnsHosts)
|
||||
{
|
||||
IPHostEntry hostAddress = Dns.GetHostByName(h);
|
||||
foreach (IPAddress addr in hostAddress.AddressList)
|
||||
ips.Add( addr, hostAddress.HostName );
|
||||
}
|
||||
IPAddress[] keys = new IPAddress[ ips.Count ];
|
||||
ips.Keys.CopyTo( keys, 0 );
|
||||
|
||||
if ((Environment.TickCount - startTime) > toTicks)
|
||||
{
|
||||
TimeOut(MultiHostStreamErrorType.Connecting);
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure they gave us at least one host
|
||||
if (ips.Count == 0)
|
||||
{
|
||||
Error("You must specify at least one host");
|
||||
return;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
// now choose a random server if there are more than one
|
||||
if (ips.Count > 1)
|
||||
{
|
||||
System.Random random = new Random((int)DateTime.Now.Ticks);
|
||||
index = random.Next(ips.Count-1);
|
||||
}
|
||||
|
||||
//
|
||||
// Lets step through our hosts until we get a connection
|
||||
for (int i=0; i < ips.Count; i++)
|
||||
{
|
||||
if ((Environment.TickCount - startTime) > toTicks)
|
||||
{
|
||||
TimeOut(MultiHostStreamErrorType.Connecting);
|
||||
return;
|
||||
}
|
||||
if (CreateStream( (IPAddress)keys[i], (string)ips[keys[i]], port ))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public override int ReadByte()
|
||||
{
|
||||
int start = Environment.TickCount;
|
||||
int ticks = readTimeOut * 1000;
|
||||
|
||||
while ((Environment.TickCount - start) < ticks)
|
||||
{
|
||||
if (DataAvailable)
|
||||
{
|
||||
int b = stream.ReadByte();
|
||||
return b;
|
||||
}
|
||||
else
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
|
||||
TimeOut(MultiHostStreamErrorType.Reading);
|
||||
return -1;
|
||||
}
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
int numToRead = count;
|
||||
int start = Environment.TickCount;
|
||||
int ticks = readTimeOut * 1000;
|
||||
|
||||
while (numToRead > 0 && (Environment.TickCount - start) < ticks)
|
||||
{
|
||||
if (DataAvailable)
|
||||
{
|
||||
int bytes_read = stream.Read( buffer, offset, numToRead);
|
||||
if (bytes_read == 0)
|
||||
return (count - numToRead);
|
||||
offset += bytes_read;
|
||||
numToRead -= bytes_read;
|
||||
}
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
|
||||
if (numToRead > 0)
|
||||
TimeOut(MultiHostStreamErrorType.Reading);
|
||||
return count;
|
||||
}
|
||||
|
||||
public override bool CanRead
|
||||
{
|
||||
get { return stream.CanRead; }
|
||||
}
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get { return stream.CanWrite; }
|
||||
}
|
||||
|
||||
public override bool CanSeek
|
||||
{
|
||||
get { return stream.CanSeek; }
|
||||
}
|
||||
|
||||
public override long Length
|
||||
{
|
||||
get { return stream.Length; }
|
||||
}
|
||||
|
||||
public override long Position
|
||||
{
|
||||
get { return stream.Position; }
|
||||
set { stream.Position = value; }
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
stream.Flush();
|
||||
}
|
||||
|
||||
public override void SetLength(long length)
|
||||
{
|
||||
stream.SetLength( length );
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
stream.Write( buffer, offset, count );
|
||||
}
|
||||
|
||||
public override long Seek( long offset, SeekOrigin origin )
|
||||
{
|
||||
return stream.Seek( offset, origin );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,208 +1,208 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for API.
|
||||
/// </summary>
|
||||
internal class NamedPipeStream : Stream
|
||||
{
|
||||
[DllImport("kernel32.dll", EntryPoint="CreateFile", SetLastError=true)]
|
||||
private static extern IntPtr CreateFile(String lpFileName,
|
||||
UInt32 dwDesiredAccess, UInt32 dwShareMode,
|
||||
IntPtr lpSecurityAttributes, UInt32 dwCreationDisposition,
|
||||
UInt32 dwFlagsAndAttributes,
|
||||
IntPtr hTemplateFile);
|
||||
[DllImport("kernel32.dll", EntryPoint="PeekNamedPipe", SetLastError=true)]
|
||||
private static extern bool PeekNamedPipe( IntPtr handle,
|
||||
byte[] buffer, uint nBufferSize, ref uint bytesRead,
|
||||
ref uint bytesAvail, ref uint BytesLeftThisMessage);
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool ReadFile( IntPtr handle,
|
||||
byte[] buffer, uint toRead, ref uint read, IntPtr lpOverLapped);
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool WriteFile( IntPtr handle,
|
||||
byte[] buffer, uint count, ref uint written, IntPtr lpOverlapped );
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool CloseHandle( IntPtr handle );
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool FlushFileBuffers( IntPtr handle );
|
||||
|
||||
//Constants for dwDesiredAccess:
|
||||
private const UInt32 GENERIC_READ = 0x80000000;
|
||||
private const UInt32 GENERIC_WRITE = 0x40000000;
|
||||
|
||||
//Constants for return value:
|
||||
private const Int32 INVALID_HANDLE_VALUE = -1;
|
||||
|
||||
//Constants for dwFlagsAndAttributes:
|
||||
private const UInt32 FILE_FLAG_OVERLAPPED = 0x40000000;
|
||||
private const UInt32 FILE_FLAG_NO_BUFFERING = 0x20000000;
|
||||
|
||||
//Constants for dwCreationDisposition:
|
||||
private const UInt32 OPEN_EXISTING = 3;
|
||||
|
||||
IntPtr _handle;
|
||||
FileAccess _mode;
|
||||
|
||||
public NamedPipeStream(string host, FileAccess mode)
|
||||
{
|
||||
_handle = IntPtr.Zero;
|
||||
Open(host, mode);
|
||||
}
|
||||
|
||||
public void Open( string host, FileAccess mode )
|
||||
{
|
||||
_mode = mode;
|
||||
uint pipemode = 0;
|
||||
|
||||
if ((mode & FileAccess.Read) > 0)
|
||||
pipemode |= GENERIC_READ;
|
||||
if ((mode & FileAccess.Write) > 0)
|
||||
pipemode |= GENERIC_WRITE;
|
||||
_handle = CreateFile( host, pipemode,
|
||||
0, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero );
|
||||
}
|
||||
|
||||
public bool DataAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
uint bytesRead=0, avail=0, thismsg=0;
|
||||
|
||||
bool result = PeekNamedPipe( _handle,
|
||||
null, 0, ref bytesRead, ref avail, ref thismsg );
|
||||
return (result == true && avail > 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanRead
|
||||
{
|
||||
get { return (_mode & FileAccess.Read) > 0; }
|
||||
}
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get { return (_mode & FileAccess.Write) > 0; }
|
||||
}
|
||||
|
||||
public override bool CanSeek
|
||||
{
|
||||
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
|
||||
}
|
||||
|
||||
public override long Length
|
||||
{
|
||||
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
|
||||
}
|
||||
|
||||
public override long Position
|
||||
{
|
||||
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
|
||||
set { }
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
if (_handle == IntPtr.Zero)
|
||||
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
|
||||
FlushFileBuffers(_handle);
|
||||
}
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (buffer == null)
|
||||
throw new ArgumentNullException("buffer", "The buffer to read into cannot be null");
|
||||
if (buffer.Length < (offset + count))
|
||||
throw new ArgumentException("Buffer is not large enough to hold requested data", "buffer");
|
||||
if (offset < 0)
|
||||
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
|
||||
if (! CanRead)
|
||||
throw new NotSupportedException("The stream does not support reading");
|
||||
if (_handle == IntPtr.Zero)
|
||||
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
|
||||
|
||||
// first read the data into an internal buffer since ReadFile cannot read into a buf at
|
||||
// a specified offset
|
||||
uint read=0;
|
||||
byte[] buf = new Byte[count];
|
||||
ReadFile( _handle, buf, (uint)count, ref read, IntPtr.Zero );
|
||||
|
||||
for (int x=0; x < read; x++)
|
||||
{
|
||||
buffer[offset+x] = buf[x];
|
||||
}
|
||||
return (int)read;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
CloseHandle(_handle);
|
||||
_handle = IntPtr.Zero;
|
||||
}
|
||||
|
||||
public override void SetLength(long length)
|
||||
{
|
||||
throw new NotSupportedException("NamedPipeStream doesn't support SetLength");
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (buffer == null)
|
||||
throw new ArgumentNullException("buffer", "The buffer to write into cannot be null");
|
||||
if (buffer.Length < (offset + count))
|
||||
throw new ArgumentException("Buffer does not contain amount of requested data", "buffer");
|
||||
if (offset < 0)
|
||||
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
|
||||
if (! CanWrite)
|
||||
throw new NotSupportedException("The stream does not support writing");
|
||||
if (_handle == IntPtr.Zero)
|
||||
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
|
||||
|
||||
// copy data to internal buffer to allow writing from a specified offset
|
||||
byte[] buf = new Byte[count];
|
||||
for (int x=0; x < count; x++)
|
||||
{
|
||||
buf[x] = buffer[offset+x];
|
||||
}
|
||||
uint written=0;
|
||||
bool result = WriteFile( _handle, buf, (uint)count, ref written, IntPtr.Zero );
|
||||
|
||||
if (! result)
|
||||
throw new IOException("Writing to the stream failed");
|
||||
if (written < count)
|
||||
throw new IOException("Unable to write entire buffer to stream");
|
||||
}
|
||||
|
||||
public override long Seek( long offset, SeekOrigin origin )
|
||||
{
|
||||
throw new NotSupportedException("NamedPipeStream doesn't support seeking");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for API.
|
||||
/// </summary>
|
||||
public class NamedPipeStream : Stream
|
||||
{
|
||||
[DllImport("kernel32.dll", EntryPoint="CreateFile", SetLastError=true)]
|
||||
private static extern IntPtr CreateFile(String lpFileName,
|
||||
UInt32 dwDesiredAccess, UInt32 dwShareMode,
|
||||
IntPtr lpSecurityAttributes, UInt32 dwCreationDisposition,
|
||||
UInt32 dwFlagsAndAttributes,
|
||||
IntPtr hTemplateFile);
|
||||
[DllImport("kernel32.dll", EntryPoint="PeekNamedPipe", SetLastError=true)]
|
||||
private static extern bool PeekNamedPipe( IntPtr handle,
|
||||
byte[] buffer, uint nBufferSize, ref uint bytesRead,
|
||||
ref uint bytesAvail, ref uint BytesLeftThisMessage);
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool ReadFile( IntPtr handle,
|
||||
byte[] buffer, uint toRead, ref uint read, IntPtr lpOverLapped);
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool WriteFile( IntPtr handle,
|
||||
byte[] buffer, uint count, ref uint written, IntPtr lpOverlapped );
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool CloseHandle( IntPtr handle );
|
||||
[DllImport("kernel32.dll", SetLastError=true)]
|
||||
private static extern bool FlushFileBuffers( IntPtr handle );
|
||||
|
||||
//Constants for dwDesiredAccess:
|
||||
private const UInt32 GENERIC_READ = 0x80000000;
|
||||
private const UInt32 GENERIC_WRITE = 0x40000000;
|
||||
|
||||
//Constants for return value:
|
||||
private const Int32 INVALID_HANDLE_VALUE = -1;
|
||||
|
||||
//Constants for dwFlagsAndAttributes:
|
||||
private const UInt32 FILE_FLAG_OVERLAPPED = 0x40000000;
|
||||
private const UInt32 FILE_FLAG_NO_BUFFERING = 0x20000000;
|
||||
|
||||
//Constants for dwCreationDisposition:
|
||||
private const UInt32 OPEN_EXISTING = 3;
|
||||
|
||||
IntPtr _handle;
|
||||
FileAccess _mode;
|
||||
|
||||
public NamedPipeStream(string host, FileAccess mode)
|
||||
{
|
||||
_handle = IntPtr.Zero;
|
||||
Open(host, mode);
|
||||
}
|
||||
|
||||
public void Open( string host, FileAccess mode )
|
||||
{
|
||||
_mode = mode;
|
||||
uint pipemode = 0;
|
||||
|
||||
if ((mode & FileAccess.Read) > 0)
|
||||
pipemode |= GENERIC_READ;
|
||||
if ((mode & FileAccess.Write) > 0)
|
||||
pipemode |= GENERIC_WRITE;
|
||||
_handle = CreateFile( host, pipemode,
|
||||
0, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero );
|
||||
}
|
||||
|
||||
public bool DataAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
uint bytesRead=0, avail=0, thismsg=0;
|
||||
|
||||
bool result = PeekNamedPipe( _handle,
|
||||
null, 0, ref bytesRead, ref avail, ref thismsg );
|
||||
return (result == true && avail > 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanRead
|
||||
{
|
||||
get { return (_mode & FileAccess.Read) > 0; }
|
||||
}
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get { return (_mode & FileAccess.Write) > 0; }
|
||||
}
|
||||
|
||||
public override bool CanSeek
|
||||
{
|
||||
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
|
||||
}
|
||||
|
||||
public override long Length
|
||||
{
|
||||
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
|
||||
}
|
||||
|
||||
public override long Position
|
||||
{
|
||||
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
|
||||
set { }
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
if (_handle == IntPtr.Zero)
|
||||
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
|
||||
FlushFileBuffers(_handle);
|
||||
}
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (buffer == null)
|
||||
throw new ArgumentNullException("buffer", "The buffer to read into cannot be null");
|
||||
if (buffer.Length < (offset + count))
|
||||
throw new ArgumentException("Buffer is not large enough to hold requested data", "buffer");
|
||||
if (offset < 0)
|
||||
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
|
||||
if (! CanRead)
|
||||
throw new NotSupportedException("The stream does not support reading");
|
||||
if (_handle == IntPtr.Zero)
|
||||
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
|
||||
|
||||
// first read the data into an internal buffer since ReadFile cannot read into a buf at
|
||||
// a specified offset
|
||||
uint read=0;
|
||||
byte[] buf = new Byte[count];
|
||||
ReadFile( _handle, buf, (uint)count, ref read, IntPtr.Zero );
|
||||
|
||||
for (int x=0; x < read; x++)
|
||||
{
|
||||
buffer[offset+x] = buf[x];
|
||||
}
|
||||
return (int)read;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
CloseHandle(_handle);
|
||||
_handle = IntPtr.Zero;
|
||||
}
|
||||
|
||||
public override void SetLength(long length)
|
||||
{
|
||||
throw new NotSupportedException("NamedPipeStream doesn't support SetLength");
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (buffer == null)
|
||||
throw new ArgumentNullException("buffer", "The buffer to write into cannot be null");
|
||||
if (buffer.Length < (offset + count))
|
||||
throw new ArgumentException("Buffer does not contain amount of requested data", "buffer");
|
||||
if (offset < 0)
|
||||
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
|
||||
if (! CanWrite)
|
||||
throw new NotSupportedException("The stream does not support writing");
|
||||
if (_handle == IntPtr.Zero)
|
||||
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
|
||||
|
||||
// copy data to internal buffer to allow writing from a specified offset
|
||||
byte[] buf = new Byte[count];
|
||||
for (int x=0; x < count; x++)
|
||||
{
|
||||
buf[x] = buffer[offset+x];
|
||||
}
|
||||
uint written=0;
|
||||
bool result = WriteFile( _handle, buf, (uint)count, ref written, IntPtr.Zero );
|
||||
|
||||
if (! result)
|
||||
throw new IOException("Writing to the stream failed");
|
||||
if (written < count)
|
||||
throw new IOException("Unable to write entire buffer to stream");
|
||||
}
|
||||
|
||||
public override long Seek( long offset, SeekOrigin origin )
|
||||
{
|
||||
throw new NotSupportedException("NamedPipeStream doesn't support seeking");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Security.
|
||||
/// </summary>
|
||||
internal class Security
|
||||
{
|
||||
public Security()
|
||||
{
|
||||
}
|
||||
|
||||
public static void ArrayCrypt( byte[] src, int srcoff, byte[] dst, int dstoff, byte[] key, int length )
|
||||
{
|
||||
int idx = 0;
|
||||
|
||||
while ( (idx+srcoff) < src.Length && idx < length )
|
||||
{
|
||||
dst[idx+dstoff] = (byte)(src[idx+srcoff] ^ key[idx]);
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,244 +0,0 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using ByteFX.Data.MySqlClient;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for SqlCommandEditorDlg.
|
||||
/// </summary>
|
||||
internal class SqlCommandEditorDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.TextBox sqlText;
|
||||
private System.Windows.Forms.Button CancelBtn;
|
||||
private System.Windows.Forms.Button OKBtn;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Splitter splitter1;
|
||||
private System.Windows.Forms.DataGrid dataGrid;
|
||||
private System.Windows.Forms.ContextMenu sqlMenu;
|
||||
private System.Windows.Forms.MenuItem runMenuItem;
|
||||
private IDbCommand command;
|
||||
private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public SqlCommandEditorDlg(object o)
|
||||
{
|
||||
command = (IDbCommand)o;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
public string SQL
|
||||
{
|
||||
get { return sqlText.Text; }
|
||||
set { sqlText.Text = value; }
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.sqlText = new System.Windows.Forms.TextBox();
|
||||
this.sqlMenu = new System.Windows.Forms.ContextMenu();
|
||||
this.runMenuItem = new System.Windows.Forms.MenuItem();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.OKBtn = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||
this.dataGrid = new System.Windows.Forms.DataGrid();
|
||||
this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// sqlText
|
||||
//
|
||||
this.sqlText.ContextMenu = this.sqlMenu;
|
||||
this.sqlText.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.sqlText.Location = new System.Drawing.Point(10, 10);
|
||||
this.sqlText.Multiline = true;
|
||||
this.sqlText.Name = "sqlText";
|
||||
this.sqlText.Size = new System.Drawing.Size(462, 144);
|
||||
this.sqlText.TabIndex = 0;
|
||||
this.sqlText.Text = "";
|
||||
//
|
||||
// sqlMenu
|
||||
//
|
||||
this.sqlMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
|
||||
this.runMenuItem});
|
||||
//
|
||||
// runMenuItem
|
||||
//
|
||||
this.runMenuItem.Index = 0;
|
||||
this.runMenuItem.Text = "Run";
|
||||
this.runMenuItem.Click += new System.EventHandler(this.runMenuItem_Click);
|
||||
//
|
||||
// CancelBtn
|
||||
//
|
||||
this.CancelBtn.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
|
||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelBtn.Location = new System.Drawing.Point(400, 350);
|
||||
this.CancelBtn.Name = "CancelBtn";
|
||||
this.CancelBtn.TabIndex = 3;
|
||||
this.CancelBtn.Text = "Cancel";
|
||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||
//
|
||||
// OKBtn
|
||||
//
|
||||
this.OKBtn.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
|
||||
this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.OKBtn.Location = new System.Drawing.Point(316, 350);
|
||||
this.OKBtn.Name = "OKBtn";
|
||||
this.OKBtn.TabIndex = 4;
|
||||
this.OKBtn.Text = "OK";
|
||||
this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right);
|
||||
this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
|
||||
this.splitter1,
|
||||
this.dataGrid,
|
||||
this.sqlText});
|
||||
this.panel1.DockPadding.Bottom = 10;
|
||||
this.panel1.DockPadding.Left = 10;
|
||||
this.panel1.DockPadding.Right = 14;
|
||||
this.panel1.DockPadding.Top = 10;
|
||||
this.panel1.Location = new System.Drawing.Point(2, 2);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(486, 344);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// splitter1
|
||||
//
|
||||
this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.splitter1.Location = new System.Drawing.Point(10, 154);
|
||||
this.splitter1.Name = "splitter1";
|
||||
this.splitter1.Size = new System.Drawing.Size(462, 3);
|
||||
this.splitter1.TabIndex = 3;
|
||||
this.splitter1.TabStop = false;
|
||||
//
|
||||
// dataGrid
|
||||
//
|
||||
this.dataGrid.CaptionVisible = false;
|
||||
this.dataGrid.DataMember = "";
|
||||
this.dataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.dataGrid.Location = new System.Drawing.Point(10, 154);
|
||||
this.dataGrid.Name = "dataGrid";
|
||||
this.dataGrid.Size = new System.Drawing.Size(462, 180);
|
||||
this.dataGrid.TabIndex = 2;
|
||||
this.dataGrid.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
|
||||
this.dataGridTableStyle1});
|
||||
//
|
||||
// dataGridTableStyle1
|
||||
//
|
||||
this.dataGridTableStyle1.AllowSorting = false;
|
||||
this.dataGridTableStyle1.DataGrid = this.dataGrid;
|
||||
this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.dataGridTableStyle1.MappingName = "";
|
||||
//
|
||||
// SqlCommandEditorDlg
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(486, 384);
|
||||
this.ControlBox = false;
|
||||
this.Controls.AddRange(new System.Windows.Forms.Control[] {
|
||||
this.panel1,
|
||||
this.OKBtn,
|
||||
this.CancelBtn});
|
||||
this.DockPadding.Bottom = 10;
|
||||
this.DockPadding.Left = 10;
|
||||
this.DockPadding.Right = 12;
|
||||
this.DockPadding.Top = 10;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Name = "SqlCommandEditorDlg";
|
||||
this.Text = "Query Builder";
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void CancelBtn_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void OKBtn_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void runMenuItem_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
if (command is MySqlCommand)
|
||||
{
|
||||
RunMySql();
|
||||
}
|
||||
}
|
||||
|
||||
private void RunMySql()
|
||||
{
|
||||
try
|
||||
{
|
||||
MySqlDataAdapter da = new MySqlDataAdapter((MySqlCommand)command);
|
||||
command.CommandText = sqlText.Text;
|
||||
command.Connection.Open();
|
||||
DataTable dt = new DataTable();
|
||||
da.Fill(dt);
|
||||
dataGrid.DataSource = dt;
|
||||
command.Connection.Close();
|
||||
dataGrid.Expand(-1);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="sqlMenu.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>SqlCommandEditorDlg</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,63 +0,0 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#if WINDOWS
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing.Design;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for MySqlConnectionDesign.
|
||||
/// </summary>
|
||||
internal class SqlCommandTextEditor : UITypeEditor
|
||||
{
|
||||
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
|
||||
{
|
||||
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
|
||||
}
|
||||
|
||||
public override bool GetPaintValueSupported(System.ComponentModel.ITypeDescriptorContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value)
|
||||
{
|
||||
System.Data.IDbCommand command = (System.Data.IDbCommand)context.Instance;
|
||||
|
||||
if (command.Connection == null)
|
||||
{
|
||||
MessageBox.Show("Connection property not set to a valid connection.\n"+
|
||||
"Please set and try again", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return value;
|
||||
}
|
||||
|
||||
SqlCommandEditorDlg dlg = new SqlCommandEditorDlg( command );
|
||||
|
||||
dlg.SQL = (string)value;
|
||||
if(dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
return dlg.SQL;
|
||||
}
|
||||
else
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,67 +0,0 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for StringUtility.
|
||||
/// </summary>
|
||||
public class StringUtility
|
||||
{
|
||||
public StringUtility()
|
||||
{
|
||||
}
|
||||
|
||||
public static string[] Split( string src, char delimiter, params char[] quotedelims )
|
||||
{
|
||||
ArrayList strings = new ArrayList();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ArrayList ar = new ArrayList(quotedelims);
|
||||
char quote_open = Char.MinValue;
|
||||
|
||||
foreach (char c in src)
|
||||
{
|
||||
if (c == delimiter && quote_open == Char.MinValue)
|
||||
{
|
||||
strings.Add( sb.ToString() );
|
||||
sb.Remove( 0, sb.Length );
|
||||
}
|
||||
|
||||
else if (ar.Contains(c))
|
||||
{
|
||||
if (quote_open == Char.MinValue)
|
||||
quote_open = c;
|
||||
else if (quote_open == c)
|
||||
quote_open = Char.MinValue;
|
||||
sb.Append(c);
|
||||
}
|
||||
else
|
||||
sb.Append( c );
|
||||
}
|
||||
|
||||
if (sb.Length > 0)
|
||||
strings.Add( sb.ToString());
|
||||
|
||||
return (string[])strings.ToArray(typeof(string));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ByteFX.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Version.
|
||||
/// </summary>
|
||||
internal struct Version
|
||||
{
|
||||
private int major;
|
||||
private int minor;
|
||||
private int build;
|
||||
|
||||
public Version( int major, int minor, int build)
|
||||
{
|
||||
this.major = major;
|
||||
this.minor = minor;
|
||||
this.build = build;
|
||||
}
|
||||
|
||||
public static Version Parse( string versionString )
|
||||
{
|
||||
int start = 0;
|
||||
int index = versionString.IndexOf('.', start);
|
||||
if (index == -1) throw new Exception("Version string not in acceptable format");
|
||||
int major = Convert.ToInt32( versionString.Substring(start, index-start).Trim());
|
||||
|
||||
start = index+1;
|
||||
index = versionString.IndexOf('.', start);
|
||||
if (index == -1) throw new Exception("Version string not in acceptable format");
|
||||
int minor = Convert.ToInt32( versionString.Substring(start, index-start).Trim());
|
||||
|
||||
start = index+1;
|
||||
int i = start;
|
||||
while (i < versionString.Length && Char.IsDigit( versionString, i ))
|
||||
i++;
|
||||
int build = Convert.ToInt32( versionString.Substring(start, i-start).Trim());
|
||||
|
||||
return new Version( major, minor, build );
|
||||
}
|
||||
|
||||
public bool isAtLeast(int major, int minor, int build)
|
||||
{
|
||||
if (major > this.major) return false;
|
||||
if (minor > this.minor) return false;
|
||||
if (build > this.build) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,7 @@ include ../../build/rules.make
|
||||
|
||||
LIBRARY = ByteFX.Data.dll
|
||||
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Xml.dll \
|
||||
/r:System.Data.dll /r:ICSharpCode.SharpZipLib.dll \
|
||||
/r:System.Design.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll \
|
||||
/res:mysqlclient/Designers/command.bmp \
|
||||
/res:mysqlclient/Designers/connection.bmp \
|
||||
/res:mysqlclient/Designers/dataadapter.bmp
|
||||
/r:System.Data.dll /r:ICSharpCode.SharpZipLib.dll
|
||||
NO_TEST = yes
|
||||
EXTRA_DISTFILES = ChangeLog.txt lgpl.txt readme.txt
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
namespace ByteFX.Data.MySqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for CharSetMap.
|
||||
/// </summary>
|
||||
internal class CharSetMap
|
||||
{
|
||||
private static Hashtable mapping;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="MySqlCharSetName"></param>
|
||||
/// <returns></returns>
|
||||
public static Encoding GetEncoding( string MySqlCharSetName )
|
||||
{
|
||||
if (mapping == null )
|
||||
InitializeMapping();
|
||||
try
|
||||
{
|
||||
int cpid = (int)mapping[ MySqlCharSetName ];
|
||||
return Encoding.GetEncoding( cpid );
|
||||
}
|
||||
catch (System.NotSupportedException)
|
||||
{
|
||||
return Encoding.GetEncoding(0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private static void InitializeMapping()
|
||||
{
|
||||
mapping = new Hashtable();
|
||||
|
||||
// relatively sure about
|
||||
mapping.Add( "default", 0 );
|
||||
mapping.Add( "big5", 950 ); // Traditional Chinese
|
||||
mapping.Add( "latin1", 28591 ); // Latin alphabet #1
|
||||
mapping.Add( "utf8", 65001 );
|
||||
mapping.Add( "ucs2", 1200 );
|
||||
mapping.Add( "latin2", 28592 );
|
||||
mapping.Add( "latin4", 28594 );
|
||||
mapping.Add( "latin3", 28593 );
|
||||
mapping.Add( "latin5", 1254 );
|
||||
mapping.Add( "cp1251", 1251 ); // Russian
|
||||
mapping.Add( "win1251", 1251 );
|
||||
mapping.Add( "hebrew", 1255 ); // Hebrew
|
||||
mapping.Add( "greek", 1253 ); // Greek
|
||||
mapping.Add( "sjis", 932 ); // Shift-JIS
|
||||
mapping.Add( "gbk", 936 ); // Simplified Chinese
|
||||
mapping.Add( "cp866", 866 );
|
||||
mapping.Add( "euc_kr", 949 );
|
||||
|
||||
// maybe, maybe not...
|
||||
mapping.Add( "win1250", 1250 ); // Central Eurpoe
|
||||
mapping.Add( "win1251ukr", 1251 );
|
||||
mapping.Add( "latin1_de", 1252 ); // Latin1 German
|
||||
mapping.Add( "german1", 1252 ); // German
|
||||
mapping.Add( "danish", 1252 ); // Danish
|
||||
mapping.Add( "dos", 437 ); // Dos
|
||||
mapping.Add( "pclatin2", 852 );
|
||||
mapping.Add( "win1250ch", 1250 );
|
||||
mapping.Add( "cp1257", 1257 );
|
||||
mapping.Add( "usa7", 646 );
|
||||
mapping.Add( "czech", 912 );
|
||||
mapping.Add( "hungarian", 912 );
|
||||
mapping.Add( "croat", 912 );
|
||||
|
||||
/* ("gb2312", "EUC_CN");
|
||||
("ujis", "EUC_JP");
|
||||
("latvian", "ISO8859_13");
|
||||
("latvian1", "ISO8859_13");
|
||||
("estonia", "ISO8859_13");
|
||||
("koi8_ru", "KOI8_R");
|
||||
("tis620", "TIS620");
|
||||
("macroman", "MacRoman");
|
||||
("macce", "MacCentralEurope");
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,420 +1,374 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
namespace ByteFX.Data.MySqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited.
|
||||
/// </summary>
|
||||
/// <include file='docs/MySqlCommandBuilder.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
|
||||
[ToolboxItem(false)]
|
||||
[System.ComponentModel.DesignerCategory("Code")]
|
||||
public sealed class MySqlCommandBuilder : Component
|
||||
{
|
||||
private MySqlDataAdapter _adapter;
|
||||
private string _QuotePrefix;
|
||||
private string _QuoteSuffix;
|
||||
private DataTable _schema;
|
||||
private string _tableName;
|
||||
|
||||
private MySqlCommand _updateCmd;
|
||||
private MySqlCommand _insertCmd;
|
||||
private MySqlCommand _deleteCmd;
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// Overloaded. Initializes a new instance of the SqlCommandBuilder class.
|
||||
/// </summary>
|
||||
public MySqlCommandBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overloaded. Initializes a new instance of the SqlCommandBuilder class.
|
||||
/// </summary>
|
||||
public MySqlCommandBuilder( MySqlDataAdapter adapter )
|
||||
{
|
||||
_adapter = adapter;
|
||||
_adapter.RowUpdating += new MySqlRowUpdatingEventHandler( OnRowUpdating );
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a MySqlDataAdapter object for which SQL statements are automatically generated.
|
||||
/// </summary>
|
||||
public MySqlDataAdapter DataAdapter
|
||||
{
|
||||
get { return _adapter; }
|
||||
set
|
||||
{
|
||||
if (_adapter != null)
|
||||
{
|
||||
_adapter.RowUpdating -= new MySqlRowUpdatingEventHandler( OnRowUpdating );
|
||||
}
|
||||
_adapter = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the beginning character or characters to use when specifying MySql database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
|
||||
/// </summary>
|
||||
public string QuotePrefix
|
||||
{
|
||||
get { return _QuotePrefix; }
|
||||
set { _QuotePrefix = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ending character or characters to use when specifying MySql database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
|
||||
/// </summary>
|
||||
public string QuoteSuffix
|
||||
{
|
||||
get { return _QuoteSuffix; }
|
||||
set { _QuoteSuffix = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
/// <summary>
|
||||
/// Retrieves parameter information from the stored procedure specified in the MySqlCommand and populates the Parameters collection of the specified MySqlCommand object.
|
||||
/// This method is not currently supported since stored procedures are not available in MySql.
|
||||
/// </summary>
|
||||
/// <param name="command">The MySqlCommand referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the Parameters collection of the MySqlCommand.</param>
|
||||
/// <exception cref="InvalidOperationException">The command text is not a valid stored procedure name.</exception>
|
||||
public static void DeriveParameters(MySqlCommand command)
|
||||
{
|
||||
throw new MySqlException("DeriveParameters is not supported (due to MySql not supporting SP)");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the automatically generated MySqlCommand object required to perform deletions on the database.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySqlCommand GetDeleteCommand()
|
||||
{
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
return CreateDeleteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the automatically generated MySqlCommand object required to perform insertions on the database.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySqlCommand GetInsertCommand()
|
||||
{
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
return CreateInsertCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the automatically generated MySqlCommand object required to perform updates on the database.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySqlCommand GetUpdateCommand()
|
||||
{
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
return CreateUpdateCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refreshes the database schema information used to generate INSERT, UPDATE, or DELETE statements.
|
||||
/// </summary>
|
||||
public void RefreshSchema()
|
||||
{
|
||||
_schema = null;
|
||||
_insertCmd = null;
|
||||
_deleteCmd = null;
|
||||
_updateCmd = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void GenerateSchema()
|
||||
{
|
||||
if (_adapter == null)
|
||||
throw new MySqlException("Improper MySqlCommandBuilder state: adapter is null");
|
||||
if (_adapter.SelectCommand == null)
|
||||
throw new MySqlException("Improper MySqlCommandBuilder state: adapter's SelectCommand is null");
|
||||
|
||||
MySqlDataReader dr = _adapter.SelectCommand.ExecuteReader(CommandBehavior.SchemaOnly | CommandBehavior.KeyInfo);
|
||||
_schema = dr.GetSchemaTable();
|
||||
dr.Close();
|
||||
|
||||
// make sure we got at least one unique or key field and count base table names
|
||||
bool hasKeyOrUnique=false;
|
||||
|
||||
foreach (DataRow row in _schema.Rows)
|
||||
{
|
||||
if (true == (bool)row["IsKey"] || true == (bool)row["IsUnique"])
|
||||
hasKeyOrUnique=true;
|
||||
if (_tableName == null)
|
||||
_tableName = (string)row["BaseTableName"];
|
||||
else if (_tableName != (string)row["BaseTableName"])
|
||||
throw new InvalidOperationException("MySqlCommandBuilder does not support multi-table statements");
|
||||
}
|
||||
if (! hasKeyOrUnique)
|
||||
throw new InvalidOperationException("MySqlCommandBuilder cannot operate on tables with no unique or key columns");
|
||||
}
|
||||
|
||||
private string Quote(string table_or_column)
|
||||
{
|
||||
if (_QuotePrefix == null || _QuoteSuffix == null)
|
||||
return table_or_column;
|
||||
return _QuotePrefix + table_or_column + _QuoteSuffix;
|
||||
}
|
||||
|
||||
private MySqlParameter CreateParameter(DataRow row, bool Original)
|
||||
{
|
||||
MySqlParameter p;
|
||||
if (Original)
|
||||
p = new MySqlParameter( "@Original_" + (string)row["ColumnName"], (MySqlDbType)row["ProviderType"],
|
||||
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Original, DBNull.Value );
|
||||
else
|
||||
p = new MySqlParameter( "@" + (string)row["ColumnName"], (MySqlDbType)row["ProviderType"],
|
||||
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Current, DBNull.Value );
|
||||
return p;
|
||||
}
|
||||
|
||||
private MySqlCommand CreateBaseCommand()
|
||||
{
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.Connection = _adapter.SelectCommand.Connection;
|
||||
cmd.CommandTimeout = _adapter.SelectCommand.CommandTimeout;
|
||||
cmd.Transaction = _adapter.SelectCommand.Transaction;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private MySqlCommand CreateDeleteCommand()
|
||||
{
|
||||
if (_deleteCmd != null) return _deleteCmd;
|
||||
|
||||
MySqlCommand cmd = CreateBaseCommand();
|
||||
|
||||
cmd.CommandText = "DELETE FROM " + Quote(_tableName) +
|
||||
" WHERE " + CreateOriginalWhere(cmd);
|
||||
|
||||
_deleteCmd = cmd;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private string CreateFinalSelect(bool forinsert)
|
||||
{
|
||||
StringBuilder sel = new StringBuilder();
|
||||
StringBuilder where = new StringBuilder();
|
||||
|
||||
foreach (DataRow row in _schema.Rows)
|
||||
{
|
||||
string colname = (string)row["ColumnName"];
|
||||
if (sel.Length > 0)
|
||||
sel.Append(", ");
|
||||
sel.Append( colname );
|
||||
if ((bool)row["IsKey"] == false) continue;
|
||||
if (where.Length > 0)
|
||||
where.Append(" AND ");
|
||||
where.Append( "(" + colname + "=" );
|
||||
if (forinsert)
|
||||
{
|
||||
if ((bool)row["IsAutoIncrement"])
|
||||
where.Append("last_insert_id()");
|
||||
else if ((bool)row["IsKey"])
|
||||
where.Append("@" + colname);
|
||||
}
|
||||
else
|
||||
{
|
||||
where.Append("@Original_" + colname);
|
||||
}
|
||||
where.Append(")");
|
||||
}
|
||||
return "SELECT " + sel.ToString() + " FROM " + Quote(_tableName) +
|
||||
" WHERE " + where.ToString();
|
||||
}
|
||||
|
||||
private string CreateOriginalWhere(MySqlCommand cmd)
|
||||
{
|
||||
StringBuilder wherestr = new StringBuilder();
|
||||
|
||||
foreach (DataRow row in _schema.Rows)
|
||||
{
|
||||
if (! IncludedInWhereClause(row)) continue;
|
||||
|
||||
// first update the where clause since it will contain all parameters
|
||||
if (wherestr.Length > 0)
|
||||
wherestr.Append(" AND ");
|
||||
string colname = Quote((string)row["ColumnName"]);
|
||||
|
||||
MySqlParameter op = CreateParameter(row, true);
|
||||
cmd.Parameters.Add(op);
|
||||
|
||||
wherestr.Append( "(" + colname + "=@" + op.ParameterName);
|
||||
if ((bool)row["AllowDBNull"] == true)
|
||||
wherestr.Append( " or (" + colname + " IS NULL and @" + op.ParameterName + " IS NULL)");
|
||||
wherestr.Append(")");
|
||||
}
|
||||
return wherestr.ToString();
|
||||
}
|
||||
|
||||
private MySqlCommand CreateUpdateCommand()
|
||||
{
|
||||
if (_updateCmd != null) return _updateCmd;
|
||||
|
||||
MySqlCommand cmd = CreateBaseCommand();
|
||||
|
||||
StringBuilder setstr = new StringBuilder();
|
||||
|
||||
foreach (DataRow schemaRow in _schema.Rows)
|
||||
{
|
||||
string colname = Quote((string)schemaRow["ColumnName"]);
|
||||
|
||||
if (! IncludedInUpdate(schemaRow)) continue;
|
||||
|
||||
if (setstr.Length > 0)
|
||||
setstr.Append(", ");
|
||||
|
||||
MySqlParameter p = CreateParameter(schemaRow, false);
|
||||
cmd.Parameters.Add(p);
|
||||
|
||||
setstr.Append( colname + "=@" + p.ParameterName );
|
||||
}
|
||||
|
||||
cmd.CommandText = "UPDATE " + Quote(_tableName) + " SET " + setstr.ToString() +
|
||||
" WHERE " + CreateOriginalWhere(cmd);
|
||||
cmd.CommandText += "; " + CreateFinalSelect(false);
|
||||
|
||||
_updateCmd = cmd;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private MySqlCommand CreateInsertCommand()
|
||||
{
|
||||
if (_insertCmd != null) return _insertCmd;
|
||||
|
||||
MySqlCommand cmd = CreateBaseCommand();
|
||||
|
||||
StringBuilder setstr = new StringBuilder();
|
||||
StringBuilder valstr = new StringBuilder();
|
||||
foreach (DataRow schemaRow in _schema.Rows)
|
||||
{
|
||||
string colname = Quote((string)schemaRow["ColumnName"]);
|
||||
|
||||
if (!IncludedInInsert(schemaRow)) continue;
|
||||
|
||||
if (setstr.Length > 0)
|
||||
{
|
||||
setstr.Append(", ");
|
||||
valstr.Append(", ");
|
||||
}
|
||||
|
||||
MySqlParameter p = CreateParameter(schemaRow, false);
|
||||
cmd.Parameters.Add(p);
|
||||
|
||||
setstr.Append( colname );
|
||||
valstr.Append( "@" + p.ParameterName );
|
||||
}
|
||||
|
||||
cmd.CommandText = "INSERT INTO " + Quote(_tableName) + " (" + setstr.ToString() + ") " +
|
||||
" VALUES (" + valstr.ToString() + ")";
|
||||
cmd.CommandText += "; " + CreateFinalSelect(true);
|
||||
|
||||
_insertCmd = cmd;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private bool IncludedInInsert (DataRow schemaRow)
|
||||
{
|
||||
// If the parameter has one of these properties, then we don't include it in the insert:
|
||||
// AutoIncrement, Hidden, Expression, RowVersion, ReadOnly
|
||||
|
||||
if ((bool) schemaRow ["IsAutoIncrement"])
|
||||
return false;
|
||||
/* if ((bool) schemaRow ["IsHidden"])
|
||||
return false;
|
||||
if ((bool) schemaRow ["IsExpression"])
|
||||
return false;*/
|
||||
if ((bool) schemaRow ["IsRowVersion"])
|
||||
return false;
|
||||
if ((bool) schemaRow ["IsReadOnly"])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IncludedInUpdate (DataRow schemaRow)
|
||||
{
|
||||
// If the parameter has one of these properties, then we don't include it in the insert:
|
||||
// AutoIncrement, Hidden, RowVersion
|
||||
|
||||
if ((bool) schemaRow ["IsAutoIncrement"])
|
||||
return false;
|
||||
// if ((bool) schemaRow ["IsHidden"])
|
||||
// return false;
|
||||
if ((bool) schemaRow ["IsRowVersion"])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IncludedInWhereClause (DataRow schemaRow)
|
||||
{
|
||||
// if ((bool) schemaRow ["IsLong"])
|
||||
// return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SetParameterValues(MySqlCommand cmd, DataRow dataRow)
|
||||
{
|
||||
foreach (MySqlParameter p in cmd.Parameters)
|
||||
{
|
||||
if (p.ParameterName.Length >= 8 && p.ParameterName.Substring(0, 8).Equals("Original"))
|
||||
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Original ];
|
||||
else
|
||||
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Current ];
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs args)
|
||||
{
|
||||
// make sure we are still to proceed
|
||||
if (args.Status != UpdateStatus.Continue) return;
|
||||
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
|
||||
if (StatementType.Delete == args.StatementType)
|
||||
args.Command = CreateDeleteCommand();
|
||||
else if (StatementType.Update == args.StatementType)
|
||||
args.Command = CreateUpdateCommand();
|
||||
else if (StatementType.Insert == args.StatementType)
|
||||
args.Command = CreateInsertCommand();
|
||||
else if (StatementType.Select == args.StatementType)
|
||||
return;
|
||||
|
||||
SetParameterValues(args.Command, args.Row);
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
namespace ByteFX.Data.MySQLClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for CommandBuilder.
|
||||
/// </summary>
|
||||
[ToolboxItem(false)]
|
||||
public sealed class MySQLCommandBuilder : Component
|
||||
{
|
||||
private MySQLDataAdapter _adapter;
|
||||
private string _QuotePrefix;
|
||||
private string _QuoteSuffix;
|
||||
private DataTable _schema;
|
||||
private string _tableName;
|
||||
|
||||
private MySQLCommand _updateCmd;
|
||||
private MySQLCommand _insertCmd;
|
||||
private MySQLCommand _deleteCmd;
|
||||
|
||||
#region Constructors
|
||||
public MySQLCommandBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
public MySQLCommandBuilder( MySQLDataAdapter adapter )
|
||||
{
|
||||
_adapter = adapter;
|
||||
_adapter.RowUpdating += new MySQLRowUpdatingEventHandler( OnRowUpdating );
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public MySQLDataAdapter DataAdapter
|
||||
{
|
||||
get { return _adapter; }
|
||||
set
|
||||
{
|
||||
if (_adapter != null)
|
||||
{
|
||||
_adapter.RowUpdating -= new MySQLRowUpdatingEventHandler( OnRowUpdating );
|
||||
}
|
||||
_adapter = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string QuotePrefix
|
||||
{
|
||||
get { return _QuotePrefix; }
|
||||
set { _QuotePrefix = value; }
|
||||
}
|
||||
|
||||
public string QuoteSuffix
|
||||
{
|
||||
get { return _QuoteSuffix; }
|
||||
set { _QuoteSuffix = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
public static void DeriveParameters(MySQLCommand command)
|
||||
{
|
||||
throw new MySQLException("DeriveParameters is not supported (due to MySQL not supporting SP)");
|
||||
}
|
||||
|
||||
public MySQLCommand GetDeleteCommand()
|
||||
{
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
return CreateDeleteCommand();
|
||||
}
|
||||
|
||||
public MySQLCommand GetInsertCommand()
|
||||
{
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
return CreateInsertCommand();
|
||||
}
|
||||
|
||||
public MySQLCommand GetUpdateCommand()
|
||||
{
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
return CreateUpdateCommand();
|
||||
}
|
||||
|
||||
public void RefreshSchema()
|
||||
{
|
||||
_schema = null;
|
||||
_insertCmd = null;
|
||||
_deleteCmd = null;
|
||||
_updateCmd = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void GenerateSchema()
|
||||
{
|
||||
if (_adapter == null)
|
||||
throw new MySQLException("Improper MySQLCommandBuilder state: adapter is null");
|
||||
if (_adapter.SelectCommand == null)
|
||||
throw new MySQLException("Improper MySQLCommandBuilder state: adapter's SelectCommand is null");
|
||||
|
||||
MySQLDataReader dr = _adapter.SelectCommand.ExecuteReader(CommandBehavior.SchemaOnly | CommandBehavior.KeyInfo);
|
||||
_schema = dr.GetSchemaTable();
|
||||
dr.Close();
|
||||
|
||||
// make sure we got at least one unique or key field and count base table names
|
||||
bool hasKeyOrUnique=false;
|
||||
|
||||
foreach (DataRow row in _schema.Rows)
|
||||
{
|
||||
if (true == (bool)row["IsKey"] || true == (bool)row["IsUnique"])
|
||||
hasKeyOrUnique=true;
|
||||
if (_tableName == null)
|
||||
_tableName = (string)row["BaseTableName"];
|
||||
else if (_tableName != (string)row["BaseTableName"])
|
||||
throw new InvalidOperationException("MySQLCommandBuilder does not support multi-table statements");
|
||||
}
|
||||
if (! hasKeyOrUnique)
|
||||
throw new InvalidOperationException("MySQLCommandBuilder cannot operate on tables with no unique or key columns");
|
||||
}
|
||||
|
||||
private string Quote(string table_or_column)
|
||||
{
|
||||
if (_QuotePrefix == null || _QuoteSuffix == null)
|
||||
return table_or_column;
|
||||
return _QuotePrefix + table_or_column + _QuoteSuffix;
|
||||
}
|
||||
|
||||
private MySQLParameter CreateParameter(DataRow row, bool Original)
|
||||
{
|
||||
MySQLParameter p;
|
||||
if (Original)
|
||||
p = new MySQLParameter( "@Original_" + (string)row["ColumnName"], (MySQLDbType)row["ProviderType"],
|
||||
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Original, null );
|
||||
else
|
||||
p = new MySQLParameter( "@" + (string)row["ColumnName"], (MySQLDbType)row["ProviderType"],
|
||||
(string)row["ColumnName"]);
|
||||
return p;
|
||||
}
|
||||
|
||||
private MySQLCommand CreateBaseCommand()
|
||||
{
|
||||
MySQLCommand cmd = new MySQLCommand();
|
||||
cmd.Connection = _adapter.SelectCommand.Connection;
|
||||
cmd.CommandTimeout = _adapter.SelectCommand.CommandTimeout;
|
||||
cmd.Transaction = _adapter.SelectCommand.Transaction;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private MySQLCommand CreateDeleteCommand()
|
||||
{
|
||||
if (_deleteCmd != null) return _deleteCmd;
|
||||
|
||||
MySQLCommand cmd = CreateBaseCommand();
|
||||
|
||||
cmd.CommandText = "DELETE FROM " + Quote(_tableName) +
|
||||
" WHERE " + CreateOriginalWhere(cmd);
|
||||
|
||||
_deleteCmd = cmd;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private string CreateFinalSelect(bool forinsert)
|
||||
{
|
||||
StringBuilder sel = new StringBuilder();
|
||||
StringBuilder where = new StringBuilder();
|
||||
|
||||
foreach (DataRow row in _schema.Rows)
|
||||
{
|
||||
string colname = (string)row["ColumnName"];
|
||||
if (sel.Length > 0)
|
||||
sel.Append(", ");
|
||||
sel.Append( colname );
|
||||
if ((bool)row["IsKey"] == false) continue;
|
||||
if (where.Length > 0)
|
||||
where.Append(" AND ");
|
||||
where.Append( "(" + colname + "=" );
|
||||
if ((bool)row["IsAutoIncrement"] && forinsert)
|
||||
where.Append("last_insert_id()");
|
||||
else
|
||||
where.Append("@Original_" + colname);
|
||||
where.Append(")");
|
||||
}
|
||||
return "SELECT " + sel.ToString() + " FROM " + Quote(_tableName) +
|
||||
" WHERE " + where.ToString();
|
||||
}
|
||||
|
||||
private string CreateOriginalWhere(MySQLCommand cmd)
|
||||
{
|
||||
StringBuilder wherestr = new StringBuilder();
|
||||
|
||||
foreach (DataRow row in _schema.Rows)
|
||||
{
|
||||
if (! IncludedInWhereClause(row)) continue;
|
||||
|
||||
// first update the where clause since it will contain all parameters
|
||||
if (wherestr.Length > 0)
|
||||
wherestr.Append(" AND ");
|
||||
string colname = Quote((string)row["ColumnName"]);
|
||||
|
||||
MySQLParameter op = CreateParameter(row, true);
|
||||
cmd.Parameters.Add(op);
|
||||
|
||||
wherestr.Append( "(" + colname + "=" + op.ParameterName);
|
||||
if ((bool)row["AllowDBNull"] == true)
|
||||
wherestr.Append( " or " + colname + " is null and " + op.ParameterName + " is null");
|
||||
wherestr.Append(")");
|
||||
}
|
||||
return wherestr.ToString();
|
||||
}
|
||||
|
||||
private MySQLCommand CreateUpdateCommand()
|
||||
{
|
||||
if (_updateCmd != null) return _updateCmd;
|
||||
|
||||
MySQLCommand cmd = CreateBaseCommand();
|
||||
|
||||
StringBuilder setstr = new StringBuilder();
|
||||
|
||||
foreach (DataRow schemaRow in _schema.Rows)
|
||||
{
|
||||
string colname = Quote((string)schemaRow["ColumnName"]);
|
||||
|
||||
if (! IncludedInUpdate(schemaRow)) continue;
|
||||
|
||||
if (setstr.Length > 0)
|
||||
setstr.Append(", ");
|
||||
|
||||
MySQLParameter p = CreateParameter(schemaRow, false);
|
||||
cmd.Parameters.Add(p);
|
||||
|
||||
setstr.Append( colname + "=" + p.ParameterName );
|
||||
}
|
||||
|
||||
cmd.CommandText = "UPDATE " + Quote(_tableName) + " SET " + setstr.ToString() +
|
||||
" WHERE " + CreateOriginalWhere(cmd);
|
||||
cmd.CommandText += "; " + CreateFinalSelect(false);
|
||||
|
||||
_updateCmd = cmd;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private MySQLCommand CreateInsertCommand()
|
||||
{
|
||||
if (_insertCmd != null) return _insertCmd;
|
||||
|
||||
MySQLCommand cmd = CreateBaseCommand();
|
||||
|
||||
StringBuilder setstr = new StringBuilder();
|
||||
StringBuilder valstr = new StringBuilder();
|
||||
foreach (DataRow schemaRow in _schema.Rows)
|
||||
{
|
||||
string colname = Quote((string)schemaRow["ColumnName"]);
|
||||
|
||||
if (!IncludedInInsert(schemaRow)) continue;
|
||||
|
||||
if (setstr.Length > 0)
|
||||
{
|
||||
setstr.Append(", ");
|
||||
valstr.Append(", ");
|
||||
}
|
||||
|
||||
MySQLParameter p = CreateParameter(schemaRow, false);
|
||||
cmd.Parameters.Add(p);
|
||||
|
||||
setstr.Append( colname );
|
||||
valstr.Append( p.ParameterName );
|
||||
}
|
||||
|
||||
cmd.CommandText = "INSERT INTO " + Quote(_tableName) + " (" + setstr.ToString() + ") " +
|
||||
" VALUES (" + valstr.ToString() + ")";
|
||||
cmd.CommandText += "; " + CreateFinalSelect(true);
|
||||
|
||||
_insertCmd = cmd;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
private bool IncludedInInsert (DataRow schemaRow)
|
||||
{
|
||||
// If the parameter has one of these properties, then we don't include it in the insert:
|
||||
// AutoIncrement, Hidden, Expression, RowVersion, ReadOnly
|
||||
|
||||
if ((bool) schemaRow ["IsAutoIncrement"])
|
||||
return false;
|
||||
/* if ((bool) schemaRow ["IsHidden"])
|
||||
return false;
|
||||
if ((bool) schemaRow ["IsExpression"])
|
||||
return false;*/
|
||||
if ((bool) schemaRow ["IsRowVersion"])
|
||||
return false;
|
||||
if ((bool) schemaRow ["IsReadOnly"])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IncludedInUpdate (DataRow schemaRow)
|
||||
{
|
||||
// If the parameter has one of these properties, then we don't include it in the insert:
|
||||
// AutoIncrement, Hidden, RowVersion
|
||||
|
||||
if ((bool) schemaRow ["IsAutoIncrement"])
|
||||
return false;
|
||||
// if ((bool) schemaRow ["IsHidden"])
|
||||
// return false;
|
||||
if ((bool) schemaRow ["IsRowVersion"])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IncludedInWhereClause (DataRow schemaRow)
|
||||
{
|
||||
if ((bool) schemaRow ["IsLong"])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SetParameterValues(MySQLCommand cmd, DataRow dataRow)
|
||||
{
|
||||
foreach (MySQLParameter p in cmd.Parameters)
|
||||
{
|
||||
if (p.ParameterName.Length >= 9 && p.ParameterName.Substring(0, 9).Equals("@Original"))
|
||||
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Original ];
|
||||
else
|
||||
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Current ];
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRowUpdating(object sender, MySQLRowUpdatingEventArgs args)
|
||||
{
|
||||
// make sure we are still to proceed
|
||||
if (args.Status != UpdateStatus.Continue) return;
|
||||
|
||||
if (_schema == null)
|
||||
GenerateSchema();
|
||||
|
||||
if (StatementType.Delete == args.StatementType)
|
||||
args.Command = CreateDeleteCommand();
|
||||
else if (StatementType.Update == args.StatementType)
|
||||
args.Command = CreateUpdateCommand();
|
||||
else if (StatementType.Insert == args.StatementType)
|
||||
args.Command = CreateInsertCommand();
|
||||
else if (StatementType.Select == args.StatementType)
|
||||
return;
|
||||
|
||||
SetParameterValues(args.Command, args.Row);
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,372 +1,257 @@
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using ByteFX.Data.Common;
|
||||
|
||||
namespace ByteFX.Data.MySqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an open connection to a MySQL Server database. This class cannot be inherited.
|
||||
/// </summary>
|
||||
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
|
||||
[System.Drawing.ToolboxBitmap( typeof(MySqlConnection), "Designers.connection.bmp")]
|
||||
[System.ComponentModel.DesignerCategory("Code")]
|
||||
[ToolboxItem(true)]
|
||||
public sealed class MySqlConnection : Component, IDbConnection, ICloneable
|
||||
{
|
||||
internal ConnectionState state;
|
||||
private MySqlInternalConnection internalConnection;
|
||||
private MySqlDataReader dataReader;
|
||||
private NumberFormatInfo numberFormat;
|
||||
private MySqlConnectionString settings;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the state of the connection changes.
|
||||
/// </summary>
|
||||
public event StateChangeEventHandler StateChange;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new connection
|
||||
/// </summary>
|
||||
public MySqlConnection()
|
||||
{
|
||||
settings = new MySqlConnectionString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new connection
|
||||
/// </summary>
|
||||
/// <param name="container"></param>
|
||||
public MySqlConnection(System.ComponentModel.IContainer container)
|
||||
{
|
||||
settings = new MySqlConnectionString();
|
||||
}
|
||||
|
||||
|
||||
// Have a constructor that takes a connection string.
|
||||
/// <summary>
|
||||
/// Creates a new connection using the specified connection string.
|
||||
/// </summary>
|
||||
/// <param name="connectString"></param>
|
||||
public MySqlConnection(string connectString)
|
||||
{
|
||||
settings = new MySqlConnectionString(connectString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the MySQL server to which to connect.
|
||||
/// </summary>
|
||||
#region Properties
|
||||
[Browsable(true)]
|
||||
public string DataSource
|
||||
{
|
||||
get { return settings.Host; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
|
||||
/// </summary>
|
||||
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="ConnectionTimeout"]/*'/>
|
||||
[Browsable(true)]
|
||||
public int ConnectionTimeout
|
||||
{
|
||||
get { return settings.ConnectTimeout; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the current database or the database to be used after a connection is opened.
|
||||
/// </summary>
|
||||
[Browsable(true)]
|
||||
public string Database
|
||||
{
|
||||
get { return settings.Database; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if this connection should use compression when communicating with the server.
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public bool UseCompression
|
||||
{
|
||||
get { return settings.UseCompression; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current state of the connection.
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public ConnectionState State
|
||||
{
|
||||
get { return state; }
|
||||
}
|
||||
|
||||
internal MySqlDataReader Reader
|
||||
{
|
||||
get { return dataReader; }
|
||||
set { dataReader = value; }
|
||||
}
|
||||
|
||||
internal MySqlInternalConnection InternalConnection
|
||||
{
|
||||
get { return internalConnection; }
|
||||
}
|
||||
|
||||
internal NumberFormatInfo NumberFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
if (numberFormat == null)
|
||||
{
|
||||
numberFormat = new NumberFormatInfo();
|
||||
numberFormat = (NumberFormatInfo)NumberFormatInfo.InvariantInfo.Clone();
|
||||
numberFormat.NumberDecimalSeparator = ".";
|
||||
}
|
||||
return numberFormat;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the version of the MySQL server to which the client is connected.
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public string ServerVersion
|
||||
{
|
||||
get { return internalConnection.Driver.Version; }
|
||||
}
|
||||
|
||||
internal Encoding Encoding
|
||||
{
|
||||
get
|
||||
{
|
||||
if (internalConnection == null)
|
||||
return System.Text.Encoding.Default;
|
||||
else
|
||||
return internalConnection.Driver.Encoding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the string used to connect to a MySQL Server database.
|
||||
/// </summary>
|
||||
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="ConnectionString"]/*'/>
|
||||
#if WINDOWS
|
||||
[Editor(typeof(Designers.ConnectionStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
|
||||
#endif
|
||||
[Browsable(true)]
|
||||
[Category("Data")]
|
||||
public string ConnectionString
|
||||
{
|
||||
get
|
||||
{
|
||||
// Always return exactly what the user set.
|
||||
// Security-sensitive information may be removed.
|
||||
return settings.ConnectString;
|
||||
}
|
||||
set
|
||||
{
|
||||
settings.ConnectString = value;
|
||||
if (internalConnection != null)
|
||||
internalConnection.Settings = settings;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Transactions
|
||||
/// <summary>
|
||||
/// Begins a database transaction.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySqlTransaction BeginTransaction()
|
||||
{
|
||||
if (state != ConnectionState.Open)
|
||||
throw new MySqlException("Invalid operation: The connection is closed");
|
||||
|
||||
MySqlTransaction t = new MySqlTransaction();
|
||||
t.Connection = this;
|
||||
InternalConnection.Driver.SendCommand( DBCmd.QUERY, "BEGIN");
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
IDbTransaction IDbConnection.BeginTransaction()
|
||||
{
|
||||
return BeginTransaction();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
/// <returns></returns>
|
||||
public MySqlTransaction BeginTransaction(IsolationLevel level)
|
||||
{
|
||||
if (state != ConnectionState.Open)
|
||||
throw new MySqlException("Invalid operation: The connection is closed");
|
||||
|
||||
MySqlTransaction t = new MySqlTransaction();
|
||||
t.Connection = this;
|
||||
t.IsolationLevel = level;
|
||||
string cmd = "SET SESSION TRANSACTION ISOLATION LEVEL ";
|
||||
switch (level)
|
||||
{
|
||||
case IsolationLevel.ReadCommitted:
|
||||
cmd += "READ COMMITTED"; break;
|
||||
case IsolationLevel.ReadUncommitted:
|
||||
cmd += "READ UNCOMMITTED"; break;
|
||||
case IsolationLevel.RepeatableRead:
|
||||
cmd += "REPEATABLE READ"; break;
|
||||
case IsolationLevel.Serializable:
|
||||
cmd += "SERIALIZABLE"; break;
|
||||
case IsolationLevel.Chaos:
|
||||
throw new NotSupportedException("Chaos isolation level is not supported");
|
||||
}
|
||||
InternalConnection.Driver.SendCommand( DBCmd.QUERY, cmd );
|
||||
InternalConnection.Driver.SendCommand( DBCmd.QUERY, "BEGIN");
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
/// <returns></returns>
|
||||
IDbTransaction IDbConnection.BeginTransaction(IsolationLevel level)
|
||||
{
|
||||
return BeginTransaction(level);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Changes the current database for an open MySqlConnection.
|
||||
/// </summary>
|
||||
/// <param name="dbName"></param>
|
||||
public void ChangeDatabase(string dbName)
|
||||
{
|
||||
if (state != ConnectionState.Open)
|
||||
throw new MySqlException("Invalid operation: The connection is closed");
|
||||
|
||||
//TODOinternalConnection.ChangeDatabase( dbName );
|
||||
InternalConnection.Driver.SendCommand( DBCmd.INIT_DB, dbName );
|
||||
}
|
||||
|
||||
internal void SetState( ConnectionState newState )
|
||||
{
|
||||
ConnectionState oldState = state;
|
||||
state = newState;
|
||||
if (this.StateChange != null)
|
||||
StateChange(this, new StateChangeEventArgs( oldState, newState ));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens a database connection with the property settings specified by the ConnectionString.
|
||||
/// </summary>
|
||||
public void Open()
|
||||
{
|
||||
if (state == ConnectionState.Open)
|
||||
throw new MySqlException("error connecting: The connection is already Open (state=Open).");
|
||||
|
||||
SetState( ConnectionState.Connecting );
|
||||
|
||||
if (settings.Pooling)
|
||||
{
|
||||
internalConnection = MySqlPoolManager.GetConnection( settings );
|
||||
}
|
||||
else
|
||||
{
|
||||
internalConnection = new MySqlInternalConnection( settings );
|
||||
internalConnection.Open();
|
||||
}
|
||||
|
||||
SetState( ConnectionState.Open );
|
||||
internalConnection.SetServerVariables(this);
|
||||
ChangeDatabase( settings.Database );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Closes the connection to the database. This is the preferred method of closing any open connection.
|
||||
/// </summary>
|
||||
public void Close()
|
||||
{
|
||||
if (state == ConnectionState.Closed) return;
|
||||
|
||||
if (dataReader != null)
|
||||
dataReader.Close();
|
||||
|
||||
if (settings.Pooling)
|
||||
MySqlPoolManager.ReleaseConnection( internalConnection );
|
||||
else
|
||||
internalConnection.Close();
|
||||
|
||||
SetState( ConnectionState.Closed );
|
||||
}
|
||||
|
||||
IDbCommand IDbConnection.CreateCommand()
|
||||
{
|
||||
return CreateCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates and returns a MySqlCommand object associated with the MySqlConnection.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySqlCommand CreateCommand()
|
||||
{
|
||||
// Return a new instance of a command object.
|
||||
MySqlCommand c = new MySqlCommand();
|
||||
c.Connection = this;
|
||||
return c;
|
||||
}
|
||||
|
||||
#region ICloneable
|
||||
/// <summary>
|
||||
/// Creates a new MySqlConnection object with the exact same ConnectionString value
|
||||
/// </summary>
|
||||
/// <returns>A cloned MySqlConnection object</returns>
|
||||
object ICloneable.Clone()
|
||||
{
|
||||
MySqlConnection clone = new MySqlConnection();
|
||||
clone.ConnectionString = this.ConnectionString;
|
||||
//TODO: how deep should this go?
|
||||
return clone;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IDisposeable
|
||||
/// <summary>
|
||||
/// Releases the resources used by the MySqlConnection.
|
||||
/// </summary>
|
||||
public new void Dispose()
|
||||
{
|
||||
if (State == ConnectionState.Open)
|
||||
Close();
|
||||
base.Dispose();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
// ByteFX.Data data access components for .Net
|
||||
// Copyright (C) 2002-2003 ByteFX, Inc.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ByteFX.Data.MySQLClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for MySQLConnection.
|
||||
/// </summary>
|
||||
#if WINDOWS
|
||||
[System.Drawing.ToolboxBitmap( typeof(MySQLConnection), "Designers.connection.bmp")]
|
||||
#endif
|
||||
[ToolboxItem(true)]
|
||||
public sealed class MySQLConnection : Common.Connection, IDbConnection, ICloneable
|
||||
{
|
||||
Driver m_Driver;
|
||||
|
||||
// Always have a default constructor.
|
||||
public MySQLConnection()
|
||||
{
|
||||
ConnectionString = "data source=localhost;user id=root;pwd=;database=mysql";
|
||||
}
|
||||
|
||||
public MySQLConnection(System.ComponentModel.IContainer container)
|
||||
{
|
||||
ConnectionString = "data source=localhost;user id=root;pwd=;database=mysql";
|
||||
}
|
||||
|
||||
|
||||
// Have a constructor that takes a connection string.
|
||||
public MySQLConnection(string sConnString)
|
||||
{
|
||||
ConnectionString = sConnString;
|
||||
Init();
|
||||
}
|
||||
|
||||
public new void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
if (m_State == ConnectionState.Open)
|
||||
Close();
|
||||
}
|
||||
|
||||
internal Driver Driver
|
||||
{
|
||||
get { return m_Driver; }
|
||||
}
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Gets a string containing the version of the of the server to which the client is connected.
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public string ServerVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Driver.ServerVersion;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public bool UseCompression
|
||||
{
|
||||
get
|
||||
{
|
||||
String s = m_ConnSettings["use compression"];
|
||||
if (s == null) return false;
|
||||
return s.ToLower() == "true" || s.ToLower() == "yes";
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public int Port
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_ConnSettings["port"] == null)
|
||||
return 3306;
|
||||
else
|
||||
return Convert.ToInt32(m_ConnSettings["port"]);
|
||||
}
|
||||
}
|
||||
|
||||
#if WINDOWS
|
||||
[Editor(typeof(Designers.ConnectionStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
|
||||
#endif
|
||||
[Browsable(true)]
|
||||
[Category("Data")]
|
||||
public string ConnectionString
|
||||
{
|
||||
get
|
||||
{
|
||||
// Always return exactly what the user set.
|
||||
// Security-sensitive information may be removed.
|
||||
return m_ConnString;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ConnString = value;
|
||||
m_ConnSettings = Common.ConnectionString.ParseConnectString( m_ConnString );
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Transactions
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySQLTransaction BeginTransaction()
|
||||
{
|
||||
MySQLTransaction t = new MySQLTransaction();
|
||||
t.Connection = this;
|
||||
m_Driver.SendCommand( DBCmd.QUERY, "BEGIN");
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
IDbTransaction IDbConnection.BeginTransaction()
|
||||
{
|
||||
return BeginTransaction();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
/// <returns></returns>
|
||||
public MySQLTransaction BeginTransaction(IsolationLevel level)
|
||||
{
|
||||
MySQLTransaction t = new MySQLTransaction();
|
||||
t.Connection = this;
|
||||
t.IsolationLevel = level;
|
||||
string cmd = "SET SESSION TRANSACTION ISOLATION LEVEL ";
|
||||
switch (level)
|
||||
{
|
||||
case IsolationLevel.ReadCommitted:
|
||||
cmd += "READ COMMITTED"; break;
|
||||
case IsolationLevel.ReadUncommitted:
|
||||
cmd += "READ UNCOMMITTED"; break;
|
||||
case IsolationLevel.RepeatableRead:
|
||||
cmd += "REPEATABLE READ"; break;
|
||||
case IsolationLevel.Serializable:
|
||||
cmd += "SERIALIZABLE"; break;
|
||||
case IsolationLevel.Chaos:
|
||||
throw new NotSupportedException("Chaos isolation level is not supported");
|
||||
}
|
||||
m_Driver.SendCommand( DBCmd.QUERY, cmd );
|
||||
m_Driver.SendCommand( DBCmd.QUERY, "BEGIN");
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
/// <returns></returns>
|
||||
IDbTransaction IDbConnection.BeginTransaction(IsolationLevel level)
|
||||
{
|
||||
return BeginTransaction(level);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="dbName"></param>
|
||||
public void ChangeDatabase(string dbName)
|
||||
{
|
||||
/*
|
||||
* Change the database setting on the back-end. Note that it is a method
|
||||
* and not a property because the operation requires an expensive
|
||||
* round trip.
|
||||
*/
|
||||
m_ConnSettings["database"] = dbName;
|
||||
|
||||
m_Driver.SendCommand( DBCmd.INIT_DB, m_ConnSettings["database"] );
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
/*
|
||||
* Open the database connection and set the ConnectionState
|
||||
* property. If the underlying connection to the server is
|
||||
* expensive to obtain, the implementation should provide
|
||||
* implicit pooling of that connection.
|
||||
*
|
||||
* If the provider also supports automatic enlistment in
|
||||
* distributed transactions, it should enlist during Open().
|
||||
*/
|
||||
m_State = ConnectionState.Connecting;
|
||||
if (m_Driver == null)
|
||||
m_Driver = new Driver(ConnectionTimeout);
|
||||
m_Driver.Open( DataSource, Port, User, Password, UseCompression );
|
||||
|
||||
//m_Driver.SendCommand( DBCmd.QUERY, "use " + m_Settings["database"] );
|
||||
m_Driver.SendCommand( DBCmd.INIT_DB, m_ConnSettings["database"] );
|
||||
m_State = ConnectionState.Open;
|
||||
}
|
||||
|
||||
|
||||
public void Close()
|
||||
{
|
||||
// this shouldn't happen, but it is!
|
||||
if (m_State == ConnectionState.Closed) return;
|
||||
|
||||
m_Driver.SendCommand( DBCmd.QUIT, null );
|
||||
m_Driver.Close();
|
||||
/*
|
||||
* Close the database connection and set the ConnectionState
|
||||
* property. If the underlying connection to the server is
|
||||
* being pooled, Close() will release it back to the pool.
|
||||
*/
|
||||
m_State = ConnectionState.Closed;
|
||||
}
|
||||
|
||||
public IDbCommand CreateCommand()
|
||||
{
|
||||
// Return a new instance of a command object.
|
||||
MySQLCommand c = new MySQLCommand();
|
||||
c.Connection = this;
|
||||
return c;
|
||||
}
|
||||
|
||||
#region ICloneable
|
||||
public object Clone()
|
||||
{
|
||||
MySQLConnection clone = new MySQLConnection();
|
||||
clone.ConnectionString = this.ConnectionString;
|
||||
//TODO: how deep should this go?
|
||||
return clone;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="ResMimeType">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="Version">
|
||||
<value>1.0.0.0</value>
|
||||
</resheader>
|
||||
<resheader name="Reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="Writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="ResMimeType">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="Version">
|
||||
<value>1.0.0.0</value>
|
||||
</resheader>
|
||||
<resheader name="Reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="Writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,125 +0,0 @@
|
||||
using System;
|
||||
using ByteFX.Data.Common;
|
||||
|
||||
namespace ByteFX.Data.MySqlClient
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
internal sealed class MySqlInternalConnection
|
||||
{
|
||||
MySqlConnectionString settings;
|
||||
Driver driver;
|
||||
DateTime createTime;
|
||||
bool serverVariablesSet;
|
||||
|
||||
public MySqlInternalConnection( MySqlConnectionString connectString )
|
||||
{
|
||||
settings = connectString;
|
||||
serverVariablesSet = false;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public MySqlConnectionString Settings
|
||||
{
|
||||
get { return settings; }
|
||||
set { settings = value; }
|
||||
}
|
||||
|
||||
internal Driver Driver
|
||||
{
|
||||
get { return driver; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public bool IsAlive()
|
||||
{
|
||||
Packet packet;
|
||||
try
|
||||
{
|
||||
byte[] bytes = driver.Encoding.GetBytes("show status like 'uptime'");
|
||||
packet = driver.SendSql( bytes );
|
||||
// we have to read for two last packets since MySql sends
|
||||
// us a last packet after schema and again after rows
|
||||
// I will likely change this later to have the driver just
|
||||
// return schema in one very large packet.
|
||||
while (! packet.IsLastPacket())
|
||||
packet = driver.ReadPacket();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool IsTooOld()
|
||||
{
|
||||
TimeSpan ts = DateTime.Now.Subtract( createTime );
|
||||
if (ts.Seconds > settings.ConnectionLifetime)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// I don't like this setup but can't think of a better way of doing
|
||||
/// right now.
|
||||
/// </summary>
|
||||
/// <param name="connection"></param>
|
||||
public void SetServerVariables(MySqlConnection connection)
|
||||
{
|
||||
if (serverVariablesSet) return;
|
||||
|
||||
// retrieve the encoding that should be used for character data
|
||||
MySqlCommand cmd = new MySqlCommand("show variables like 'max_allowed_packet'", connection);
|
||||
try
|
||||
{
|
||||
MySqlDataReader reader = cmd.ExecuteReader();
|
||||
reader.Read();
|
||||
driver.MaxPacketSize = reader.GetInt64( 1 );
|
||||
reader.Close();
|
||||
}
|
||||
catch
|
||||
{
|
||||
driver.MaxPacketSize = 1047552;
|
||||
}
|
||||
|
||||
cmd.CommandText = "show variables like 'character_set'";
|
||||
driver.Encoding = System.Text.Encoding.Default;
|
||||
|
||||
try
|
||||
{
|
||||
MySqlDataReader reader = cmd.ExecuteReader();
|
||||
if (reader.Read())
|
||||
driver.Encoding = CharSetMap.GetEncoding( reader.GetString(1) );
|
||||
reader.Close();
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new MySqlException("Failure to initialize connection");
|
||||
}
|
||||
|
||||
serverVariablesSet = true;
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
driver = new Driver();
|
||||
driver.Open( settings );
|
||||
|
||||
createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
driver.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using System;
|
||||
using ByteFX.Data.Common;
|
||||
|
||||
namespace ByteFX.Data.MySqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for MySqlConnectionString.
|
||||
/// </summary>
|
||||
internal sealed class MySqlConnectionString : DBConnectionString
|
||||
{
|
||||
private bool useCompression = false;
|
||||
|
||||
public MySqlConnectionString()
|
||||
{
|
||||
connectLifetime = 0;
|
||||
pooling = true;
|
||||
minPoolSize = 0;
|
||||
maxPoolSize = 100;
|
||||
connectTimeout = 15;
|
||||
port = 3306;
|
||||
}
|
||||
|
||||
public MySqlConnectionString(string connectString) : base(connectString)
|
||||
{
|
||||
connectLifetime = 0;
|
||||
pooling = true;
|
||||
minPoolSize = 0;
|
||||
maxPoolSize = 100;
|
||||
connectTimeout = 15;
|
||||
port = 3306;
|
||||
Parse();
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public bool UseCompression
|
||||
{
|
||||
get { return useCompression; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected override void ConnectionParameterParsed(string key, string value)
|
||||
{
|
||||
switch (key.ToLower())
|
||||
{
|
||||
case "use compression":
|
||||
case "compress":
|
||||
if (value.ToLower() == "no" || value.ToLower() == "false")
|
||||
useCompression = false;
|
||||
else
|
||||
useCompression = true;
|
||||
break;
|
||||
}
|
||||
|
||||
base.ConnectionParameterParsed(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loaded 100 of 2989 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user