+2007-03-14 Marek Habersack <mhabersack@novell.com>
+
+ * data/net_2_0/machine.config: add two missing section handlers.
+
+2007-03-13 Wade Berrier <wberrier@novell.com>
+
+ * Makefile.am:
+ * msvc/Makefile.am:
+ Update EXTRA_DIST to take into account .vcproj file moves
+
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * mono.sln, libmono.vcproj, mono.vcproj, genmdesc.vcproj, winsetup.bat,
+ mono/monodiet.vcproj, mono/pedump.vcproj: Move to msvc directory.
+
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * libmono.vcproj, mono.vcproj, genmdesc.vcproj, mono/monodiet.vcproj,
+ mono/pedump.vcproj: Fix Release build target, add define to remove CRT warnings,
+ structure output folders a bit better, begin WIN64 port, and change
+ libmono to build a DLL instead of a static library.
+ * mono.sln: Begin x64 target support.
+
+Fri Mar 9 18:57:47 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+ * Makefile.am, configure.in, msvc: add msvc directory to the
+ distribution.
+ * msvc/create-windef.pl, msvc/mono.def: added def file for exported
+ functions.
+
+2007-03-09 Zoltan Varga <vargaz@gmail.com>
+
+ * docs/aot-compiler.txt: Update 'future work'.
+
+2007-03-07 Zoltan Varga <vargaz@gmail.com>
+
+ * docs/aot-compiler.txt: Add into about the PLT.
+
+ * docs/aot-compiler.txt: Update a bit to reflect recent changes.
+
2007-02-24 Raja R Harinath <rharinath@novell.com>
* data/config.in (odbc32.dll) [os=osx]: Fix misplaced ".
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
-SUBDIRS = $(libgc_dir) mono $(ikvm_native_dir) support docs data runtime scripts man samples web
+SUBDIRS = $(libgc_dir) mono $(ikvm_native_dir) support docs data runtime scripts man samples web msvc
# Keep in sync with SUBDIRS
## 'tools' is not normally built
-DIST_SUBDIRS = libgc mono ikvm-native support docs data runtime scripts man samples web tools
+DIST_SUBDIRS = libgc mono ikvm-native support docs data runtime scripts man samples web tools msvc
-vs_files = genmdesc.vcproj libmono.vcproj mono.vcproj mono.sln
-
-EXTRA_DIST= mono.pc.in mint.pc.in mono-uninstalled.pc.in dotnet.pc.in mono-cairo.pc.in LICENSE $(vs_files)
+EXTRA_DIST= mono.pc.in mint.pc.in mono-uninstalled.pc.in dotnet.pc.in mono-cairo.pc.in LICENSE
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
export CC
fi
HOST_CC="gcc"
- CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024"
+ CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024 -DUNICODE -D_UNICODE"
libmono_cflags="-mno-cygwin"
libmono_ldflags="-mno-cygwin"
libdl=
tools/Makefile
tools/locale-builder/Makefile
runtime/Makefile
+msvc/Makefile
])
if test x$platform_win32 = xyes; then
<%@ Import Namespace="System.Web.Services" %>
<%@ Import Namespace="System.Web.Services.Description" %>
<%@ Import Namespace="System.Web.Services.Configuration" %>
+<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Globalization" %>
Page.DataBind();
ProfileViolations = new BasicProfileViolationCollection ();
- WebServicesInteroperability.CheckConformance (WsiProfiles.BasicProfile1_1, descriptions, ProfileViolations);
+ foreach (WsiProfilesElement claims in ((WebServicesSection) WebConfigurationManager.GetSection("system.web/webServices")).ConformanceWarnings)
+ if (claims.Name != WsiProfiles.None)
+ WebServicesInteroperability.CheckConformance (claims.Name, descriptions, ProfileViolations);
}
void BuildOperationInfo ()
<%@ Import Namespace="System.Web.Services" %>
<%@ Import Namespace="System.Web.Services.Description" %>
<%@ Import Namespace="System.Web.Services.Configuration" %>
+<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Globalization" %>
Page.DataBind();
ProfileViolations = new BasicProfileViolationCollection ();
- WebServicesInteroperability.CheckConformance (WsiProfiles.BasicProfile1_1, descriptions, ProfileViolations);
+ foreach (WsiProfilesElement claims in ((WebServicesSection) WebConfigurationManager.GetSection("system.web/webServices")).ConformanceWarnings)
+ if (claims.Name != WsiProfiles.None)
+ WebServicesInteroperability.CheckConformance (claims.Name, descriptions, ProfileViolations);
}
void BuildOperationInfo ()
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="healthMonitoring" type="System.Web.Configuration.HealthMonitoringSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="urlMappings" type="System.Web.Configuration.UrlMappingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="xhtmlConformance" type="System.Web.Services.Configuration.XhtmlConformanceSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<configuration>
<configSections>
+ <section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
+ <section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <!-- <section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> -->
+ <section name="system.codedom" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.data.dataset" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.data.odbc" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.data.oledb" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.data.oracleclient" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.data.sqlclient" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.windows.forms" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="xhtmlConformance" type="System.Web.Services.Configuration.XhtmlConformanceSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="deployment" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
+ <section name="healthMonitoring" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
+ <section name="hostingEnvironment" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
+ <section name="httpCookies" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="identity" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="processModel" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" allowLocation="false" />
+ <section name="securityPolicy" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
+ <section name="sessionPageState" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="trust" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
+ <section name="webParts" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
</sectionGroup>
+ <sectionGroup name="system.xml.serialization" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <section name="schemaImporterExtensions" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="dateTimeSerialization" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="xmlSerializer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" requirePermission="false" />
+ </sectionGroup>
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="settings" type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="webRequestModules" type="System.Net.Configuration.WebRequestModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
+ <sectionGroup name="system.transactions" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <section name="defaultSettings" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <section name="machineSettings" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
+ </sectionGroup>
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<sectionGroup name="mainsoft.drawing">
<section name="icons" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <add verb="*" path="*.class" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.jar" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
+ <conformanceWarnings>
+ <add name="BasicProfile1_1"/>
+ </conformanceWarnings>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<webControls clientScriptsLocation="/web_scripts" />
<add key="type" value = "Mainsoft.Data.Jdbc.Providers.OleDbSqlServerProvider2005, System.Data" />
<add key="keyMapping" value = "serverName=data source,server,address,addr;user=user id,user,uid;password=password,pwd;database=initial catalog,database;loginTimeout=connect timeout,connection timeout;" />
<add key="keyExclude" value="provider,jndi-datasource-name,naming-provider-url,naming-factory-initial,jdbcdriverclassname,jdbcurl" />
+ <add key="keyUnsupported" value="AttachDBFilename" />
</provider>
<!-- Microsoft SQLServer driver 2005 (default) -->
<add key="type" value = "Mainsoft.Data.Jdbc.Providers.OleDbSqlServerProvider2005, System.Data" />
<add key="keyMapping" value = "serverName=data source,server,address,addr;user=user id,user,uid;password=password,pwd;database=initial catalog,database;loginTimeout=connect timeout,connection timeout;" />
<add key="keyExclude" value="provider,jndi-datasource-name,naming-provider-url,naming-factory-initial,jdbcdriverclassname,jdbcurl" />
+ <add key="keyUnsupported" value="AttachDBFilename" />
</provider>
</SqlClientProviders>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
+ <conformanceWarnings>
+ <add name="BasicProfile1_1"/>
+ </conformanceWarnings>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<pages>
assembly, while the -O=all flag instructs Mono to use all the
available optimizations.
+* Caching metadata
+------------------
+
+ Besides code, the AOT file also contains cached metadata information which allows
+ the runtime to avoid certain computations at runtime, like the computation of
+ generic vtables. This reduces both startup time, and memory usage. It is possible
+ to create an AOT image which contains only this cached information and no code by
+ using the 'metadata-only' option during compilation:
+
+ mono --aot=metadata-only assembly.exe
+
+ This works even on platforms where AOT is not normally supported.
+
* Position Independent Code
---------------------------
svn diff -r 37739:38213 mini-x86.c
+ * The Program Linkage Table
+
+ As in ELF, calls made from AOT code do not go through the GOT. Instead, a direct call is
+ made to an entry in the Program Linkage Table (PLT). This is based on the fact that on
+ most architectures, call instructions use a displacement instead of an absolute address, so
+ they are already position independent. An PLT entry is usually a jump instruction, which
+ initially points to some trampoline code which transfers control to the AOT loader, which
+ will compile the called method, and patch the PLT entry so that further calls are made
+ directly to the called method.
+ If the called method is in the same assembly, and does not need initialization (i.e. it
+ doesn't have GOT slots etc), then the call is made directly, bypassing the PLT.
+
* The Precompiled File Format
-----------------------------
A list of assemblies referenced by this AOT
module.
-
+
+ methods
+
+ The precompiled code itself.
+
method_offsets
- The equivalent to a procedure linkage table.
+ Maps method indexes to offsets in the methods array.
+
+ ex_info
+
+ Contains information about methods which is rarely used during normal execution,
+ like exception and debug info.
+
+ ex_info_offsets
+
+ Maps method indexes to offsets in the ex_info array.
+
+ class_info
+
+ Contains precomputed metadata used to speed up various runtime functions.
+
+ class_info_offsets
+
+ Maps class indexes to offsets in the class_info array.
+
+ class_name_table
+
+ A hash table mapping class names to class indexes. Used to speed up
+ mono_class_from_name ().
+
+ plt
+
+ The Program Linkage Table
+
+ plt_info
+
+ Contains information needed to find the method belonging to a given PLT entry.
* Performance considerations
----------------------------
* Future Work
-------------
-- Currently, the runtime needs to setup some data structures and fill out
- GOT entries before a method is first called. This means that even calls to
- a method whose code is in the same AOT image need to go through the GOT,
- instead of using a direct call.
+- Currently, when an AOT module is loaded, all of its dependent assemblies are also
+ loaded eagerly, and these assemblies need to be exactly the same as the ones loaded
+ when the AOT module was created ('hard binding'). Non-hard binding should be allowed.
- On x86, the generated code uses call 0, pop REG, add GOTOFFSET, REG to
materialize the GOT address. Newer versions of gcc use a separate function
to do this, maybe we need to do the same.
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="genmdesc"\r
- ProjectGUID="{B7098DFA-31E6-4006-8A15-1C9A4E925149}"\r
- RootNamespace="genmdesc"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="./VSDependancies/temp/genmdesc/Debug"\r
- IntermediateDirectory="./VSDependancies/temp/genmdesc/Debug"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="winsetup.bat"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TypeLibraryName=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories=".\libgc\include;.\;".\VSDependancies\include\glib-2.0";".\VSDependancies\include\glib-2.0\glib";.\VSDependancies\include;".\VSDependancies\lib\glib-2.0\include";.\mono\;.\mono\jit;"C:\Program Files\Microsoft SDK\include""\r
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- UsePrecompiledHeader="0"\r
- PrecompiledHeaderFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/genmdesc.pch"\r
- AssemblerListingLocation=".\./VSDependancies/temp/genmdesc___Win32_Debug/"\r
- ObjectFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/"\r
- ProgramDataBaseFileName=".\./VSDependancies/temp/genmdesc___Win32_Debug/"\r
- BrowseInformation="1"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- DebugInformationFormat="4"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="_DEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="odbc32.lib odbccp32.lib glib-2.0.lib gmodule-2.0.lib"\r
- OutputFile=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.exe"\r
- LinkIncremental="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\VSDependancies\lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.pdb"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/genmdesc.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- CommandLine="mono\mini\runmdesc.bat"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory=".\Release"\r
- IntermediateDirectory=".\Release"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TypeLibraryName=".\Release/genmdesc.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\libgc\include,.\,.\VSDependancies\include\glib-2.0\glib,.\VSDependancies\include,.\mono\,.\mono\jit"\r
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__"\r
- StringPooling="true"\r
- RuntimeLibrary="0"\r
- EnableFunctionLevelLinking="true"\r
- UsePrecompiledHeader="0"\r
- PrecompiledHeaderFile=".\Release/genmdesc.pch"\r
- AssemblerListingLocation=".\Release/"\r
- ObjectFile=".\Release/"\r
- ProgramDataBaseFileName=".\Release/"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="odbc32.lib odbccp32.lib glib-2.0.lib"\r
- OutputFile=".\Release/genmdesc.exe"\r
- LinkIncremental="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\VSDependancies\lib"\r
- ProgramDatabaseFile=".\Release/genmdesc.pdb"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile=".\Release/genmdesc.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
- >\r
- <File\r
- RelativePath="mono\mini\genmdesc.c"\r
- >\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\helpers.c"\r
- >\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\monobitset.c"\r
- >\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\opcodes.c"\r
- >\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * include/gc.h: Fix _WIN64 typedefs.
+ * libgc.vcproj: Fix Release target and begin Win64 port.
+
2007-02-01 Geoff Norton <gnorton@customerdna.com>
* include/private/gc_pthread_redirects.h:
/* Win64 isn't really supported yet, but this is the first step. And */
/* it might cause error messages to show up in more plausible places. */
/* This needs basetsd.h, which is included by windows.h. */
- typedef ULONG_PTR GC_word;
- typedef LONG_PTR GC_word;
+ typedef unsigned __int64 GC_word;
+ typedef __int64 GC_signed_word;
#endif
/* Public read-only variables */
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="libgc"\r
- ProjectGUID="{EB56000B-C80B-4E8B-908D-D84D31B517D3}"\r
- RootNamespace="libgc"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../VSDependancies/temp/libgc/Debug"\r
- IntermediateDirectory="../VSDependancies/temp/libgc/Debug"\r
- ConfigurationType="4"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories=".\include\"\r
- PreprocessorDefinitions="GC_THREADS;WIN32_THREADS;GC_WIN32_THREADS;GC_INSIDE_DLL;GC_GCJ_SUPPORT;WIN32;_DEBUG;_LIB;_WINDOWS;__WIN32__;__i386__;PLATFORM_WIN32;SILENT;ALL_INTERIOR_POINTERS;__STDC__"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4311;4312;4996;4005"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- OutputFile="..\libgc.lib"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="4"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\allchblk.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\alloc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\blacklst.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\dbg_mlc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\dyn_load.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\finalize.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\gcj_mlc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\headers.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mach_dep.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\malloc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mallocx.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mark.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mark_rts.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\misc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\new_hblk.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\obj_map.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\os_dep.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ptr_chck.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\reclaim.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\stubborn.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\typd_mlc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\win32_threads.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\gc.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\private\gc_hdrs.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\private\gc_locks.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\gc_mark.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\private\gc_pmark.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\private\gc_priv.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\private\gcconfig.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
#if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
if (!GC_is_initialized) {
BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL;
- HMODULE hK32 = GetModuleHandle("kernel32.dll");
+ HMODULE hK32 = GetModuleHandle(_T("kernel32.dll"));
if (hK32)
(FARPROC) pfn = GetProcAddress(hK32,
"InitializeCriticalSectionAndSpinCount");
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="libmono"\r
- ProjectGUID="{CB0D9E92-293C-439C-9AC7-C5F59B6E0771}"\r
- RootNamespace="libmono"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory=".\Release"\r
- IntermediateDirectory=".\Release"\r
- ConfigurationType="4"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalOptions="/D /NODEFAULTLIB:LIBCD" ""\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\libgc\include,.\,.\VSDependancies\include\glib-2.0\glib,.\VSDependancies\include,.\mono\,.\mono\jit"\r
- PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;MONO_EXPORTS;__WIN32__;HAVE_CONFIG_H;__i386__"\r
- StringPooling="true"\r
- RuntimeLibrary="0"\r
- EnableFunctionLevelLinking="true"\r
- UsePrecompiledHeader="0"\r
- PrecompiledHeaderFile=".\Release/libmono.pch"\r
- AssemblerListingLocation=".\Release/"\r
- ObjectFile=".\Release/"\r
- ProgramDataBaseFileName=".\Release/"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- OutputFile=".\Release\libmono.lib"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile=".\Release/libmono.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="./VSDependancies/temp/libmono/Debug"\r
- IntermediateDirectory="./VSDependancies/temp/libmono/Debug"\r
- ConfigurationType="4"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalOptions="/D /NODEFAULTLIB:LIBCD" ""\r
- Optimization="0"\r
- InlineFunctionExpansion="0"\r
- AdditionalIncludeDirectories=".\;.\mono\;.\libgc\include;.\VSDependancies\include\;".\VSDependancies\include\glib-2.0";".\VSDependancies\include\glib-2.0\glib";".\VSDependancies\lib\glib-2.0\include""\r
- PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;__WIN32__;HAVE_CONFIG_H;__i386__;PLATFORM_WIN32;GC_NOT_DLL;GC_GCJ_SUPPORT;GC_WIN32_THREADS"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- UsePrecompiledHeader="0"\r
- PrecompiledHeaderFile=""\r
- AssemblerListingLocation=".\./VSDependancies/temp/libmono/"\r
- ObjectFile=".\./VSDependancies/temp/libmono/"\r
- ProgramDataBaseFileName=".\./VSDependancies/temp/libmono/vc80.pdb"\r
- BrowseInformation="1"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4996;4018;4244"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="_DEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- AdditionalDependencies="libgc.lib"\r
- OutputFile=".\libmono.lib"\r
- AdditionalLibraryDirectories=".;.\VSDependancies\lib"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile=".\./VSDependancies/temp/libmono___Win32_Debug/libmono.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl"\r
- >\r
- <File\r
- RelativePath=".\config.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\io-layer\io-layer.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="utils"\r
- >\r
- <File\r
- RelativePath="mono\utils\mono-codeman.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-codeman.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-compiler.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-counters.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-counters.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-digest.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-dl.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-dl.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-hash.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-hash.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-logger.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-logger.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-math.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-math.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-md5.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-mmap.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-mmap.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-path.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-path.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-poll.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-poll.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-sha1.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-stdlib.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\utils\mono-stdlib.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-uri.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\mono-uri.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\monobitset.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\monobitset.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\strenc.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\strenc.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\utils\strtod.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\utils\strtod.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="metadata"\r
- >\r
- <File\r
- RelativePath="mono\metadata\appdomain.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\appdomain.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\assembly.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\boehm-gc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\char-conversions.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\cil-coff.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\class-internals.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\class.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\console-io.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\console-io.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\culture-info-tables.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\culture-info.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\debug-helpers.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\debug-mono-symfile.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\debug-mono-symfile.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\decimal.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\decimal.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\domain-internals.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\domain.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\environment.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\environment.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\exception.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\exception.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\file-io.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\file-io.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\filewatcher.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\filewatcher.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\gc-internal.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\gc.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\icall.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\image.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\loader.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\locales.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\locales.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\marshal.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\marshal.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mempool.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\metadata-internals.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\metadata.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\monitor.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\monitor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mono-config.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mono-debug-debugger.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mono-debug-debugger.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mono-debug.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mono-debug.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\mono-endian.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\mono-mlist.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\mono-mlist.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\object-internals.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\object.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\opcodes.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\process.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\process.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\profiler-private.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\profiler.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\rand.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\rand.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\rawbuffer.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\reflection.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\security-manager.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\metadata\security-manager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\security.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\security.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\socket-io.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\socket-io.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\string-icalls.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\string-icalls.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\sysmath.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\sysmath.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\tabledefs.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\threadpool.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\threadpool.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\threads-types.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\threads.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\metadata\verify.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="os"\r
- >\r
- <File\r
- RelativePath="mono\os\gc_wrapper.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="mini"\r
- >\r
- <File\r
- RelativePath="mono\mini\abcremoval.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\abcremoval.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\aliasing.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\aot-compiler.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\aot-runtime.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\branch-opts.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\cfold.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\cpu-pentium.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\debug-mini.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\declsec.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\declsec.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\dominators.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\driver.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\exceptions-x86.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\graph.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\helpers.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\inssel.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\inssel.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\jit-icalls.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\jit-icalls.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\linear-scan.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\liveness.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\local-propagation.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-arch.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-codegen.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-exceptions.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-ops.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-trampolines.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-x86.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini-x86.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\mini.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\regalloc.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\regalloc.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\ssa.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\ssapre-cee-ops.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\ssapre-mini-ops.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\ssapre.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\ssapre.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\trace.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="mono\mini\trace.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="mono\mini\tramp-x86.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- UsePrecompiledHeader="0"\r
- BrowseInformation="1"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath=".\mono\mini\wapihandles.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
servletDomain.SetData ("DataDirectory", dataDirectory);
+ if (config.getServletContext ().getRealPath ("/") == null)
+ servletDomain.SetData(".appStartTime", DateTime.UtcNow);
+
// The BaseDir is the full path to the physical dir of the app
// and allows the application to modify files in the case of
// open deployment.
+2007-03-12 Vladimir Krasnov <vladimirk@mainsoft.com>\r
+\r
+ * ServletWorkerRequest.jvm.cs: fixed ctor, adding welcome page to\r
+ aspnetconfig folder\r
+\r
+2007-03-06 Vladimir Krasnov <vladimirk@mainsoft.com>\r
+\r
+ * BaseHttpServlet.cs: added .appStartTime value to app domain\r
+\r
2007-02-20 Vladimir Krasnov <vladimirk@mainsoft.com>\r
\r
* ServletWorkerRequest.jvm.cs: fixed MapPath, made it able to return\r
int paramNameStart = _requestUri.LastIndexOf('/');
_pathInfo = _requestUri.Substring(paramNameStart, _requestUri.Length - paramNameStart);
}
+
+ const int aspnetconfigLength = 12; //"aspnetconfig".Length
+ int endingSlash = _requestUri [_requestUri.Length - 1] == '/' ? 1 : 0;
+ if (_requestUri.Length > aspnetconfigLength &&
+ String.CompareOrdinal ("aspnetconfig", 0, _requestUri,
+ _requestUri.Length - aspnetconfigLength - endingSlash, aspnetconfigLength) == 0) {
+
+ if (endingSlash == 0)
+ _requestUri += "/";
+ _requestUri += "Default.aspx";
+ }
}
public object GetService (Type serviceType)
string contextPath = GetAppPath ();
if (contextPath.Length != appVirtualPathIndex ||
- string.CompareOrdinal (contextPath, 0, virtualPath, 0, appVirtualPathIndex) != 0) {
+ string.Compare (contextPath, 0, virtualPath, 0, appVirtualPathIndex, StringComparison.InvariantCultureIgnoreCase) != 0) {
- ServletContext context = config.getServletContext ().getContext (virtualPath.Remove (appVirtualPathIndex));
+ if (virtualPath.Length > appVirtualPathIndex)
+ virtualPath = virtualPath.Remove (appVirtualPathIndex);
+ ServletContext context = config.getServletContext ().getContext (virtualPath);
string retVal;
if (context == null || ((retVal = context.getRealPath (appVirtualPath)) == null))
throw new HttpException ("MapPath: Mapping across applications not allowed");
+03-01-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * Mainsoft.Web.Profile: added file
+ Mainsoft.Web.Profile/WPUserProfile.cs
+
02-27-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* Mainsoft.Web.Profile: added directory for respective namespace -
<Link>MonoTODOAttribute.cs</Link>\r
</Compile>\r
<Compile Include="Mainsoft.Web.Profile\WPProfileProvider.cs" />\r
+ <Compile Include="Mainsoft.Web.Profile\WPUserProfile.cs" />\r
<Compile Include="Mainsoft.Web.Security\IPumaServicesProvider.cs" />\r
<Compile Include="Mainsoft.Web.Security\PumaServicesProvider.cs" />\r
<Compile Include="Mainsoft.Web.Security\PumaServicesProviderFactory.cs" />\r
<Compile Include="Mainsoft.Web.Security\WPGroupsRoleProvider.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
<Compile Include="Mainsoft.Web.Security\WPMembershipProvider.cs" />\r
+ <Compile Include="Mainsoft.Web.Security\WPAuthenticationModule.cs" />\r
<Compile Include="Mainsoft.Web.Security\WPMembershipUser.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<UserProperties REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\mscorlib.jar" REFS-JarPath-portlet-helpers="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\Portlet.Helpers.jar" REFS-JarPath-system-web="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Web.jar" REFS-JarPath-system-configuration="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Configuration.jar" REFS-JarPath-j2ee-helpers="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\J2EE.Helpers.jar" />\r
</VisualStudio>\r
</ProjectExtensions>\r
-</Project>
\ No newline at end of file
+</Project>\r
+03-06-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPUserProfile.cs: added support for PortalPreferences (defined in
+ portlet.xml and not defined in Web.config)
+ * WPProfileProvider.cs: fixed action/render phases related code.
+
+03-04-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPUserProfile.cs: refactored.
+ * WPProfileProvider.cs: added integration with
+ javax.portal.PortalPreferences API (see Get/SetPropertyValues methods)
+
+03-01-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPUserProfile.cs: added the class which is represents the JSR-168
+ user-info properties.
+
02-27-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* WPProfileProvider.cs: added skeleton implementation of WebSphere
using System.Web.Profile;\r
using System.Configuration;\r
\r
+using java.util;\r
+using javax.portlet;\r
+\r
using Mainsoft.Web.Security;\r
+using vmw.portlet;\r
+\r
+\r
\r
namespace Mainsoft.Web.Profile\r
{\r
public class WPProfileProvider : ProfileProvider\r
{\r
- private static readonly string DESCRIPTION = "WebSphere Portal Profile Provider";\r
- private static readonly string NAME = "WPProfileProvider";\r
+ internal static readonly string DESCRIPTION = "WebSphere Portal Profile Provider";\r
+ internal static readonly string NAME = "WPProfileProvider";\r
+\r
+ private static readonly string BIN_SERIALIZATION_PREFIX = "VMW_BIN_PREFIX:";\r
+ private static readonly string BIN_SERIALIZATION_NULL = "#_NULL_#";\r
\r
private string _applicationName = String.Empty;\r
\r
}\r
}\r
\r
- public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection)\r
+ public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)\r
{\r
- throw new NotImplementedException("The method or operation is not implemented.");\r
+ SettingsPropertyValueCollection settings = new SettingsPropertyValueCollection();\r
+ if (properties.Count == 0)\r
+ return settings;\r
+\r
+ PortletPreferences pp = PortletPreferences;\r
+ if (pp == null)\r
+ {\r
+#if DEBUG\r
+ Console.WriteLine("Cannot obtain PortletPreferences");\r
+#endif\r
+ return settings;\r
+ }\r
+\r
+ foreach (SettingsProperty property in properties)\r
+ {\r
+ if (property.SerializeAs == SettingsSerializeAs.ProviderSpecific)\r
+ if (property.PropertyType.IsPrimitive || property.PropertyType == typeof(string))\r
+ property.SerializeAs = SettingsSerializeAs.String;\r
+ else\r
+ property.SerializeAs = SettingsSerializeAs.Xml;\r
+\r
+ settings.Add(new SettingsPropertyValue(property));\r
+ }\r
+\r
+ for(java.util.Enumeration enumer = pp.getNames(); enumer.hasMoreElements();)\r
+ {\r
+ string name = (string)enumer.nextElement();\r
+\r
+ SettingsPropertyValue property = settings[name];\r
+ \r
+ if (property == null)\r
+ continue;\r
+\r
+ string value = pp.getValue(name, null);\r
+\r
+ if (value == null)\r
+ {\r
+ property.IsDirty = false;\r
+ property.Deserialized = true;\r
+ property.PropertyValue = null;\r
+ }\r
+ else if (value.StartsWith(BIN_SERIALIZATION_PREFIX))\r
+ {\r
+ if (value.StartsWith(BIN_SERIALIZATION_PREFIX + BIN_SERIALIZATION_NULL))\r
+ {\r
+ property.SerializedValue = null;\r
+ }\r
+ else\r
+ {\r
+ string base64 = value.Substring(BIN_SERIALIZATION_PREFIX.Length);\r
+ byte[] serializedData = Convert.FromBase64String(base64);\r
+ property.SerializedValue = serializedData;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ property.SerializedValue = value;\r
+ }\r
+ }\r
+ return settings;\r
+\r
}\r
\r
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection)\r
{\r
- throw new NotImplementedException("The method or operation is not implemented.");\r
+ if (!IsInActionPhase)\r
+ {\r
+#if DEBUG\r
+ Console.WriteLine("The portlet not in the process action phase");\r
+#endif\r
+ return;\r
+ }\r
+ PortletPreferences pp = PortletPreferences;\r
+ if (pp == null)\r
+ {\r
+#if DEBUG\r
+ Console.WriteLine("Cannot obtain PortletPreferences");\r
+#endif\r
+ return;\r
+ }\r
+ \r
+ try\r
+ {\r
+ string username = (string)context["UserName"];\r
+ bool authenticated = (bool)context["IsAuthenticated"];\r
+#if DEBUG\r
+ Console.WriteLine("The username is : " + username + " and he is authenticated: " + authenticated);\r
+#endif\r
+ foreach (SettingsPropertyValue spv in collection)\r
+ {\r
+ if (!authenticated && !(bool)spv.Property.Attributes["AllowAnonymous"])\r
+ continue;\r
+\r
+ if (!spv.IsDirty && spv.UsingDefaultValue)\r
+ continue;\r
+\r
+ \r
+ string storeValue = null;\r
+\r
+ if (spv.Deserialized && spv.PropertyValue == null)\r
+ {\r
+ pp.setValue(spv.Name, null);\r
+ continue;\r
+ }\r
+\r
+ object serialized = spv.SerializedValue;\r
+ if (serialized == null)\r
+ {\r
+ pp.setValue(spv.Name, BIN_SERIALIZATION_PREFIX + BIN_SERIALIZATION_NULL);\r
+ continue;\r
+ }\r
+ \r
+ if (serialized is string)\r
+ {\r
+ storeValue = (string)serialized;\r
+ }\r
+ else\r
+ {\r
+ string encodedValue = Convert.ToBase64String((byte[])serialized);\r
+ storeValue = BIN_SERIALIZATION_PREFIX + encodedValue;\r
+ }\r
+ \r
+ pp.setValue(spv.Name, storeValue);\r
+\r
+ }\r
+ }\r
+ finally\r
+ {\r
+ pp.store();\r
+ }\r
}\r
\r
#region Not Implemented Methods\r
throw new NotImplementedException("The method or operation is not implemented.");\r
}\r
#endregion\r
+\r
+ #region Helper Methods\r
+\r
+ private PortletPreferences PortletPreferences\r
+ {\r
+ get\r
+ {\r
+ PortletRequest pr = PortletUtils.getPortletRequest();\r
+ if (pr == null)\r
+ return null;\r
+ return pr.getPreferences();\r
+ }\r
+ }\r
+\r
+ private bool IsInActionPhase\r
+ {\r
+ get\r
+ {\r
+ PortletRequest pr = PortletUtils.getPortletRequest();\r
+ return pr is ActionRequest;\r
+ }\r
+ }\r
+\r
+ #endregion\r
}\r
}\r
\r
--- /dev/null
+//\r
+// Mainsoft.Web.Profile.WPUserProfile\r
+//\r
+// Authors:\r
+// Ilya Kharmatsky (ilyak@mainsoft.com)\r
+//\r
+// (C) 2007 Mainsoft\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+\r
+#if NET_2_0\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Web.Profile;\r
+using System.Text;\r
+\r
+using java.util;\r
+using javax.portlet;\r
+\r
+using vmw.portlet;\r
+\r
+namespace Mainsoft.Web.Profile\r
+{\r
+ public class WPUserProfile : ProfileBase\r
+ {\r
+ private WPUser _user;\r
+\r
+ \r
+ public WPUserProfile()\r
+ {\r
+ _user = new WPUser();\r
+ }\r
+\r
+ public virtual WPUser user\r
+ {\r
+ get { return _user; }\r
+ }\r
+\r
+ public override object this[string propertyName]\r
+ {\r
+ get\r
+ {\r
+ \r
+ if(Properties[propertyName] != null)\r
+ return base[propertyName];\r
+ return GetFromPortletPreferences(propertyName); \r
+ }\r
+ set\r
+ {\r
+ if (Properties[propertyName] != null)\r
+ base[propertyName] = value;\r
+ else\r
+ SetInPortletPreferences(propertyName, value);\r
+ }\r
+ }\r
+\r
+ private object GetFromPortletPreferences(string propertyName)\r
+ {\r
+\r
+ javax.portlet.PortletPreferences prefs = Preferences;\r
+ if (prefs == null)\r
+ return null;\r
+\r
+ return prefs.getValue(propertyName, "NOT FOUND");\r
+ }\r
+\r
+ private void SetInPortletPreferences(string propName, object val)\r
+ {\r
+ javax.portlet.PortletPreferences prefs = Preferences;\r
+ prefs.setValue(propName, val.ToString());\r
+ prefs.store();\r
+ }\r
+\r
+ private javax.portlet.PortletPreferences Preferences\r
+ {\r
+ get\r
+ {\r
+ javax.portlet.PortletRequest pr = PortletUtils.getPortletRequest();\r
+ if (pr == null || !(pr is javax.portlet.ActionRequest))\r
+ return null;\r
+ return pr.getPreferences();\r
+ }\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// The class is stateless container, needed mainly as a workarround for naming convention problem -\r
+ /// the user attribute properties in JSR 168 defines properties with dot '.' symbol in the name.\r
+ /// The dot symbol is forbidden in names of .Net properties, therefor we are creating sub class - WPUser...\r
+ /// </summary>\r
+ #region user class\r
+ public class WPUser\r
+ {\r
+ UserName _name;\r
+ HomeInfo _homeInfo;\r
+ BusinessInfo _businessInfo;\r
+\r
+ public WPUser ()\r
+ {\r
+ _name = new UserName();\r
+ _homeInfo = new HomeInfo();\r
+ _businessInfo = new BusinessInfo();\r
+ }\r
+\r
+ private static java.util.Map UserInfo\r
+ {\r
+ get\r
+ {\r
+ PortletRequest pr = vmw.portlet.PortletUtils.getPortletRequest();\r
+ if (pr == null)\r
+ return null;\r
+ return (java.util.Map)pr.getAttribute(PortletRequest__Finals.USER_INFO);\r
+ }\r
+ }\r
+\r
+ protected internal static string GetValue(string attribName)\r
+ {\r
+ java.util.Map userInfo = UserInfo;\r
+\r
+ if (userInfo == null)\r
+ return null;\r
+\r
+ return (string)userInfo.get(attribName);\r
+ }\r
+\r
+ public virtual string bdate\r
+ {\r
+ get { return GetValue("user.bdate"); }\r
+ }\r
+\r
+ public virtual string gender\r
+ {\r
+ get { return GetValue("user.gender"); }\r
+ }\r
+\r
+ public virtual string employer\r
+ {\r
+ get { return GetValue("user.employer"); }\r
+ }\r
+\r
+ public virtual string department\r
+ {\r
+ get { return GetValue("user.department"); }\r
+ }\r
+\r
+ public virtual string jobtitle\r
+ {\r
+ get { return GetValue("user.jobtitle"); }\r
+ }\r
+\r
+ public virtual UserName name\r
+ {\r
+ get { return _name; }\r
+ }\r
+\r
+ /// <summary>\r
+ /// In JSR 168 properties the name of property is "home-info", since\r
+ /// .Net doesn't allow usage of '-' character in names of properties, we are replacing\r
+ /// it with '_'\r
+ /// </summary>\r
+ public virtual HomeInfo home_info\r
+ {\r
+ get { return _homeInfo; }\r
+ }\r
+\r
+ /// <summary>\r
+ /// In JSR 168 properties the name of property is "home-info", since\r
+ /// .Net doesn't allow usage of '-' character in names of properties, we are replacing\r
+ /// it with '_'\r
+ /// </summary>\r
+ public virtual BusinessInfo business_info\r
+ {\r
+ get { return _businessInfo; }\r
+ }\r
+\r
+ #region user.home-info class\r
+ public class HomeInfo\r
+ {\r
+ Postal _postal = new Postal("user.home-info.postal.");\r
+ Telecom _telecom = new Telecom("user.home-info.telecom.");\r
+ Online _online = new Online("user.home-info.online.");\r
+\r
+ public virtual Postal postal\r
+ {\r
+ get { return _postal; }\r
+ }\r
+\r
+ public virtual Telecom telecom\r
+ {\r
+ get { return _telecom; }\r
+ }\r
+\r
+ public virtual Online online\r
+ {\r
+ get { return _online; }\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ #region user.business-info class\r
+ public class BusinessInfo\r
+ {\r
+\r
+ Postal _postal = new Postal("user.business-info.postal.");\r
+ Telecom _telecom = new Telecom("user.business-info.telecom.");\r
+ Online _online = new Online("user.business-info.online.");\r
+\r
+ public virtual Postal postal\r
+ {\r
+ get { return _postal; }\r
+ }\r
+\r
+ public virtual Telecom telecom\r
+ {\r
+ get { return _telecom; }\r
+ }\r
+\r
+ public virtual Online online\r
+ {\r
+ get { return _online; }\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ #region user.name class\r
+ public class UserName\r
+ {\r
+ public virtual string prefix\r
+ {\r
+ get { return WPUser.GetValue("user.name.prefix"); }\r
+ }\r
+\r
+ public virtual string given\r
+ {\r
+ get { return WPUser.GetValue("user.name.given"); }\r
+ }\r
+\r
+ public virtual string family\r
+ {\r
+ get { return WPUser.GetValue("user.name.family"); }\r
+ }\r
+\r
+ public virtual string middle\r
+ {\r
+ get { return WPUser.GetValue("user.name.middle"); }\r
+ }\r
+\r
+ public virtual string suffix\r
+ {\r
+ get { return WPUser.GetValue("user.name.suffix"); }\r
+ }\r
+\r
+ public virtual string nickName\r
+ {\r
+ get { return WPUser.GetValue("user.name.nickName"); }\r
+ }\r
+ }\r
+ #endregion\r
+ }\r
+ #endregion\r
+\r
+ #region TelecomInfo class (contains telecom devices specific info)\r
+ public class TelecomInfo\r
+ {\r
+\r
+ private string _intcode;\r
+ private string _loccode;\r
+ private string _number;\r
+ private string _ext;\r
+ private string _comment;\r
+\r
+ public TelecomInfo(string prefix)\r
+ {\r
+ if(prefix == null)\r
+ throw new ArgumentNullException("prefix");\r
+\r
+ _intcode = prefix + "intcode";\r
+ _loccode = prefix + "loccode";\r
+ _number = prefix + "number";\r
+ _ext = prefix + "ext";\r
+ _comment = prefix + "comment";\r
+ }\r
+\r
+ public virtual string intcode\r
+ {\r
+ get { return WPUser.GetValue(_intcode); }\r
+ }\r
+\r
+ public virtual string loccode\r
+ {\r
+ get { return WPUser.GetValue(_loccode); }\r
+ }\r
+\r
+ public virtual string number\r
+ {\r
+ get { return WPUser.GetValue(_number); }\r
+ }\r
+\r
+ public virtual string ext\r
+ {\r
+ get { return WPUser.GetValue(_ext); }\r
+ }\r
+\r
+ public virtual string comment\r
+ {\r
+ get { return WPUser.GetValue(_comment); }\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ #region Postal class (contains ground postal info)\r
+ public class Postal\r
+ {\r
+ \r
+ private string _name;\r
+ private string _street;\r
+ private string _city;\r
+ private string _stateprov;\r
+ private string _postalcode;\r
+ private string _country;\r
+ private string _organization;\r
+\r
+\r
+ public Postal(string prefix)\r
+ {\r
+ if (prefix == null)\r
+ throw new ArgumentNullException("prefix");\r
+\r
+ _name = prefix + "name";\r
+ _street = prefix + "street";\r
+ _city = prefix + "city";\r
+ _stateprov = prefix + "stateprov";\r
+ _postalcode = prefix + "postalcode";\r
+ _country = prefix + "country";\r
+ _organization = prefix + "organization";\r
+ }\r
+\r
+ public virtual string name\r
+ {\r
+ get { return WPUser.GetValue(_name); }\r
+ }\r
+\r
+ public virtual string street\r
+ {\r
+ get { return WPUser.GetValue(_organization); }\r
+ }\r
+\r
+ public virtual string city\r
+ {\r
+ get { return WPUser.GetValue(_city); }\r
+ }\r
+\r
+ public virtual string stateprov\r
+ {\r
+ get { return WPUser.GetValue(_stateprov); }\r
+ }\r
+\r
+ public virtual string postalcode\r
+ {\r
+ get { return WPUser.GetValue(_postalcode); }\r
+ }\r
+\r
+ public virtual string country\r
+ {\r
+ get { return WPUser.GetValue(_country); }\r
+ }\r
+\r
+ public virtual string organization\r
+ {\r
+ get { return WPUser.GetValue(_organization); }\r
+ }\r
+\r
+ }\r
+ #endregion\r
+\r
+ #region Online class (contains on-line info)\r
+ public class Online\r
+ {\r
+ private string namespacePrefix;\r
+\r
+ public Online(string prefix)\r
+ {\r
+ namespacePrefix = prefix;\r
+ }\r
+ public virtual string email\r
+ {\r
+ get { return WPUser.GetValue(namespacePrefix + "email"); }\r
+ }\r
+\r
+ public virtual string uri\r
+ {\r
+ get { return WPUser.GetValue(namespacePrefix + "uri"); }\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ #region Telecom class (contains telecom info - see TelecomInfo)\r
+ public class Telecom\r
+ {\r
+ private string namespacePrefix;\r
+\r
+\r
+\r
+ private TelecomInfo _pager;\r
+ private TelecomInfo _telephone;\r
+ private TelecomInfo _fax;\r
+ private TelecomInfo _mobile;\r
+\r
+ public Telecom(string prefix)\r
+ {\r
+ namespacePrefix = prefix;\r
+ _pager = new TelecomInfo(namespacePrefix + "pager.");\r
+ _telephone = new TelecomInfo(namespacePrefix + "telephone.");\r
+ _fax = new TelecomInfo(namespacePrefix + "fax.");\r
+ _mobile = new TelecomInfo(namespacePrefix + "mobile.");\r
+ }\r
+\r
+ public virtual TelecomInfo pager { get { return _pager; } }\r
+ public virtual TelecomInfo telephone { get { return _telephone; } }\r
+ public virtual TelecomInfo fax { get { return _fax; } }\r
+ public virtual TelecomInfo mobile { get { return _mobile; } }\r
+\r
+ }\r
+ #endregion\r
+}\r
+#endif\r
+03-12-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
+\r
+ * WPAuthenticationModule.cs: added to project. Portal specific\r
+ authentication module (uses PUMA services)\r
+ * IPumaServicesProvider.cs, PumaServicesProvider.cs,\r
+ WPGroupsRoleProvider.cs: added 'CurrentUserName' property and \r
+ internal helpers methods.\r
+\r
+03-01-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
+\r
+ * PumaServicesProvider.cs: fixed PumaController property (proper\r
+ handling process action phace)\r
+\r
02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
\r
* WPGroupsRoleProvider.cs: fixed RoleExists method - in case when\r
configuration properties - use JNDI repository and cache it in\r
portlet/servlet session.\r
\r
+03-12-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
+\r
+ * PumaServicesProvider.cs: fixed TD BUG: 7489 (the application\r
+ should not throw an exeption even if no WPGroupsRoleNamespace is not\r
+ defined in web.xml)\r
+\r
02-25-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
\r
* WPSGroupsRoleProvider.cs: added\r
/// </summary>\r
User CurrentUser { get; }\r
\r
+ /// <summary>\r
+ /// Returns the human readable name of current user.\r
+ /// </summary>\r
+ string CurrentUserName { get;}\r
+\r
\r
/// <summary>\r
/// Adds attribute for given principal (User or Group)\r
\r
private PumaHomeWrapper _pumaHome;\r
\r
+ private java.util.List _nameAttributeList;\r
+\r
#region Initialization \r
\r
internal PumaServicesProvider()\r
throw new ApplicationException("Cannot obtain servlet/portlet request");\r
_pumaHome = GetPumaHomeWrapper(httpReq);\r
}\r
+\r
+ _nameAttributeList = new java.util.ArrayList(1);\r
+ _nameAttributeList.add("uid");\r
}\r
\r
/* Needs HttpServletRequest because ServletRequest doesn't contain getSession method*/\r
get { return _pumaHome.PumaProfile.getCurrentUser(); }\r
}\r
\r
+ public string CurrentUserName\r
+ {\r
+ get\r
+ {\r
+ com.ibm.portal.um.User user = CurrentUser;\r
+ string username = null;\r
+ \r
+ if (user != null)\r
+ {\r
+ java.util.Map m = PumaProfile.getAttributes(user, _nameAttributeList);\r
+ username = (string)m.get("uid");\r
+ }\r
+\r
+ return username;\r
+ }\r
+ }\r
+\r
public void AddAttribute(com.ibm.portal.um.Principal p, string attributeName, string attributeValue)\r
{\r
HashMap map = new HashMap();\r
{\r
get\r
{\r
- if (_isPortletPumaHome) //TODO: FIX ME - Check what is ActionRequest\r
- return _portletPumaHome.getController(null);\r
+ if (_isPortletPumaHome)\r
+ {\r
+ ActionRequest ar = CurrentPortletRequest as ActionRequest;\r
+ if (ar == null)\r
+ throw new ApplicationException("The page is not in process action phase");\r
+ return _portletPumaHome.getController(ar);\r
+ }\r
else\r
+ {\r
return _servletPumaHome.getController(CurrentServletRequest);\r
+ }\r
}\r
}\r
\r
\r
private object ReadValueFromJNDI(string attribName)\r
{\r
- Context env = (Context)new InitialContext().lookup("java:comp/env");\r
- return env.lookup(attribName);\r
+ try\r
+ {\r
+ Context env = (Context)new InitialContext().lookup("java:comp/env");\r
+ return env.lookup(attribName);\r
+ }\r
+ catch (javax.naming.NamingException ne)\r
+ {\r
+#if DEBUG\r
+ Console.WriteLine(ne);\r
+#endif\r
+ return null;\r
+ }\r
}\r
\r
private HttpServletRequest CurrentServletRequest\r
--- /dev/null
+//\r
+// Mainsoft.Web.Security.WPAuthenticationModule\r
+//\r
+// Authors:\r
+// Ilya Kharmatsky (ilyak@mainsoft.com)\r
+//\r
+// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)\r
+//\r
+\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+\r
+using System;\r
+using System.Security.Principal;\r
+using System.Text;\r
+using System.Web;\r
+using System.Web.Configuration;\r
+using System.Web.Util;\r
+using System.Web.Security;\r
+\r
+\r
+using javax.portlet;\r
+\r
+using vmw.portlet;\r
+\r
+namespace Mainsoft.Web.Security\r
+{\r
+ public sealed class WPAuthenticationModule : IHttpModule\r
+ {\r
+ public void Dispose()\r
+ {\r
+ }\r
+\r
+ public void Init(HttpApplication app)\r
+ {\r
+ app.AuthenticateRequest += new EventHandler(OnAuthenticateRequest);\r
+ }\r
+\r
+ void OnAuthenticateRequest(object sender, EventArgs args)\r
+ {\r
+ HttpApplication app = (HttpApplication)sender;\r
+ PortletRequest req = vmw.portlet.PortletUtils.getPortletRequest();\r
+ if (req != null)\r
+ app.Context.User = new WPPrincipal(req);\r
+ }\r
+ }\r
+\r
+ internal class WPPrincipal : IPrincipal\r
+ {\r
+ private IIdentity _identity;\r
+ private string _username;\r
+\r
+ public WPPrincipal(PortletRequest req)\r
+ {\r
+ string authType = req.getAuthType();\r
+ if (authType == null)\r
+ authType = "";\r
+ IPumaServicesProvider provider = PumaServicesProviderFactory.CreateProvider();\r
+ _username = provider.CurrentUserName;\r
+ _identity = new GenericIdentity(_username, authType);\r
+ }\r
+\r
+ public bool IsInRole(string role)\r
+ {\r
+ if (role == null)\r
+ return false;\r
+\r
+ if (_username == null)\r
+ return false;\r
+\r
+ try\r
+ {\r
+ return Roles.IsUserInRole(_username, role);\r
+ }\r
+ catch (Exception e)\r
+ {\r
+#if DEBUG\r
+ Console.WriteLine(e);\r
+#endif\r
+ return false;\r
+ }\r
+\r
+ }\r
+\r
+ public IIdentity Identity { get { return _identity; } }\r
+ }\r
+}\r
+\r
\r
}\r
\r
+ internal protected static string[] GetRolesForUser(com.ibm.portal.um.User user)\r
+ {\r
+ if (user == null)\r
+ return new string[0];\r
+\r
+ try\r
+ {\r
+ IPumaServicesProvider provider = PumaServicesProviderFactory.CreateProvider();\r
+ java.util.List groups = provider.PumaLocator.findGroupsByPrincipal(user, true);\r
+ return GroupsToStringArray(provider, groups);\r
+ }\r
+ catch (Exception e)\r
+ {\r
+#if DEBUG\r
+ Console.WriteLine(e);\r
+#endif\r
+ return new string[0];\r
+ }\r
+ }\r
+\r
public override string[] GetUsersInRole(string roleName)\r
{\r
if(roleName == null || roleName == String.Empty) \r
using System.Configuration;\r
using System.Globalization;\r
using System.Web.Profile;\r
-using System.Web.Configuration;\r
-using System.Configuration.Provider;
+using System.Web.Configuration;
using System.Collections.Specialized;\r
using System.Text;\r
using System.IO;\r
\r
using Mainsoft.Web.Security;\r
+using System.Configuration.Provider;\r
\r
namespace Mainsoft.Web.Profile
{
public class DerbyProfileProvider : ProfileProvider
{\r
ConnectionStringSettings _connectionString;\r
- string _connectionStringName = string.Empty;\r
string _applicationName = string.Empty;
+ bool _schemaChecked = false;\r
+ DerbyUnloadManager.DerbyShutDownPolicy _shutDownPolicy = DerbyUnloadManager.DerbyShutDownPolicy.Default;
public DerbyProfileProvider ()
{
\r
DbConnection CreateConnection ()\r
{\r
- if (_connectionString == null)\r
- throw new ProviderException (String.Format ("The connection name '{0}' was not found in the applications configuration or the connection string is empty.", _connectionStringName));\r
- \r
- DerbyDBSchema.CheckSchema (_connectionString.ConnectionString);\r
+ if (!_schemaChecked) {\r
+ DerbyDBSchema.CheckSchema (_connectionString.ConnectionString);\r
+ _schemaChecked = true;\r
+\r
+ DerbyUnloadManager.RegisterUnloadHandler (_connectionString.ConnectionString, _shutDownPolicy);\r
+ }\r
\r
OleDbConnection connection = new OleDbConnection (_connectionString.ConnectionString);\r
connection.Open ();\r
public override int DeleteProfiles (ProfileInfoCollection profiles)\r
{\r
if (profiles == null)\r
- throw new ArgumentNullException ("prfoles");\r
+ throw new ArgumentNullException ("profiles");\r
if (profiles.Count == 0)\r
- throw new ArgumentException ("prfoles");\r
+ throw new ArgumentException ("profiles");\r
\r
string [] usernames = new string [profiles.Count];\r
\r
_applicationName = GetStringConfigValue (config, "applicationName", "/");\r
\r
ProfileSection profileSection = (ProfileSection) WebConfigurationManager.GetSection ("system.web/profile");\r
- _connectionStringName = config ["connectionStringName"];\r
- \r
- if (_applicationName.Length > 256)\r
- throw new ProviderException ("The ApplicationName attribute must be 256 characters long or less.");\r
- if (_connectionStringName == null || _connectionStringName.Length == 0)\r
- throw new ProviderException ("The ConnectionStringName attribute must be present and non-zero length.");
-\r
- _connectionString = WebConfigurationManager.ConnectionStrings [_connectionStringName];\r
+ string connectionStringName = config ["connectionStringName"];\r
+ _connectionString = WebConfigurationManager.ConnectionStrings [connectionStringName];\r
+ if (_connectionString == null)\r
+ throw new ProviderException (String.Format ("The connection name '{0}' was not found in the applications configuration or the connection string is empty.", connectionStringName));\r
\r
- if (_connectionString != null)\r
- DerbyDBSchema.RegisterUnloadHandler (_connectionString.ConnectionString);\r
+ string shutdown = config ["shutdown"];\r
+ if (!String.IsNullOrEmpty (shutdown))\r
+ _shutDownPolicy = (DerbyUnloadManager.DerbyShutDownPolicy) Enum.Parse (typeof (DerbyUnloadManager.DerbyShutDownPolicy), shutdown, true);\r
}\r
\r
private ProfileInfoCollection BuildProfileInfoCollection (DbDataReader reader, int pageIndex, int pageSize, out int totalRecords)\r
using System.Data.OleDb;
using System.Collections.Generic;
using System.Text;
+using System.Configuration.Provider;
namespace Mainsoft.Web.Security
{
internal class DerbyDBSchema
- {\r
- const string _currentSchemaVersion = "1.0";\r
- static object _lock = "DerbyDBSchema";
+ {
+ const string _currentSchemaVersion = "1.0";
+ static readonly object _lock = new object ();
#region schema string array
static string [] schemaElements = new string [] {
@"CREATE INDEX aspnet_Version_Idx ON aspnet_Version(SchemaVersion)",
@"INSERT INTO aspnet_Version VALUES ('1.0')"
};
- #endregion\r
-\r
- public static void CheckSchema (string connectionString)\r
- {\r
- string schemaVersion = GetSchemaVersion (connectionString);\r
- if (schemaVersion != null)\r
- if (string.CompareOrdinal (schemaVersion, _currentSchemaVersion) == 0)\r
- return;\r
- else\r
- throw new Exception ("Incorrect aspnetdb schema version.");\r
-\r
- lock (_lock) {\r
- if (GetSchemaVersion (connectionString) != _currentSchemaVersion) {\r
- InitializeSchema (connectionString);\r
- }\r
- }\r
- }\r
-\r
- static string GetSchemaVersion (string connectionString)\r
- {\r
- OleDbConnection connection = new OleDbConnection ();\r
- connection.ConnectionString = connectionString;\r
-\r
- try {\r
- connection.Open ();\r
- }\r
- catch (Exception) {\r
- return null;\r
- }\r
-\r
- using (connection) {\r
- OleDbCommand cmd = new OleDbCommand ("SELECT SchemaVersion FROM aspnet_Version", connection);\r
- try {\r
- using (OleDbDataReader reader = cmd.ExecuteReader ()) {\r
- if (reader.Read ())\r
- return reader.GetString (0);\r
- }\r
- }\r
- catch (Exception) { }\r
- return null;\r
- }\r
- }\r
-\r
- static void InitializeSchema (string connectionString)\r
- {\r
- if (connectionString.ToLower ().IndexOf ("create=true") < 0) {\r
- if (!connectionString.Trim ().EndsWith (";"))\r
- connectionString += ";";\r
-\r
- connectionString += "create=true";\r
- }\r
-\r
- OleDbConnection connection = new OleDbConnection ();\r
- connection.ConnectionString = connectionString;\r
-\r
- connection.Open ();\r
-\r
- using (connection) {\r
- for (int i = 0; i < schemaElements.Length; i++) {\r
- OleDbCommand cmd = new OleDbCommand (schemaElements [i], connection);\r
- cmd.ExecuteNonQuery ();\r
- }\r
- }\r
+ #endregion
+
+ public static void CheckSchema (string connectionString) {
+ string schemaVersion = GetSchemaVersion (connectionString);
+ if (schemaVersion != null) {
+ if (string.CompareOrdinal (schemaVersion, _currentSchemaVersion) == 0)
+ return;
+ }
+ else {
+ lock (_lock) {
+ schemaVersion = GetSchemaVersion (connectionString);
+ if (schemaVersion == null) {
+ InitializeSchema (connectionString);
+ return;
+ }
+ }
+ }
+
+ throw new ProviderException (String.Format ("Incorrect aspnetdb schema version: found '{0}', expected '{1}'.", schemaVersion, _currentSchemaVersion));
+ }
+
+ static string GetSchemaVersion (string connectionString)
+ {
+ OleDbConnection connection = new OleDbConnection (connectionString);
+
+ connection.Open ();
+
+ using (connection) {
+ OleDbCommand cmd = new OleDbCommand ("SELECT SchemaVersion FROM aspnet_Version", connection);
+
+ try {
+ using (OleDbDataReader reader = cmd.ExecuteReader ()) {
+ if (reader.Read ())
+ return reader.GetString (0);
+ }
+ }
+ catch { }
+
+ return null;
+ }
}
- public static void RegisterUnloadHandler (string connectionString)
+ static void InitializeSchema (string connectionString)
{
- DerbyUnloadManager derbyMan = new DerbyUnloadManager (connectionString);
- derbyMan.RegisterUnloadHandler ();
+ OleDbConnection connection = new OleDbConnection ();
+ connection.ConnectionString = connectionString;
+
+ connection.Open ();
+
+ using (connection) {
+ for (int i = 0; i < schemaElements.Length; i++) {
+ OleDbCommand cmd = new OleDbCommand (schemaElements [i], connection);
+ cmd.ExecuteNonQuery ();
+ }
+ }
}
}
internal class DerbyUnloadManager
{
- private string _releaseString = null;
-
- public DerbyUnloadManager (string connectionString)
+ public enum DerbyShutDownPolicy
{
- _releaseString = connectionString;
-
- string [] parts = _releaseString.Split (';');
- bool found = false;
-
- for (int i=0; i<parts.Length; i++)
- {
- if (parts[i].ToLower().Trim().StartsWith("create"))
- {
- parts[i] = parts[i].ToLower().Trim().Replace("create", "shutdown");
- found = true;
- break;
- }
- }
- if (found)
- _releaseString = string.Join (";", parts);
- else
- {
- if (!_releaseString.Trim ().EndsWith (";"))
- _releaseString += ";";
-
- _releaseString += "shutdown=true";
- }
+ Default,
+ Never,
+ Database,
+ System
+ }
+
+ readonly string _connectionString;
+ readonly DerbyShutDownPolicy _policy;
+
+ DerbyUnloadManager (string connectionString, DerbyShutDownPolicy policy) {
+ _connectionString = connectionString;
+ _policy = policy;
+ }
+
+ public static void RegisterUnloadHandler (string connectionString, DerbyShutDownPolicy policy) {
+ if (policy == DerbyShutDownPolicy.Never)
+ return;
+
+ if (connectionString.IndexOf("org.apache.derby.jdbc.EmbeddedDriver", StringComparison.Ordinal) < 0)
+ return;
+
+ DerbyUnloadManager derbyMan = new DerbyUnloadManager (connectionString, policy);
+ AppDomain.CurrentDomain.DomainUnload += new EventHandler (derbyMan.UnloadHandler);
}
public void UnloadHandler (object sender, EventArgs e)
{
- OleDbConnection connection = new OleDbConnection (_releaseString);
+ string shutUrl;
- try {
- connection.Open ();
+ switch (_policy) {
+ case DerbyShutDownPolicy.Never:
+ return;
+ case DerbyShutDownPolicy.Database:
+ shutUrl = GetConnectionProperty (_connectionString, "JdbcURL");
+ break;
+ case DerbyShutDownPolicy.System:
+ shutUrl = "JdbcURL=jdbc:derby:";
+ break;
+ default:
+ case DerbyShutDownPolicy.Default:
+ java.lang.ClassLoader contextLoader = (java.lang.ClassLoader) AppDomain.CurrentDomain.GetData (J2EEConsts.CLASS_LOADER);
+ java.lang.Class klass = contextLoader.loadClass ("org.apache.derby.jdbc.EmbeddedDriver");
+ if (klass == null)
+ return;
+
+ shutUrl = (klass.getClassLoader () == contextLoader) ?
+ "JdbcURL=jdbc:derby:" : GetConnectionProperty (_connectionString, "JdbcURL");
+
+ break;
}
- catch (Exception ex) {
-#if TRACE\r
- Console.Write (ex.ToString ());
+
+ const string shuttingConnection = "JdbcDriverClassName=org.apache.derby.jdbc.EmbeddedDriver;{0};shutdown=true";
+
+ if (!String.IsNullOrEmpty (shutUrl)) {
+ try {
+ new OleDbConnection (String.Format (shuttingConnection, shutUrl)).Open ();
+ }
+ catch (Exception ex) {
+#if TRACE
+ Console.Write (ex.ToString ());
#endif
+ }
}
}
- public void RegisterUnloadHandler ()
- {
- AppDomain.CurrentDomain.DomainUnload += new EventHandler (UnloadHandler);
- }
+ static string GetConnectionProperty (string connectionString, string name) {
+ if (String.IsNullOrEmpty (connectionString))
+ return null;
- public void UnregisterUnloadHandler ()
- {
- AppDomain.CurrentDomain.DomainUnload -= new EventHandler (UnloadHandler);
+ string [] parts = connectionString.Split (';');
+ foreach (string part in parts)
+ if (part.StartsWith (name, StringComparison.OrdinalIgnoreCase))
+ return part;
+
+ return null;
}
}
}
string passwordStrengthRegularExpression;
TimeSpan userIsOnlineTimeWindow;
ConnectionStringSettings connectionString;
+ bool schemaChecked = false;
+ DerbyUnloadManager.DerbyShutDownPolicy shutDownPolicy = DerbyUnloadManager.DerbyShutDownPolicy.Default;
string applicationName;
DbConnection CreateConnection ()
{\r
- DerbyDBSchema.CheckSchema (connectionString.ConnectionString);\r
+ if (!schemaChecked) {\r
+ DerbyDBSchema.CheckSchema (connectionString.ConnectionString);\r
+ schemaChecked = true;\r
+\r
+ DerbyUnloadManager.RegisterUnloadHandler (connectionString.ConnectionString, shutDownPolicy);\r
+ }\r
\r
OleDbConnection connection = new OleDbConnection (connectionString.ConnectionString);
connection.Open ();
if (connectionString == null)\r
throw new ProviderException (String.Format ("The connection name '{0}' was not found in the applications configuration or the connection string is empty.", connectionStringName));\r
\r
- DerbyDBSchema.RegisterUnloadHandler (connectionString.ConnectionString);\r
+ if (connectionString == null)\r
+ throw new ProviderException (String.Format ("The connection name '{0}' was not found in the applications configuration or the connection string is empty.", connectionStringName));\r
+\r
+ string shutdown = config ["shutdown"];\r
+ if (!String.IsNullOrEmpty (shutdown))\r
+ shutDownPolicy = (DerbyUnloadManager.DerbyShutDownPolicy) Enum.Parse (typeof (DerbyUnloadManager.DerbyShutDownPolicy), shutdown, true);\r
}
public override string ResetPassword (string username, string answer)
{\r
ConnectionStringSettings connectionString;\r
string applicationName;\r
+ bool schemaChecked = false;\r
+ DerbyUnloadManager.DerbyShutDownPolicy shutDownPolicy = DerbyUnloadManager.DerbyShutDownPolicy.Default;\r
\r
DbConnection CreateConnection ()\r
{\r
- DerbyDBSchema.CheckSchema (connectionString.ConnectionString);\r
+ if (!schemaChecked) {\r
+ DerbyDBSchema.CheckSchema (connectionString.ConnectionString);\r
+ schemaChecked = true;\r
+\r
+ DerbyUnloadManager.RegisterUnloadHandler (connectionString.ConnectionString, shutDownPolicy);\r
+ }\r
\r
OleDbConnection connection = new OleDbConnection (connectionString.ConnectionString);\r
connection.Open ();\r
if (connectionString == null)\r
throw new ProviderException (String.Format("The connection name '{0}' was not found in the applications configuration or the connection string is empty.", connectionStringName));\r
\r
- DerbyDBSchema.RegisterUnloadHandler (connectionString.ConnectionString);\r
+ string shutdown = config ["shutdown"];\r
+ if (!String.IsNullOrEmpty (shutdown))\r
+ shutDownPolicy = (DerbyUnloadManager.DerbyShutDownPolicy) Enum.Parse (typeof (DerbyUnloadManager.DerbyShutDownPolicy), shutdown, true);\r
}\r
\r
public override bool IsUserInRole (string username, string rolename)\r
if (realFs == null || realFs == J2EEConsts.ACCESS_FULL) {\r
try {\r
string realPath = config.getServletContext ().getRealPath (appVirtualPath);\r
- if (realPath != null)\r
+ if (!String.IsNullOrEmpty (realPath)) {\r
+ if (!String.IsNullOrEmpty (appVirtualPath) &&\r
+ appVirtualPath [appVirtualPath.Length - 1] == '/')\r
+ if (realPath [realPath.Length - 1] != Path.DirectorySeparatorChar)\r
+ realPath += Path.DirectorySeparatorChar;\r
+\r
return realPath;\r
+ }\r
}\r
catch (Exception e) {\r
#if TRACE\r
+2007-03-13 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * System.Windows.Forms_test.dll.sources: Added ErrorProviderTest.cs.
+
+2007-03-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * Makefile: Added 32x32 icon.
+
+2007-03-09 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * System.Windows.Forms_test.dll.sources: Added FormHandleTest and
+ MdiFormHandleTest.
+
+2007-03-08 Chris Toshok <toshok@ximian.com>
+
+ * System.Windows.Forms/DataGrid.cs: some field renaming to make things consistent.
+
+ * System.Windows.Forms/ThemeWin32Classic.cs: same.
+
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * Makefile: Don't show obsolete warnings when compiling tests.
+
+2007-03-02 Jonathan Pobst <monkey@jpobst.com>
+
+ * System.Windows.Forms.dll.sources: Add ThemeElements.cs,
+ ThemeElementsDefault.cs.
+
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * System.Windows.Forms.dll.sources: Added FormWindowManager.cs and
+ ToolWindowManager.cs
+ * Test/System.Windows.Forms/FormTest.cs: Added
+ MaximizedParentedFormTest.
+
2007-02-27 Jonathan Pobst <monkey@jpobst.com>
* System.Windows.Forms.dll.sources: Add RelatedImageListAttribute.cs.
* resources/, System.Windows.Forms.dll.resources, Makefile:
Add user-home Tango icon in various sizes.
-2006-09-05 Kornél Pál <kornelpal@hotmail.com>
+2006-09-05 KornÃ\83©l PÃ\83¡l <kornelpal@hotmail.com>
* Makefile: Removed CODEPAGE as now UTF-8 is the default.
* System.Windows.Forms_test.dll.sources: Added System.Resources/CultureTest.cs
-2005-11-12 Pedro MartÃÂnez Juliá <pedromj@gmail.com>
+2005-11-12 Pedro MartÃ\83ÂÂnez JuliÃ\83¡ <pedromj@gmail.com>
* System.Windows.Forms_test.dll.sources: Added DataGridViewElementTest.cs
DataGridViewBandTest.cs DataGridViewCellTest.cs
* System.Windows.Forms_test.dll.sources : Added Common.cs
-2005-09-27 Kornél Pál <kornelpal@hotmail.com>
+2005-09-27 KornÃ\83©l PÃ\83¡l <kornelpal@hotmail.com>
* Makefile: Replaced /codepage with CODEPAGE.
TEST_DISTFILES = \
M.gif \
Test/resources/a.cur \
+ Test/resources/32x32.ico \
Test/System.Resources/compat_1_1.resx \
Test/System.Resources/compat_2_0.resx \
Test/System.Windows.Forms/bitmaps/a.png
$(TEST_DISTFILES)
TEST_MCS_FLAGS = /r:System.Data.dll /r:System.Drawing.dll \
- -resource:Test/resources/a.cur,a.cur
+ -resource:Test/resources/a.cur,a.cur \
+ -resource:Test/resources/32x32.ico,32x32.ico \
+ -nowarn:618,612
SWF.csproj: System.Windows.Forms.dll.sources System.Windows.Forms.dll.resources build-csproj
./build-csproj
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "System.Windows.Forms\DrawTreeNodeEventHandler.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "System.Windows.Forms\ErrorBlinkStyle.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "System.Windows.Forms\FormWindowManager.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "System.Windows.Forms\FormWindowState.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "System.Windows.Forms\RelatedImageListAttribute.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "System.Windows.Forms\RelatedPropertyManager.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "System.Windows.Forms\ToolWindowManager.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "System.Windows.Forms\TrackBar.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "System.Windows.Forms\TreeViewHitTestInfo.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "System.Windows.Forms\TreeViewHitTestLocations.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "System.Windows.Forms.Theming\ThemeElements.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "System.Windows.Forms.Theming\ThemeElementsDefault.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "System.Windows.Forms.VisualStyles\BackgroundType.cs"
SubType = "Code"
<Compile Include="System.Windows.Forms\DrawItemState.cs" />
<Compile Include="System.Windows.Forms\DrawMode.cs" />
<Compile Include="System.Windows.Forms\DrawTreeNodeEventArgs.cs" />
+ <Compile Include="System.Windows.Forms\DrawTreeNodeEventHandler.cs" />
<Compile Include="System.Windows.Forms\ErrorBlinkStyle.cs" />
<Compile Include="System.Windows.Forms\ErrorIconAlignment.cs" />
<Compile Include="System.Windows.Forms\ErrorProvider.cs" />
<Compile Include="System.Windows.Forms\FormClosingEventHandler.cs" />
<Compile Include="System.Windows.Forms\FormCollection.cs" />
<Compile Include="System.Windows.Forms\FormStartPosition.cs" />
+ <Compile Include="System.Windows.Forms\FormWindowManager.cs" />
<Compile Include="System.Windows.Forms\FormWindowState.cs" />
<Compile Include="System.Windows.Forms\FrameStyle.cs" />
<Compile Include="System.Windows.Forms\GetChildAtPointSkip.cs" />
<Compile Include="System.Windows.Forms\RadioButton.cs" />
<Compile Include="System.Windows.Forms\RadioButtonRenderer.cs" />
<Compile Include="System.Windows.Forms\RelatedCurrencyManager.cs" />
+ <Compile Include="System.Windows.Forms\RelatedImageListAttribute.cs" />
<Compile Include="System.Windows.Forms\RelatedPropertyManager.cs" />
<Compile Include="System.Windows.Forms\RetrieveVirtualItemEventArgs.cs" />
<Compile Include="System.Windows.Forms\RetrieveVirtualItemEventHandler.cs" />
<Compile Include="System.Windows.Forms\ToolStripTextDirection.cs" />
<Compile Include="System.Windows.Forms\ToolTip.cs" />
<Compile Include="System.Windows.Forms\ToolTipIcon.cs" />
+ <Compile Include="System.Windows.Forms\ToolWindowManager.cs" />
<Compile Include="System.Windows.Forms\TrackBar.cs" />
<Compile Include="System.Windows.Forms\TrackBarRenderer.cs" />
<Compile Include="System.Windows.Forms\TreeNode.cs" />
<Compile Include="System.Windows.Forms\TreeViewDrawMode.cs" />
<Compile Include="System.Windows.Forms\TreeViewEventArgs.cs" />
<Compile Include="System.Windows.Forms\TreeViewEventHandler.cs" />
+ <Compile Include="System.Windows.Forms\TreeViewHitTestInfo.cs" />
<Compile Include="System.Windows.Forms\TreeViewHitTestLocations.cs" />
<Compile Include="System.Windows.Forms\TreeViewImageIndexConverter.cs" />
<Compile Include="System.Windows.Forms\TypeValidationEventArgs.cs" />
<Compile Include="System.Windows.Forms.Layout\FlowLayout.cs" />
<Compile Include="System.Windows.Forms.Layout\TableLayout.cs" />
<Compile Include="System.Windows.Forms.Layout\TableLayoutSettingsTypeConverter.cs" />
+ <Compile Include="System.Windows.Forms.Theming\ThemeElements.cs" />
+ <Compile Include="System.Windows.Forms.Theming\ThemeElementsDefault.cs" />
<Compile Include="System.Windows.Forms.VisualStyles\BackgroundType.cs" />
<Compile Include="System.Windows.Forms.VisualStyles\BooleanProperty.cs" />
<Compile Include="System.Windows.Forms.VisualStyles\BorderType.cs" />
+2007-03-12 Frederik Carlier <frederik.carlier@ugent.be>
+
+ * ResXFileRef.cs: Add support for byte[] types.
+
+ Fixes 81122
+
+2007-03-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ResXFileRef.cs: On 2.0 profile, special case files with .ico
+ extension to retain their actual dimension.
+
2007-02-10 Gert Driesen <drieseng@users.sourceforge.net>
* ResXResourceReader.cs: Add additional checks for validity of reader
using System;
using System.ComponentModel;
+#if NET_2_0
+using System.Drawing;
+#endif
using System.IO;
using System.Reflection;
using System.Text;
file.Read(buffer, 0, (int) file.Length);
}
+ if (type == typeof(System.Byte[]))
+ return buffer;
+
+#if NET_2_0
+ if (type == typeof (Bitmap) && Path.GetExtension (parts [0]) == ".ico") {
+ MemoryStream ms = new MemoryStream (buffer);
+ return new Icon (ms).ToBitmap ();
+ }
+#endif
+
return Activator.CreateInstance(type, BindingFlags.CreateInstance
| BindingFlags.Public | BindingFlags.Instance, null,
new object[] { new MemoryStream (buffer) }, culture);
+2007-02-28 Jonathan Pobst <monkey@jpobst.com>
+
+ * DefaultLayout.cs: Use ClientRectangle instead of DisplayRectangle
+ to layout children because DisplayRectangle can be overridden.
+ [Fixes bug #80917]
+
2007-02-14 Jonathan Pobst <monkey@jpobst.com>
* FlowLayout.cs: Add support for laying out ToolStrips, which
{
void LayoutDockedChildren (Control parent, Control[] controls)
{
- Rectangle space = parent.DisplayRectangle;
+ Rectangle space = parent.ClientRectangle;
MdiClient mdi = null;
// Deal with docking; go through in reverse, MS docs say that lowest Z-order is closest to edge
void LayoutAnchoredChildren (Control parent, Control[] controls)
{
- Rectangle space = parent.DisplayRectangle;
+ Rectangle space = parent.ClientRectangle;
for (int i = 0; i < controls.Length; i++) {
int left;
--- /dev/null
+2007-03-02 Jonathan Pobst <monkey@jpobst.com>\r
+\r
+ * ThemeElements.cs: Driver code to theme class that actually draws \r
+ theme elements.\r
+ * ThemeElementsDefault.cs: Default [win32 style] implementation of \r
+ Standard, Flat, Popup buttons.
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Drawing;\r
+\r
+namespace System.Windows.Forms.Theming\r
+{\r
+ internal class ThemeElements\r
+ {\r
+ private static ThemeElementsDefault theme;\r
+\r
+ static ThemeElements ()\r
+ {\r
+ string theme_var;\r
+\r
+ theme_var = Environment.GetEnvironmentVariable ("MONO_THEME");\r
+\r
+ if (theme_var == null)\r
+ theme_var = "win32";\r
+ else\r
+ theme_var = theme_var.ToLower ();\r
+\r
+ theme = new ThemeElementsDefault ();\r
+ }\r
+\r
+ #region Buttons\r
+ public static void DrawButton (Graphics g, Rectangle bounds, ButtonThemeState state, Color backColor, Color foreColor)\r
+ {\r
+ theme.DrawButton (g, bounds, state, backColor, foreColor);\r
+ }\r
+\r
+ public static void DrawFlatButton (Graphics g, Rectangle bounds, ButtonThemeState state, Color backColor, Color foreColor, FlatButtonAppearance appearance)\r
+ {\r
+ theme.DrawFlatButton (g, bounds, state, backColor, foreColor, appearance);\r
+ }\r
+\r
+ public static void DrawPopupButton (Graphics g, Rectangle bounds, ButtonThemeState state, Color backColor, Color foreColor)\r
+ {\r
+ theme.DrawPopupButton (g, bounds, state, backColor, foreColor);\r
+ }\r
+ #endregion\r
+ }\r
+\r
+ #region Internal Enums\r
+ [Flags]\r
+ internal enum ButtonThemeState\r
+ {\r
+ Normal = 1,\r
+ Entered = 2,\r
+ Pressed = 4,\r
+ Disabled = 8,\r
+ Default = 16\r
+ }\r
+ #endregion\r
+}\r
--- /dev/null
+using System;\r
+using System.Drawing;\r
+\r
+namespace System.Windows.Forms.Theming\r
+{\r
+ internal class ThemeElementsDefault\r
+ {\r
+ public ThemeElementsDefault ()\r
+ {\r
+ }\r
+\r
+ protected SystemResPool ResPool { get { return ThemeEngine.Current.ResPool; } }\r
+ \r
+ #region Buttons\r
+ #region Standard Button\r
+ public virtual void DrawButton (Graphics g, Rectangle bounds, ButtonThemeState state, Color backColor, Color foreColor)\r
+ {\r
+ bool is_themecolor = backColor.ToArgb () == ThemeEngine.Current.ColorControl.ToArgb () || backColor == Color.Empty ? true : false;\r
+ CPColor cpcolor = is_themecolor ? CPColor.Empty : ResPool.GetCPColor (backColor);\r
+ Pen pen;\r
+ \r
+ switch (state) {\r
+ case ButtonThemeState.Normal:\r
+ case ButtonThemeState.Entered:\r
+ case ButtonThemeState.Disabled:\r
+ pen = is_themecolor ? SystemPens.ControlLightLight : ResPool.GetPen (cpcolor.LightLight);\r
+ g.DrawLine (pen, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 2);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Y, bounds.Right - 2, bounds.Y);\r
+\r
+ pen = is_themecolor ? SystemPens.Control : ResPool.GetPen (backColor);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Y + 1, bounds.X + 1, bounds.Bottom - 3);\r
+ g.DrawLine (pen, bounds.X + 2, bounds.Y + 1, bounds.Right - 3, bounds.Y + 1);\r
+\r
+ pen = is_themecolor ? SystemPens.ControlDark : ResPool.GetPen (cpcolor.Dark);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Bottom - 2, bounds.Right - 2, bounds.Bottom - 2);\r
+ g.DrawLine (pen, bounds.Right - 2, bounds.Y + 1, bounds.Right - 2, bounds.Bottom - 3);\r
+\r
+ pen = is_themecolor ? SystemPens.ControlDarkDark : ResPool.GetPen (cpcolor.DarkDark);\r
+ g.DrawLine (pen, bounds.X, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1);\r
+ g.DrawLine (pen, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 2);\r
+ break;\r
+ case ButtonThemeState.Pressed:\r
+ g.DrawRectangle (ResPool.GetPen (foreColor), bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);\r
+\r
+ bounds.Inflate (-1, -1);\r
+ pen = is_themecolor ? SystemPens.ControlDark : ResPool.GetPen (cpcolor.Dark);\r
+ g.DrawRectangle (pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);\r
+ break;\r
+ case ButtonThemeState.Default:\r
+ g.DrawRectangle (ResPool.GetPen (foreColor), bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);\r
+\r
+ bounds.Inflate (-1, -1);\r
+ pen = is_themecolor ? SystemPens.ControlLightLight : ResPool.GetPen (cpcolor.LightLight);\r
+ g.DrawLine (pen, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 2);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Y, bounds.Right - 2, bounds.Y);\r
+\r
+ pen = is_themecolor ? SystemPens.Control : ResPool.GetPen (backColor);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Y + 1, bounds.X + 1, bounds.Bottom - 3);\r
+ g.DrawLine (pen, bounds.X + 2, bounds.Y + 1, bounds.Right - 3, bounds.Y + 1);\r
+\r
+ pen = is_themecolor ? SystemPens.ControlDark : ResPool.GetPen (cpcolor.Dark);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Bottom - 2, bounds.Right - 2, bounds.Bottom - 2);\r
+ g.DrawLine (pen, bounds.Right - 2, bounds.Y + 1, bounds.Right - 2, bounds.Bottom - 3);\r
+\r
+ pen = is_themecolor ? SystemPens.ControlDarkDark : ResPool.GetPen (cpcolor.DarkDark);\r
+ g.DrawLine (pen, bounds.X, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1);\r
+ g.DrawLine (pen, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 2);\r
+ break;\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ #region FlatStyle Button\r
+ public virtual void DrawFlatButton (Graphics g, Rectangle bounds, ButtonThemeState state, Color backColor, Color foreColor, FlatButtonAppearance appearance)\r
+ {\r
+ bool is_themecolor = backColor.ToArgb () == ThemeEngine.Current.ColorControl.ToArgb () || backColor == Color.Empty ? true : false;\r
+ CPColor cpcolor = is_themecolor ? CPColor.Empty : ResPool.GetCPColor (backColor);\r
+ Pen pen;\r
+ \r
+ switch (state) {\r
+ case ButtonThemeState.Normal:\r
+ case ButtonThemeState.Disabled:\r
+ // This will just use the BackColor\r
+ break;\r
+ case ButtonThemeState.Entered:\r
+ if (appearance.MouseOverBackColor != Color.Empty)\r
+ g.FillRectangle (ResPool.GetSolidBrush (appearance.MouseOverBackColor), bounds);\r
+ break;\r
+ case ButtonThemeState.Pressed:\r
+ if (appearance.MouseDownBackColor != Color.Empty)\r
+ g.FillRectangle (ResPool.GetSolidBrush (appearance.MouseDownBackColor), bounds);\r
+ break;\r
+ case ButtonThemeState.Default:\r
+ if (appearance.CheckedBackColor != Color.Empty)\r
+ g.FillRectangle (ResPool.GetSolidBrush (appearance.CheckedBackColor), bounds);\r
+ break;\r
+ }\r
+ \r
+ if (appearance.BorderColor == Color.Empty)\r
+ pen = is_themecolor ? SystemPens.ControlDarkDark : ResPool.GetSizedPen (cpcolor.DarkDark, appearance.BorderSize);\r
+ else\r
+ pen = ResPool.GetSizedPen (appearance.BorderColor, appearance.BorderSize);\r
+ \r
+ bounds.Width -= 1;\r
+ bounds.Height -= 1;\r
+ g.DrawRectangle (pen, bounds);\r
+\r
+ if (state == ButtonThemeState.Default || state == ButtonThemeState.Pressed) {\r
+ bounds.Inflate (-1, -1);\r
+ g.DrawRectangle (pen, bounds);\r
+ }\r
+ }\r
+ #endregion\r
+\r
+ #region Popup Button\r
+ public virtual void DrawPopupButton (Graphics g, Rectangle bounds, ButtonThemeState state, Color backColor, Color foreColor)\r
+ {\r
+ bool is_themecolor = backColor.ToArgb () == ThemeEngine.Current.ColorControl.ToArgb () || backColor == Color.Empty ? true : false;\r
+ CPColor cpcolor = is_themecolor ? CPColor.Empty : ResPool.GetCPColor (backColor);\r
+ Pen pen;\r
+\r
+ switch (state) {\r
+ case ButtonThemeState.Normal:\r
+ case ButtonThemeState.Disabled:\r
+ case ButtonThemeState.Pressed:\r
+ case ButtonThemeState.Default:\r
+ pen = is_themecolor ? SystemPens.ControlDarkDark : ResPool.GetPen (cpcolor.DarkDark);\r
+\r
+ bounds.Width -= 1;\r
+ bounds.Height -= 1;\r
+ g.DrawRectangle (pen, bounds);\r
+\r
+ if (state == ButtonThemeState.Default || state == ButtonThemeState.Pressed) {\r
+ bounds.Inflate (-1, -1);\r
+ g.DrawRectangle (pen, bounds);\r
+ }\r
+ break;\r
+ case ButtonThemeState.Entered:\r
+ pen = is_themecolor ? SystemPens.ControlLightLight : ResPool.GetPen (cpcolor.LightLight);\r
+ g.DrawLine (pen, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 2);\r
+ g.DrawLine (pen, bounds.X + 1, bounds.Y, bounds.Right - 2, bounds.Y);\r
+\r
+ pen = is_themecolor ? SystemPens.ControlDark : ResPool.GetPen (cpcolor.Dark);\r
+ g.DrawLine (pen, bounds.X, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1);\r
+ g.DrawLine (pen, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 2);\r
+ break;\r
+ }\r
+ }\r
+ #endregion\r
+ #endregion\r
+ }\r
+}\r
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * X11Hwnd.cs: Update to use ToolWindowManager.
+
2007-02-08 Chris Toshok <toshok@ximian.com>
* X11Display.cs: port over some more changes from XplatUIX11.cs.
Form form = Control.FromHandle (Handle) as Form;
if (form != null && form.window_manager == null && (border_style == FormBorderStyle.FixedToolWindow ||
border_style == FormBorderStyle.SizableToolWindow)) {
- form.window_manager = new InternalWindowManager (form);
+ form.window_manager = new ToolWindowManager (form);
}
BorderStyle = border_style;
System.Windows.Forms/DrawItemState.cs
System.Windows.Forms/DrawMode.cs
System.Windows.Forms/DrawTreeNodeEventArgs.cs
+System.Windows.Forms/DrawTreeNodeEventHandler.cs
System.Windows.Forms/ErrorBlinkStyle.cs
System.Windows.Forms/ErrorIconAlignment.cs
System.Windows.Forms/ErrorProvider.cs
System.Windows.Forms/FormClosingEventHandler.cs
System.Windows.Forms/FormCollection.cs
System.Windows.Forms/FormStartPosition.cs
+System.Windows.Forms/FormWindowManager.cs
System.Windows.Forms/FormWindowState.cs
System.Windows.Forms/FrameStyle.cs
System.Windows.Forms/GetChildAtPointSkip.cs
System.Windows.Forms/ToolStripTextDirection.cs
System.Windows.Forms/ToolTip.cs
System.Windows.Forms/ToolTipIcon.cs
+System.Windows.Forms/ToolWindowManager.cs
System.Windows.Forms/TrackBar.cs
System.Windows.Forms/TrackBarRenderer.cs
System.Windows.Forms/TreeNode.cs
System.Windows.Forms/TreeViewDrawMode.cs
System.Windows.Forms/TreeViewEventArgs.cs
System.Windows.Forms/TreeViewEventHandler.cs
+System.Windows.Forms/TreeViewHitTestInfo.cs
System.Windows.Forms/TreeViewHitTestLocations.cs
System.Windows.Forms/TreeViewImageIndexConverter.cs
System.Windows.Forms/TypeValidationEventArgs.cs
System.Windows.Forms.Layout/FlowLayout.cs
System.Windows.Forms.Layout/TableLayout.cs
System.Windows.Forms.Layout/TableLayoutSettingsTypeConverter.cs
+System.Windows.Forms.Theming/ThemeElements.cs
+System.Windows.Forms.Theming/ThemeElementsDefault.cs
System.Windows.Forms.VisualStyles/BackgroundType.cs
System.Windows.Forms.VisualStyles/BooleanProperty.cs
System.Windows.Forms.VisualStyles/BorderType.cs
#region Private Variables
internal string name;
internal string value;
- private Control owner;
+ internal Control owner;
internal AccessibleRole role;
internal AccessibleStates state;
internal string default_action;
public static int LoopCount {
get {
- IEnumerator e;
- int loops;
- MWFThread thread;
-
- e = threads.Values.GetEnumerator();
- loops = 0;
+ lock (threads) {
+ int loops = 0;
- while (e.MoveNext()) {
- thread = (MWFThread)e.Current;
- if (thread != null && thread.messageloop_started) {
- loops++;
+ foreach (MWFThread thread in threads.Values) {
+ if (thread.messageloop_started)
+ loops++;
}
- }
- return loops;
+ return loops;
+ }
}
}
Application.ApplicationExit(null, EventArgs.Empty);
}
}
- lock (threads) {
- threads[thread_id] = null;
- }
+
+ ((MWFThread)threads[thread_id]).MessageLoop = false;
}
#endregion // Methods
}
}
#region Private Methods
- private static void CloseForms(Thread thread) {
- Form f;
- IEnumerator control;
- bool all;
-
+ internal static void CloseForms(Thread thread) {
#if DebugRunLoop
Console.WriteLine(" CloseForms({0}) called", thread);
#endif
- if (thread == null) {
- all = true;
- } else {
- all = false;
- }
+
+ ArrayList forms_to_close = new ArrayList ();
lock (forms) {
- control = forms.GetEnumerator();
-
- while (control.MoveNext()) {
- f = (Form)control.Current;
-
- if (all || (thread == f.creator_thread)) {
- if (f.IsHandleCreated) {
- XplatUI.PostMessage(f.Handle, Msg.WM_CLOSE_INTERNAL, IntPtr.Zero, IntPtr.Zero);
- }
- #if DebugRunLoop
- Console.WriteLine(" Closing form {0}", f);
- #endif
- }
+ foreach (Form f in forms) {
+ if (thread == null || thread == f.creator_thread)
+ forms_to_close.Add (f);
+ }
+
+ foreach (Form f in forms_to_close) {
+ #if DebugRunLoop
+ Console.WriteLine(" Closing form {0}", f);
+ #endif
+ f.Dispose ();
}
}
}
#endif
public static void Exit() {
+ XplatUI.PostQuitMessage(0);
CloseForms(null);
-
- // FIXME - this needs to be fired when they're all closed
- // But CloseForms uses PostMessage, so it gets fired before
- // We need to wait on something...
- if (ApplicationExit != null) {
- ApplicationExit(null, EventArgs.Empty);
- }
}
public static void ExitThread() {
CloseForms(Thread.CurrentThread);
- MWFThread.Current.Exit();
+ // this might not be right - need to investigate (somehow) if a WM_QUIT message is generated here
+ XplatUI.PostQuitMessage(0);
}
public static ApartmentState OleRequired() {
Object queue_id;
MWFThread thread;
-
thread = MWFThread.Current;
msg = new MSG();
context.MainForm.context = context;
context.MainForm.closing = false;
context.MainForm.Visible = true; // Cannot use Show() or scaling gets confused by menus
- // FIXME - do we need this?
- //context.MainForm.PerformLayout();
- context.MainForm.Activate();
+ // XXX the above line can be used to close the form. another problem with our handling of Show/Activate.
+ if (context.MainForm != null)
+ context.MainForm.Activate();
}
#if DebugRunLoop
queue_id = XplatUI.StartLoop(Thread.CurrentThread);
thread.MessageLoop = true;
- while (XplatUI.GetMessage(queue_id, ref msg, IntPtr.Zero, 0, 0)) {
+ bool quit = false;
+
+ while (!quit && XplatUI.GetMessage(queue_id, ref msg, IntPtr.Zero, 0, 0)) {
lock (message_filters) {
if (message_filters.Count > 0) {
Message m;
goto default;
}
break;
+ case Msg.WM_QUIT:
+ quit = true; // make sure we exit
+ break;
default:
XplatUI.TranslateMessage(ref msg);
XplatUI.DispatchMessage(ref msg);
#if NET_2_0
object tag;
#endif
+ bool thread_exit_raised;
+
#endregion // Local Variables
#region Public Constructors & Destructors
}
protected virtual void ExitThreadCore() {
- if (ThreadExit!=null) {
+ XplatUI.PostQuitMessage(0);
+ if (!thread_exit_raised && ThreadExit != null) {
+ thread_exit_raised = true;
ThreadExit(this, EventArgs.Empty);
}
}
using System.ComponentModel;
using System.Collections;
+using System.Collections.Generic;
using System.Reflection;
namespace System.Windows.Forms {
bool allow_new_set;
bool allow_new;
+ bool suspended;
+
+ int position = -1;
public BindingSource (IContainer container) : this ()
{
IList GetListFromEnumerable (IEnumerable enumerable)
{
- IList l;
+ IList l = null;
IEnumerator e = enumerable.GetEnumerator();
- e.MoveNext ();
-
- object o = e.Current;
- if (o == null)
- l = new BindingList<object>();
+ if (enumerable is string) {
+ /* special case this.. seems to be the only one .net special cases? */
+ l = new BindingList<char> ();
+ }
else {
- Type t = typeof (BindingList<>).MakeGenericType (new Type[] { o.GetType() });
- l = (IList)Activator.CreateInstance (t);
+ /* try to figure out the type based on
+ * the first element, if there is
+ * one */
+ object first = null;
+ if (e.MoveNext ()) {
+ first = e.Current;
+ }
+
+ if (first == null) {
+ return null;
+ }
+ else {
+ Type t = typeof (BindingList<>).MakeGenericType (new Type[] { first.GetType() });
+ l = (IList)Activator.CreateInstance (t);
+ }
+ }
+
+ e.Reset ();
+ while (e.MoveNext ()) {
+ l.Add (e.Current);
}
return l;
l = (IList)datasource;
}
else if (datasource is IEnumerable) {
- l = GetListFromEnumerable ((IEnumerable)datasource);
+ IList new_list = GetListFromEnumerable ((IEnumerable)datasource);
+ l = new_list == null ? list : new_list;
}
else {
Type t = typeof (BindingList<>).MakeGenericType (new Type[] { datasource.GetType() });
l = (IList)Activator.CreateInstance (t);
}
+ // XXX
+ list = l;
+
if (datamember != "") {
-
}
}
[Browsable (false)]
public virtual bool AllowRemove {
- get { throw new NotImplementedException (); }
+ get {
+ if (list == null)
+ return false;
+ throw new NotImplementedException (); }
}
[Browsable (false)]
public virtual int Count {
- get { throw new NotImplementedException (); }
+ get {
+ if (list == null)
+ return -1;
+ return list.Count;
+ }
}
[Browsable (false)]
ResetList ();
+ position = 0;
+
OnDataSourceChanged (EventArgs.Empty);
}
}
[Browsable (false)]
public bool IsBindingSuspended {
- get { throw new NotImplementedException (); }
+ get { return suspended; }
}
[Browsable (false)]
[DefaultValue (-1)]
[Browsable (false)]
public int Position {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return position; }
+ set {
+ if (value >= Count) value = Count - 1;
+ if (value < 0) value = 0;
+
+ if (position != value) {
+ position = value;
+ OnPositionChanged (EventArgs.Empty);
+ }
+ }
}
[Browsable (false)]
public void MoveFirst ()
{
- throw new NotImplementedException ();
+ Position = 0;
}
public void MoveLast ()
{
- throw new NotImplementedException ();
+ Position = Count - 1;
}
public void MoveNext ()
{
- throw new NotImplementedException ();
+ Position ++;
}
public void MovePrevious ()
{
- throw new NotImplementedException ();
+ Position --;
}
protected virtual void OnAddingNew (AddingNewEventArgs e)
public void ResetBindings (bool metadataChanged)
{
- throw new NotImplementedException ();
+ if (metadataChanged)
+ OnListChanged (new ListChangedEventArgs (ListChangedType.PropertyDescriptorChanged, 0));
+
+ OnListChanged (new ListChangedEventArgs (ListChangedType.Reset, -1, -1));
}
public void ResetCurrentItem ()
{
- throw new NotImplementedException ();
+ OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, Position, -1));
}
public void ResetItem (int itemIndex)
{
- throw new NotImplementedException ();
+ OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, itemIndex, -1));
}
public void ResumeBinding ()
{
+ suspended = false;
throw new NotImplementedException ();
}
public void SuspendBinding ()
{
+ suspended = true;
throw new NotImplementedException ();
}
if (eh != null)
eh (this, EventArgs.Empty);
}
+
+#if NET_2_0
+ internal override void Draw (PaintEventArgs pevent)
+ {
+ // System style does not use any of the new 2.0 stuff
+ if (this.FlatStyle == FlatStyle.System) {
+ base.Draw (pevent);
+ return;
+ }
+
+ // FIXME: This should be called every time something that can affect it
+ // is changed, not every paint. Can only change so many things at a time.
+
+ // Figure out where our text and image should go
+ Rectangle text_rectangle;
+ Rectangle image_rectangle;
+
+ ThemeEngine.Current.CalculateButtonTextAndImageLayout (this, out text_rectangle, out image_rectangle);
+
+ // Draw our button
+ if (this.FlatStyle == FlatStyle.Standard)
+ ThemeEngine.Current.DrawButton (pevent.Graphics, this, text_rectangle, image_rectangle, pevent.ClipRectangle);
+ else if (this.FlatStyle == FlatStyle.Flat)
+ ThemeEngine.Current.DrawFlatButton (pevent.Graphics, this, text_rectangle, image_rectangle, pevent.ClipRectangle);
+ else if (this.FlatStyle == FlatStyle.Popup)
+ ThemeEngine.Current.DrawPopupButton (pevent.Graphics, this, text_rectangle, image_rectangle, pevent.ClipRectangle);
+ }
+#endif
#endregion // Internal methods
#region Public Instance Properties
}
protected override bool ProcessMnemonic(char charCode) {
- if (IsMnemonic(charCode, Text) == true) {
+ if (this.UseMnemonic && IsMnemonic(charCode, Text) == true) {
PerformClick();
return true;
}
add { Events.AddHandler (DoubleClickEvent, value); }
remove { Events.RemoveHandler (DoubleClickEvent, value); }
}
+
+#if NET_2_0
+ public new event MouseEventHandler MouseDoubleClick {
+ add { base.MouseDoubleClick += value; }
+ remove { base.MouseDoubleClick -= value; }
+ }
+#endif
#endregion // Events
+
#if NET_2_0
+ protected override void OnFontChanged (EventArgs e)
+ {
+ base.OnFontChanged (e);
+ }
+
protected override void OnMouseEnter (EventArgs e)
{
base.OnMouseEnter (e);
public abstract class ButtonBase : Control
{
#region Local Variables
- FlatStyle flat_style;
- internal int image_index;
+ private FlatStyle flat_style;
+ private int image_index;
internal Image image;
internal ImageList image_list;
- internal ContentAlignment image_alignment;
+ private ContentAlignment image_alignment;
internal ContentAlignment text_alignment;
private bool is_default;
internal bool is_pressed;
- internal bool enter_state;
+ private bool enter_state;
internal StringFormat text_format;
internal bool paint_as_acceptbutton;
-#if NET_2_0
+
+ // Properties are 2.0, but variables used in 1.1 for common drawing code
+ private bool auto_ellipsis;
+ private FlatButtonAppearance flat_button_appearance;
+ private string image_key;
+ private TextImageRelation text_image_relation;
+ private TextFormatFlags text_format_flags;
+ private bool use_mnemonic;
private bool use_visual_style_back_color;
- private FlatButtonAppearance flat_button_appearance;
-#endif
#endregion // Local Variables
#region ButtonBaseAccessibleObject sub-class
flat_style = FlatStyle.Standard;
#if NET_2_0
flat_button_appearance = new FlatButtonAppearance (this);
+ this.image_key = string.Empty;
+ this.text_image_relation = TextImageRelation.Overlay;
+ this.use_mnemonic = true;
#endif
image_index = -1;
image = null;
text_format.LineAlignment = StringAlignment.Center;
text_format.HotkeyPrefix = HotkeyPrefix.Show;
+ text_format_flags = TextFormatFlags.HorizontalCenter;
+ text_format_flags |= TextFormatFlags.VerticalCenter;
+ text_format_flags |= TextFormatFlags.WordBreak;
+
TextChanged+=new System.EventHandler(RedrawEvent);
SizeChanged+=new EventHandler(RedrawEvent);
Invalidate();
}
}
-#if NET_2_0
- [MonoTODO("FlatAppearance is currently ignored on drawing.")]
+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Browsable(true)]
- public FlatButtonAppearance FlatAppearance
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ FlatButtonAppearance FlatAppearance
{
get { return flat_button_appearance; }
}
-#endif
+
[Localizable(true)]
[MWFDescription("Sets image to be displayed on button face"), MWFCategory("Appearance")]
public Image Image {
get {
- return image;
- }
+ if (this.image != null)
+ return this.image;
+ if (this.image_index >= 0)
+ if (this.image_list != null)
+ return this.image_list.Images[this.image_index];
+
+#if NET_2_0
+ if (!string.IsNullOrEmpty (this.image_key))
+ if (this.image_list != null)
+ return this.image_list.Images[this.image_key];
+#endif
+ return null;
+ }
set {
- image = value;
- Invalidate();
+ if (this.image != value) {
+ this.image = value;
+ this.image_index = -1;
+ this.image_key = string.Empty;
+ this.image_list = null;
+ Invalidate();
+ }
}
}
}
set {
- image_index=value;
- Invalidate();
+ if (this.image_index != value) {
+ this.image_index = value;
+ this.image = null;
+ this.image_key = string.Empty;
+ Invalidate();
+ }
}
}
set {
if (text_alignment != value) {
text_alignment = value;
+
+ text_format_flags &= ~TextFormatFlags.Bottom;
+ text_format_flags &= ~TextFormatFlags.Top;
+ text_format_flags &= ~TextFormatFlags.Left;
+ text_format_flags &= ~TextFormatFlags.Right;
+ text_format_flags &= ~TextFormatFlags.HorizontalCenter;
+ text_format_flags &= ~TextFormatFlags.VerticalCenter;
+
switch(text_alignment) {
case ContentAlignment.TopLeft:
text_format.Alignment=StringAlignment.Near;
case ContentAlignment.TopCenter:
text_format.Alignment=StringAlignment.Center;
text_format.LineAlignment=StringAlignment.Near;
+ text_format_flags |= TextFormatFlags.HorizontalCenter;
break;
case ContentAlignment.TopRight:
text_format.Alignment=StringAlignment.Far;
text_format.LineAlignment=StringAlignment.Near;
+ text_format_flags |= TextFormatFlags.Right;
break;
case ContentAlignment.MiddleLeft:
text_format.Alignment=StringAlignment.Near;
text_format.LineAlignment=StringAlignment.Center;
+ text_format_flags |= TextFormatFlags.VerticalCenter;
break;
case ContentAlignment.MiddleCenter:
text_format.Alignment=StringAlignment.Center;
text_format.LineAlignment=StringAlignment.Center;
+ text_format_flags |= TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter;
break;
case ContentAlignment.MiddleRight:
text_format.Alignment=StringAlignment.Far;
text_format.LineAlignment=StringAlignment.Center;
+ text_format_flags |= TextFormatFlags.VerticalCenter | TextFormatFlags.Right;
break;
case ContentAlignment.BottomLeft:
text_format.Alignment=StringAlignment.Near;
text_format.LineAlignment=StringAlignment.Far;
+ text_format_flags |= TextFormatFlags.Bottom;
break;
case ContentAlignment.BottomCenter:
text_format.Alignment=StringAlignment.Center;
text_format.LineAlignment=StringAlignment.Far;
+ text_format_flags |= TextFormatFlags.HorizontalCenter | TextFormatFlags.Bottom;
break;
case ContentAlignment.BottomRight:
text_format.Alignment=StringAlignment.Far;
text_format.LineAlignment=StringAlignment.Far;
+ text_format_flags |= TextFormatFlags.Bottom | TextFormatFlags.Right;
break;
}
Invalidate();
}
#endregion // Public Instance Properties
-
+ #region Internal Instance Properties
+ internal bool Pressed {
+ get { return this.is_pressed; }
+ }
+
+ // The flags to be used for MeasureText and DrawText
+ internal TextFormatFlags TextFormatFlags {
+ get { return this.text_format_flags; }
+ }
+ #endregion
+
#region Internal Methods
private void PerformClick() {
OnClick(EventArgs.Empty);
#endregion // Internal Methods
#region Events
+#if NET_2_0
+ public new event EventHandler AutoSizeChanged {
+ add { base.AutoSizeChanged += value; }
+ remove { base.AutoSizeChanged -= value; }
+ }
+#endif
+
[Browsable(false)]
[EditorBrowsable (EditorBrowsableState.Never)]
public new event EventHandler ImeModeChanged {
#region .NET 2.0 Public Instance Properties
+ [DefaultValue (false)]
#if NET_2_0
- public bool UseVisualStyleBackColor {
- get { return use_visual_style_back_color; }
- set { use_visual_style_back_color = value; }
+ public
+#else
+ internal
+#endif
+ bool AutoEllipsis {
+ get { return this.auto_ellipsis; }
+ set {
+ if (this.auto_ellipsis != value) {
+ this.auto_ellipsis = value;
+
+ if (this.auto_ellipsis) {
+ text_format_flags |= TextFormatFlags.EndEllipsis;
+ text_format_flags &= ~TextFormatFlags.WordBreak;
+ }
+ else {
+ text_format_flags &= ~TextFormatFlags.EndEllipsis;
+ text_format_flags |= TextFormatFlags.WordBreak;
+ }
+
+ this.Invalidate ();
+ }
+ }
}
- [DefaultValue (false)]
- public bool UseCompatibleTextRendering {
- get {
- return use_compatible_text_rendering;
+#if NET_2_0
+ [DefaultValue (true)]
+ public override bool AutoSize {
+ get { return base.AutoSize; }
+ set { base.AutoSize = value; }
+ }
+
+ public override Color BackColor {
+ get { return base.BackColor; }
+ set { base.BackColor = value; }
+ }
+
+ [Localizable (true)]
+ public string ImageKey {
+ get { return this.image_key; }
+ set {
+ if (this.image_key != value) {
+ this.image = null;
+ this.image_index = -1;
+ this.image_key = value;
+ this.Invalidate ();
+ }
}
+ }
+
+ [Localizable (true)]
+ [DefaultValue (TextImageRelation.Overlay)]
+ public
+#else
+ internal
+#endif
+ TextImageRelation TextImageRelation {
+ get { return this.text_image_relation; }
+ set {
+ if (!Enum.IsDefined (typeof (TextImageRelation), value))
+ throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for TextImageRelation", value));
+ if (this.text_image_relation != value) {
+ this.text_image_relation = value;
+ this.Invalidate ();
+ }
+ }
+ }
+
+ [DefaultValue (true)]
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ bool UseMnemonic {
+ get { return this.use_mnemonic; }
set {
- use_compatible_text_rendering = value;
+ if (this.use_mnemonic != value) {
+ this.use_mnemonic = value;
+
+ if (this.use_mnemonic)
+ text_format_flags &= ~TextFormatFlags.NoPrefix;
+ else
+ text_format_flags |= TextFormatFlags.NoPrefix;
+
+ this.Invalidate ();
+ }
}
}
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ bool UseVisualStyleBackColor {
+ get { return use_visual_style_back_color; }
+ set { use_visual_style_back_color = value; }
+ }
+
+ [DefaultValue (false)]
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ bool UseCompatibleTextRendering {
+ get { return use_compatible_text_rendering; }
+ set { use_compatible_text_rendering = value; }
+ }
+
+#if NET_2_0
[SettingsBindable (true)]
[Editor ("System.ComponentModel.Design.MultilineStringEditor, " + Consts.AssemblySystem_Design,
"System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+2007-03-14 Chris Toshok <toshok@ximian.com>
+
+ * Form.cs: go ahead and remove the RecreateHandles that jpobst
+ removed earlier and I had him add back it. It turns out metacity
+ *does* in fact handle the MOTIF_WM_HINTS property changing, it
+ just doesn't redraw the window titlebar until you resize the
+ window. This also means we aren't recreating the entire window
+ hierarchy on X when you change this property. And it looks better
+ on windows, too.
+
+2007-03-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListViewItem.cs:
+ * ListView.cs: Collecting selection information
+ is now done in SelectedIndexCollection rather than in
+ SelectedListViewItemCollection. This is done so we can
+ have the selection information code in one single place
+ (virtual mode selection information entirely depends on
+ SelectedIndexCollection).
+
+2007-03-13 Miguel de Icaza <miguel@novell.com>
+
+ * ErrorProvider.cs: Add stubs for ISupportInitialize
+
+2007-03-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListViewItem.cs: Trigger the ItemCheck and ItemChecked events
+ in the right order with the right values, from the Checked property,
+ just as MS does (instead of triggering them from ListView).
+
+ * ListView.cs: Make OnItemCheck and OnItemChecked internal.
+
+2007-03-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListView.cs: Implement ItemChecked 2.0 event. Also cast to
+ the correct handler in OnItemCheck method (ItemCheckEventHandler
+ instead of EventHandler). This used to throw an InvalidCastException.
+
+2007-03-13 Jackson Harper <jackson@ximian.com>
+
+ * TextBoxBase.cs: Calculate the document before the handle is
+ created, so there isn't an extra invalidate called.
+
+2007-03-13 Jonathan Pobst <monkey@jpobst.com>
+
+ * Form.cs: Don't set owner in ShowDialog until we are sure
+ that we aren't going to throw an exception. [Fixes bug #80773]
+
+2007-03-12 George Giolfan <georgegiolfan@yahoo.com>
+
+ * TreeView.cs: Make it compile.
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * Control.cs: Another place we don't call SizeFromClientSize.
+ * Form.cs: Another place we don't call SizeFromClientSize.
+ [Fixes bug #81125]
+
+2007-03-12 Jackson Harper <jackson@ximian.com>
+
+ * TreeView.cs: Basically emulating some strangness here with
+ exanding nodes and setting node positions when windows aren't
+ created.
+ - Also attempting to walk the node tree less than previously, and
+ just use visible order calculations for determining offsets.
+ - oops made scrolling backwards.
+ * TreeNode.cs: We need to start nodes with a zero visible order,
+ because the order calcs are based on the first nodes order.
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * Form.cs: Don't exit the program if RecreateHandle is called on
+ the main form.
+
+2007-03-12 Chris Toshok <toshok@ximian.com>
+
+ * XEventQueue.cs: remove the use of PostQuitState.
+
+ * XplatUIX11.cs: remove the use of PostQuitState. If we get a
+ WM_QUIT message in GetMessage, return false (and if we're in the
+ nested WaitForHwndMessage, repost the WM_QUIT message).
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * Form.cs: Don't call RecreateHandle when we change the MinimizeBox
+ or the MaximizeBox properties. [Part of bug #80640]
+
+2007-03-12 Everaldo Canuto <everaldo@simios.org>
+
+ * LinkLabel.cs: When calculate pieces make LinkArea empty if theres
+ no links.
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * ToolStripItem.cs: Fix some tests I broke by checking Visible
+ instead of visible.
+
+2007-03-12 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * FileDialog.cs: Use text of File name combobox to determine what
+ files the user selected. Added tokenizer to parse the file names.
+ Fixes bug #81123.
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * Control.cs: We can't call SizeFromClientSize in the constructor,
+ but we still need to do the same work, so make an internal version.
+ [Fixes bug #80621]
+
+2007-03-12 Jackson Harper <jackson@ximian.com>
+
+ * TreeView.cs:
+ * TreeNode.cs:
+ * OpenTreeNodeEnumerator: Match MS better for IsVisible and
+ IsExpanded.
+
+2007-03-12 Jackson Harper <jackson@ximian.com>
+
+ * TextBoxBase.cs: Now that the handles are being created a little
+ later, we need to make sure that the document is recalculated when
+ the handle is created.
+
+2007-03-11 Everaldo Canuto <everaldo@simios.org>
+
+ * Theme.cs: GetLinkFont abstract method added.
+
+ * LinkLabel.cs:
+ - Remove CalcTrimRectangle, no longer needed.
+ - Factor also remove, position issues must be fixed in libgdiplus.
+ - Move GetPieceColor to ThemeWin32Classic.cs as it is theme related.
+ - GetPieceFont, CreateLinkFont and link_font removed, theme must be
+ care about font used to draw links.
+ - Set TabStop to true when control is "Selectable", control is selectable
+ when have one or more links. Fixes #80501 (test case is also added).
+ - Set the LinkArea values after links change, LinkArea values must be
+ based in first link position and size, a test case was created.
+ - Fix ControlStyles.Selectable value, now is based on LinkArea value,
+ the attribute must be true LinkArea.Length > 0. The same was applied to
+ TabStop.
+
+ * ThemeWin32Classic.cs:
+ - LinkLabelGetPieceColor and LinkLabelGetPieceFont created and used
+ in draw method.
+ - Use CPDrawStringDisabled to draw disabled text instead of hard code
+ color change.
+ - Draw focus rectangle for every parts focused, including parts that
+ is on another line, its because regions returns various rectangles
+ and not only one. Needed to mimic W32 look.
+ - Uses Graphics.Clip to delimite region painted, it mean that now
+ complete text is passed to DrawString, with this we solve layout
+ issues without create another text renderer.
+ - Uses Region.Intersect to fix some flickers problems, now only needed
+ parts will redrawed.
+ - This changes fixes #79614 and some other unreported issues, on Linux
+ some layout problems still remain, the problem is under
+ MeasureCharacterRanges but it is an libgdiplus bug.
+
+2007-03-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * TextBox.cs: Set for foreground color.
+ * TextBoxBase.cs: Remove Invalidate when setting BackColor, since
+ this is already done in Control.
+
+2007-03-10 Jackson Harper <jackson@ximian.com>
+
+ * TextBox.cs: Set the background color, but reset the
+ backcolor_set flag which is just for the user setting the
+ background color.
+
+2007-03-09 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs: really remove the call to XplatUI.SetVisible from
+ CreateHandle(), like I said I did when I merged the branch.
+
+ * BindingSource.cs: implement some more of this stuff.
+
+2007-03-09 Jackson Harper <jackson@ximian.com>
+
+ * TextBox.cs: Don't explicitly set our background colors.
+ * TextControl.cs:
+ * TextBoxBase.cs: Draw readonly text.
+ - Need to invalidate when backcolor or readonly are changed.
+
+2007-03-09 Jackson Harper <jackson@ximian.com>
+
+ * TextBoxBase.cs: Don't set the forecolor until the handle is
+ created.
+ - Do not raise OnPaint, and removed some old debug code.
+
+2007-03-09 George Giolfan <georgegiolfan@yahoo.com>
+
+ * ScrollableControl.cs: Fix mouse wheel scrolling.
+
+2007-03-09 Jonathan Pobst <monkey@jpobst.com>
+
+ * Control.cs: Wire up MouseDoubleClick event.
+
+2007-03-09 Jonathan Pobst <monkey@jpobst.com>
+
+ * ToolStrip.cs: Rework AutoSize to adjust height when docked to the
+ top or bottom.
+ * ToolStripItem.cs: Make Image drawing take ImageScaling into account.
+ * ToolStripItemCollection.cs: Don't call owner.PerformLayout when a new
+ item is added. This logic was moved to ToolStrip.OnItemAdded.
+ [Fixes bug #81090]
+
+2007-03-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListVieItem.cs: SetIndex is only valid for 2.0 profile by now.
+
+2007-03-08 Jackson Harper <jackson@ximian.com>
+
+ * TreeView.cs: Show the correct image for selected node (this used
+ to work, not sure how the code got deleted). Also implemented 2.0 feature
+ SelectedImageKey.
+
+2007-03-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListView.cs:
+ * ListViewItem.cs: Cache index in items when retrieving them
+ in VirtualMode.
+
+2007-03-08 Jonathan Pobst <monkey@jpobst.com>
+
+ * ToolStripItem.cs: Don't return the explicit_size if we are using
+ AutoSize. Fixes invalidation issue when user has explicitly set a
+ size and has AutoSize = true.
+
+2007-03-08 Jonathan Pobst <monkey@jpobst.com>
+
+ * XplatUIX11.cs: Hardcode FrameBorderSize value temporarily to fix MWF.
+
+2007-03-07 Pedro MartÃnez Juliá <pedromj@gmail.com>
+
+ * DataGridView.cs: Remove event handler from DataView when a
+ DataTable is used as DataSource.
+
+2007-03-08 Jonathan Pobst <monkey@jpobst.com>
+
+ * Control.cs: Create internal setter for client_size to allow it to be
+ set without triggering resizing code.
+ * Form.cs: Calculate client_size in constructor, only change client_size
+ in FormBorderStyle property if Handle has been created.
+ [Fixes #80574, #80791]
+
+2007-03-08 George Giolfan <georgegiolfan@yahoo.com>
+
+ * SystemInformation.cs: Add TerminalServerSession.
+
+2007-03-07 Jonathan Pobst <monkey@jpobst.com>
+
+ * TreeViewDrawMode.cs: Make internal for 1.1 to allow for consolidated
+ TreeView code.
+
+2007-03-07 Jonathan Pobst <monkey@jpobst.com>
+
+ * XplatUIWin32.cs: The no_activate stuff was forcing us to create a
+ Handle before we were supposed to. Now checks ActivateOnShow property
+ in Control.
+ * Control.cs: Add internal ActivateOnShow property.
+ * ComboBox.cs, Form.cs, MenuAPI.cs, ToolStripDropDown.cs: Return false
+ for ActivateOnShow.
+ * Hwnd.cs Remove no longer needed no_activate field.
+
+2007-03-07 Jackson Harper <jackson@ximian.com>
+
+ * TreeView.cs: Implement owner draw tree nodes. And a couple more
+ 2.0 properties
+ * DrawTreeNodeEventHandler.cs: Add
+ * DrawTreeNodeEventArgs.cs: Correct default value.
+
+2007-03-07 Chris Toshok <toshok@ximian.com>
+
+ * XplatUIWin32.cs: create InternalWndProc so that we're guaranteed
+ to be called before NativeWindow.WndProc. Put the HwndCreating
+ magic there to hook up our Hwnd's to handles.
+
+2007-03-07 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * DataGridView.cs: Comment out debug code.
+
+2007-03-07 Chris Toshok <toshok@ximian.com>
+
+ [merge -r72718:73765 from mwf-handle-branch, and include 2 changes
+ to make the rest of the world happy]
+
+ * Control.cs (CreateHandle): there's no need to call
+ XplatUI.SetVisible here, it's effectively done by
+ XplatUI.CreateWindow on X now, and always was on windows.
+
+ * XplatUIX11.cs (WaitForHwndMessage): only use the PostQuitState
+ shortcircuit out of the loop if we have a message loop running on
+ this thread.
+
+ [Changelog from merge]
+
+ 2007-03-05 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs (AccessibilityNotifyClients): turns out in 1.1 this
+ causes handle creation.
+
+ 2007-02-28 Chris Toshok <toshok@ximian.com>
+
+ * ApplicationContext.cs: Add a flag to make sure we only raise the
+ ThreadExit event once (ExitThreadCore can be indirectly called
+ from a few places.) I don't like the additional flag, but it
+ makes the event ordering/count correct.
+
+ * Application.cs (MWFThread.LoopCount): don't use an enumerator
+ without locking the collection. An enumerator doesn't give us any
+ protection from modification anyway. Lock the thread hash and
+ replace the complicated enumerator loop with a foreach.
+ (Application.CloseForms): make internal so it can be called from
+ ApplicationContext. This should probably be moved to MWFThread.
+ (Application.ExitThread): don't call MWFThread.Current.Exit()
+ here. just call XplatUI.PostQuitMessage. We'll exit the thread
+ when the runloop exits (in response to WM_QUIT.)
+ (Application.RunLoop): add a comment (and check) for
+ context.MainForm being null after setting context.MainForm.Visible
+ = true. This is because you're perfectly free to dispose of a
+ form in VisibilityChanged. Chalk this up to another case where we
+ need to synchronously generate WM_ACTIVATE from Control.Show.
+ Also, add handling for WM_QUIT here so we'll exit the loop.
+
+ * XplatUIX11.cs: clean up MapWindow and UnmapWindow a bit. The
+ fact that we don't wait if we're only unmapping the whole_window
+ makes me a bit nervous, but it doesn't seem to cause any problems
+ yet.
+
+ also, add a comment about the stupid, broken and wrong resetting
+ of PostQuitState to false in GetMessage().
+
+ In PostQuitMessage, we need to add a WM_QUIT message to the
+ thread's queue. We use the FosterParent to get the right
+ handle/hwnd/queue.
+
+ Lastly, in SetVisible, we need to unmap both windows, since the
+ waiting only happens when we're unmapping the client window. So
+ now, the *only* time we unmap just the whole_window is in the hack
+ for resizing a control to 0,0.
+
+ 2007-02-21 Chris Toshok <toshok@ximian.com>
+
+ * Application.cs (CloseForms): rewrite this so that we don't
+ modify the list while we're traversing it.
+
+ 2007-02-20 Chris Toshok <toshok@ximian.com>
+
+ * ListBox.cs (.ctor): move the Control.AddImplicits here instead
+ of OnHandleCreated.
+ (HorizontalScrollEvent): only call XplatUI.ScrollWindow if the
+ handle is created. otherwise we'll create it here.
+ (VerticalScrollEvent): same here.
+
+ * Application.cs (CloseForms): call Form.Dispose, don't post
+ WM_CLOSE_INTERNAL.
+
+ * Form.cs (WndProc): we don't need to use CLOSE_INTERNAL
+ here. Application should Dispose() of the Form's.
+
+ * XplatUIX11.cs (WaitForHwndMessage): break out of the loop on
+ WM_DESTROY as well.
+ (MapWindow,UnmapWindow): only actually do the waiting for
+ SHOWWINDOW if the control we're dealing with is a Form.
+ (CreateWindow): if the control isn't a form, SendMessage
+ WM_SHOWWINDOW here (if the WS_VISIBLE style is set).
+
+ * Control.cs (SetVisibleCore): always use is_visible here, not
+ value. If we use value, we can end up re-setting something
+ visible if, for instance, you do Control.Hide() in a delegate
+ attached to VisibleChanged as we do in FormTest.ShowDialogTest.
+
+ 2007-02-20 Chris Toshok <toshok@ximian.com>
+
+ * XplatUIX11.cs (WaitForHwndMessage): we need to loop until we get
+ the message we need. PeekMessage returning false should not be a
+ condition under which we exit the loop.
+
+ 2007-02-15 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs (Refresh): only refresh if we've got a handle and are
+ visible.
+ (CreateAccessibilityInstance): CreateControl() here.
+ (UpdateChildrenZOrder): complicate the code loop even more by
+ taking into account controls that haven't had their handle
+ created, and those that aren't visible. But on the flip side,
+ simplify the code by splitting it into two loops. one which
+ builds up the list of child controls we're interested in, and the
+ other that sets the z order of those children.
+
+ 2007-02-14 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs: Control.AccessibilityObject causes the control to be
+ created, not just the handle.
+
+ 2007-02-14 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs: rework UpdateChildrenZOrder to correctly handle the
+ problem on X where a window might have its handle created (and be
+ visible) while the window is unmapped. calling XConfigureWindow
+ on an unmapped window is bad, and generates X errors.
+
+ 2007-02-13 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs (CreateHandle): don't loop over our children setting
+ their parent here. do it when in WndProc when we're shown.
+ (UpdateChildrenZOrder): make this internal so we can call it from
+ ScrollableControl.
+ (WndProc): for WM_SHOWWINDOW, reparent the child control after
+ creating its handle. Also, remove the calls to PerformLayout from
+ here. they're done in ScrollableControl.OnVisibleChanged. Also,
+ OnVisibleChanged only seems to be called directly here for the
+ toplevel control. It's propagated down the window hierarchy by
+ calls to child.OnParentVisibleChanged.
+ (OnVisibleChanged): don't do layout here - it's done (oddly
+ enough, according to a glance at stack traces on ms.net..) in
+ ScrollableControl.
+
+ * ScrollableControl.cs (OnVisibleChanged): make sure we update the
+ z order of our children before calling PerformLayout.
+
+ 2007-02-12 Chris Toshok <toshok@ximian.com>
+
+ [big change, fixes #80020]
+
+ * AccessibleObject.cs: we need to make owner internal again to fix
+ some of ControlAccessibleObject.
+
+ * Control.cs: lots of changes here. add support for WM_CREATE,
+ for which we generate OnHandleCreated. Remove the OnHandleCreated
+ call from CreateHandle. Also add support for WM_SHOWWINDOW where
+ we create child controls. leave the MonoTODO's for the
+ accessibility calls, but fix the exceptions so the tests pass.
+
+ Add the InvalidOperationExceptions to Invoke methods, and remove a
+ couple of InvokeInternal methods we aren't using.
+
+ Also, add a couple of CreateHandle calls in places where we know
+ the handles are being created but our code doesn't reference
+ .Handle.
+
+ Make SetVisibleCore call OnVisibleChange if the handle isn't
+ created. If the handle is created, we rely on XplatUI.SetVisible
+ generating the event synchronously.
+
+ Lastly, make sure we don't use this.Handle inside CreateHandle,
+ because we can call back into client (and that code can dispose of
+ the control).
+
+ * XplatUIStructs.cs: misc/cleanup.
+
+ * XplatUIX11.cs: Map/Unmap X events correspond to WM_SHOWWINDOW,
+ although we don't populate the wParam properly.
+ (CreateWindow): generate WM_CREATE.
+ (MapWindow,UnmapWindow): make these calls synchronous, at great
+ performance expense (particularly in the unmap case), to match
+ win32 behavior.
+
+ * Form.cs (.ctor): remove the call to UpdateBounds. we don't need
+ to call it.
+ (set_MdiParent): don't recreate the handle unless it's been
+ created already.
+
+ * MdiClient.cs (OnResize): don't InvalidateNC Parent.Handle unless
+ it's created.
+
+ * NativeWindow.cs: this is probably the weirdest part of the
+ patch. We need a way to link up the window being created to the
+ WM_CREATE message. Since we can only be creating one window at a
+ time on a given thread, we keep track of a per-thread reference so
+ we can dispatch it properly. We also need to keep track of the
+ Hwnd currently being created so that the win32 backend doesn't
+ have problems.
+
+ * XplatUIWin32.cs: a similar change to the one we made in
+ NativeWindow.cs.
+
+2007-03-07 Jonathan Pobst <monkey@jpobst.com>
+
+ * ToolStripItem.cs: Make CalculatePreferredSize virtual.
+ * ToolStripMenuItem.cs: Modify CalculatePreferredSize and OnPaint
+ to draw the menu shortcut string.
+
+2007-03-07 Jackson Harper <jackson@ximian.com>
+
+ * TreeNode.cs: Add the 2.0 collapse method.
+
+2007-03-07 Pedro MartÃnez Juliá <pedromj@gmail.com>
+
+ * DataGridViewColumn.cs: Fix HeaderText behaviour (Bug #80746).
+
+2007-03-07 Pedro MartÃnez Juliá <pedromj@gmail.com>
+
+ * DataGridView.cs: Change DataSource will clear column and row
+ lists. Call Invalidate() to reflect DataSource change.
+
+2007-03-07 Pedro MartÃnez Juliá <pedromj@gmail.com>
+
+ * DataGridView.cs: Add rows when DataSource is System.Data.DataView
+ and a new row is added to it.
+
+2007-03-07 Pedro MartÃnez Juliá <pedromj@gmail.com>
+
+ * DataGridView.cs: Add columns when DataSource is en empty list but
+ is a System.Data.DataView (from a System.Data.DataTable).
+
+2007-03-06 Andreia Gaita <avidigal@novell.com>
+
+ * Label.cs: Implement AutoEllipsis (2.0)
+
+2007-03-06 Jackson Harper <jackson@ximian.com>
+
+ * TreeView.cs: Implement 2.0 TopNode setter property.
+ - Use a local var instead of the skipped_nodes field for computing
+ how many nodes to skip. Otherwise we won't scroll because the
+ valuechanged handler checks if skipped_nodes is equal to the new
+ value.
+ - Implement 2.0 Sort method.
+ - Add useless 2.0 DoubleBuffer property
+ - Implement 2.0 LineColors property. Lets you change the color of
+ the lines in the tree. Terribly useful for creating non cohesive
+ desktops.
+ - Implement 2.0 image key feature.
+
+2007-03-06 Jackson Harper <jackson@ximian.com>
+
+ * TreeView.cs: We can't get the bounds of the nodes before raising
+ the AfterSelect event, because that event could change the node's
+ bounds (scrolling, font change, etc).
+
+2007-03-06 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * XplatUIWin32.cs: When faking styles don't remove the WS_VISIBLE flag.
+ * Form.cs: Don't recreate handle when creating FormWindowManager, just
+ update window styles. In CreateParams us VisibleInternal instead of
+ VIsible to get the actual visible flag set for this form.
+ * FormWindowManager.cs: Activate the form whenever the mouse clicks on
+ the nc area. Fixes #81042. Also fix HandleTitleBarDoubleClick to
+ handle the case when the form is already maximized, in which case
+ it should be restored. Fixes #81043.
+
+2007-03-06 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * XplatUIX11.cs: Tool windows still get wm styles. Fixes toolwindows showing up with double decorations.
+
+2007-03-05 Jackson Harper <jackson@ximian.com>
+
+ * TreeViewHitTestInfo.cs: implement.
+
+2007-03-05 Jackson Harper <jackson@ximian.com>
+
+ * InternalWindowManager.cs: class status fix.
+
+2007-03-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * InternalWindowManager.cs: All windows that have a parent
+ are confined to their parent when they're being moved.
+ Fixes #80822.
+
+2007-03-04 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * SystemInformation.cs: Marked KeyboardDelay and KeyboardSpeed public
+ on 2.0 profile. Fixes bug #81018. Small code formatting fixes.
+
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * ThemeWin32Classic.cs: ManagedWindowSetButtonLocations: Make all
+ buttons invisible before deciding which ones should be visible
+ (fixes minimize/maximize buttons showing up in toolwindows). Remove
+ an unused variable.
+ * InternalWindowManager.cs: Remove warning.
+
+2007-03-02 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListView.cs: Add a check in ListViewItemCollection.RemoveAt
+ to throw an InvalidOperationException is virtual mode is being used.
+
+2007-03-02 Jonathan Pobst <monkey@jpobst.com>
+
+ * SplitContainer.cs, SplitterPanel.cs, StatusStrip.cs, TableLayoutPanel.cs,
+ ToolStrip.cs, ToolStripContainer.cs, ToolStripContentPanel.cs,
+ ToolStripControlHost.cs, ToolStripDropDownItems.cs, ToolStripItem.cs,
+ ToolStripMenuItem.cs, ToolStripOverflowButton.cs, ToolStripPanel.cs,
+ ToolStripPanelRow.cs, ToolStripProfessionalRenderer.cs, ToolStripSplitButton.cs,
+ ToolStripStatusLabel.cs, ToolStripTextBox.cs: Corcompare work.
+
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * XplatUI.cs: Fixed returning driver.KeyboardSpeed instead of
+ driver.KeyboardDelay from XplatUI.KeyboardDelay
+ * XplatUIW in32.cs: Implemented KeyboardSpeed/KeyboardDelay properties
+ (patch by Sergey Volk)
+
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * ToolWindowManager.cs: Added, contains logic for
+ tool windows.
+ * CreateParams.cs: Add a few helper methods and an
+ internal variable to know which control the CreateParams belongs
+ to.
+ * Control.cs: Call Form.ChangingParent when the
+ parent is about to be changed.
+ * XplatUIX11.cs: DeriveStyles (): Set
+ caption_height for all windows that have captions and are children.
+ Update to use ToolWindowManager instead of InternalWindowManager
+ for ToolWindows.
+ * XplatUIWin32.cs: Set fake window styles for all
+ windows that have window managers.
+ * MdiWindowManager.cs: Added MaximizedTitleButtons (buttons are
+ now duplicated for mdi windows when they are
+ maximized, first for the buttons the window itself has, then for
+ the buttons that appear in the menu bar. Makes things a little
+ easier). Updated UpdateWindowDecorations, SetWindowState and the
+ mouse eventhandlers accordingly.
+ * Form.cs: Add ChangingParent (), contains the
+ logic of what should happen when the parent changes. In MdiParent
+ don't set things that ChangingParent () is doing. When handling
+ WM_CLOSE, we can close the form if there are any other modal forms
+ and the current form is a descendent of the modal form.
+ * InternalWindowManager.cs: A lot of refactoring,
+ the title buttons are now extracted to a separate container class
+ that takes care of all button code (clicks, tooltips, etc). Moved
+ Iconic|Maximized|Normal Bounds properties to this class from
+ MdiWindowManager, so that the window state logic can succeed for
+ other than mdi wm's. Implemented general window state change logic.
+ Moved CreateButtons to ThemeWin32Classic, since the theme might
+ override which buttons are available when as well as the exact
+ location.
+ * FormWindowManager.cs: Added, contains logic for
+ normal forms.
+ * ThemeWin32Classic.cs: ManagedWindowSetButtonLocations now decides
+ which buttons go where (and if they are at all visible).
+ Removed special handling of maximized windows, since they aren't special.
+ In DrawManagedWindowDecorations don't try to draw the text if it is
+ empty.
+ * MdiClient.cs: ArrangeIconicWindows: Don't calculate any sizes,
+ use whatever the wm gives us.
+
+2007-03-02 Jonathan Pobst <monkey@jpobst.com>
+
+ * ButtonBase.cs: Add 2.0 properties.
+ * Button.cs: Override Draw for 2.0.
+ * Control.cs: Add Entered and Selected properties.
+ * FlatButtonAppearance.cs, TextFormatFlags.cs, TextImageRelation.cs,
+ TextRenderer.cs: Make internal for 1.1 to unify drawing code.
+ * Theme.cs: New abstract functions for drawing Standard, Flat, Popup
+ buttons.
+ * ThemeWin32Classic.cs: Implement layout calculations for 2.0 buttons.
+
+2007-03-01 Jonathan Pobst <monkey@jpobst.com>
+
+ * XplatUIWin32.cs: Don't use 2.0 methods in 1.1 code. :/
+
+2007-03-01 Jonathan Pobst <monkey@jpobst.com>
+
+ * XplatUIWin32.cs: Register a new class with Windows each time we get
+ a new ClassStyle. [Fixes bugs #79432, #80817]
+ * Controls.cs: Set the correct ClassStyle in CreateParams.
+ * ToolStripDropDown.cs: Don't request an invalid ClassStyle.
+
+2007-03-01 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ListView.cs: Add fireEvent argument to ReorderColumn since the
+ ColumnReordered event must not be signaled when modifying DisplayIndex
+ of a ColumnHeader. Added internal ReorderColumns method which takes
+ care of drawing, and updating the internal DisplayIndex of the
+ ColumnHeader. Added AddColumn method which is invoked from
+ ColumnHeaderCollection when adding or inserting columns, and which
+ ensures that reorder_columns_indices is kept in sync. Avoid redrawing
+ after adding each ColumnHeader in ColumnHeaderCollection.AddRange.
+ Recalculated dispay indices after removing a ColumnHeader.
+ * ColumnHeader.cs: Save DisplayIndex separately from ListView to
+ match MS. Allows last display index to be returned after ListView
+ is disposed. Update actual location of ColumnHeader when DisplayIndex
+ is modified.
+
+2007-03-01 Everaldo Canuto <everaldo@simios.org>
+
+ * LinkLabel.cs: Improve CalcTrimRectangle.
+
+ * ThemeWin32Classic.cs: Fix some compilation problem under VS 2003.
+
+2007-02-28 Everaldo Canuto <everaldo@simios.org>
+
+ * LinkLabel.cs: Rename CalcMeasurementFactor as CalcTrimRectangle and
+ get rectangle as a result value.
+
+2007-02-28 Everaldo Canuto <everaldo@simios.org>
+
+ * LinkLabel.cs: Theres some diferences between rectangle return from
+ MeasureCharacterRanges and the area used for DrawString to fix this
+ CalcMeasurementFactor method was created, it calcules the diferences
+ to be use later to adjust rectangle in draw operations. Fixes #80473.
+
+ * ThemeWin32Classic.cs: Use factor calculated by CalcMeasurementFactor
+ to adjust draw rectangle.
+
+2007-02-27 Everaldo Canuto <everaldo@simios.org>
+
+ * ThemeWin32Classic.cs: In DrawLinkLabel draw focus rectangle before draw
+ text and some other changes to reduce and optimize source code.
+
2007-02-27 Jonathan Pobst <monkey@jpobst.com>
* RadioButton.cs: Implement 2.0 event.
private string name = String.Empty;
private object tag;
#endif
+ private int display_index = -1;
// internal variables
Rectangle column_rect = Rectangle.Empty;
get { return format; }
}
+ internal int InternalDisplayIndex {
+ get { return display_index; }
+ set { display_index = value; }
+ }
+
internal void CalcColumnHeader ()
- {
+ {
if (text_alignment == HorizontalAlignment.Center)
format.Alignment = StringAlignment.Center;
else if (text_alignment == HorizontalAlignment.Right)
#endregion // Private Internal Methods Properties
#region Public Instance Properties
+
#if NET_2_0
[Localizable (true)]
[RefreshProperties (RefreshProperties.Repaint)]
public int DisplayIndex {
get {
if (owner == null)
- return -1;
+ return display_index;
return owner.GetReorderedColumnIndex (this);
- }
+ }
set {
- if (owner == null)
+ if (owner == null) {
+ display_index = value;
return;
+ }
if (value < 0 || value >= owner.Columns.Count)
- throw new ArgumentOutOfRangeException ("value");
+ throw new ArgumentOutOfRangeException ("DisplayIndex");
- owner.ReorderColumn (this, value);
+ owner.ReorderColumn (this, value, false);
}
}
SetStyle (ControlStyles.ResizeRedraw | ControlStyles.Opaque, true);
this.is_visible = false;
- Hwnd.ObjectFromHandle (this.Handle).no_activate = true;
if (owner.DropDownStyle == ComboBoxStyle.Simple)
InternalBorderStyle = BorderStyle.Fixed3D;
}
}
+ internal override bool ActivateOnShow { get { return false; } }
#region Private Methods
// Calcs the listbox area
BindingContext binding_context;
RightToLeft right_to_left; // drawing direction for control
ContextMenu context_menu; // Context menu associated with the control
+ internal bool use_compatible_text_rendering;
// double buffering
DoubleBuffer backbuffer;
ControlBindingsCollection data_bindings;
#if NET_2_0
- internal bool use_compatible_text_rendering;
static bool verify_thread_handle;
Padding padding;
ImageLayout backgroundimage_layout;
#region Public Classes
[ComVisible(true)]
public class ControlAccessibleObject : AccessibleObject {
- Control owner;
+ IntPtr handle;
#region ControlAccessibleObject Constructors
public ControlAccessibleObject(Control ownerControl)
: base (ownerControl)
{
- this.owner = ownerControl;
+ if (ownerControl == null)
+ throw new ArgumentNullException ("owner");
+
+ handle = ownerControl.Handle;
}
#endregion // ControlAccessibleObject Constructors
public IntPtr Handle {
get {
- return owner.Handle;
+ return handle;
}
set {
public Control Owner {
get {
- return owner;
+ return base.owner;
}
}
return base.GetHelpTopic (out FileName);
}
- [MonoTODO("Implement this and tie it into Control.AccessibilityNotifyClients")]
+ [MonoTODO ("Implement this")]
public void NotifyClients(AccessibleEvents accEvent) {
throw new NotImplementedException();
}
- [MonoTODO("Implement this and tie it into Control.AccessibilityNotifyClients")]
+ [MonoTODO ("Implement this")]
public void NotifyClients(AccessibleEvents accEvent, int childID) {
- throw new NotImplementedException();
}
public override string ToString() {
value.InitLayout();
- owner.UpdateChildrenZOrder();
+ if (owner.Visible)
+ owner.UpdateChildrenZOrder();
owner.PerformLayout(value, "Parent");
owner.OnControlAdded(new ControlEventArgs(value));
}
if (impl_list == null)
impl_list = new ArrayList ();
- if (AllContains (control))
+ if (AllContains (control)) {
+ owner.PerformLayout ();
return;
+ }
+
+ if (control.parent != null) {
+ control.parent.Controls.Remove(control);
+ }
all_controls = null;
impl_list.Add (control);
control.ChangeParent (owner);
control.InitLayout ();
- owner.UpdateChildrenZOrder ();
+ if (owner.Visible)
+ owner.UpdateChildrenZOrder ();
owner.PerformLayout (control, "Parent");
owner.OnControlAdded (new ControlEventArgs (control));
}
#endregion // ControlCollection Class
#region Public Constructors
- public Control() {
+ public Control ()
+ {
layout_type = LayoutType.Anchor;
anchor_style = AnchorStyles.Top | AnchorStyles.Left;
dist_bottom = 0;
tab_stop = true;
ime_mode = ImeMode.Inherit;
+ use_compatible_text_rendering = true;
#if NET_2_0
backgroundimage_layout = ImageLayout.Tile;
child_controls = CreateControlsInstance();
client_size = new Size(DefaultSize.Width, DefaultSize.Height);
client_rect = new Rectangle(0, 0, DefaultSize.Width, DefaultSize.Height);
- bounds.Size = SizeFromClientSize (client_size);
+ bounds.Size = InternalSizeFromClientSize (client_size);
explicit_bounds = bounds;
}
- public Control(Control parent, string text) : this() {
+ public Control (Control parent, string text) : this()
+ {
Text=text;
Parent=parent;
}
- public Control(Control parent, string text, int left, int top, int width, int height) : this() {
+ public Control (Control parent, string text, int left, int top, int width, int height) : this()
+ {
Parent=parent;
bounds.X=left;
bounds.Y=top;
Text=text;
}
- public Control(string text) : this() {
+ public Control (string text) : this()
+ {
Text=text;
}
- public Control(string text, int left, int top, int width, int height) : this() {
+ public Control (string text, int left, int top, int width, int height) : this()
+ {
bounds.X=left;
bounds.Y=top;
bounds.Width=width;
private delegate void RemoveDelegate(object c);
- protected override void Dispose(bool disposing) {
+ protected override void Dispose (bool disposing)
+ {
if (!is_disposed && disposing) {
Capture = false;
#endregion // Public Constructors
#region Internal Properties
+ // Control is currently selected, like Focused, except maintains state
+ // when Form loses focus
+ internal bool InternalSelected {
+ get {
+ IContainerControl container;
+
+ container = GetContainerControl();
+
+ if (container != null && container.ActiveControl == this)
+ return true;
+
+ return false;
+ }
+ }
+
+ // Mouse is currently within the control's bounds
+ internal bool Entered {
+ get { return this.is_entered; }
+ }
+
internal bool VisibleInternal {
get { return is_visible; }
}
}
}
}
+
+ internal Size InternalClientSize { set { this.client_size = value; } }
+ internal virtual bool ActivateOnShow { get { return true; } }
#endregion // Internal Properties
#region Private & Internal Methods
if (!disposing) {
Control p = this;
do {
- if (!p.IsHandleCreated) {
- throw new InvalidOperationException("Cannot call Invoke or InvokeAsync on a control until the window handle is created");
- }
+ if (!p.IsHandleCreated)
+ throw new InvalidOperationException("Cannot call Invoke or BeginInvoke on a control until the window handle is created");
p = p.parent;
} while (p != null);
}
OnClick(EventArgs.Empty);
#else
OnDoubleClick(me);
+ OnMouseDoubleClick (me);
} else {
OnClick(me);
OnMouseClick (me);
XplatUI.SetParent(Handle,
(new_parent == null || !new_parent.IsHandleCreated) ? IntPtr.Zero : new_parent.Handle);
if (this is Form ) {
- XplatUI.SetWindowStyle (Handle, CreateParams);
+ ((Form) this).ChangingParent (new_parent);
}
}
}
}
+ // Sometimes we need to do this calculation without it being virtual (constructor)
+ internal Size InternalSizeFromClientSize (Size clientSize)
+ {
+ Rectangle ClientRect;
+ Rectangle WindowRect;
+ CreateParams cp;
+
+ ClientRect = new Rectangle (0, 0, clientSize.Width, clientSize.Height);
+ cp = this.CreateParams;
+
+ if (XplatUI.CalculateWindowRect (ref ClientRect, cp.Style, cp.ExStyle, null, out WindowRect))
+ return new Size (WindowRect.Width, WindowRect.Height);
+
+ return Size.Empty;
+ }
+
private void UpdateDistances() {
if (parent != null) {
if (bounds.Width > 0)
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string AccessibleDefaultActionDescription {
get {
- return AccessibilityObject.default_action;
+ if (accessibility_object != null)
+ return accessibility_object.default_action;
+ else
+ return null;
}
set {
- AccessibilityObject.default_action=value;
+ if (accessibility_object != null)
+ accessibility_object.default_action = value;
}
}
[MWFCategory("Accessibility")]
public string AccessibleDescription {
get {
- return AccessibilityObject.description;
+ if (accessibility_object != null)
+ return accessibility_object.description;
+ else
+ return null;
}
set {
- AccessibilityObject.description=value;
+ if (accessibility_object != null)
+ accessibility_object.description = value;
}
}
[MWFCategory("Accessibility")]
public string AccessibleName {
get {
- return AccessibilityObject.Name;
+ if (accessibility_object != null)
+ return accessibility_object.Name;
+ else
+ return null;
}
set {
- AccessibilityObject.Name=value;
+ if (accessibility_object != null)
+ accessibility_object.Name = value;
}
}
[MWFDescription("Role of the control"), MWFCategory("Accessibility")]
public AccessibleRole AccessibleRole {
get {
- return AccessibilityObject.role;
+ if (accessibility_object != null)
+ return accessibility_object.role;
+ else
+ return AccessibleRole.Default;
}
set {
- AccessibilityObject.role=value;
+ if (accessibility_object != null)
+ accessibility_object.role = value;
}
}
if (value != is_captured) {
if (value) {
is_captured = true;
- XplatUI.GrabWindow(this.Handle, IntPtr.Zero);
+ XplatUI.GrabWindow(Handle, IntPtr.Zero);
} else {
- XplatUI.UngrabWindow(this.Handle);
+ if (IsHandleCreated)
+ XplatUI.UngrabWindow(Handle);
is_captured = false;
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsHandleCreated {
get {
- if ((window != null) && (window.Handle != IntPtr.Zero)) {
- Hwnd hwnd = Hwnd.ObjectFromHandle (window.Handle);
- if (hwnd != null && !hwnd.zombie)
- return true;
- }
+ if (window == null || window.Handle == IntPtr.Zero)
+ return false;
- return false;
+ Hwnd hwnd = Hwnd.ObjectFromHandle (window.Handle);
+ if (hwnd != null && hwnd.zombie)
+ return false;
+
+ return true;
}
}
create_params.ClassName = XplatUI.DefaultClassName;
- create_params.ClassStyle = 0;
+ create_params.ClassStyle = (int)(XplatUIWin32.ClassStyle.CS_OWNDC | XplatUIWin32.ClassStyle.CS_DBLCLKS);
create_params.ExStyle = 0;
create_params.Param = 0;
public void BringToFront() {
if (parent != null) {
parent.child_controls.SetChildIndex(this, 0);
- parent.Refresh();
- } else {
+ }
+ else if (IsHandleCreated) {
XplatUI.SetZOrder(Handle, IntPtr.Zero, false, false);
}
}
is_created = true;
}
- Control [] controls = child_controls.GetAllControls ();
- for (int i=0; i<controls.Length; i++) {
- if (controls [i].is_visible)
- controls [i].CreateControl ();
- }
-
- UpdateChildrenZOrder();
-
if (binding_context == null) { // seem to be sent whenever it's null?
OnBindingContextChanged(EventArgs.Empty);
}
}
public DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects) {
- return XplatUI.StartDrag(this.window.Handle, data, allowedEffects);
+ if (IsHandleCreated)
+ return XplatUI.StartDrag(Handle, data, allowedEffects);
+ else
+ return DragDropEffects.None;
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
}
public Control GetChildAtPoint(Point pt) {
+ // MS's version causes the handle to be created. The stack trace shows that get_Handle is called here, but
+ // we'll just call CreateHandle instead.
+ CreateHandle ();
+
// Microsoft's version of this function doesn't seem to work, so I can't check
// if we only consider children or also grandchildren, etc.
// I'm gonna say 'children only'
}
public object Invoke (Delegate method, object[] args) {
+ Control p = this;
+ do {
+ if (!p.IsHandleCreated)
+ throw new InvalidOperationException("Cannot call Invoke or BeginInvoke on a control until the window handle is created");
+ p = p.parent;
+ } while (p != null);
+
if (!this.InvokeRequired) {
return method.DynamicInvoke(args);
}
return EndInvoke(result);
}
- internal object InvokeInternal (Delegate method, bool disposing) {
- return InvokeInternal(method, null, disposing);
- }
-
- internal object InvokeInternal (Delegate method, object[] args, bool disposing) {
- if (!this.InvokeRequired) {
- return method.DynamicInvoke(args);
- }
-
- IAsyncResult result = BeginInvokeInternal (method, args, disposing);
- return EndInvoke(result);
- }
-
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void PerformLayout() {
PerformLayout(null, null);
}
public virtual void Refresh() {
- if (IsHandleCreated) {
+ if (IsHandleCreated && Visible) {
Invalidate();
XplatUI.UpdateWindow(window.Handle);
[EditorBrowsable(EditorBrowsableState.Never)]
public void ResetBindings() {
- data_bindings.Clear();
+ if (data_bindings != null)
+ data_bindings.Clear();
}
[EditorBrowsable(EditorBrowsableState.Never)]
#if DebugFocus
private void printTree(Control c, string t) {
foreach(Control i in c.child_controls) {
- Console.WriteLine("{2}{0}.TabIndex={1}", i, i.tab_index, t);
- printTree(i, t+"\t");
+ Console.WriteLine ("{2}{0}.TabIndex={1}", i, i.tab_index, t);
+ printTree (i, t+"\t");
}
}
#endif
}
SetBoundsCore(x, y, width, height, specified);
- if (parent != null) {
+ if (parent != null)
parent.PerformLayout(this, "Bounds");
- }
}
public void Show () {
- if (!is_created) {
- this.CreateControl();
- }
-
- this.Visible=true;
+ this.Visible = true;
}
public void SuspendLayout() {
#region Protected Instance Methods
[EditorBrowsable(EditorBrowsableState.Advanced)]
- [MonoTODO("Implement this and tie it into Control.ControlAccessibleObject.NotifyClients")]
protected void AccessibilityNotifyClients(AccessibleEvents accEvent, int childID) {
- throw new NotImplementedException();
+ // turns out this method causes handle
+ // creation in 1.1. at first I thought this
+ // would be accomplished just by using
+ // get_AccessibilityObject, which would route
+ // through CreateAccessibilityInstance, which
+ // calls CreateControl. This isn't the case,
+ // though (as overriding
+ // CreateAccessibilityInstance and adding a
+ // CWL shows nothing. So we fudge it and put
+ // a CreateHandle here.
+
+#if ONLY_1_1
+ CreateHandle ();
+#endif
+
+ if (accessibility_object != null && accessibility_object is ControlAccessibleObject)
+ ((ControlAccessibleObject)accessibility_object).NotifyClients (accEvent, childID);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual AccessibleObject CreateAccessibilityInstance() {
+ CreateControl ();
return new Control.ControlAccessibleObject(this);
}
creator_thread = Thread.CurrentThread;
XplatUI.EnableWindow(window.Handle, is_enabled);
- XplatUI.SetVisible(window.Handle, is_visible, true);
if (clip_region != null) {
- XplatUI.SetClipRegion(Handle, clip_region);
+ XplatUI.SetClipRegion(window.Handle, clip_region);
}
// Set our handle with our parent
XplatUI.SetParent(window.Handle, parent.Handle);
}
- // Set our handle as parent for our children
- Control [] children;
-
- children = child_controls.GetAllControls ();
- for (int i = 0; i < children.Length; i++ ) {
- if (!children[i].RecreatingHandle)
- XplatUI.SetParent(children[i].Handle, window.Handle);
- }
-
UpdateStyles();
- XplatUI.SetAllowDrop (Handle, allow_drop);
+ XplatUI.SetAllowDrop (window.Handle, allow_drop);
// Find out where the window manager placed us
if ((CreateParams.Style & (int)WindowStyles.WS_CHILD) != 0) {
XplatUI.SetBorderStyle(window.Handle, (FormBorderStyle)border_style);
}
UpdateBounds();
-
- OnHandleCreated(EventArgs.Empty);
}
}
#if NET_2_0
protected virtual AccessibleObject GetAccessibilityObjectById (int objectId)
{
- throw new NotImplementedException ();
+ // XXX need to implement this.
+ return null;
}
#endif
}
protected virtual bool IsInputChar (char charCode) {
+ // XXX on MS.NET this method causes the handle to be created..
+ CreateHandle ();
+
return true;
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected void RecreateHandle() {
+ if (!IsHandleCreated)
+ return;
+
#if DebugRecreate
Console.WriteLine("Recreating control {0}", XplatUI.Window(window.Handle));
#endif
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void SetClientSizeCore(int x, int y) {
- Size NewSize = SizeFromClientSize (new Size (x, y));
+ Size NewSize = InternalSizeFromClientSize (new Size (x, y));
if (NewSize != Size.Empty)
SetBounds (bounds.X, bounds.Y, NewSize.Width, NewSize.Height, BoundsSpecified.Size);
throw new ArgumentException ("Cannot change toplevel style of a parented control.");
}
+ // XXX MS.NET causes handle to be created here
+ CreateHandle ();
+
if (this is Form) {
if (value == true) {
if (!Visible) {
}
protected virtual void SetVisibleCore(bool value) {
- if (value!=is_visible) {
- is_visible=value;
+ if (value != is_visible) {
+ is_visible = value;
- if (value && ((window.Handle == IntPtr.Zero) || !is_created)) {
+ if (is_visible && ((window.Handle == IntPtr.Zero) || !is_created)) {
CreateControl();
}
if (IsHandleCreated) {
- XplatUI.SetVisible(Handle, value, true);
+ XplatUI.SetVisible(Handle, is_visible, true);
// Explicitly move Toplevel windows to where we want them;
// apparently moving unmapped toplevel windows doesn't work
if (is_visible && (this is Form)) {
XplatUI.SetWindowPos(window.Handle, bounds.X, bounds.Y, bounds.Width, bounds.Height);
}
}
-
- OnVisibleChanged(EventArgs.Empty);
-
- if (value == false && parent != null && Focused) {
- Control container;
-
- // Need to start at parent, GetContainerControl might return ourselves if we're a container
- container = (Control)parent.GetContainerControl();
- if (container != null) {
- container.SelectNextControl(this, true, true, true, true);
- }
- }
-
- if (parent != null) {
- parent.PerformLayout(this, "visible");
- } else {
- if (is_visible)
- PerformLayout(this, "visible");
+ else {
+ OnVisibleChanged(EventArgs.Empty);
}
}
}
internal
#endif
virtual Size SizeFromClientSize (Size clientSize) {
- Rectangle ClientRect;
- Rectangle WindowRect;
- CreateParams cp;
-
- ClientRect = new Rectangle (0, 0, clientSize.Width, clientSize.Height);
- cp = this.CreateParams;
-
- if (XplatUI.CalculateWindowRect (ref ClientRect, cp.Style, cp.ExStyle, null, out WindowRect))
- return new Size (WindowRect.Width, WindowRect.Height);
-
- return Size.Empty;
+ return InternalSizeFromClientSize (clientSize);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected void UpdateBounds() {
+ if (!IsHandleCreated)
+ return;
+
int x;
int y;
int width;
int client_width;
int client_height;
- if (!IsHandleCreated) {
- CreateHandle();
- }
-
XplatUI.GetWindowPos(this.Handle, this is Form, out x, out y, out width, out height, out client_width, out client_height);
UpdateBounds(x, y, width, height, client_width, client_height);
return IntPtr.Zero;
}
- private void UpdateChildrenZOrder() {
+ // internal because we need to call it from ScrollableControl.OnVisibleChanged
+ internal void UpdateChildrenZOrder() {
Control [] controls;
if (!IsHandleCreated) {
return;
}
+ // XXX This code is severely broken. It leaks
+ // the "zero_sized" abstraction out of the X11
+ // backend and into Control.cs. It'll work on
+ // windows simply by virtue of windows never
+ // setting that field to true.
+ //
+ // basically what we need to guard against is
+ // calling XplatUI.SetZOrder on an hwnd that
+ // corresponds to an unmapped X window.
controls = child_controls.GetAllControls ();
- for (int i = 1; i < controls.Length; i++ ) {
- XplatUI.SetZOrder(controls[i].Handle, controls[i-1].Handle, false, false);
+
+ ArrayList children_to_order = new ArrayList ();
+
+ for (int i = 0; i < controls.Length; i ++) {
+ if (!controls[i].IsHandleCreated || !controls[i].VisibleInternal)
+ continue;
+
+ Hwnd hwnd = Hwnd.ObjectFromHandle (controls[i].Handle);
+ if (hwnd.zero_sized)
+ continue;
+
+ children_to_order.Add (controls[i]);
+ }
+
+ for (int i = 1; i < children_to_order.Count; i ++) {
+ Control upper = (Control)children_to_order[i-1];
+ Control lower = (Control)children_to_order[i];
+
+ XplatUI.SetZOrder(lower.Handle, upper.Handle, false, false);
}
}
return;
}
+ case Msg.WM_SHOWWINDOW: {
+ WmShowWindow (ref m);
+ return;
+ }
+
+ case Msg.WM_CREATE: {
+ WmCreate (ref m);
+ return;
+ }
+
case Msg.WM_MOUSE_ENTER: {
WmMouseEnter (ref m);
return;
private void WmDestroy (ref Message m) {
OnHandleDestroyed(EventArgs.Empty);
#if DebugRecreate
- IntPtr handle = window.Handle;
+ IntPtr handle = window.Handle;
#endif
window.InvalidateHandle();
if (is_recreating) {
#if DebugRecreate
- Console.WriteLine ("Creating handle for {0:X}", handle.ToInt32());
+ Console.WriteLine ("Creating handle for {0:X}", handle.ToInt32());
#endif
CreateHandle();
#if DebugRecreate
- Console.WriteLine (" + new handle = {0:X}", Handle.ToInt32());
+ Console.WriteLine (" + new handle = {0:X}", Handle.ToInt32());
#endif
is_recreating = false;
}
DefWndProc(ref m);
}
+ private void WmCreate (ref Message m) {
+ OnHandleCreated(EventArgs.Empty);
+ }
+
private void WmMouseWheel (ref Message m) {
DefWndProc(ref m);
OnMouseWheel (new MouseEventArgs (FromParamToMouseButtons ((int) m.WParam.ToInt32()),
OnMouseHover(EventArgs.Empty);
}
+ private void WmShowWindow (ref Message m) {
+ if (m.WParam.ToInt32() != 0) {
+ /* if we're being shown, make sure our child controls all have their handles created */
+ Control [] controls = child_controls.GetAllControls ();
+ for (int i=0; i<controls.Length; i++) {
+ if (controls [i].is_visible) {
+ controls [i].CreateControl ();
+ XplatUI.SetParent(controls[i].Handle, window.Handle);
+ }
+ }
+ }
+ else {
+ if (parent != null && Focused) {
+ Control container;
+
+ // Need to start at parent, GetContainerControl might return ourselves if we're a container
+ container = (Control)parent.GetContainerControl();
+ if (container != null) {
+ container.SelectNextControl(this, true, true, true, true);
+ }
+ }
+ }
+
+ if (is_toplevel) /* XXX make sure this works for mdi forms */
+ OnVisibleChanged(EventArgs.Empty);
+ }
+
private void WmSysKeyUp (ref Message m) {
if (ProcessKeyMessage(ref m)) {
m.Result = IntPtr.Zero;
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnVisibleChanged(EventArgs e) {
- if ((parent != null) && !Created && Visible) {
- if (!is_disposed) {
- CreateControl();
- PerformLayout();
- }
- }
-
EventHandler eh = (EventHandler)(Events [VisibleChangedEvent]);
if (eh != null)
eh (this, e);
private object param;
private IntPtr parent;
internal Menu menu;
+ internal Control control;
#endregion // Local variables
#region Public Constructors
}
#endregion // Public Instance Properties
+ #region Internal Instance Methods
+ internal bool IsSet (WindowStyles Style) {
+ return (this.style & (int) Style) != 0;
+ }
+
+ internal bool IsSet (WindowExStyles ExStyle) {
+ return (this.ex_style & (int)ExStyle) != 0;
+ }
+
+ internal bool HasWindowManager {
+ get {
+ return control != null && control is Form && ((Form) control).window_manager != null;
+ }
+ }
+ internal WindowExStyles WindowExStyle {
+ get {
+ return (WindowExStyles) ex_style;
+ }
+ set
+ {
+ ex_style = (int)value;
+ }
+ }
+
+ internal WindowStyles WindowStyle {
+ get {
+ return (WindowStyles) style;
+ }
+ set {
+ style = (int) value;
+ }
+ }
+ #endregion
+
#region Public Instance Methods
public override string ToString() {
return "CreateParams {'" + class_name +
static readonly Color def_background_color = ThemeEngine.Current.DataGridBackgroundColor;
static readonly Color def_caption_backcolor = ThemeEngine.Current.DataGridCaptionBackColor;
static readonly Color def_caption_forecolor = ThemeEngine.Current.DataGridCaptionForeColor;
- static readonly Color def_parentrowsback_color = ThemeEngine.Current.DataGridParentRowsBackColor;
- static readonly Color def_parentrowsfore_color = ThemeEngine.Current.DataGridParentRowsForeColor;
+ static readonly Color def_parent_rows_backcolor = ThemeEngine.Current.DataGridParentRowsBackColor;
+ static readonly Color def_parent_rows_forecolor = ThemeEngine.Current.DataGridParentRowsForeColor;
/* colors */
// XXX this needs addressing. Control.background_color should not be internal.
new Color background_color;
Color caption_backcolor;
Color caption_forecolor;
- Color parentrowsback_color;
- Color parentrowsfore_color;
+ Color parent_rows_backcolor;
+ Color parent_rows_forecolor;
/* flags to determine which areas of the datagrid are shown */
bool caption_visible;
- bool parentrows_visible;
+ bool parent_rows_visible;
GridTableStylesCollection styles_collection;
- DataGridParentRowsLabelStyle parentrowslabel_style;
+ DataGridParentRowsLabelStyle parent_rows_label_style;
DataGridTableStyle default_style;
DataGridTableStyle grid_style;
DataGridTableStyle current_style;
/* layout/rendering */
bool allow_navigation;
- int first_visiblerow;
- int first_visiblecolumn;
- int visiblerow_count;
- int visiblecolumn_count;
+ int first_visible_row;
+ int first_visible_column;
+ int visible_row_count;
+ int visible_column_count;
Font caption_font;
string caption_text;
bool flatmode;
bool is_editing; // Current cell is edit mode
bool is_changing;
- internal Stack dataSourceStack;
+ internal Stack data_source_stack;
#endregion // Local Variables
caption_text = string.Empty;
caption_visible = true;
datamember = string.Empty;
- parentrowsback_color = def_parentrowsback_color;
- parentrowsfore_color = def_parentrowsfore_color;
- parentrows_visible = true;
+ parent_rows_backcolor = def_parent_rows_backcolor;
+ parent_rows_forecolor = def_parent_rows_forecolor;
+ parent_rows_visible = true;
current_cell = new DataGridCell ();
- parentrowslabel_style = DataGridParentRowsLabelStyle.Both;
+ parent_rows_label_style = DataGridParentRowsLabelStyle.Both;
selected_rows = new Hashtable ();
selection_start = -1;
rows = new DataGridRelationshipRow [0];
SetStyle (ControlStyles.UserMouse, true);
- dataSourceStack = new Stack ();
+ data_source_stack = new Stack ();
back_button_image = ResourceImageLoader.Get ("go-previous.png");
//back_button_image.MakeTransparent (Color.Transparent);
[Browsable(false)]
public int FirstVisibleColumn {
- get { return first_visiblecolumn; }
+ get { return first_visible_column; }
}
[DefaultValue(false)]
}
public Color ParentRowsBackColor {
- get { return parentrowsback_color; }
+ get { return parent_rows_backcolor; }
set {
- if (parentrowsback_color != value) {
- parentrowsback_color = value;
- if (parentrows_visible) {
+ if (parent_rows_backcolor != value) {
+ parent_rows_backcolor = value;
+ if (parent_rows_visible) {
Refresh ();
}
}
}
public Color ParentRowsForeColor {
- get { return parentrowsfore_color; }
+ get { return parent_rows_forecolor; }
set {
- if (parentrowsfore_color != value) {
- parentrowsfore_color = value;
- if (parentrows_visible) {
+ if (parent_rows_forecolor != value) {
+ parent_rows_forecolor = value;
+ if (parent_rows_visible) {
Refresh ();
}
}
[DefaultValue(DataGridParentRowsLabelStyle.Both)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public DataGridParentRowsLabelStyle ParentRowsLabelStyle {
- get { return parentrowslabel_style; }
+ get { return parent_rows_label_style; }
set {
- if (parentrowslabel_style != value) {
- parentrowslabel_style = value;
- if (parentrows_visible) {
+ if (parent_rows_label_style != value) {
+ parent_rows_label_style = value;
+ if (parent_rows_visible) {
Refresh ();
}
[DefaultValue(true)]
public bool ParentRowsVisible {
- get { return parentrows_visible; }
+ get { return parent_rows_visible; }
set {
- if (parentrows_visible != value) {
- parentrows_visible = value;
+ if (parent_rows_visible != value) {
+ parent_rows_visible = value;
CalcAreasAndInvalidate ();
OnParentRowsVisibleChanged (EventArgs.Empty);
}
[Browsable(false)]
public int VisibleColumnCount {
- get { return visiblecolumn_count; }
+ get { return visible_column_count; }
}
[Browsable(false)]
public int VisibleRowCount {
- get { return visiblerow_count; }
+ get { return visible_row_count; }
}
#endregion // Public Instance Properties
}
internal int FirstVisibleRow {
- get { return first_visiblerow; }
+ get { return first_visible_row; }
}
internal int RowsCount {
}
internal bool ShowParentRows {
- get { return ParentRowsVisible && dataSourceStack.Count > 0; }
+ get { return ParentRowsVisible && data_source_stack.Count > 0; }
}
#endregion Private Instance Properties
protected virtual void GridVScrolled (object sender, ScrollEventArgs se)
{
- int old_first_visiblerow = first_visiblerow;
- first_visiblerow = se.NewValue;
+ int old_first_visible_row = first_visible_row;
+ first_visible_row = se.NewValue;
- if (first_visiblerow == old_first_visiblerow)
+ if (first_visible_row == old_first_visible_row)
return;
UpdateVisibleRowCount ();
- if (first_visiblerow == old_first_visiblerow)
+ if (first_visible_row == old_first_visible_row)
return;
- ScrollToRow (old_first_visiblerow, first_visiblerow);
+ ScrollToRow (old_first_visible_row, first_visible_row);
}
public HitTestInfo HitTest (Point position)
// From Point to Cell
public HitTestInfo HitTest (int x, int y)
{
- if (columnhdrs_area.Contains (x, y)) {
+ if (column_headers_area.Contains (x, y)) {
int offset_x = x + horiz_pixeloffset;
int column_x;
int column_under_mouse = FromPixelToColumn (offset_x, out column_x);
}
}
- if (rowhdrs_area.Contains (x, y)) {
+ if (row_headers_area.Contains (x, y)) {
int posy;
int rcnt = FirstVisibleRow + VisibleRowCount;
for (int r = FirstVisibleRow; r < rcnt; r++) {
pos_y = cells_area.Y + rows[row].VerticalOffset - rows[FirstVisibleRow].VerticalOffset;
if (y <= pos_y + rows[row].Height) {
int col_pixel;
- int column_cnt = first_visiblecolumn + visiblecolumn_count;
+ int column_cnt = first_visible_column + visible_column_count;
if (column_cnt > 0) {
- for (int column = first_visiblecolumn; column < column_cnt; column++) {
+ for (int column = first_visible_column; column < column_cnt; column++) {
if (CurrentTableStyle.GridColumnStyles[column].bound == false)
continue;
col_pixel = GetColumnStartingPixel (column);
[MonoTODO]
public void NavigateBack ()
{
- if (dataSourceStack.Count == 0)
+ if (data_source_stack.Count == 0)
return;
- DataGridDataSource source = (DataGridDataSource)dataSourceStack.Pop ();
+ DataGridDataSource source = (DataGridDataSource)data_source_stack.Pop ();
list_manager = source.list_manager;
rows = source.Rows;
selected_rows = source.SelectedRows;
previous_source.SelectedRows = selected_rows;
previous_source.SelectionStart = selection_start;
- dataSourceStack.Push (previous_source);
+ data_source_stack.Push (previous_source);
rows = null;
selected_rows = new Hashtable ();
case HitTestType.RowHeader:
bool expansion_click = false;
if (CurrentTableStyle.HasRelations) {
- if (e.X > rowhdrs_area.X + rowhdrs_area.Width / 2) {
+ if (e.X > row_headers_area.X + row_headers_area.Width / 2) {
/* it's in the +/- space */
if (IsExpanded (testinfo.Row))
Collapse (testinfo.Row);
protected virtual bool ShouldSerializeParentRowsBackColor ()
{
- return parentrowsback_color != def_parentrowsback_color;
+ return parent_rows_backcolor != def_parent_rows_backcolor;
}
protected virtual bool ShouldSerializeParentRowsForeColor ()
{
- return parentrowsback_color != def_parentrowsback_color;
+ return parent_rows_backcolor != def_parent_rows_backcolor;
}
protected bool ShouldSerializePreferredRowHeight ()
private void EnsureCellVisibility (DataGridCell cell)
{
- if (cell.ColumnNumber <= first_visiblecolumn ||
- cell.ColumnNumber + 1 >= first_visiblecolumn + visiblecolumn_count) {
+ if (cell.ColumnNumber <= first_visible_column ||
+ cell.ColumnNumber + 1 >= first_visible_column + visible_column_count) {
- first_visiblecolumn = GetFirstColumnForColumnVisibility (first_visiblecolumn, cell.ColumnNumber);
- int pixel = GetColumnStartingPixel (first_visiblecolumn);
+ first_visible_column = GetFirstColumnForColumnVisibility (first_visible_column, cell.ColumnNumber);
+ int pixel = GetColumnStartingPixel (first_visible_column);
ScrollToColumnInPixels (pixel);
horiz_scrollbar.Value = pixel;
Update();
}
- if (cell.RowNumber < first_visiblerow ||
- cell.RowNumber + 1 >= first_visiblerow + visiblerow_count) {
+ if (cell.RowNumber < first_visible_row ||
+ cell.RowNumber + 1 >= first_visible_row + visible_row_count) {
- if (cell.RowNumber + 1 >= first_visiblerow + visiblerow_count) {
- int old_first_visiblerow = first_visiblerow;
- first_visiblerow = 1 + cell.RowNumber - visiblerow_count;
+ if (cell.RowNumber + 1 >= first_visible_row + visible_row_count) {
+ int old_first_visible_row = first_visible_row;
+ first_visible_row = 1 + cell.RowNumber - visible_row_count;
UpdateVisibleRowCount ();
- ScrollToRow (old_first_visiblerow, first_visiblerow);
+ ScrollToRow (old_first_visible_row, first_visible_row);
} else {
- int old_first_visiblerow = first_visiblerow;
- first_visiblerow = cell.RowNumber;
+ int old_first_visible_row = first_visible_row;
+ first_visible_row = cell.RowNumber;
UpdateVisibleRowCount ();
- ScrollToRow (old_first_visiblerow, first_visiblerow);
+ ScrollToRow (old_first_visible_row, first_visible_row);
}
- vert_scrollbar.Value = first_visiblerow;
+ vert_scrollbar.Value = first_visible_row;
}
}
if (old_lm != list_manager) {
BindColumns ();
- /* reset first_visiblerow to 0 here before
+ /* reset first_visible_row to 0 here before
* doing anything that'll requires us to
* figure out if we need a scrollbar. */
vert_scrollbar.Value = 0;
horiz_scrollbar.Value = 0;
- first_visiblerow = 0;
+ first_visible_row = 0;
if (recreate_rows)
RecreateDataGridRows (false);
XplatUI.ScrollWindow (Handle, rows_area, 0, pixels, false);
/* if the row is still */
- if (CurrentRow >= first_visiblerow && CurrentRow < first_visiblerow + visiblerow_count)
+ if (CurrentRow >= first_visible_row && CurrentRow < first_visible_row + visible_row_count)
Edit ();
}
int width_of_all_columns;
internal Rectangle caption_area;
- internal Rectangle columnhdrs_area; // Used columns header area
- internal int columnhdrs_maxwidth; // Total width (max width) for columns headrs
- internal Rectangle rowhdrs_area; // Used Headers rows area
+ internal Rectangle column_headers_area; // Used columns header area
+ internal int column_headers_max_width; // Total width (max width) for columns headrs
+ internal Rectangle row_headers_area; // Used Headers rows area
internal Rectangle cells_area;
#endregion // Local Variables
return 0;
if (CurrentTableStyle.CurrentRowHeadersVisible) {
- width += rowhdrs_area.X + rowhdrs_area.Width;
- column_x += rowhdrs_area.X + rowhdrs_area.Width;
+ width += row_headers_area.X + row_headers_area.Width;
+ column_x += row_headers_area.X + row_headers_area.Width;
}
for (int col = 0; col < cnt; col++) {
}
// Which column has to be the first visible column to ensure a column visibility
- int GetFirstColumnForColumnVisibility (int current_first_visiblecolumn, int column)
+ int GetFirstColumnForColumnVisibility (int current_first_visible_column, int column)
{
int new_col = column;
int width = 0;
- if (column > current_first_visiblecolumn) { // Going forward
+ if (column > current_first_visible_column) { // Going forward
for (new_col = column; new_col >= 0; new_col--){
if (CurrentTableStyle.GridColumnStyles[new_col].bound == false)
continue;
UpdateVisibleRowCount ();
needHoriz = (width_of_all_columns > visible_cells_width);
- needVert = (allrows > visiblerow_count);
+ needVert = (allrows > visible_row_count);
}
int horiz_scrollbar_width = ClientRectangle.Width;
parent_rows.Width -= vert_scrollbar.Width;
if (!ShowingColumnHeaders) {
- if (columnhdrs_area.X + columnhdrs_area.Width > vert_scrollbar.Location.X) {
- columnhdrs_area.Width -= vert_scrollbar.Width;
+ if (column_headers_area.X + column_headers_area.Width > vert_scrollbar.Location.X) {
+ column_headers_area.Width -= vert_scrollbar.Width;
}
}
}
if (needVert) {
- if (rowhdrs_area.Y + rowhdrs_area.Height > ClientRectangle.Y + ClientRectangle.Height) {
- rowhdrs_area.Height -= horiz_scrollbar.Height;
+ if (row_headers_area.Y + row_headers_area.Height > ClientRectangle.Y + ClientRectangle.Height) {
+ row_headers_area.Height -= horiz_scrollbar.Height;
}
vert_scrollbar.Size = new Size (vert_scrollbar.Width,
void CalcCellsArea ()
{
- cells_area.X = ClientRectangle.X + rowhdrs_area.Width;
- cells_area.Y = columnhdrs_area.Y + columnhdrs_area.Height;
+ cells_area.X = ClientRectangle.X + row_headers_area.Width;
+ cells_area.Y = column_headers_area.Y + column_headers_area.Height;
cells_area.Width = ClientRectangle.X + ClientRectangle.Width - cells_area.X;
if (cells_area.Width < 0)
cells_area.Width = 0;
{
int max_width_cols;
- columnhdrs_area.X = ClientRectangle.X;
- columnhdrs_area.Y = parent_rows.Y + parent_rows.Height;
+ column_headers_area.X = ClientRectangle.X;
+ column_headers_area.Y = parent_rows.Y + parent_rows.Height;
// TODO: take into account Scrollbars
- columnhdrs_maxwidth = ClientRectangle.X + ClientRectangle.Width - columnhdrs_area.X;
- max_width_cols = columnhdrs_maxwidth;
+ column_headers_max_width = ClientRectangle.X + ClientRectangle.Width - column_headers_area.X;
+ max_width_cols = column_headers_max_width;
if (CurrentTableStyle.CurrentRowHeadersVisible)
max_width_cols -= RowHeaderWidth;
if (width_of_all_columns > max_width_cols) {
- columnhdrs_area.Width = columnhdrs_maxwidth;
+ column_headers_area.Width = column_headers_max_width;
} else {
- columnhdrs_area.Width = width_of_all_columns;
+ column_headers_area.Width = width_of_all_columns;
if (CurrentTableStyle.CurrentRowHeadersVisible)
- columnhdrs_area.Width += RowHeaderWidth;
+ column_headers_area.Width += RowHeaderWidth;
}
if (ShowingColumnHeaders)
- columnhdrs_area.Height = CurrentTableStyle.HeaderFont.Height + 6;
+ column_headers_area.Height = CurrentTableStyle.HeaderFont.Height + 6;
else
- columnhdrs_area.Height = 0;
+ column_headers_area.Height = 0;
}
void CalcParentRows ()
parent_rows.Y = caption_area.Y + caption_area.Height;
parent_rows.Width = ClientRectangle.Width;
if (ShowParentRows)
- parent_rows.Height = (CaptionFont.Height + 3) * dataSourceStack.Count;
+ parent_rows.Height = (CaptionFont.Height + 3) * data_source_stack.Count;
else
parent_rows.Height = 0;
}
void CalcParentButtons ()
{
- if (dataSourceStack.Count > 0 && CaptionVisible) {
+ if (data_source_stack.Count > 0 && CaptionVisible) {
back_button_rect = new Rectangle (ClientRectangle.X + ClientRectangle.Width - 2 * (caption_area.Height - 2) - 8,
caption_area.Height / 2 - back_button_image.Height / 2,
back_button_image.Width, back_button_image.Height);
void CalcRowHeaders ()
{
- rowhdrs_area.X = ClientRectangle.X;
- rowhdrs_area.Y = columnhdrs_area.Y + columnhdrs_area.Height;
- rowhdrs_area.Height = ClientRectangle.Height + ClientRectangle.Y - rowhdrs_area.Y;
+ row_headers_area.X = ClientRectangle.X;
+ row_headers_area.Y = column_headers_area.Y + column_headers_area.Height;
+ row_headers_area.Height = ClientRectangle.Height + ClientRectangle.Y - row_headers_area.Y;
if (CurrentTableStyle.CurrentRowHeadersVisible)
- rowhdrs_area.Width = RowHeaderWidth;
+ row_headers_area.Width = RowHeaderWidth;
else
- rowhdrs_area.Width = 0;
+ row_headers_area.Width = 0;
}
int GetVisibleRowCount (int visibleHeight)
void UpdateVisibleColumn ()
{
if (CurrentTableStyle.GridColumnStyles.Count == 0) {
- visiblecolumn_count = 0;
+ visible_column_count = 0;
return;
}
int max_pixel = horiz_pixeloffset + cells_area.Width;
int unused;
- first_visiblecolumn = FromPixelToColumn (horiz_pixeloffset, out unused);
+ first_visible_column = FromPixelToColumn (horiz_pixeloffset, out unused);
col = FromPixelToColumn (max_pixel, out unused);
- visiblecolumn_count = 1 + col - first_visiblecolumn;
+ visible_column_count = 1 + col - first_visible_column;
- visiblecolumn_count = 0;
- for (int i = first_visiblecolumn; i <= col; i ++) {
+ visible_column_count = 0;
+ for (int i = first_visible_column; i <= col; i ++) {
if (CurrentTableStyle.GridColumnStyles[i].bound)
- visiblecolumn_count++;
+ visible_column_count++;
}
- if (first_visiblecolumn + visiblecolumn_count < CurrentTableStyle.GridColumnStyles.Count) {
- visiblecolumn_count++; // Partially visible column
+ if (first_visible_column + visible_column_count < CurrentTableStyle.GridColumnStyles.Count) {
+ visible_column_count++; // Partially visible column
}
}
void UpdateVisibleRowCount ()
{
- visiblerow_count = GetVisibleRowCount (cells_area.Height);
+ visible_row_count = GetVisibleRowCount (cells_area.Height);
CalcRowHeaders (); // Height depends on num of visible rows
}
void InvalidateRowHeader (int row)
{
Rectangle rect_rowhdr = new Rectangle ();
- rect_rowhdr.X = rowhdrs_area.X;
- rect_rowhdr.Width = rowhdrs_area.Width;
+ rect_rowhdr.X = row_headers_area.X;
+ rect_rowhdr.Width = row_headers_area.Width;
rect_rowhdr.Height = rows[row].Height;
- rect_rowhdr.Y = rowhdrs_area.Y + rows[row].VerticalOffset - rows[FirstVisibleRow].VerticalOffset;
+ rect_rowhdr.Y = row_headers_area.Y + rows[row].VerticalOffset - rows[FirstVisibleRow].VerticalOffset;
Invalidate (rect_rowhdr);
}
// Returns the ColumnHeaders area excluding the rectangle shared with RowHeaders
internal Rectangle ColumnHeadersArea {
get {
- Rectangle columns_area = columnhdrs_area;
+ Rectangle columns_area = column_headers_area;
if (CurrentTableStyle.CurrentRowHeadersVisible) {
columns_area.X += RowHeaderWidth;
}
internal Rectangle RowHeadersArea {
- get { return rowhdrs_area; }
+ get { return row_headers_area; }
}
internal Rectangle ParentRowsArea {
using System.Drawing;
using System.Reflection;
using System.Collections;
+using System.Data;
namespace System.Windows.Forms {
- the System.ComponentModel.IBindingList interface, such as the System.ComponentModel.Collections.BindingList<> class.
- the System.ComponentModel.IBindingListView interface, such as the System.Windows.Forms.BindingSource class.
*/
- if (!(value is IList) && !(value is IListSource) && !(value is IBindingList) && !(value is IBindingListView)) {
+ if (!(value == null || value is IList || value is IListSource || value is IBindingList || value is IBindingListView)) {
throw new NotSupportedException("Type cant be binded.");
}
+ if (dataSource != null) {
+ columns.Clear();
+ rows.Clear();
+ if (dataSource is DataView) {
+ (dataSource as DataView).ListChanged -= OnListChanged;
+ }
+ if (dataSource is DataTable) {
+ ((dataSource as IListSource).GetList() as DataView).ListChanged -= OnListChanged;
+ }
+ }
dataSource = value;
OnDataSourceChanged(EventArgs.Empty);
- // DataBinding
- if (value is IList) {
- BindIList(value as IList);
- }
- else if (value is IListSource) {
- BindIListSource(value as IListSource);
- }
- else if (value is IBindingList) {
- BindIBindingList(value as IBindingList);
- }
- else if (value is IBindingListView) {
- BindIBindingListView(value as IBindingListView);
- //bool cosa = ((value as IBindingListView).SortDescriptions as IList).IsFixedSize;
+ if (dataSource != null) {
+ // DataBinding
+ if (value is IList) {
+ BindIList(value as IList);
+ }
+ else if (value is IListSource) {
+ BindIListSource(value as IListSource);
+ }
+ else if (value is IBindingList) {
+ BindIBindingList(value as IBindingList);
+ }
+ else if (value is IBindingListView) {
+ BindIBindingListView(value as IBindingListView);
+ //bool cosa = ((value as IBindingListView).SortDescriptions as IList).IsFixedSize;
+ }
+ OnDataBindingComplete(new DataGridViewBindingCompleteEventArgs(ListChangedType.Reset));
}
- OnDataBindingComplete(new DataGridViewBindingCompleteEventArgs(ListChangedType.Reset));
+ Invalidate();
}
}
}
protected override void OnPaint (PaintEventArgs e) {
base.OnPaint(e);
- //Console.WriteLine(e.ClipRectangle);
+ //Console.WriteLine("DataGridView.OnPaint-ClipRectangle: {0};", e.ClipRectangle);
Rectangle bounds = ClientRectangle; //e.ClipRectangle;
e.Graphics.FillRectangle(new SolidBrush(backgroundColor), bounds);
Pen pen = new Pen(gridColor);
if (horizontalScrollBar.Visible && (gridHeight + horizontalScrollBar.Height) > Size.Height) {
verticalScrollBar.Visible = true;
}
- if (verticalScrollBar.Visible && (gridWidth + horizontalScrollBar.Width) > Size.Width) {
+ if (verticalScrollBar.Visible && (gridWidth + verticalScrollBar.Width) > Size.Width) {
horizontalScrollBar.Visible = true;
}
if (horizontalScrollBar.Visible) {
}
private void BindIList (IList list) {
- if (list.Count > 0) {
+ if (list is DataView) {
+ DataView dataView = (DataView) list;
+ DataTable table = dataView.Table;
+ DataGridViewCell template = new DataGridViewTextBoxCell();
+ foreach (DataColumn dataColumn in table.Columns) {
+ DataGridViewColumn col = new DataGridViewColumn(template);
+ col.Name = dataColumn.ColumnName;
+ col.ValueType = dataColumn.DataType;
+ columns.Add(col);
+ }
+ dataView.ListChanged += OnListChanged;
+ }
+ else if (list.Count > 0) {
DataGridViewCell template = new DataGridViewTextBoxCell();
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(list[0])) {
DataGridViewColumn col = new DataGridViewColumn(template);
BindIList(list);
}
+ private void OnListChanged (object sender, ListChangedEventArgs args) {
+ if (args.OldIndex >= 0) {
+ }
+ if (args.NewIndex >= 0) {
+ object element = (sender as DataView)[args.NewIndex];
+ DataGridViewRow row = new DataGridViewRow();
+ rows.InternalAdd(row);
+ PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(element);
+ foreach (PropertyDescriptor property in properties) {
+ DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();
+ cell.Value = property.GetValue(element);
+ cell.ValueType = property.PropertyType;
+ row.Cells.Add(cell);
+ }
+ Invalidate();
+ }
+ }
+
public sealed class HitTestInfo {
public static readonly HitTestInfo Nowhere = new HitTestInfo(-1, -1, -1, -1, DataGridViewHitTestType.None);
private float fillWeight;
private bool frozen;
private DataGridViewColumnHeaderCell headerCell;
- private string headerText = "";
private DataGridViewAutoSizeColumnMode inheritedAutoSizeMode;
private bool isDataBound;
private int minimumWidth = 5;
[Localizable (true)]
public string HeaderText {
- get { return headerText; }
- set { headerText = value; }
+ get {
+ if (headerCell.Value == null) {
+ return String.Empty;
+ }
+ return (string) headerCell.Value;
+ }
+ set { headerCell.Value = value; }
}
[Browsable (false)]
Rectangle bounds, TreeNodeStates state)
{
this.bounds = bounds;
- this.draw_default = true;
+ this.draw_default = false;
this.graphics = graphics;
this.node = node;
this.state = state;
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007 Novell, Inc.
+//
+// Authors:
+// Jackson Harper (jackson@ximian.com)
+//
+
+#if NET_2_0
+
+using System;
+
+namespace System.Windows.Forms {
+
+ public delegate void DrawTreeNodeEventHandler (object sender, DrawTreeNodeEventArgs e);
+
+}
+
+
+#endif
[ComplexBindingProperties ("DataSource", "DataMember")]
#endif
public class ErrorProvider : Component, IExtenderProvider
+#if NET_2_0
+ , ISupportInitialize
+#endif
{
private class ErrorWindow : UserControl
return ep;
}
#endregion // Private Methods
+
+#if NET_2_0
+ void ISupportInitialize.BeginInit ()
+ {
+ }
+
+ void ISupportInitialize.EndInit ()
+ {
+ }
+#endif
}
}
using System.Drawing;
using System.IO;
using System.Resources;
+using System.Text;
using System.Threading;
using System.Xml;
}
}
}
-
- string internalfullfilename = String.Empty;
-
- if (!multiSelect) {
- string fileFromComboBox = fileNameComboBox.Text.Trim ();
-
- if (fileFromComboBox.Length > 0) {
- if (!Path.IsPathRooted (fileFromComboBox)) {
- // on unix currentRealFolder for "Recently used files" is null,
- // because recently used files don't get saved as links in a directory
- // recently used files get saved in a xml file
- if (mwfFileView.CurrentRealFolder != null)
- fileFromComboBox = Path.Combine (mwfFileView.CurrentRealFolder, fileFromComboBox);
- else
+
+ ArrayList files = new ArrayList ();
+ FileNamesTokenizer tokenizer = new FileNamesTokenizer (
+ fileNameComboBox.Text, multiSelect);
+ tokenizer.GetNextFile ();
+ while (tokenizer.CurrentToken != TokenType.EOF) {
+ string fileName = tokenizer.TokenText;
+ string internalfullfilename;
+
+ if (!Path.IsPathRooted (fileName)) {
+ // on unix currentRealFolder for "Recently used files" is null,
+ // because recently used files don't get saved as links in a directory
+ // recently used files get saved in a xml file
+ if (mwfFileView.CurrentRealFolder != null)
+ fileName = Path.Combine (mwfFileView.CurrentRealFolder, fileName);
+ else
if (mwfFileView.CurrentFSEntry != null) {
- fileFromComboBox = mwfFileView.CurrentFSEntry.FullName;
+ fileName = mwfFileView.CurrentFSEntry.FullName;
}
- }
-
- FileInfo fileInfo = new FileInfo (fileFromComboBox);
-
- if (fileInfo.Exists || fileDialogType == FileDialogType.SaveFileDialog) {
- internalfullfilename = fileFromComboBox;
+ }
+
+ FileInfo fileInfo = new FileInfo (fileName);
+
+ if (fileInfo.Exists || fileDialogType == FileDialogType.SaveFileDialog) {
+ internalfullfilename = fileName;
+ } else {
+ DirectoryInfo dirInfo = new DirectoryInfo (fileName);
+ if (dirInfo.Exists) {
+ mwfFileView.ChangeDirectory (null, dirInfo.FullName);
+ fileNameComboBox.Text = null;
+ return;
} else {
- DirectoryInfo dirInfo = new DirectoryInfo (fileFromComboBox);
- if (dirInfo.Exists) {
- mwfFileView.ChangeDirectory (null, dirInfo.FullName);
- fileNameComboBox.Text = null;
- return;
- } else {
- internalfullfilename = fileFromComboBox;
- }
+ internalfullfilename = fileName;
}
- } else
- return;
-
+ }
+
if (fileDialogType == FileDialogType.OpenFileDialog) {
if (checkFileExists) {
if (!File.Exists (internalfullfilename)) {
string message = "\"" + internalfullfilename + "\" doesn't exist. Please verify that you have entered the correct file name.";
MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
-
return;
}
}
if (File.Exists (internalfullfilename)) {
string message = "\"" + internalfullfilename + "\" exists. Overwrite ?";
DialogResult dr = MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
-
if (dr == DialogResult.Cancel)
return;
}
}
-
+
if (createPrompt) {
if (!File.Exists (internalfullfilename)) {
string message = "\"" + internalfullfilename + "\" doesn't exist. Create ?";
DialogResult dr = MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
-
if (dr == DialogResult.Cancel)
return;
}
}
- }
-
- if (fileDialogType == FileDialogType.SaveFileDialog) {
+
if (addExtension) {
string extension_to_use = String.Empty;
string filter_exentsion = String.Empty;
-
+
if (fileFilter != null) {
- FilterStruct filterstruct = (FilterStruct)fileFilter.FilterArrayList [filterIndex - 1];
-
+ FilterStruct filterstruct = (FilterStruct) fileFilter.FilterArrayList [filterIndex - 1];
+
for (int i = 0; i < filterstruct.filters.Count; i++) {
string extension = filterstruct.filters [i];
-
+
if (extension.StartsWith ("*"))
extension = extension.Remove (0, 1);
-
+
if (extension.IndexOf ('*') != -1)
continue;
-
+
filter_exentsion = extension;
break;
}
}
-
+
if (filter_exentsion != String.Empty)
extension_to_use = filter_exentsion;
else
if (DefaultExt.Length > 0)
extension_to_use = "." + DefaultExt;
-
+
if (!internalfullfilename.EndsWith (extension_to_use))
internalfullfilename += extension_to_use;
}
}
- // do not use the FileName setter internally, as this will
- // cause the illegal character check to be skipped, and we
- // do not want this for filename users have entered
- fileNames = new string [1] { internalfullfilename };
-
- mwfFileView.WriteRecentlyUsed (internalfullfilename);
- } else // multiSelect = true
- if (fileDialogType != FileDialogType.SaveFileDialog) {
- if (mwfFileView.SelectedItems.Count > 0) {
- // first remove all selected directories
- ArrayList al = new ArrayList ();
-
- foreach (FileViewListViewItem lvi in mwfFileView.SelectedItems) {
- FSEntry fsEntry = lvi.FSEntry;
-
- if (fsEntry.Attributes != FileAttributes.Directory) {
- al.Add (fsEntry);
- }
- }
-
- fileNames = new string [al.Count];
-
- for (int i = 0; i < al.Count; i++) {
- fileNames [i] = ((FSEntry)al [i]).FullName;
- }
+ files.Add (internalfullfilename);
+ tokenizer.GetNextFile ();
+ }
+
+ if (files.Count > 0) {
+ fileNames = new string [files.Count];
+ for (int i = 0; i < files.Count; i++) {
+ string fileName = (string) files [i];
+ fileNames [i] = fileName;
+ mwfFileView.WriteRecentlyUsed (fileName);
+
+ if (!File.Exists (fileName))
+ // ignore files that do not exist
+ continue;
+
+ if (fileNameComboBox.Items.IndexOf (fileName) == -1)
+ fileNameComboBox.Items.Insert (0, fileName);
}
+
+ // remove items above the maximum items that we want to display
+ while (fileNameComboBox.Items.Count > MaxFileNameItems)
+ fileNameComboBox.Items.RemoveAt (MaxFileNameItems);
}
-
+
if (checkPathExists && mwfFileView.CurrentRealFolder != null) {
if (!Directory.Exists (mwfFileView.CurrentRealFolder)) {
string message = "\"" + mwfFileView.CurrentRealFolder + "\" doesn't exist. Please verify that you have entered the correct directory name.";
return;
}
}
-
+
if (restoreDirectory) {
- lastFolder = restoreDirectoryString;
+ lastFolder = restoreDirectoryString;
} else {
lastFolder = mwfFileView.CurrentFolder;
}
- foreach (string fileName in fileNames) {
- if (!File.Exists (fileName))
- // ignore files that do not exist
- continue;
-
- if (fileNameComboBox.Items.IndexOf (fileName) == -1)
- fileNameComboBox.Items.Insert (0, fileName);
- }
-
- // remove items above the maximum items that we want to display
- while (fileNameComboBox.Items.Count > MaxFileNameItems)
- fileNameComboBox.Items.RemoveAt (MaxFileNameItems);
-
CancelEventArgs cancelEventArgs = new CancelEventArgs ();
-
+
cancelEventArgs.Cancel = false;
-
+
OnFileOk (cancelEventArgs);
-
+
form.DialogResult = DialogResult.OK;
}
if (RestoreDirectory)
restoreDirectoryString = lastFolder;
}
+
+ class FileNamesTokenizer
+ {
+ public FileNamesTokenizer (string text, bool allowMultiple)
+ {
+ _text = text;
+ _position = 0;
+ _tokenType = TokenType.BOF;
+ _allowMultiple = allowMultiple;
+ }
+
+ public TokenType CurrentToken {
+ get { return _tokenType; }
+ }
+
+ public string TokenText {
+ get { return _tokenText; }
+ }
+
+ public bool AllowMultiple {
+ get { return _allowMultiple; }
+ }
+
+ private int ReadChar ()
+ {
+ if (_position < _text.Length) {
+ return _text [_position++];
+ } else {
+ return -1;
+ }
+ }
+
+ private int PeekChar ()
+ {
+ if (_position < _text.Length) {
+ return _text [_position];
+ } else {
+ return -1;
+ }
+ }
+
+ private void SkipWhitespaceAndQuotes ()
+ {
+ int ch;
+
+ while ((ch = PeekChar ()) != -1) {
+ if ((char) ch != '"' && !char.IsWhiteSpace ((char) ch))
+ break;
+ ReadChar ();
+ }
+ }
+
+ public void GetNextFile ()
+ {
+ if (_tokenType == TokenType.EOF)
+ throw new Exception ("");
+
+ int ch;
+
+ SkipWhitespaceAndQuotes ();
+
+ if (PeekChar () == -1) {
+ _tokenType = TokenType.EOF;
+ return;
+ }
+
+ _tokenType = TokenType.FileName;
+ StringBuilder sb = new StringBuilder ();
+
+ while ((ch = PeekChar ()) != -1) {
+ if ((char) ch == '"') {
+ ReadChar ();
+ if (AllowMultiple)
+ break;
+ int pos = _position;
+
+ SkipWhitespaceAndQuotes ();
+ if (PeekChar () == -1) {
+ break;
+ }
+ _position = ++pos;
+ sb.Append ((char) ch);
+ } else {
+ sb.Append ((char) ReadChar ());
+ }
+ }
+
+ _tokenText = sb.ToString ();
+ }
+
+ private readonly bool _allowMultiple;
+ private int _position;
+ private readonly string _text;
+ private TokenType _tokenType;
+ private string _tokenText;
+ }
+
+ internal enum TokenType
+ {
+ BOF,
+ EOF,
+ FileName,
+ }
}
#endregion
// Author:
// Daniel Nauck (dna(at)mono-project(dot)de)
-#if NET_2_0
using System;
using System.ComponentModel;
namespace System.Windows.Forms
{
- public class FlatButtonAppearance
+#if NET_2_0
+ public
+#endif
+ class FlatButtonAppearance
{
private Color borderColor = Color.Empty;
private int borderSize = 1;
}
}
}
-}
-#endif
\ No newline at end of file
+}
\ No newline at end of file
}
}
+ internal void ChangingParent (Control new_parent)
+ {
+ if (IsMdiChild) {
+ return;
+ }
+
+ if (new_parent == null) {
+ window_manager = null;
+ } else if (new_parent is MdiClient) {
+ window_manager = new MdiWindowManager (this, (MdiClient) new_parent);
+ } else {
+ window_manager = new FormWindowManager (this);
+ if (IsHandleCreated) {
+ XplatUI.SetWindowStyle (Handle, CreateParams);
+ }
+ }
+
+ if (window_manager != null) {
+ window_manager.UpdateWindowState (window_state, window_state, true);
+ }
+ }
#endregion // Private & Internal Methods
#region Public Classes
default_maximized_bounds = Rectangle.Empty;
owned_forms = new Form.ControlCollection(this);
transparency_key = Color.Empty;
-
- // FIXME: this should disappear just as soon as the handle creation is done in the right place (here is too soon()
- UpdateBounds();
-
+ InternalClientSize = new Size (this.Width - (SystemInformation.FrameBorderSize.Width * 2), this.Height - (SystemInformation.FrameBorderSize.Height * 2) - SystemInformation.CaptionHeight);
}
#endregion // Public Constructor & Destructor
window_manager.UpdateBorderStyle (value);
}
- UpdateStyles();
+ Size current_client_size = ClientSize;
- if (this.Visible)
- this.Size = SizeFromClientSize (this.ClientSize);
- else
- XplatUI.InvalidateNC (this.Handle);
+ if (this.IsHandleCreated) {
+ UpdateStyles();
+ this.Size = InternalSizeFromClientSize (current_client_size);
+ }
}
}
set {
if (maximize_box != value) {
maximize_box = value;
- if (IsHandleCreated) {
- RecreateHandle();
- }
UpdateStyles();
}
}
if (value != null) {
mdi_parent = value;
- window_manager = new MdiWindowManager (this,
- mdi_parent.MdiContainer);
+ if (window_manager == null) {
+ window_manager = new MdiWindowManager (this, mdi_parent.MdiContainer);
+ }
+
mdi_parent.MdiContainer.Controls.Add (this);
mdi_parent.MdiContainer.Controls.SetChildIndex (this, 0);
-
- RecreateHandle ();
-
+
+ if (IsHandleCreated)
+ RecreateHandle ();
} else if (mdi_parent != null) {
mdi_parent = null;
window_manager = null;
FormBorderStyle = form_border_style;
- RecreateHandle ();
+ if (IsHandleCreated)
+ RecreateHandle ();
}
}
}
set {
if (minimize_box != value) {
minimize_box = value;
- if (IsHandleCreated) {
- RecreateHandle();
- }
UpdateStyles();
}
}
cp.Param = 0;
cp.Parent = IntPtr.Zero;
cp.menu = ActiveMenu;
+ cp.control = this;
- if (start_position == FormStartPosition.WindowsDefaultLocation && !IsMdiChild) {
- cp.X = unchecked((int)0x80000000);
- cp.Y = unchecked((int)0x80000000);
+ if (start_position == FormStartPosition.WindowsDefaultLocation && !IsMdiChild && Parent == null) {
+ cp.X = unchecked ((int)0x80000000);
+ cp.Y = unchecked ((int)0x80000000);
} else {
cp.X = Left;
cp.Y = Top;
cp.ExStyle |= (int)WindowExStyles.WS_EX_CONTEXTHELP;
}
- if (Visible)
+ if (VisibleInternal)
cp.Style |= (int)WindowStyles.WS_VISIBLE;
if (opacity < 1.0 || TransparencyKey != Color.Empty) {
}
}
}
-#if NET_2_0
+
+#if !NET_2_0
+ internal
+#else
[MonoTODO ("Implemented for Win32, needs X11 implementation")]
- protected virtual bool ShowWithoutActivation {
+ protected
+#endif
+ virtual bool ShowWithoutActivation {
get { return false; }
}
-#endif
#endregion // Protected Instance Properties
#region Public Static Methods
bool confined;
IntPtr capture_window;
- owner = null;
+ Form owner_to_be = null;
if (ownerWin32 != null) {
Control c = Control.FromHandle (ownerWin32.Handle);
if (c != null)
- owner = c.TopLevelControl as Form;
+ owner_to_be = c.TopLevelControl as Form;
}
- if (owner == this) {
+ if (owner_to_be == this) {
throw new ArgumentException ("Forms cannot own themselves or their owners.", "owner");
}
+ " form from any parent form before calling ShowDialog.");
}
+ if (owner_to_be != null)
+ owner = owner_to_be;
+
#if broken
// Can't do this, will screw us in the modal loop
form_parent_window.Parent = this.owner;
protected override void CreateHandle() {
base.CreateHandle ();
+ if (!IsHandleCreated) {
+ return;
+ }
+
Application.AddForm (this);
UpdateBounds();
}
}
-#if NET_2_0
- if (this.ShowWithoutActivation)
- Hwnd.ObjectFromHandle (this.Handle).no_activate = true;
-#endif
-
XplatUI.SetWindowMinMax(window.Handle, maximized_bounds, minimum_size, maximum_size);
if ((FormBorderStyle != FormBorderStyle.FixedDialog) && (icon != null)) {
XplatUI.SetIcon(window.Handle, icon);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
- protected override void SetVisibleCore(bool value) {
+ protected override void SetVisibleCore(bool value)
+ {
is_changing_visible_state = true;
has_been_visible = value || has_been_visible;
base.SetVisibleCore (value);
Console.WriteLine(DateTime.Now.ToLongTimeString () + " Form {0} ({2}) received message {1}", window.Handle == IntPtr.Zero ? this.Text : XplatUI.Window(window.Handle), m.ToString (), Text);
#endif
- if (window_manager != null && window_manager.HandleMessage (ref m)) {
+ if (window_manager != null && window_manager.WndProc (ref m)) {
return;
}
switch((Msg)m.Msg) {
case Msg.WM_DESTROY: {
- base.WndProc(ref m);
- if (!RecreatingHandle) {
+ if (!RecreatingHandle)
this.closing = true;
- }
- return;
- }
- case Msg.WM_CLOSE_INTERNAL: {
- DestroyHandle();
- break;
+ base.WndProc(ref m);
+ return;
}
case Msg.WM_CLOSE: {
Form act = Form.ActiveForm;
+ // Don't close this form if there's another modal form visible.
if (act != null && act != this && act.Modal == true) {
- return;
+ // Check if any of the parents up the tree is the modal form,
+ // in which case we can still close this form.
+ Control current = this;
+ while (current != null && current.Parent != act) {
+ current = current.Parent;
+ }
+ if (current == null || current.Parent != act) {
+ return;
+ }
}
if (mdi_container != null) {
}
}
}
+
+ internal override bool ActivateOnShow { get { return !this.ShowWithoutActivation; } }
#region Events
static object ActivatedEvent = new object ();
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
+//
+// Authors:
+// Rolf Bjarne Kvinge (RKvinge@novell.com)
+//
+//
+
+
+using System;
+using System.Drawing;
+using System.Runtime.InteropServices;
+
+namespace System.Windows.Forms
+{
+ internal class FormWindowManager : InternalWindowManager
+ {
+ private bool pending_activation;
+ public FormWindowManager (Form form) : base (form)
+ {
+
+ form.MouseCaptureChanged += new EventHandler (HandleCaptureChanged);
+ }
+
+ void HandleCaptureChanged (object sender, EventArgs e)
+ {
+ if (pending_activation && !form.Capture) {
+ form.BringToFront ();
+ pending_activation = false;
+ }
+ }
+
+ public override void PointToClient (ref int x, ref int y)
+ {
+ XplatUI.ScreenToClient (Form.Parent.Handle, ref x, ref y);
+ }
+
+
+ protected override bool HandleNCLButtonDown (ref Message m)
+ {
+ // MS seems to be doing this on mouse up, but we don't get WM_NCLBUTTONUP when anything is captured
+ // so work around this using MouseCaptureChanged.
+ pending_activation = true;
+
+ return base.HandleNCLButtonDown (ref m);
+ }
+
+ protected override void HandleTitleBarDoubleClick (int x, int y)
+ {
+ if (IconRectangleContains (x, y)) {
+ form.Close ();
+ } else if (form.WindowState == FormWindowState.Maximized) {
+ form.WindowState = FormWindowState.Normal;
+ } else {
+ form.WindowState = FormWindowState.Maximized;
+ }
+ base.HandleTitleBarDoubleClick (x, y);
+ }
+
+ internal override Rectangle MaximizedBounds {
+ get {
+ Rectangle result = base.MaximizedBounds;
+ int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this);
+ result.Inflate (bw, bw);
+ return result;
+ }
+ }
+ }
+}
internal static Bitmap bmp = new Bitmap(1, 1, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
internal static Graphics bmp_g = Graphics.FromImage (bmp);
internal XEventQueue queue;
- internal bool no_activate; // For Win32, popup windows will not steal focus
internal WindowExStyles initial_ex_style;
#endregion // Local Variables
namespace System.Windows.Forms {
- internal class InternalWindowManager {
+ internal abstract class InternalWindowManager {
private Size MinTitleBarSize = new Size (115, 25);
-
+ private TitleButtons title_buttons;
internal Form form;
- internal TitleButton close_button;
- internal TitleButton maximize_button;
- internal TitleButton minimize_button;
-
- private ToolTip.ToolTipWindow tooltip;
- private Timer tooltip_timer;
- private TitleButton tooltip_hovered_button;
- private TitleButton tooltip_hidden_button;
- private const int tooltip_hide_interval = 3000;
- private const int tooltip_show_interval = 1000;
- private TitleButton [] title_buttons = new TitleButton [3];
-
// moving windows
internal Point start;
internal State state;
protected Point clicked_point;
private FormPos sizing_edge;
internal Rectangle virtual_position;
-
- public class TitleButton {
- public Rectangle Rectangle;
- public ButtonState State;
- public CaptionButton Caption;
- public EventHandler Clicked;
- public TitleButton (CaptionButton caption, EventHandler clicked)
- {
- Caption = caption;
- Clicked = clicked;
- }
- }
+ private Rectangle normal_bounds;
+ private Rectangle iconic_bounds;
+
public enum State {
Idle,
form.SizeChanged += new EventHandler (FormSizeChangedHandler);
- CreateButtons ();
+ title_buttons = new TitleButtons (form);
+ ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
}
public Form Form {
get { return form; }
}
+
+ public int IconWidth {
+ get { return TitleBarHeight - 5; }
+ }
- public bool AnyPushedTitleButtons {
+ public TitleButtons TitleButtons {
get {
- return (minimize_button != null && minimize_button.State == ButtonState.Pushed) ||
- (maximize_button != null && maximize_button.State == ButtonState.Pushed) ||
- (close_button != null && close_button.State == ButtonState.Pushed);
+ return title_buttons;
+ }
+ }
+ internal Rectangle NormalBounds {
+ get {
+ return normal_bounds;
+ }
+ set {
+ normal_bounds = value;
+ }
+ }
+ internal Size IconicSize {
+ get {
+ int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this);
+ return new Size (152 + bw * 2, TitleBarHeight + bw * 2);
}
}
- public int IconWidth {
- get { return TitleBarHeight - 5; }
+ internal Rectangle IconicBounds {
+ get {
+ if (iconic_bounds == Rectangle.Empty)
+ return Rectangle.Empty;
+ Rectangle result = iconic_bounds;
+ result.Y = Form.Parent.ClientRectangle.Bottom - iconic_bounds.Y;
+ return result;
+ }
+ set {
+ iconic_bounds = value;
+ iconic_bounds.Y = Form.Parent.ClientRectangle.Bottom - iconic_bounds.Y;
+ }
+ }
+
+ internal virtual Rectangle MaximizedBounds {
+ get {
+ return Form.Parent.ClientRectangle;
+ }
}
+
+ public virtual void UpdateWindowState (FormWindowState old_window_state, FormWindowState new_window_state, bool force)
+ {
+ if (old_window_state == FormWindowState.Normal) {
+ NormalBounds = form.Bounds;
+ } else if (old_window_state == FormWindowState.Minimized) {
+ IconicBounds = form.Bounds;
+ }
+
+ switch (new_window_state) {
+ case FormWindowState.Minimized:
+ if (IconicBounds == Rectangle.Empty) {
+ Size size = IconicSize;
+ Point location = new Point (0, Form.Parent.ClientSize.Height - size.Height);
+ IconicBounds = new Rectangle (location, size);
+ }
+ form.Bounds = IconicBounds;
+ break;
+ case FormWindowState.Maximized:
+ form.Bounds = MaximizedBounds;
+ break;
+ case FormWindowState.Normal:
+ form.Bounds = NormalBounds;
+ break;
+ }
- public virtual bool HandleMessage (ref Message m)
+ UpdateWindowDecorations (new_window_state);
+ form.ResetCursor ();
+ }
+
+ public virtual void UpdateWindowDecorations (FormWindowState window_state)
{
+ ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
+ XplatUI.RequestNCRecalc (form.Handle);
+ }
+
+ public virtual bool WndProc (ref Message m)
+ {
+#if debug
+ Console.WriteLine(DateTime.Now.ToLongTimeString () + " " + this.GetType () .Name + " (Handle={0},Text={1}) received message {2}", form.IsHandleCreated ? form.Handle : IntPtr.Zero, form.Text, m.ToString ());
+#endif
+
switch ((Msg)m.Msg) {
ncp.rgrc1.right -= bw;
}
- // This is necessary for Linux, can't handle 0-sized
+ // This is necessary for Linux, can't handle <= 0-sized
// client areas correctly.
- if (ncp.rgrc1.right == ncp.rgrc1.left) {
- ncp.rgrc1.right++;
+ if (ncp.rgrc1.right <= ncp.rgrc1.left) {
+ ncp.rgrc1.right += ncp.rgrc1.left - ncp.rgrc1.right + 1;
}
- if (ncp.rgrc1.top == ncp.rgrc1.bottom) {
- ncp.rgrc1.bottom++;
+ if (ncp.rgrc1.top >= ncp.rgrc1.bottom) {
+ ncp.rgrc1.bottom += ncp.rgrc1.top - ncp.rgrc1.bottom + 1;
}
Marshal.StructureToPtr (ncp, m.LParam, true);
return;
}
- CreateButtons ();
+ ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
}
- #region ToolTip helpers
- // Called from MouseMove if mouse is over a button
- private void ToolTipStart (TitleButton button)
- {
- tooltip_hovered_button = button;
-
- if (tooltip_hovered_button == tooltip_hidden_button)
- return;
- tooltip_hidden_button = null;
-
- if (tooltip != null && tooltip.Visible)
- ToolTipShow (true);
-
- if (tooltip_timer == null) {
-
- tooltip_timer = new Timer ();
- tooltip_timer.Tick += new EventHandler (ToolTipTimerTick);
- }
-
- tooltip_timer.Interval = tooltip_show_interval;
- tooltip_timer.Start ();
- tooltip_hovered_button = button;
- }
- private void ToolTipTimerTick (object sender, EventArgs e)
- {
- if (tooltip_timer.Interval == tooltip_hide_interval) {
- tooltip_hidden_button = tooltip_hovered_button;
- ToolTipHide (false);
- } else {
- ToolTipShow (false);
- }
- }
- // Called from timer (with only_refresh = false)
- // Called from ToolTipStart if tooltip is already shown (with only_refresh = true)
- private void ToolTipShow (bool only_refresh)
- {
- string text = Locale.GetText (tooltip_hovered_button.Caption.ToString ());
-
- tooltip_timer.Interval = tooltip_hide_interval;
- tooltip_timer.Enabled = true;
-
- if (only_refresh && (tooltip == null || !tooltip.Visible )) {
- return;
- }
-
- if (tooltip == null)
- tooltip = new ToolTip.ToolTipWindow ();
- else if (tooltip.Text == text && tooltip.Visible)
- return;
- else if (tooltip.Visible)
- tooltip.Visible = false;
-
- if (form.WindowState == FormWindowState.Maximized)
- tooltip.Present (form.MdiParent, text);
- else
- tooltip.Present (form, text);
-
- }
-
- // Called from MouseLeave (with reset_hidden_button = true)
- // Called from MouseDown (with reset_hidden_button = false)
- // Called from MouseMove if mouse isn't over any button (with reset_hidden_button = false)
- // Called from Timer if hiding (with reset_hidden_button = false)
- private void ToolTipHide (bool reset_hidden_button)
- {
- if (tooltip_timer != null)
- tooltip_timer.Enabled = false;
- if (tooltip != null && tooltip.Visible)
- tooltip.Visible = false;
- if (reset_hidden_button)
- tooltip_hidden_button = null;
- }
- #endregion
public virtual void SetWindowState (FormWindowState old_state, FormWindowState window_state)
{
+ UpdateWindowState (old_state, window_state, false);
}
public virtual FormWindowState GetWindowState ()
return style != FormBorderStyle.FixedToolWindow && style != FormBorderStyle.SizableToolWindow;
}
+ public bool IconRectangleContains (int x, int y)
+ {
+ if (form.Icon == null)
+ return false;
+
+ int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this);
+ Rectangle icon = new Rectangle (bw + 3, bw + 2, IconWidth, IconWidth);
+ return icon.Contains (x, y);
+ }
+
protected virtual void Activate ()
{
form.Refresh ();
}
- public virtual bool IsActive ()
- {
- return true;
+ public virtual bool IsActive {
+ get {
+ return true;
+ }
}
XplatUI.InvalidateNC (form.Handle);
}
- protected void CreateButtons ()
- {
- switch (form.FormBorderStyle) {
- case FormBorderStyle.None:
- close_button = null;
- minimize_button = null;
- maximize_button = null;
- if (IsMaximized || IsMinimized)
- goto case FormBorderStyle.Sizable;
- break;
- case FormBorderStyle.FixedToolWindow:
- case FormBorderStyle.SizableToolWindow:
- close_button = new TitleButton (CaptionButton.Close, new EventHandler (CloseClicked));
- if (IsMaximized || IsMinimized)
- goto case FormBorderStyle.Sizable;
- break;
- case FormBorderStyle.FixedSingle:
- case FormBorderStyle.Fixed3D:
- case FormBorderStyle.FixedDialog:
- case FormBorderStyle.Sizable:
- close_button = new TitleButton (CaptionButton.Close, new EventHandler (CloseClicked));
- minimize_button = new TitleButton (CaptionButton.Minimize, new EventHandler (MinimizeClicked));
- maximize_button = new TitleButton (CaptionButton.Maximize, new EventHandler (MaximizeClicked));
- break;
- }
-
- title_buttons [0] = close_button;
- title_buttons [1] = minimize_button;
- title_buttons [2] = maximize_button;
-
- ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
- }
-
protected virtual bool HandleRButtonDown (ref Message m)
{
Activate ();
protected virtual void HandleTitleBarLeave (int x, int y)
{
- foreach (TitleButton button in title_buttons) {
- if (button != null) {
- button.State = ButtonState.Normal;
- }
- }
- ToolTipHide (true);
- return;
+ title_buttons.MouseLeave (x, y);
}
protected virtual void HandleTitleBarMouseMove (int x, int y)
{
bool any_change = false;
- bool any_tooltip = false;
- bool any_pushed_buttons = AnyPushedTitleButtons;
- foreach (TitleButton button in title_buttons) {
- if (button == null)
- continue;
-
- if (button.Rectangle.Contains (x, y)) {
- if (any_pushed_buttons) {
- any_change |= button.State != ButtonState.Pushed;
- button.State = ButtonState.Pushed;
- }
- ToolTipStart (button);
- any_tooltip = true;
- } else {
- if (any_pushed_buttons) {
- any_change |= button.State != ButtonState.Normal;
- button.State = ButtonState.Normal;
- }
- }
- }
+ any_change = title_buttons.MouseMove (x, y);
+
if (any_change) {
if (IsMaximized && form.IsMdiChild)
XplatUI.InvalidateNC (form.MdiParent.Handle);
else
XplatUI.InvalidateNC (form.Handle);
}
- if (!any_tooltip)
- ToolTipHide (false);
}
protected virtual void HandleTitleBarUp (int x, int y)
{
- foreach (TitleButton button in title_buttons) {
- if (button == null)
- continue;
-
- button.State = ButtonState.Normal;
- if (button.Rectangle.Contains (x, y)) {
- button.Clicked (this, EventArgs.Empty);
- }
- }
+ title_buttons.MouseUp (x, y);
return;
}
protected virtual void HandleTitleBarDown (int x, int y)
{
- ToolTipHide (false);
-
- foreach (TitleButton button in title_buttons) {
- if (button != null) {
- if (button.Rectangle.Contains (x, y)) {
- button.State = ButtonState.Pushed;
- } else {
- button.State = ButtonState.Normal;
- }
- }
- }
-
- if (!AnyPushedTitleButtons && !IsMaximized){
+ title_buttons.MouseDown (x, y);
+
+ if (!TitleButtons.AnyPushedTitleButtons && !IsMaximized) {
state = State.Moving;
clicked_point = new Point (x, y);
- if (form.IsMdiChild) {
+ if (form.Parent != null) {
form.CaptureWithConfine (form.Parent);
} else {
form.Capture = true;
{
}
- protected virtual void CloseClicked (object sender, EventArgs e)
- {
- form.Close ();
- }
-
- private void MinimizeClicked (object sender, EventArgs e)
- {
- if (GetWindowState () != FormWindowState.Minimized) {
- form.WindowState = FormWindowState.Minimized;
- } else {
- form.WindowState = FormWindowState.Normal;
- }
- }
-
- private void MaximizeClicked (object sender, EventArgs e)
- {
- if (GetWindowState () != FormWindowState.Maximized) {
- form.WindowState = FormWindowState.Maximized;
- } else {
- form.WindowState = FormWindowState.Normal;
- }
- }
-
protected Point MouseMove (Message m)
{
Point cp = Cursor.Position;
return FormPos.None;
}
}
+ internal class TitleButton
+ {
+ public Rectangle Rectangle;
+ public ButtonState State;
+ public CaptionButton Caption;
+ private EventHandler Clicked;
+ public bool Visible;
+
+ public TitleButton (CaptionButton caption, EventHandler clicked)
+ {
+ Caption = caption;
+ Clicked = clicked;
+ }
+
+ public void OnClick ()
+ {
+ if (Clicked != null) {
+ Clicked (this, EventArgs.Empty);
+ }
+ }
+ }
+
+ internal class TitleButtons : System.Collections.IEnumerable
+ {
+ public TitleButton MinimizeButton;
+ public TitleButton MaximizeButton;
+ public TitleButton RestoreButton;
+ public TitleButton CloseButton;
+ public TitleButton HelpButton;
+
+ public TitleButton [] AllButtons;
+ public bool Visible;
+
+ private ToolTip.ToolTipWindow tooltip;
+ private Timer tooltip_timer;
+ private TitleButton tooltip_hovered_button;
+ private TitleButton tooltip_hidden_button;
+ private const int tooltip_hide_interval = 3000;
+ private const int tooltip_show_interval = 1000;
+ private Form form;
+
+ public TitleButtons (Form frm)
+ {
+ this.form = frm;
+ this.Visible = true;
+
+ MinimizeButton = new TitleButton (CaptionButton.Minimize, new EventHandler (ClickHandler));
+ MaximizeButton = new TitleButton (CaptionButton.Maximize, new EventHandler (ClickHandler));
+ RestoreButton = new TitleButton (CaptionButton.Restore, new EventHandler (ClickHandler));
+ CloseButton = new TitleButton (CaptionButton.Close, new EventHandler (ClickHandler));
+ HelpButton = new TitleButton (CaptionButton.Help, new EventHandler (ClickHandler));
+
+ AllButtons = new TitleButton [] { MinimizeButton, MaximizeButton, RestoreButton, CloseButton, HelpButton };
+ }
+
+ private void ClickHandler (object sender, EventArgs e)
+ {
+ if (!Visible) {
+ return;
+ }
+
+ TitleButton button = (TitleButton) sender;
+
+ switch (button.Caption) {
+ case CaptionButton.Close:
+ form.Close ();
+ break;
+ case CaptionButton.Help:
+ Console.WriteLine ("Help not implemented.");
+ break;
+ case CaptionButton.Maximize:
+ form.WindowState = FormWindowState.Maximized;
+ break;
+ case CaptionButton.Minimize:
+ form.WindowState = FormWindowState.Minimized;
+ break;
+ case CaptionButton.Restore:
+ form.WindowState = FormWindowState.Normal;
+ break;
+ }
+ }
+
+ public TitleButton FindButton (int x, int y)
+ {
+ if (!Visible) {
+ return null;
+ }
+
+ foreach (TitleButton button in AllButtons) {
+ if (button.Visible && button.Rectangle.Contains (x, y)) {
+ return button;
+ }
+ }
+ return null;
+ }
+
+ public bool AnyPushedTitleButtons {
+ get {
+ if (!Visible) {
+ return false;
+ }
+
+ foreach (TitleButton button in AllButtons) {
+ if (button.Visible && button.State == ButtonState.Pushed) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+ #region IEnumerable Members
+
+ public System.Collections.IEnumerator GetEnumerator ()
+ {
+ return AllButtons.GetEnumerator ();
+ }
+ #endregion
+
+ #region ToolTip helpers
+ // Called from MouseMove if mouse is over a button
+ public void ToolTipStart (TitleButton button)
+ {
+ tooltip_hovered_button = button;
+
+ if (tooltip_hovered_button == tooltip_hidden_button)
+ return;
+ tooltip_hidden_button = null;
+
+ if (tooltip != null && tooltip.Visible)
+ ToolTipShow (true);
+
+ if (tooltip_timer == null) {
+
+ tooltip_timer = new Timer ();
+ tooltip_timer.Tick += new EventHandler (ToolTipTimerTick);
+ }
+
+ tooltip_timer.Interval = tooltip_show_interval;
+ tooltip_timer.Start ();
+ tooltip_hovered_button = button;
+ }
+
+ public void ToolTipTimerTick (object sender, EventArgs e)
+ {
+ if (tooltip_timer.Interval == tooltip_hide_interval) {
+ tooltip_hidden_button = tooltip_hovered_button;
+ ToolTipHide (false);
+ } else {
+ ToolTipShow (false);
+ }
+ }
+ // Called from timer (with only_refresh = false)
+ // Called from ToolTipStart if tooltip is already shown (with only_refresh = true)
+ public void ToolTipShow (bool only_refresh)
+ {
+ string text = Locale.GetText (tooltip_hovered_button.Caption.ToString ());
+
+ tooltip_timer.Interval = tooltip_hide_interval;
+ tooltip_timer.Enabled = true;
+
+ if (only_refresh && (tooltip == null || !tooltip.Visible)) {
+ return;
+ }
+
+ if (tooltip == null)
+ tooltip = new ToolTip.ToolTipWindow ();
+ else if (tooltip.Text == text && tooltip.Visible)
+ return;
+ else if (tooltip.Visible)
+ tooltip.Visible = false;
+
+ if (form.WindowState == FormWindowState.Maximized && form.MdiParent != null)
+ tooltip.Present (form.MdiParent, text);
+ else
+ tooltip.Present (form, text);
+
+ }
+
+ // Called from MouseLeave (with reset_hidden_button = true)
+ // Called from MouseDown (with reset_hidden_button = false)
+ // Called from MouseMove if mouse isn't over any button (with reset_hidden_button = false)
+ // Called from Timer if hiding (with reset_hidden_button = false)
+ public void ToolTipHide (bool reset_hidden_button)
+ {
+ if (tooltip_timer != null)
+ tooltip_timer.Enabled = false;
+ if (tooltip != null && tooltip.Visible)
+ tooltip.Visible = false;
+ if (reset_hidden_button)
+ tooltip_hidden_button = null;
+ }
+ #endregion
+
+ public bool MouseMove (int x, int y)
+ {
+ if (!Visible) {
+ return false;
+ }
+
+ bool any_change = false;
+ bool any_pushed_buttons = AnyPushedTitleButtons;
+ bool any_tooltip = false;
+ TitleButton over_button = FindButton (x, y);
+
+ foreach (TitleButton button in this) {
+ if (button == null)
+ continue;
+
+ if (button == over_button) {
+ if (any_pushed_buttons) {
+ any_change |= button.State != ButtonState.Pushed;
+ button.State = ButtonState.Pushed;
+ }
+ ToolTipStart (button);
+ any_tooltip = true;
+ } else {
+ if (any_pushed_buttons) {
+ any_change |= button.State != ButtonState.Normal;
+ button.State = ButtonState.Normal;
+ }
+ }
+ }
+
+ if (!any_tooltip)
+ ToolTipHide (false);
+
+ return any_change;
+ }
+
+ public void MouseDown (int x, int y)
+ {
+ if (!Visible) {
+ return;
+ }
+
+ ToolTipHide (false);
+
+ foreach (TitleButton button in this) {
+ if (button != null) {
+ button.State = ButtonState.Normal;
+ }
+ }
+ TitleButton clicked_button = FindButton (x, y);
+ if (clicked_button != null) {
+ clicked_button.State = ButtonState.Pushed;
+ }
+ }
+
+ public void MouseUp (int x, int y)
+ {
+ if (!Visible) {
+ return;
+ }
+
+ TitleButton clicked_button = FindButton (x, y);
+ if (clicked_button != null) {
+ clicked_button.OnClick ();
+ }
+
+ foreach (TitleButton button in this) {
+ if (button == null)
+ continue;
+
+ button.State = ButtonState.Normal;
+ }
+ }
+
+ internal void MouseLeave (int x, int y)
+ {
+ if (!Visible) {
+ return;
+ }
+
+ foreach (TitleButton button in this) {
+ if (button == null)
+ continue;
+
+ button.State = ButtonState.Normal;
+ }
+
+ ToolTipHide (true);
+ }
+ }
}
public class Label : Control
{
private bool autosize;
+#if NET_2_0
+ private bool auto_ellipsis;
+#endif
private Image image;
private bool render_transparent;
private FlatStyle flat_style;
}
#region Public Properties
+
+#if NET_2_0
+ [DefaultValue (false)]
+ [Browsable (true)]
+ [EditorBrowsable (EditorBrowsableState.Always)]
+ public bool AutoEllipsis
+ {
+ get { return this.auto_ellipsis; }
+ set
+ {
+ if (this.auto_ellipsis != value) {
+ this.auto_ellipsis = value;
+
+ if (this.auto_ellipsis)
+ string_format.Trimming = StringTrimming.EllipsisCharacter;
+ else
+ string_format.Trimming = StringTrimming.Character;
+
+ this.Invalidate ();
+ }
+ }
+ }
+#endif
+
[DefaultValue(false)]
[Localizable(true)]
[RefreshProperties(RefreshProperties.All)]
internal Link[] sorted_links;
private bool link_visited;
internal Piece[] pieces;
- internal Font link_font;
private Cursor override_cursor;
private DialogResult dialog_result;
link_behavior = LinkBehavior.SystemDefault;
link_visited = false;
pieces = null;
- link_font = null;
focused_index = -1;
+ string_format.FormatFlags = StringFormatFlags.NoClip;
+
ActiveLinkColor = Color.Red;
DisabledLinkColor = ThemeEngine.Current.ColorGrayText;
LinkColor = Color.FromArgb (255, 0, 0, 255);
protected override void CreateHandle ()
{
base.CreateHandle ();
- CreateLinkFont ();
CreateLinkPieces ();
}
protected override void OnFontChanged (EventArgs e)
{
base.OnFontChanged (e);
- CreateLinkFont ();
CreateLinkPieces ();
}
protected override void SetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified)
{
base.SetBoundsCore (x, y, width, height, specified);
- CreateLinkFont ();
CreateLinkPieces();
}
{
if (Text.Length == 0) {
SetStyle (ControlStyles.Selectable, false);
+ TabStop = false;
return;
}
+
+ if (Links.Count == 1 && Links[0].Start == 0 && Links[0].Length == -1)
+ Links[0].Length = Text.Length;
+
+ SortLinks ();
+
+ // Set the LinkArea values based on first link.
+ if (Links.Count > 0) {
+ link_area.Start = Links[0].Start;
+ link_area.Length = Links[0].Length;
+ } else {
+ link_area.Start = 0;
+ link_area.Length = 0;
+ }
- SetStyle (ControlStyles.Selectable, Links.Count > 0);
+ TabStop = (LinkArea.Length > 0);
+ SetStyle (ControlStyles.Selectable, TabStop);
/* don't bother doing the rest if our handle hasn't been created */
if (!IsHandleCreated)
return;
- if (Links.Count == 1 && Links[0].Start == 0 && Links[0].Length == -1)
- Links[0].Length = Text.Length;
-
- SortLinks ();
-
ArrayList pieces_list = new ArrayList ();
int current_end = 0;
for(int i = 0; i < pieces.Length; i++)
ranges[i] = new CharacterRange (pieces[i].start, pieces[i].length);
- string_format.FormatFlags = StringFormatFlags.NoClip;
string_format.SetMeasurableCharacterRanges (ranges);
Region[] regions = DeviceContext.MeasureCharacterRanges (Text,
- link_font,
+ ThemeEngine.Current.GetLinkFont (this),
ClientRectangle,
string_format);
}
}
- internal Font GetPieceFont (Piece piece)
- {
- if (piece.link == null)
- return Font;
-
- switch (link_behavior) {
- case LinkBehavior.AlwaysUnderline:
- case LinkBehavior.SystemDefault: // Depends on IE configuration
- {
- return link_font;
- }
- case LinkBehavior.HoverUnderline:
- {
- if (piece.link.Hovered) {
- return link_font;
- } else {
- return Font;
- }
- }
-
- case LinkBehavior.NeverUnderline:
- default:
- return Font;
- }
-
- }
-
-
- internal Color GetPieceColor (Piece piece, int i)
- {
- Color color;
-
- if (Enabled == false)
- return DisabledLinkColor;
-
- if (piece.link == null)
- return ForeColor;
-
- if (!piece.link.Enabled)
- color = DisabledLinkColor;
- else if (piece.link.Active)
- color = ActiveLinkColor;
- else if ((LinkVisited && i == 0) || piece.link.Visited == true)
- color = VisitedLinkColor;
- else
- color = LinkColor;
-
- return color;
- }
-
- private void CreateLinkFont ()
- {
- if (link_font != null)
- link_font.Dispose ();
-
- link_font = new Font (Font.FontFamily, Font.Size, Font.Style | FontStyle.Underline,
- Font.Unit);
- }
-
#endregion // Private Methods
//
hscrollbar.Visible = false;
hscrollbar.ValueChanged += new EventHandler (HorizontalScrollEvent);
+ Controls.AddImplicit (vscrollbar);
+ Controls.AddImplicit (hscrollbar);
+
/* Events */
MouseDown += new MouseEventHandler (OnMouseDownLB);
MouseMove += new MouseEventHandler (OnMouseMoveLB);
protected override void OnHandleCreated (EventArgs e)
{
base.OnHandleCreated (e);
-
- SuspendLayout ();
- Controls.AddImplicit (vscrollbar);
- Controls.AddImplicit (hscrollbar);
- ResumeLayout ();
LayoutListBox ();
}
if (hbar_offset < 0)
hbar_offset = 0;
- XplatUI.ScrollWindow (Handle, items_area, old_offset - hbar_offset, 0, false);
+ if (IsHandleCreated)
+ XplatUI.ScrollWindow (Handle, items_area, old_offset - hbar_offset, 0, false);
}
}
else
vscrollbar.Value = top_index;
Scroll (vscrollbar, vscrollbar.Value - top_index);
- XplatUI.ScrollWindow (Handle, items_area, 0, ItemHeight * (val - vscrollbar.Value), false);
+ if (IsHandleCreated)
+ XplatUI.ScrollWindow (Handle, items_area, 0, ItemHeight * (val - vscrollbar.Value), false);
}
}
int diff = top_item - top_index;
- XplatUI.ScrollWindow (Handle, items_area, 0, ItemHeight * diff, false);
+ if (IsHandleCreated)
+ XplatUI.ScrollWindow (Handle, items_area, 0, ItemHeight * diff, false);
}
#endregion Private Methods
private Size item_size; // used for caching item size
#if NET_2_0
private Size tile_size;
+ private bool virtual_mode;
+ private int virtual_list_size;
#endif
// internal variables
static object ItemCheckEvent = new object ();
static object ItemDragEvent = new object ();
static object SelectedIndexChangedEvent = new object ();
+#if NET_2_0
+ static object ItemCheckedEvent = new object ();
+ static object CacheVirtualItemsEvent = new object ();
+ static object RetrieveVirtualItemEvent = new object ();
+#endif
public event LabelEditEventHandler AfterLabelEdit {
add { Events.AddHandler (AfterLabelEditEvent, value); }
remove { Events.RemoveHandler (ItemCheckEvent, value); }
}
+#if NET_2_0
+ public event ItemCheckedEventHandler ItemChecked {
+ add { Events.AddHandler (ItemCheckedEvent, value); }
+ remove { Events.RemoveHandler (ItemCheckedEvent, value); }
+ }
+#endif
+
public event ItemDragEventHandler ItemDrag {
add { Events.AddHandler (ItemDragEvent, value); }
remove { Events.RemoveHandler (ItemDragEvent, value); }
remove { base.TextChanged -= value; }
}
+#if NET_2_0
+ public event CacheVirtualItemsEventHandler CacheVirtualItems {
+ add { Events.AddHandler (CacheVirtualItemsEvent, value); }
+ remove { Events.RemoveHandler (CacheVirtualItemsEvent, value); }
+ }
+
+ public event RetrieveVirtualItemEventHandler RetrieveVirtualItem {
+ add { Events.AddHandler (RetrieveVirtualItemEvent, value); }
+ remove { Events.RemoveHandler (RetrieveVirtualItemEvent, value); }
+ }
+#endif
+
#endregion // Events
#region Public Constructors
sort_order = value;
+#if NET_2_0
+ if (virtual_mode) // Sorting is not allowed in virtual mode
+ return;
+#endif
+
if (value == SortOrder.None) {
if (item_sorter != null) {
// ListViewItemSorter should never be reset for SmallIcon
}
}
}
+
+#if NET_2_0
+ public bool VirtualMode {
+ get {
+ return virtual_mode;
+ }
+ set {
+ if (virtual_mode == value)
+ return;
+
+ if (!virtual_mode && items.Count > 0)
+ throw new InvalidOperationException ();
+
+ virtual_mode = value;
+ Redraw (true);
+ }
+ }
+
+ public int VirtualListSize {
+ get {
+ return virtual_list_size;
+ }
+ set {
+ if (value < 0)
+ throw new ArgumentException ("value");
+
+ if (virtual_list_size == value)
+ return;
+
+ virtual_list_size = value;
+ if (virtual_mode)
+ Redraw (true);
+ }
+ }
+#endif
#endregion // Public Instance Properties
#region Internal Methods Properties
return Items.Count - 1;
}
}
-
+
internal void OnSelectedIndexChanged ()
{
if (IsHandleCreated)
// Avoid calculations when control is being updated
if (updating)
return;
+#if NET_2_0
+ // VirtualMode doesn't do any calculations until handle is created
+ if (virtual_mode && !IsHandleCreated)
+ return;
+#endif
+
if (recalculate)
CalculateListView (this.alignment);
Size temp = Size.Empty;
Size ret_size = Size.Empty;
- // 0th column holds the item text, we check the size of
- // the various subitems falling in that column and get
- // the biggest one's size.
- foreach (ListViewItem item in items) {
- if (col >= item.SubItems.Count)
- continue;
+#if NET_2_0
+ // VirtualMode uses the first item text size
+ if (virtual_mode && items.Count > 0) {
+ ListViewItem item = items [0];
+ ret_size = Size.Ceiling (DeviceContext.MeasureString (item.SubItems [col].Text,
+ Font));
+ } else {
+#endif
+ // 0th column holds the item text, we check the size of
+ // the various subitems falling in that column and get
+ // the biggest one's size.
+ foreach (ListViewItem item in items) {
+ if (col >= item.SubItems.Count)
+ continue;
- temp = Size.Ceiling (this.DeviceContext.MeasureString
- (item.SubItems [col].Text, this.Font));
- if (temp.Width > ret_size.Width)
- ret_size = temp;
+ temp = Size.Ceiling (DeviceContext.MeasureString
+ (item.SubItems [col].Text, Font));
+ if (temp.Width > ret_size.Width)
+ ret_size = temp;
+ }
+#if NET_2_0
}
+#endif
// adjustment for space
if (!ret_size.IsEmpty)
return -1;
}
#endif
-
+
internal ColumnHeader GetReorderedColumn (int index)
{
if (reordered_column_indices == null)
return Columns [reordered_column_indices [index]];
}
- internal void ReorderColumn (ColumnHeader col, int index)
+ internal void ReorderColumn (ColumnHeader col, int index, bool fireEvent)
{
#if NET_2_0
- ColumnReorderedEventHandler eh = (ColumnReorderedEventHandler) (Events [ColumnReorderedEvent]);
- if (eh != null){
- ColumnReorderedEventArgs args = new ColumnReorderedEventArgs (col.Index, index, col);
-
- eh (this, args);
- if (args.Cancel){
- header_control.Invalidate ();
- item_control.Invalidate ();
- return;
+ if (fireEvent) {
+ ColumnReorderedEventHandler eh = (ColumnReorderedEventHandler) (Events [ColumnReorderedEvent]);
+ if (eh != null){
+ ColumnReorderedEventArgs args = new ColumnReorderedEventArgs (col.Index, index, col);
+
+ eh (this, args);
+ if (args.Cancel) {
+ header_control.Invalidate ();
+ item_control.Invalidate ();
+ return;
+ }
}
}
#endif
+ int column_count = Columns.Count;
+
if (reordered_column_indices == null) {
- reordered_column_indices = new int [Columns.Count];
- for (int i = 0; i < Columns.Count; i++)
+ reordered_column_indices = new int [column_count];
+ for (int i = 0; i < column_count; i++)
reordered_column_indices [i] = i;
}
return;
int[] curr = reordered_column_indices;
- int[] result = new int [Columns.Count];
+ int [] result = new int [column_count];
int curr_idx = 0;
- for (int i = 0; i < Columns.Count; i++) {
- if (curr_idx < Columns.Count && curr [curr_idx] == col.Index)
+ for (int i = 0; i < column_count; i++) {
+ if (curr_idx < column_count && curr [curr_idx] == col.Index)
curr_idx++;
if (i == index)
result [i] = curr [curr_idx++];
}
- reordered_column_indices = result;
- LayoutDetails ();
- header_control.Invalidate ();
- item_control.Invalidate ();
+ ReorderColumns (result, true);
+ }
+
+ internal void ReorderColumns (int [] display_indices, bool redraw)
+ {
+ reordered_column_indices = display_indices;
+ for (int i = 0; i < Columns.Count; i++) {
+ ColumnHeader col = Columns [i];
+ col.InternalDisplayIndex = reordered_column_indices [i];
+ }
+ if (redraw && view == View.Details && IsHandleCreated) {
+ LayoutDetails ();
+ header_control.Invalidate ();
+ item_control.Invalidate ();
+ }
+ }
+
+ internal void AddColumn (ColumnHeader newCol, int index, bool redraw)
+ {
+ int column_count = Columns.Count;
+ newCol.SetListView (this);
+
+ int [] display_indices = new int [column_count];
+ for (int i = 0; i < column_count; i++) {
+ ColumnHeader col = Columns [i];
+ if (i == index) {
+ display_indices [i] = index;
+ } else {
+ int display_index = col.InternalDisplayIndex;
+ if (display_index < index) {
+ display_indices [i] = display_index;
+ } else {
+ display_indices [i] = (display_index + 1);
+ }
+ }
+ }
+
+ ReorderColumns (display_indices, redraw);
+ Invalidate ();
}
- Size LargeIconItemSize {
+ Size LargeIconItemSize
+ {
get {
int image_w = LargeImageList == null ? 12 : LargeImageList.ImageSize.Width;
int image_h = LargeImageList == null ? 2 : LargeImageList.ImageSize.Height;
int y = row * (sz.Height + y_spacing);
SetItemLocation (i, x, y, row, col);
item_index_matrix [row, col] = i;
- items [i].Layout ();
+#if NET_2_0
+ if (!virtual_mode) // Virtual mode sets Layout until draw time
+#endif
+ items [i].Layout ();
+
if (left_aligned) {
if (++row == rows) {
row = 0;
if (items.Count > 0) {
for (int i = 0; i < items.Count; i++) {
SetItemLocation (i, 0, y, 0, 0);
- items [i].Layout ();
+#if NET_2_0
+ if (!virtual_mode) // Virtual mode sets Layout until draw time
+#endif
+ items [i].Layout ();
+
y += item_height + 2;
}
private bool SelectItems (ArrayList sel_items)
{
bool changed = false;
- ArrayList curr_items = SelectedItems.List;
- foreach (ListViewItem item in curr_items)
+ foreach (ListViewItem item in SelectedItems)
if (!sel_items.Contains (item)) {
item.Selected = false;
changed = true;
case BoxSelect.Control:
items = new ArrayList ();
- foreach (ListViewItem item in prev_selection)
- if (!box_items.Contains (item))
- items.Add (item);
+ foreach (int index in prev_selection)
+ if (!box_items.Contains (owner.Items [index]))
+ items.Add (owner.Items [index]);
foreach (ListViewItem item in box_items)
- if (!prev_selection.Contains (item))
+ if (!prev_selection.Contains (item.Index))
items.Add (item);
break;
case BoxSelect.Shift:
items = box_items;
foreach (ListViewItem item in box_items)
- prev_selection.Remove (item);
- foreach (ListViewItem item in prev_selection)
- items.Add (item);
+ prev_selection.Remove (item.Index);
+ foreach (int index in prev_selection)
+ items.Add (owner.Items [index]);
break;
default:
private void ToggleCheckState (ListViewItem item)
{
- CheckState curr_state = item.Checked ? CheckState.Checked : CheckState.Unchecked;
item.Checked = !item.Checked;
- CheckState new_state = item.Checked ? CheckState.Checked : CheckState.Unchecked;
-
- ItemCheckEventArgs ice = new ItemCheckEventArgs (item.Index, curr_state, new_state);
- owner.OnItemCheck (ice);
}
private void ItemsMouseDown (object sender, MouseEventArgs me)
else
box_select_mode = BoxSelect.Normal;
box_select_start = pt;
- prev_selection = owner.SelectedItems.List;
+ prev_selection = owner.SelectedIndices.List;
} else if (owner.SelectedItems.Count > 0) {
owner.SelectedItems.Clear ();
}
foreach (ColumnHeader col in columns)
col.SetListView (null);
- foreach (ListViewItem item in items)
- item.Owner = null;
+#if NET_2_0
+ if (!virtual_mode) // In virtual mode we don't save the items
+#endif
+ foreach (ListViewItem item in items)
+ item.Owner = null;
}
base.Dispose (disposing);
protected override void OnHandleCreated (EventArgs e)
{
base.OnHandleCreated (e);
- Sort ();
+ CalculateListView (alignment);
+#if NET_2_0
+ if (!virtual_mode) // Sorting is not allowed in virtual mode
+#endif
+ Sort ();
}
protected override void OnHandleDestroyed (EventArgs e)
eh (this, e);
}
- protected virtual void OnItemCheck (ItemCheckEventArgs ice)
+ protected internal virtual void OnItemCheck (ItemCheckEventArgs ice)
{
- EventHandler eh = (EventHandler)(Events [ItemCheckEvent]);
+ ItemCheckEventHandler eh = (ItemCheckEventHandler)(Events [ItemCheckEvent]);
if (eh != null)
eh (this, ice);
}
+#if NET_2_0
+ protected internal virtual void OnItemChecked (ItemCheckedEventArgs icea)
+ {
+ ItemCheckedEventHandler eh = (ItemCheckedEventHandler)(Events [ItemCheckedEvent]);
+ if (eh != null)
+ eh (this, icea);
+ }
+#endif
+
protected virtual void OnItemDrag (ItemDragEventArgs e)
{
EventHandler eh = (EventHandler)(Events [ItemDragEvent]);
base.OnSystemColorsChanged (e);
}
+#if NET_2_0
+ protected virtual void OnCacheVirtualItems (CacheVirtualItemsEventArgs args)
+ {
+ EventHandler eh = (EventHandler)Events [CacheVirtualItemsEvent];
+ if (eh != null)
+ eh (this, args);
+ }
+
+ protected virtual void OnRetrieveVirtualItem (RetrieveVirtualItemEventArgs args)
+ {
+ RetrieveVirtualItemEventHandler eh = (RetrieveVirtualItemEventHandler)Events [RetrieveVirtualItemEvent];
+ if (eh != null)
+ eh (this, args);
+ }
+#endif
+
protected void RealizeProperties ()
{
// FIXME: TODO
public void Sort ()
{
+#if NET_2_0
+ if (virtual_mode)
+ throw new InvalidOperationException ();
+#endif
+
Sort (true);
}
if (drag_to_index > GetReorderedIndex (clicked_column))
drag_to_index--;
if (owner.GetReorderedColumn (drag_to_index) != clicked_column)
- owner.ReorderColumn (clicked_column, drag_to_index);
+ owner.ReorderColumn (clicked_column, drag_to_index, true);
drag_to_index = -1;
Invalidate ();
}
#region Public Methods
public virtual int Add (ColumnHeader value)
{
- int idx;
- value.SetListView (this.owner);
- idx = list.Add (value);
- if (owner.IsHandleCreated) {
- owner.Redraw (true);
- }
+ int idx = list.Add (value);
+ owner.AddColumn (value, idx, true);
return idx;
}
public virtual void AddRange (ColumnHeader [] values)
{
foreach (ColumnHeader colHeader in values) {
- colHeader.SetListView (this.owner);
- Add (colHeader);
+ int idx = list.Add (colHeader);
+ owner.AddColumn (colHeader, idx, false);
}
- owner.Redraw (true);
+ owner.Redraw (true);
}
public virtual void Clear ()
foreach (ColumnHeader col in list)
col.SetListView (null);
list.Clear ();
- owner.Redraw (true);
+ owner.ReorderColumns (new int [0], true);
}
public bool Contains (ColumnHeader value)
if (index < 0 || index > list.Count)
throw new ArgumentOutOfRangeException ("index");
- value.SetListView (owner);
list.Insert (index, value);
- owner.Redraw (true);
+ owner.AddColumn (value, index, true);
}
#if NET_2_0
public virtual void Remove (ColumnHeader column)
{
- // TODO: Update Column internal index ?
+ if (!Contains (column))
+ return;
+
list.Remove (column);
column.SetListView (null);
- owner.Redraw (true);
+
+ int rem_display_index = column.InternalDisplayIndex;
+ int [] display_indices = new int [list.Count];
+ for (int i = 0; i < display_indices.Length; i++) {
+ ColumnHeader col = (ColumnHeader) list [i];
+ int display_index = col.InternalDisplayIndex;
+ if (display_index < rem_display_index) {
+ display_indices [i] = display_index;
+ } else {
+ display_indices [i] = (display_index - 1);
+ }
+ }
+
+ column.InternalDisplayIndex = -1;
+ owner.ReorderColumns (display_indices, true);
}
#if NET_2_0
#region Public Constructor
public ListViewItemCollection (ListView owner)
{
- list = new ArrayList ();
+ list = new ArrayList (0);
this.owner = owner;
}
#endregion // Public Constructor
#region Public Properties
[Browsable (false)]
public int Count {
- get { return list.Count; }
+ get {
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ return owner.VirtualListSize;
+#endif
+
+ return list.Count;
+ }
}
public bool IsReadOnly {
public virtual ListViewItem this [int displayIndex] {
get {
- if (displayIndex < 0 || displayIndex >= list.Count)
+ if (displayIndex < 0 || displayIndex >= Count)
throw new ArgumentOutOfRangeException ("displayIndex");
+
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ return RetrieveVirtualItemFromOwner (displayIndex);
+#endif
return (ListViewItem) list [displayIndex];
}
set {
- if (displayIndex < 0 || displayIndex >= list.Count)
+ if (displayIndex < 0 || displayIndex >= Count)
throw new ArgumentOutOfRangeException ("displayIndex");
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
+
if (list.Contains (value))
throw new ArgumentException ("An item cannot be added more than once. To add an item again, you need to clone it.", "value");
if (idx == -1)
return null;
- return (ListViewItem) list [idx];
+ return this [idx];
}
}
#endif
#region Public Methods
public virtual ListViewItem Add (ListViewItem value)
{
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
+
AddItem (value);
CollectionChanged (true);
{
if (values == null)
throw new ArgumentNullException ("Argument cannot be null!", "values");
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
foreach (ListViewItem item in values)
AddItem (item);
public virtual void Clear ()
{
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
owner.SetFocusedItem (null);
owner.h_scroll.Value = owner.v_scroll.Value = 0;
foreach (ListViewItem item in list) {
public bool Contains (ListViewItem item)
{
- return list.Contains (item);
+ return IndexOf (item) != -1;
}
#if NET_2_0
public IEnumerator GetEnumerator ()
{
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
+
return list.GetEnumerator ();
}
int result;
ListViewItem li;
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
+
if (item is ListViewItem) {
li = (ListViewItem) item;
if (list.Contains (li))
bool IList.Contains (object item)
{
- return list.Contains (item);
+ return Contains ((ListViewItem) item);
}
int IList.IndexOf (object item)
{
- return list.IndexOf (item);
+ return IndexOf ((ListViewItem) item);
}
void IList.Insert (int index, object item)
public int IndexOf (ListViewItem item)
{
+#if NET_2_0
+ if (owner != null && owner.VirtualMode) {
+ for (int i = 0; i < Count; i++)
+ if (RetrieveVirtualItemFromOwner (i) == item)
+ return i;
+
+ return -1;
+ }
+#endif
+
return list.IndexOf (item);
}
if (key == null || key.Length == 0)
return -1;
- for (int i = 0; i < list.Count; i++) {
- ListViewItem lvi = (ListViewItem) list [i];
+ for (int i = 0; i < Count; i++) {
+ ListViewItem lvi = this [i];
if (String.Compare (key, lvi.Name, true) == 0)
return i;
}
if (index < 0 || index > list.Count)
throw new ArgumentOutOfRangeException ("index");
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
+
if (list.Contains (item))
throw new ArgumentException ("An item cannot be added more than once. To add an item again, you need to clone it.", "item");
public virtual void Remove (ListViewItem item)
{
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
if (!list.Contains (item))
return;
{
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException ("index");
+
+#if NET_2_0
+ if (owner != null && owner.VirtualMode)
+ throw new InvalidOperationException ();
+#endif
+
ListViewItem item = (ListViewItem) list [index];
Remove (item);
}
}
}
+#if NET_2_0
+ ListViewItem RetrieveVirtualItemFromOwner (int displayIndex)
+ {
+ RetrieveVirtualItemEventArgs args = new RetrieveVirtualItemEventArgs (displayIndex);
+
+ owner.OnRetrieveVirtualItem (args);
+ ListViewItem retval = args.Item;
+ retval.Owner = owner;
+ retval.SetIndex (displayIndex);
+
+ return retval;
+ }
+#endif
+
internal event CollectionChangedHandler Changed;
internal void Sort (IComparer comparer)
public class SelectedIndexCollection : IList, ICollection, IEnumerable
{
private readonly ListView owner;
+ private ArrayList list;
#region Public Constructor
public SelectedIndexCollection (ListView owner)
{
this.owner = owner;
+ owner.Items.Changed += new CollectionChangedHandler (ItemsCollection_Changed);
}
#endregion // Public Constructor
[Browsable (false)]
public int Count {
get {
- return owner.SelectedItems.Count;
+ if (!owner.IsHandleCreated)
+ return 0;
+
+ return List.Count;
}
}
public int this [int index] {
get {
- int [] indices = GetIndices ();
- if (index < 0 || index >= indices.Length)
+ if (!owner.IsHandleCreated || index < 0 || index >= List.Count)
throw new ArgumentOutOfRangeException ("index");
- return indices [index];
+
+ return (int) List [index];
}
}
if (!owner.IsHandleCreated)
return 0;
- return owner.SelectedItems.Count;
+ return List.Count;
}
+#endif
- public void Clear ()
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ void Clear ()
{
- owner.SelectedItems.Clear ();
+ if (!owner.IsHandleCreated)
+ return;
+
+ foreach (int index in List)
+ owner.Items [index].Selected = false;
}
-#endif
+
public bool Contains (int selectedIndex)
{
- int [] indices = GetIndices ();
- for (int i = 0; i < indices.Length; i++) {
- if (indices [i] == selectedIndex)
- return true;
- }
- return false;
+ return IndexOf (selectedIndex) != -1;
}
public void CopyTo (Array dest, int index)
{
- int [] indices = GetIndices ();
- Array.Copy (indices, 0, dest, index, indices.Length);
+ List.CopyTo (dest, index);
}
public IEnumerator GetEnumerator ()
{
- int [] indices = GetIndices ();
- return indices.GetEnumerator ();
+ return List.GetEnumerator ();
}
int IList.Add (object value)
void IList.Clear ()
{
- throw new NotSupportedException ("Clear operation is not supported.");
+ Clear ();
}
bool IList.Contains (object selectedIndex)
public int IndexOf (int selectedIndex)
{
- int [] indices = GetIndices ();
- for (int i = 0; i < indices.Length; i++) {
- if (indices [i] == selectedIndex)
- return i;
- }
- return -1;
+ return List.IndexOf (selectedIndex);
}
#if NET_2_0
#endif
#endregion // Public Methods
- private int [] GetIndices ()
- {
- ArrayList selected_items = owner.SelectedItems.List;
- int [] indices = new int [selected_items.Count];
- for (int i = 0; i < selected_items.Count; i++) {
- ListViewItem item = (ListViewItem) selected_items [i];
- indices [i] = item.Index;
+ internal ArrayList List {
+ get {
+ if (list == null) {
+ list = new ArrayList ();
+ for (int i = 0; i < owner.Items.Count; i++) {
+ if (owner.Items [i].Selected)
+ list.Add (i);
+ }
+ }
+
+ return list;
}
- return indices;
}
+
+ internal void Reset ()
+ {
+ // force re-population of list
+ list = null;
+ }
+
+ private void ItemsCollection_Changed ()
+ {
+ Reset ();
+ }
+
} // SelectedIndexCollection
public class SelectedListViewItemCollection : IList, ICollection, IEnumerable
{
private readonly ListView owner;
- private ArrayList list;
#region Public Constructor
public SelectedListViewItemCollection (ListView owner)
{
this.owner = owner;
- this.owner.Items.Changed += new CollectionChangedHandler (
- ItemsCollection_Changed);
}
#endregion // Public Constructor
[Browsable (false)]
public int Count {
get {
- if (!owner.IsHandleCreated)
- return 0;
- return List.Count;
+ return owner.SelectedIndices.Count;
}
}
public ListViewItem this [int index] {
get {
- ArrayList selected_items = List;
- if (!owner.IsHandleCreated || index < 0 || index >= selected_items.Count)
+ if (!owner.IsHandleCreated || index < 0 || index >= Count)
throw new ArgumentOutOfRangeException ("index");
- return (ListViewItem) selected_items [index];
+
+ int item_index = owner.SelectedIndices [index];
+ return owner.Items [item_index];
}
}
if (idx == -1)
return null;
- return (ListViewItem) List [idx];
+ return this [idx];
}
}
#endif
#region Public Methods
public void Clear ()
{
- if (!owner.IsHandleCreated)
- return;
-
- foreach (ListViewItem item in List)
- item.Selected = false;
+ owner.SelectedIndices.Clear ();
}
public bool Contains (ListViewItem item)
{
- if (!owner.IsHandleCreated)
- return false;
- return List.Contains (item);
+ return IndexOf (item) != -1;
}
#if NET_2_0
{
if (!owner.IsHandleCreated)
return;
- List.CopyTo (dest, index);
+ if (index > Count) // Throws ArgumentException instead of IOOR exception
+ throw new ArgumentException ("index");
+
+ for (int i = 0; i < Count; i++)
+ dest.SetValue (this [i], index++);
}
public IEnumerator GetEnumerator ()
{
if (!owner.IsHandleCreated)
return (new ListViewItem [0]).GetEnumerator ();
- return List.GetEnumerator ();
+
+ ListViewItem [] items = new ListViewItem [Count];
+ for (int i = 0; i < Count; i++)
+ items [i] = this [i];
+
+ return items.GetEnumerator ();
}
int IList.Add (object value)
{
if (!owner.IsHandleCreated)
return -1;
- return List.IndexOf (item);
+
+ for (int i = 0; i < Count; i++)
+ if (this [i] == item)
+ return i;
+
+ return -1;
}
#if NET_2_0
if (!owner.IsHandleCreated || key == null || key.Length == 0)
return -1;
- ArrayList selected_items = List;
- for (int i = 0; i < selected_items.Count; i++) {
- ListViewItem item = (ListViewItem) selected_items [i];
+ for (int i = 0; i < Count; i++) {
+ ListViewItem item = this [i];
if (String.Compare (item.Name, key, true) == 0)
return i;
}
#endif
#endregion // Public Methods
- internal ArrayList List {
- get {
- if (list == null) {
- list = new ArrayList ();
- foreach (ListViewItem item in owner.Items) {
- if (item.Selected)
- list.Add (item);
- }
- }
- return list;
- }
- }
-
- internal void Reset ()
- {
- // force re-population of list
- list = null;
- }
-
- private void ItemsCollection_Changed ()
- {
- Reset ();
- }
} // SelectedListViewItemCollection
internal delegate void CollectionChangedHandler ();
private ListViewGroup group = null;
private string name = String.Empty;
private string image_key = String.Empty;
+ int index; // cached index for VirtualMode
#endif
Rectangle bounds;
Rectangle checkbox_rect; // calculated by CalcListViewItem method
if (is_checked == value)
return;
- is_checked = value;
-
if (owner != null) {
- // force re-population of list
- owner.CheckedItems.Reset ();
- Layout ();
- }
- Invalidate ();
+ CheckState current_value = is_checked ? CheckState.Checked : CheckState.Unchecked;
+ CheckState new_value = value ? CheckState.Checked : CheckState.Unchecked;
+
+ ItemCheckEventArgs icea = new ItemCheckEventArgs (Index,
+ new_value, current_value);
+ owner.OnItemCheck (icea);
+
+ if (new_value != current_value) {
+ // force re-population of list
+ owner.CheckedItems.Reset ();
+ is_checked = new_value == CheckState.Checked;
+ Invalidate ();
+
+#if NET_2_0
+ ItemCheckedEventArgs args = new ItemCheckedEventArgs (this);
+ owner.OnItemChecked (args);
+#endif
+ }
+ } else
+ is_checked = value;
}
}
get {
if (owner == null)
return -1;
+#if NET_2_0
+ if (owner.VirtualMode)
+ return index;
+#endif
else
return owner.Items.IndexOf (this);
}
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public bool Selected {
- get { return selected; }
+ get {
+ return selected;
+ }
set {
if (selected == value)
return;
owner.SelectedItems.Clear ();
selected = value;
// force re-population of list
- owner.SelectedItems.Reset ();
+ owner.SelectedIndices.Reset ();
Layout ();
owner.OnSelectedIndexChanged ();
} else {
}
}
+#if NET_2_0
+ internal void SetIndex (int index)
+ {
+ this.index = index;
+ }
+#endif
+
private void Invalidate ()
{
if (owner == null || owner.item_control == null)
{
base.OnResize (e);
- if (Parent != null)
+ if (Parent != null && Parent.IsHandleCreated)
XplatUI.InvalidateNC (Parent.Handle);
// Should probably make this into one loop
SizeScrollBars ();
internal void ArrangeIconicWindows (bool rearrange_all)
{
- int xspacing = 160;
- int yspacing = 27;
-
- Rectangle rect = new Rectangle (0, 0, xspacing, yspacing);
+ Rectangle rect = Rectangle.Empty;
lock_sizing = true;
foreach (Form form in Controls) {
continue;
}
- // Need to get the width in the loop cause some themes might have
- // different widths for different styles
- int bw = ThemeEngine.Current.ManagedWindowBorderWidth (wm);
-
- int height = wm.TitleBarHeight + (bw * 2);
-
bool success = true;
int startx, starty, currentx, currenty;
+
+ rect.Size = wm.IconicSize;
startx = 0;
- starty = ClientSize.Height - yspacing;
+ starty = ClientSize.Height - rect.Height;
currentx = startx;
currenty = starty;
do {
rect.X = currentx;
rect.Y = currenty;
- rect.Height = height;
success = true;
foreach (Form form2 in Controls) {
if (form2 == form || form2.window_state != FormWindowState.Minimized)
}
}
if (!success) {
- currentx += xspacing;
- if (currentx + xspacing > Right) {
+ currentx += rect.Width;
+ if (currentx + rect.Width > Right) {
currentx = startx;
- currenty -= Math.Max(yspacing, height);
+ currenty -= rect.Height;
}
}
} while (!success);
if (!form.Visible)
return false;
- bool is_active = wm.IsActive();
+ bool is_active = wm.IsActive;
bool maximize_this = false;
if (!is_active){
MdiWindowManager wm = (MdiWindowManager) form.window_manager;
- if (!is_activating_child && new_window_state == FormWindowState.Maximized && !wm.IsActive ()) {
+ if (!is_activating_child && new_window_state == FormWindowState.Maximized && !wm.IsActive) {
ActivateChild (form);
return;
}
private MdiClient mdi_container;
private Rectangle prev_virtual_position;
- private Rectangle normal_bounds;
- private Rectangle iconic_bounds;
private Point icon_clicked;
private DateTime icon_clicked_time;
private bool icon_dont_show_popup;
+
+ private TitleButtons maximized_title_buttons;
+
+ private TitleButtons MaximizedTitleButtons {
+ get {
+ if (maximized_title_buttons == null) {
+ maximized_title_buttons = new TitleButtons (this.Form);
+ maximized_title_buttons.CloseButton.Visible = true;
+ maximized_title_buttons.RestoreButton.Visible = true;
+ maximized_title_buttons.MinimizeButton.Visible = true;
+ }
+ return maximized_title_buttons;
+ }
+ }
- internal Rectangle MaximizedBounds {
+ internal override Rectangle MaximizedBounds {
get {
Rectangle pb = mdi_container.ClientRectangle;
int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this);
}
}
- internal Rectangle NormalBounds {
- get {
- return normal_bounds;
- }
- set {
- normal_bounds = value;
- }
- }
- internal Rectangle IconicBounds {
- get {
- if (iconic_bounds == Rectangle.Empty)
- return Rectangle.Empty;
- Rectangle result = iconic_bounds;
- result.Y = mdi_container.ClientRectangle.Bottom - iconic_bounds.Y;
- return result;
- }
- set {
- iconic_bounds = value;
- iconic_bounds.Y = mdi_container.ClientRectangle.Bottom - iconic_bounds.Y;
- }
- }
public MdiWindowManager (Form form, MdiClient mdi_container) : base (form)
{
this.mdi_container = mdi_container;
- if (form.WindowState == FormWindowState.Normal)
- normal_bounds = form.Bounds;
+ if (form.WindowState == FormWindowState.Normal) {
+ NormalBounds = form.Bounds;
+ }
form_closed_handler = new EventHandler (FormClosed);
form.Closed += form_closed_handler;
form.TextChanged += new EventHandler (FormTextChangedHandler);
XplatUI.ClientToScreen (mdi_container.Handle, ref x, ref y);
}
- public void UpdateWindowDecorations (FormWindowState window_state)
- {
- CreateButtons ();
-
+ public override void UpdateWindowDecorations (FormWindowState window_state)
+ {
switch (window_state) {
case FormWindowState.Minimized:
- maximize_button.Caption = CaptionButton.Maximize;
- minimize_button.Caption = CaptionButton.Restore;
+ case FormWindowState.Normal:
MaximizedMenu.Paint -= draw_maximized_buttons;
+ MaximizedTitleButtons.Visible = false;
+ TitleButtons.Visible = true;
break;
case FormWindowState.Maximized:
- maximize_button.Caption = CaptionButton.Restore;
- minimize_button.Caption = CaptionButton.Minimize;
MaximizedMenu.Paint += draw_maximized_buttons;
- break;
- case FormWindowState.Normal:
- maximize_button.Caption = CaptionButton.Maximize;
- minimize_button.Caption = CaptionButton.Minimize;
- MaximizedMenu.Paint -= draw_maximized_buttons;
+ MaximizedTitleButtons.Visible = true;
+ TitleButtons.Visible = false;
break;
}
- XplatUI.RequestNCRecalc (form.Handle);
+
+ base.UpdateWindowDecorations (window_state);
}
public override void SetWindowState (FormWindowState old_state, FormWindowState window_state)
Size bs = ThemeEngine.Current.ManagedWindowButtonSize (this);
Point pnt = XplatUI.GetMenuOrigin (mdi_container.ParentForm.Handle);
int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this);
+ TitleButtons buttons = MaximizedTitleButtons;
+
+ buttons.Visible = true;
+ TitleButtons.Visible = false;
- close_button.Rectangle = new Rectangle (mdi_container.ParentForm.Size.Width - 1 - bw - bs.Width - 2,
+ buttons.CloseButton.Rectangle = new Rectangle (mdi_container.ParentForm.Size.Width - 1 - bw - bs.Width - 2,
pnt.Y + 2, bs.Width, bs.Height);
- maximize_button.Rectangle = new Rectangle (close_button.Rectangle.Left - 2 - bs.Width,
+ buttons.RestoreButton.Rectangle = new Rectangle (buttons.CloseButton.Rectangle.Left - 2 - bs.Width,
pnt.Y + 2, bs.Width, bs.Height);
-
- minimize_button.Rectangle = new Rectangle (maximize_button.Rectangle.Left - bs.Width,
+
+ buttons.MinimizeButton.Rectangle = new Rectangle (buttons.RestoreButton.Rectangle.Left - bs.Width,
pnt.Y + 2, bs.Width, bs.Height);
- DrawTitleButton (pe.Graphics, minimize_button, pe.ClipRectangle);
- DrawTitleButton (pe.Graphics, maximize_button, pe.ClipRectangle);
- DrawTitleButton (pe.Graphics, close_button, pe.ClipRectangle);
+ DrawTitleButton (pe.Graphics, buttons.MinimizeButton, pe.ClipRectangle);
+ DrawTitleButton (pe.Graphics, buttons.RestoreButton, pe.ClipRectangle);
+ DrawTitleButton (pe.Graphics, buttons.CloseButton, pe.ClipRectangle);
- minimize_button.Rectangle.Y -= pnt.Y;
- maximize_button.Rectangle.Y -= pnt.Y;
- close_button.Rectangle.Y -= pnt.Y;
+ buttons.MinimizeButton.Rectangle.Y -= pnt.Y;
+ buttons.RestoreButton.Rectangle.Y -= pnt.Y;
+ buttons.CloseButton.Rectangle.Y -= pnt.Y;
}
- private bool IconRectangleContains (int x, int y)
- {
- if (form.Icon == null)
- return false;
-
- int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this);
- Rectangle icon = new Rectangle (bw + 3, bw + 2, IconWidth, IconWidth);
- return icon.Contains (x, y);
- }
-
public bool HandleMenuMouseDown (MainMenu menu, int x, int y)
{
Point pt = MenuTracker.ScreenToMenu (menu, new Point (x, y));
HandleTitleBarDown (pt.X, pt.Y);
- return AnyPushedTitleButtons;
+ return TitleButtons.AnyPushedTitleButtons;
}
public void HandleMenuMouseUp (MainMenu menu, int x, int y)
{
base.HandleTitleBarLeave (x, y);
+ if (maximized_title_buttons != null) {
+ maximized_title_buttons.MouseLeave (x, y);
+ }
+
if (IsMaximized)
XplatUI.InvalidateNC (form.MdiParent.Handle);
}
return;
}
+ bool was_maximized = IsMaximized;
base.HandleTitleBarUp (x, y);
+ if (maximized_title_buttons != null && was_maximized) {
+ maximized_title_buttons.MouseUp (x, y);
+ }
if (IsMaximized)
XplatUI.InvalidateNC (mdi_container.Parent.Handle);
}
base.HandleTitleBarDown (x, y);
-
+
+ if (maximized_title_buttons != null) {
+ maximized_title_buttons.MouseDown (x, y);
+ }
if (IsMaximized) {
XplatUI.InvalidateNC (mdi_container.Parent.Handle);
}
}
+ protected override void HandleTitleBarMouseMove (int x, int y)
+ {
+ base.HandleTitleBarMouseMove (x, y);
+
+ if (maximized_title_buttons != null) {
+ maximized_title_buttons.MouseMove (x, y);
+ }
+ }
+
protected override bool HandleLButtonDblClick (ref Message m)
{
return base.HandleLButtonDown (ref m);
}
- protected override bool HandleNCLButtonDown (ref Message m)
- {
- return base.HandleNCLButtonDown (ref m);
- }
-
protected override bool ShouldRemoveWindowManager (FormBorderStyle style)
{
return false;
form.Refresh ();
}
- public override bool IsActive ()
- {
- return mdi_container.ActiveMdiChild == form;
+ public override bool IsActive {
+ get {
+ return mdi_container.ActiveMdiChild == form;
+ }
}
protected override void Activate ()
SetStyle (ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
SetStyle (ControlStyles.ResizeRedraw | ControlStyles.Opaque, true);
is_visible = false;
- Hwnd.ObjectFromHandle (this.Handle).no_activate = true;
}
protected override CreateParams CreateParams
Width = menu.Rect.Width;
Height = menu.Rect.Height;
}
+
+ internal override bool ActivateOnShow { get { return false; } }
}
}
using System.Runtime.Remoting;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
+using System.Threading;
using System.Collections;
using System.Diagnostics;
internal IntPtr window_handle;
static internal Hashtable window_collection = new Hashtable();
+ [ThreadStatic]
+ static NativeWindow WindowCreating;
+
#region Public Constructors
public NativeWindow()
{
public void AssignHandle(IntPtr handle)
{
lock (window_collection) {
- if (window_handle != IntPtr.Zero) {
+ if (window_handle != IntPtr.Zero)
window_collection.Remove(window_handle);
- }
window_handle=handle;
window_collection.Add(window_handle, this);
}
public virtual void CreateHandle(CreateParams create_params)
{
if (create_params != null) {
+ WindowCreating = this;
+
window_handle=XplatUI.CreateWindow(create_params);
+ WindowCreating = null;
+
if (window_handle != IntPtr.Zero) {
lock (window_collection) {
- window_collection.Add(window_handle, this);
+ window_collection[window_handle] = this;
}
}
}
+
}
public void DefWndProc(ref Message m)
if (window != null)
window.WndProc(ref m);
+ else if (WindowCreating != null) {
+ // we need to do this AssignHandle here instead of relying on
+ // Control.WndProc to do it, because subclasses can override
+ // WndProc, install their own WM_CREATE block, and look at
+ // this.Handle, and it needs to be set. Otherwise, we end up
+ // recursively creating windows and emitting WM_CREATE.
+ if (WindowCreating.window_handle == IntPtr.Zero)
+ WindowCreating.AssignHandle (hWnd);
+
+ WindowCreating.WndProc (ref m);
+ }
else
m.Result=XplatUI.DefWndProc(ref m);
}
return (current != null);
}
- if (current.IsExpanded && current.Nodes.Count > 0) {
+ if (current.is_expanded && current.Nodes.Count > 0) {
current = current.Nodes [0];
return true;
}
TreeNode walk = prev;
while (walk != null) {
prev = walk;
- if (!walk.IsExpanded)
+ if (!walk.is_expanded)
break;
walk = walk.LastNode;
}
vscrollbar.Value = vscrollbar.Minimum;
}
} else {
- if (vscrollbar.Maximum > (vscrollbar.Value + vscrollbar.LargeChange)) {
+ int maximum_scrollbar_value = vscrollbar.Maximum - vscrollbar.LargeChange + 1;
+ if (maximum_scrollbar_value > (vscrollbar.Value + vscrollbar.LargeChange)) {
vscrollbar.Value += vscrollbar.LargeChange;
} else {
- vscrollbar.Value = vscrollbar.Maximum;
+ vscrollbar.Value = maximum_scrollbar_value;
}
}
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnVisibleChanged(EventArgs e) {
if (Visible) {
+ UpdateChildrenZOrder ();
PerformLayout();
}
base.OnVisibleChanged(e);
#endregion
#region Protected Methods
- [EditorBrowsable (EditorBrowsableState.Never)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override ControlCollection CreateControlsInstance ()
{
return new SplitContainerTypedControlCollection (this);
base.OnMouseLeave (e);
}
- [EditorBrowsable (EditorBrowsableState.Never)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override void OnMouseMove (MouseEventArgs e)
{
base.OnMouseMove (e);
base.OnPaint (e);
}
- [EditorBrowsable (EditorBrowsableState.Never)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override void OnRightToLeftChanged (EventArgs e)
{
base.OnRightToLeftChanged (e);
#region Public Events
[Browsable (false)]
[EditorBrowsable (EditorBrowsableState.Never)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new event EventHandler AutoSizeChanged {
add { base.AutoSizeChanged += value; }
remove { base.AutoSizeChanged -= value; }
set { base.Dock = value; }
}
+ [Browsable (false)]
[DefaultValue (false)]
public new bool CanOverflow {
get { return base.CanOverflow; }
ToolStripItemOverflow[] overflow = new ToolStripItemOverflow[this.Items.Count];
ToolStripItemPlacement[] placement = new ToolStripItemPlacement[this.Items.Count];
- Size proposedSize = new Size (0, bounds.Height);
+ Size proposedSize = new Size (0, Bounds.Height);
int[] widths = new int[this.Items.Count];
int total_width = 0;
int toolstrip_width = DisplayRectangle.Width;
using System;
using System.Drawing;
-namespace System.Windows.Forms {
- public class SystemInformation {
- #region Constructor
- internal SystemInformation() {
+namespace System.Windows.Forms
+{
+ public class SystemInformation
+ {
+ private SystemInformation ()
+ {
}
- #endregion
- #region Public Static Properties
public static ArrangeDirection ArrangeDirection {
get {
return ThemeEngine.Current.ArrangeDirection;
}
}
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static int KeyboardDelay {
+ get {
+ return XplatUI.KeyboardDelay;
+ }
+ }
+
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static int KeyboardSpeed {
+ get {
+ return XplatUI.KeyboardSpeed;
+ }
+ }
+
public static Size MaxWindowTrackSize {
get {
return XplatUI.MaxWindowTrackSize;
}
#if NET_2_0
- public static bool MenuAccessKeysUnderlined {
+ public
#else
- internal static bool MenuAccessKeysUnderlined {
+ internal
#endif
+ static bool MenuAccessKeysUnderlined {
get {
return ThemeEngine.Current.MenuAccessKeysUnderlined;
}
public static bool Secure {
get {
- return true; // FIXME - figure out if we're running 98/Me and return false
+ return true;
}
}
}
}
+#if NET_2_0
+ public static bool TerminalServerSession {
+ get {
+ return false;
+ }
+ }
+#endif
+
public static Size ToolWindowCaptionButtonSize {
get {
return ThemeEngine.Current.ToolWindowCaptionButtonSize;
return XplatUI.WorkingArea;
}
}
- #endregion // Public Static Properties
-
- #region Internal Static Properties
- internal static int KeyboardSpeed {
- get {
- return XplatUI.KeyboardSpeed;
- }
- }
-
- internal static int KeyboardDelay {
- get {
- return XplatUI.KeyboardDelay;
- }
- }
- #endregion // Internal Static Properties
}
}
[ProvideProperty ("Row", typeof (Control))]
[ProvideProperty ("RowSpan", typeof (Control))]
[DefaultProperty ("ColumnCount")]
- [Docking (DockingBehavior.Ask)]
+ [Docking (DockingBehavior.Never)]
public class TableLayoutPanel : Panel, IExtenderProvider
{
private TableLayoutSettings settings;
[Browsable (false)]
[DisplayName ("Columns")]
+ [MergableProperty (false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public TableLayoutColumnStyleCollection ColumnStyles {
get { return settings.ColumnStyles; }
}
[Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
new public TableLayoutControlCollection Controls {
get { return (TableLayoutControlCollection) base.Controls; }
}
[Browsable (false)]
[DisplayName ("Rows")]
+ [MergableProperty (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public TableLayoutRowStyleCollection RowStyles {
get { return settings.RowStyles; }
}
[Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
public int[] GetColumnWidths ()
{
return this.column_widths;
}
[Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
public int[] GetRowHeights ()
{
return this.row_heights;
#endregion
#region Protected Methods
- [EditorBrowsable (EditorBrowsableState.Never)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override ControlCollection CreateControlsInstance ()
{
return new TableLayoutControlCollection (this);
eh (this, e);
}
- [EditorBrowsable (EditorBrowsableState.Never)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override void OnLayout (LayoutEventArgs levent)
{
base.OnLayout (levent);
scrollbars = RichTextBoxScrollBars.None;
alignment = HorizontalAlignment.Left;
this.LostFocus +=new EventHandler(TextBox_LostFocus);
- this.BackColor = ThemeEngine.Current.ColorWindow;
- this.ForeColor = ThemeEngine.Current.ColorWindowText;
+
+ BackColor = SystemColors.Window;
+ ForeColor = SystemColors.WindowText;
+ backcolor_set = false;
SetStyle (ControlStyles.StandardClick | ControlStyles.StandardDoubleClick, false);
SetStyle (ControlStyles.FixedHeight, true);
return base.BackColor;
}
set {
- if (value != ThemeEngine.Current.ColorWindow) {
- backcolor_set = true;
- } else {
- backcolor_set = false;
- }
+ backcolor_set = true;
base.BackColor = value;
}
}
if (value != read_only) {
read_only = value;
OnReadOnlyChanged(EventArgs.Empty);
+ Invalidate ();
}
}
}
#region Protected Instance Methods
protected override void CreateHandle() {
+ CalculateDocument ();
base.CreateHandle ();
document.AlignCaret();
ScrollToCaret();
// Draw the viewable document
document.Draw(pevent.Graphics, pevent.ClipRectangle);
- Rectangle rect = ClientRectangle;
- rect.Width--;
- rect.Height--;
- //pevent.Graphics.DrawRectangle(ThemeEngine.Current.ResPool.GetPen(ThemeEngine.Current.ColorControlDark), rect);
-
- #if Debug
- int start;
- int end;
- Line line;
- int line_no;
- Pen p;
-
- p = new Pen(Color.Red, 1);
-
- // First, figure out from what line to what line we need to draw
- start = document.GetLineByPixel(pevent.ClipRectangle.Top - document.ViewPortY, false).line_no;
- end = document.GetLineByPixel(pevent.ClipRectangle.Bottom - document.ViewPortY, false).line_no;
-
- //Console.WriteLine("Starting drawing on line '{0}'", document.GetLine(start));
- //Console.WriteLine("Ending drawing on line '{0}'", document.GetLine(end));
-
- line_no = start;
- while (line_no <= end) {
- line = document.GetLine(line_no);
-
- if (draw_lines) {
- for (int i = 0; i < line.text.Length; i++) {
- pevent.Graphics.DrawLine(p, (int)line.widths[i] - document.ViewPortX, line.Y - document.ViewPortY, (int)line.widths[i] - document.ViewPortX, line.Y + line.height - document.ViewPortY);
- }
- }
-
- line_no++;
- }
- #endif
+ //
+ // OnPaint does not get raised on MS (see bug #80639)
+ //
+ pevent.Handled = true;
}
private bool IsDoubleClick (MouseEventArgs e)
Brush tag_brush;
Brush current_brush;
Brush disabled_brush;
+ Brush readonly_brush;
Brush hilight;
Brush hilight_text;
#endif
disabled_brush = ThemeEngine.Current.ResPool.GetSolidBrush(ThemeEngine.Current.ColorGrayText);
+ readonly_brush = ThemeEngine.Current.ResPool.GetSolidBrush (ThemeEngine.Current.ColorControlText);
hilight = ThemeEngine.Current.ResPool.GetSolidBrush(ThemeEngine.Current.ColorHighlight);
hilight_text = ThemeEngine.Current.ResPool.GetSolidBrush(ThemeEngine.Current.ColorHighlightText);
tag_brush = tag.color;
current_brush = tag_brush;
-
+
if (!owner.is_enabled) {
Color a = ((SolidBrush) tag.color).Color;
Color b = ThemeEngine.Current.ColorWindowText;
if ((a.R == b.R) && (a.G == b.G) && (a.B == b.B)) {
tag_brush = disabled_brush;
}
+ } else if (owner.read_only && !owner.backcolor_set) {
+ tag_brush = readonly_brush;
}
int tag_pos = tag.start;
current_brush = hilight_text;
tag_pos = Math.Min (tag.end, line_selection_end);
} else if (tag_pos < line_selection_start) {
- current_brush = tag.color;
+ current_brush = tag_brush;
tag_pos = Math.Min (tag.end, line_selection_start);
} else {
- current_brush = tag.color;
+ current_brush = tag_brush;
tag_pos = tag.end;
}
//
-#if NET_2_0
namespace System.Windows.Forms {
[FlagsAttribute()]
- public enum TextFormatFlags {
+#if NET_2_0
+ public
+#endif
+ enum TextFormatFlags {
Left = 0,
Top = 0,
Default = 0,
NoPadding = 268435456,
LeftAndRightPadding = 536870912
}
-
-}
-
-#endif
+}
\ No newline at end of file
//
-#if NET_2_0
namespace System.Windows.Forms
{
- public enum TextImageRelation
+#if NET_2_0
+ public
+#endif
+ enum TextImageRelation
{
Overlay = 0,
ImageAboveText = 1,
TextBeforeImage = 8
}
}
-#endif
\ No newline at end of file
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text;
using System.Drawing.Text;
-using System.Windows.Forms.VisualStyles;
namespace System.Windows.Forms
{
- public sealed class TextRenderer
+#if NET_2_0
+ public sealed
+#endif
+ class TextRenderer
{
private static Bitmap measure_bitmap = new Bitmap (1, 1);
}
#region Public Methods
+#if NET_2_0
public static void DrawText (IDeviceContext dc, string text, Font font, Point pt, Color foreColor)
{
DrawTextInternal (dc, text, font, pt, foreColor, Color.Transparent, TextFormatFlags.Default, false);
{
return MeasureTextInternal (dc, text, font, proposedSize, flags, false);
}
+#endif
#endregion
#region Internal Methods That Do Stuff
+#if NET_2_0
internal static void DrawTextInternal (IDeviceContext dc, string text, Font font, Rectangle bounds, Color foreColor, Color backColor, TextFormatFlags flags, bool useDrawString)
+#else
+ internal static void DrawTextInternal (Graphics dc, string text, Font font, Rectangle bounds, Color foreColor, Color backColor, TextFormatFlags flags, bool useDrawString)
+#endif
{
+#if NET_2_0
if (dc == null)
throw new ArgumentNullException ("dc");
}
// Use Graphics.DrawString as a fallback method
else {
+#endif
Graphics g;
+#if NET_2_0
if (dc is Graphics)
g = (Graphics)dc;
else
g = Graphics.FromHdc (dc.GetHdc ());
+#else
+ g = (Graphics)dc;
+
+#endif
StringFormat sf = FlagsToStringFormat (flags);
Rectangle new_bounds = PadDrawStringRectangle (bounds, flags);
- using (Brush b = new SolidBrush (foreColor))
- g.DrawString (text, font, b, new_bounds, sf);
+ g.DrawString (text, font, ThemeEngine.Current.ResPool.GetSolidBrush (foreColor), new_bounds, sf);
+#if NET_2_0
if (!(dc is Graphics)) {
g.Dispose ();
dc.ReleaseHdc ();
}
}
+#endif
}
+#if NET_2_0
internal static Size MeasureTextInternal (IDeviceContext dc, string text, Font font, Size proposedSize, TextFormatFlags flags, bool useMeasureString)
+#else
+ internal static Size MeasureTextInternal (Graphics dc, string text, Font font, Size proposedSize, TextFormatFlags flags, bool useMeasureString)
+#endif
{
+#if NET_2_0
if (!useMeasureString && (Environment.OSVersion.Platform == PlatformID.Win32NT || Environment.OSVersion.Platform == PlatformID.Win32Windows)) {
// Tell DrawText to calculate size instead of draw
flags |= (TextFormatFlags)1024; // DT_CALCRECT
return retval;
}
else {
+#endif
Graphics g = Graphics.FromImage (measure_bitmap);
Size retval = g.MeasureString (text, font).ToSize ();
return retval;
}
+#if NET_2_0
}
+#endif
#endregion
#region Internal Methods That Are Just Overloads
+#if NET_2_0
internal static void DrawTextInternal (IDeviceContext dc, string text, Font font, Point pt, Color foreColor, bool useDrawString)
{
DrawTextInternal (dc, text, font, pt, foreColor, Color.Transparent, TextFormatFlags.Default, useDrawString);
}
internal static void DrawTextInternal (IDeviceContext dc, string text, Font font, Rectangle bounds, Color foreColor, TextFormatFlags flags, bool useDrawString)
+#else
+ internal static void DrawTextInternal (Graphics dc, string text, Font font, Rectangle bounds, Color foreColor, TextFormatFlags flags, bool useDrawString)
+#endif
{
DrawTextInternal (dc, text, font, bounds, foreColor, Color.Transparent, flags, useDrawString);
}
+#if NET_2_0
internal static void DrawTextInternal (IDeviceContext dc, string text, Font font, Point pt, Color foreColor, Color backColor, TextFormatFlags flags, bool useDrawString)
{
Size sz = MeasureTextInternal (dc, text, font, useDrawString);
return MeasureTextInternal (dc, text, font, proposedSize, TextFormatFlags.Default, useMeasureString);
}
+#endif
internal static Size MeasureTextInternal (string text, Font font, Size proposedSize, TextFormatFlags flags, bool useMeasureString)
{
return MeasureTextInternal (Graphics.FromImage (measure_bitmap), text, font, proposedSize, flags, useMeasureString);
static extern bool SelectClipRgn(IntPtr hdc, IntPtr hrgn);
#endregion
}
-}
-#endif
+}
\ No newline at end of file
#endregion // OwnerDraw Support
#region Button
+ public abstract void CalculateButtonTextAndImageLayout (Button b, out Rectangle textRectangle, out Rectangle imageRectangle);
+ public abstract void DrawButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle);
+ public abstract void DrawFlatButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle);
+ public abstract void DrawPopupButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle);
#endregion // Button
#region ButtonBase
#endregion // ComboBox
#region Control
+ public abstract Font GetLinkFont (Control control);
#endregion // Control
#region Datagrid
using System.Drawing.Printing;
using System.Drawing.Text;
using System.Text;
+using System.Windows.Forms.Theming;
namespace System.Windows.Forms
{
}
#endregion // Internal Methods
+ #region Control
+ public override Font GetLinkFont (Control control)
+ {
+ return new Font (control.Font.FontFamily, control.Font.Size, control.Font.Style | FontStyle.Underline, control.Font.Unit);
+ }
+ #endregion // Control
+
#region OwnerDraw Support
public override void DrawOwnerDrawBackground (DrawItemEventArgs e)
{
}
#endregion // OwnerDraw Support
+ #region Button
+ #region Standard Button Style
+ public override void DrawButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle)
+ {
+ // Draw Button Background
+ DrawButtonBackground (g, b, clipRectangle);
+
+ // If we have an image, draw it
+ if (imageBounds.Size != Size.Empty)
+ DrawButtonImage (g, b, imageBounds);
+
+ // If we're focused, draw a focus rectangle
+ if (b.Focused && b.Enabled)
+ DrawButtonFocus (g, b);
+
+ // If we have text, draw it
+ if (textBounds != Rectangle.Empty)
+ DrawButtonText (g, b, textBounds);
+ }
+
+ public virtual void DrawButtonBackground (Graphics g, Button button, Rectangle clipArea)
+ {
+ if (button.Pressed)
+ ThemeElements.DrawButton (g, button.ClientRectangle, ButtonThemeState.Pressed, button.BackColor, button.ForeColor);
+ else if (button.InternalSelected)
+ ThemeElements.DrawButton (g, button.ClientRectangle, ButtonThemeState.Default, button.BackColor, button.ForeColor);
+ else if (button.Entered)
+ ThemeElements.DrawButton (g, button.ClientRectangle, ButtonThemeState.Entered, button.BackColor, button.ForeColor);
+ else if (!button.Enabled)
+ ThemeElements.DrawButton (g, button.ClientRectangle, ButtonThemeState.Disabled, button.BackColor, button.ForeColor);
+ else
+ ThemeElements.DrawButton (g, button.ClientRectangle, ButtonThemeState.Normal, button.BackColor, button.ForeColor);
+ }
+
+ public virtual void DrawButtonFocus (Graphics g, Button button)
+ {
+ ControlPaint.DrawFocusRectangle (g, Rectangle.Inflate (button.ClientRectangle, -4, -4));
+ }
+
+ public virtual void DrawButtonImage (Graphics g, Button button, Rectangle imageBounds)
+ {
+ if (button.Enabled)
+ g.DrawImage (button.Image, imageBounds);
+ else
+ CPDrawImageDisabled (g, button.Image, imageBounds.Left, imageBounds.Top, ColorControl);
+ }
+
+ public virtual void DrawButtonText (Graphics g, Button button, Rectangle textBounds)
+ {
+ if (button.Pressed)
+ textBounds.Offset (1, 1);
+
+ if (button.Enabled)
+ TextRenderer.DrawTextInternal (g, button.Text, button.Font, textBounds, button.ForeColor, button.TextFormatFlags, button.UseCompatibleTextRendering);
+ else
+ DrawStringDisabled20 (g, button.Text, button.Font, textBounds, button.BackColor, button.TextFormatFlags, button.UseCompatibleTextRendering);
+ }
+ #endregion
+
+ #region FlatStyle Button Style
+ public override void DrawFlatButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle)
+ {
+ // Draw Button Background
+ DrawFlatButtonBackground (g, b, clipRectangle);
+
+ // If we have an image, draw it
+ if (imageBounds.Size != Size.Empty)
+ DrawFlatButtonImage (g, b, imageBounds);
+
+ // If we're focused, draw a focus rectangle
+ if (b.Focused && b.Enabled)
+ DrawFlatButtonFocus (g, b);
+
+ // If we have text, draw it
+ if (textBounds != Rectangle.Empty)
+ DrawFlatButtonText (g, b, textBounds);
+ }
+
+ public virtual void DrawFlatButtonBackground (Graphics g, Button button, Rectangle clipArea)
+ {
+ if (button.Pressed)
+ ThemeElements.DrawFlatButton (g, button.ClientRectangle, ButtonThemeState.Pressed, button.BackColor, button.ForeColor, button.FlatAppearance);
+ else if (button.InternalSelected)
+ ThemeElements.DrawFlatButton (g, button.ClientRectangle, ButtonThemeState.Default, button.BackColor, button.ForeColor, button.FlatAppearance);
+ else if (button.Entered)
+ ThemeElements.DrawFlatButton (g, button.ClientRectangle, ButtonThemeState.Entered, button.BackColor, button.ForeColor, button.FlatAppearance);
+ else if (!button.Enabled)
+ ThemeElements.DrawFlatButton (g, button.ClientRectangle, ButtonThemeState.Disabled, button.BackColor, button.ForeColor, button.FlatAppearance);
+ else
+ ThemeElements.DrawFlatButton (g, button.ClientRectangle, ButtonThemeState.Normal, button.BackColor, button.ForeColor, button.FlatAppearance);
+ }
+
+ public virtual void DrawFlatButtonFocus (Graphics g, Button button)
+ {
+ if (!button.Pressed) {
+ Color focus_color = ControlPaint.Light(button.BackColor);
+ g.DrawRectangle (ResPool.GetPen (focus_color), new Rectangle (button.ClientRectangle.Left + 4, button.ClientRectangle.Top + 4, button.ClientRectangle.Width - 9, button.ClientRectangle.Height - 9));
+ }
+ }
+
+ public virtual void DrawFlatButtonImage (Graphics g, Button button, Rectangle imageBounds)
+ {
+ // No changes from Standard for image for this theme
+ DrawButtonImage (g, button, imageBounds);
+ }
+
+ public virtual void DrawFlatButtonText (Graphics g, Button button, Rectangle textBounds)
+ {
+ // No changes from Standard for image for this theme
+ DrawButtonText (g, button, textBounds);
+ }
+ #endregion
+
+ #region Popup Button Style
+ public override void DrawPopupButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle)
+ {
+ // Draw Button Background
+ DrawPopupButtonBackground (g, b, clipRectangle);
+
+ // If we have an image, draw it
+ if (imageBounds.Size != Size.Empty)
+ DrawPopupButtonImage (g, b, imageBounds);
+
+ // If we're focused, draw a focus rectangle
+ if (b.Focused && b.Enabled)
+ DrawPopupButtonFocus (g, b);
+
+ // If we have text, draw it
+ if (textBounds != Rectangle.Empty)
+ DrawPopupButtonText (g, b, textBounds);
+ }
+
+ public virtual void DrawPopupButtonBackground (Graphics g, Button button, Rectangle clipArea)
+ {
+ if (button.Pressed)
+ ThemeElements.DrawPopupButton (g, button.ClientRectangle, ButtonThemeState.Pressed, button.BackColor, button.ForeColor);
+ else if (button.Entered)
+ ThemeElements.DrawPopupButton (g, button.ClientRectangle, ButtonThemeState.Entered, button.BackColor, button.ForeColor);
+ else if (button.InternalSelected)
+ ThemeElements.DrawPopupButton (g, button.ClientRectangle, ButtonThemeState.Default, button.BackColor, button.ForeColor);
+ else if (!button.Enabled)
+ ThemeElements.DrawPopupButton (g, button.ClientRectangle, ButtonThemeState.Disabled, button.BackColor, button.ForeColor);
+ else
+ ThemeElements.DrawPopupButton (g, button.ClientRectangle, ButtonThemeState.Normal, button.BackColor, button.ForeColor);
+ }
+
+ public virtual void DrawPopupButtonFocus (Graphics g, Button button)
+ {
+ // No changes from Standard for image for this theme
+ DrawButtonFocus (g, button);
+ }
+
+ public virtual void DrawPopupButtonImage (Graphics g, Button button, Rectangle imageBounds)
+ {
+ // No changes from Standard for image for this theme
+ DrawButtonImage (g, button, imageBounds);
+ }
+
+ public virtual void DrawPopupButtonText (Graphics g, Button button, Rectangle textBounds)
+ {
+ // No changes from Standard for image for this theme
+ DrawButtonText (g, button, textBounds);
+ }
+ #endregion
+
+ #region Button Layout Calculations
+ public override void CalculateButtonTextAndImageLayout (Button button, out Rectangle textRectangle, out Rectangle imageRectangle)
+ {
+ Image image = button.Image;
+ string text = button.Text;
+ Rectangle content_rect = button.ClientRectangle;
+ Size text_size = TextRenderer.MeasureTextInternal (text, button.Font, content_rect.Size, button.TextFormatFlags, button.UseCompatibleTextRendering);
+ Size image_size = image == null ? Size.Empty : image.Size;
+
+ textRectangle = Rectangle.Empty;
+ imageRectangle = Rectangle.Empty;
+
+ switch (button.TextImageRelation) {
+ case TextImageRelation.Overlay:
+ // Overlay is easy, text always goes here
+ textRectangle = Rectangle.Inflate (content_rect, -4, -4);
+
+ if (button.Pressed)
+ textRectangle.Offset (1, 1);
+
+ // Image is dependent on ImageAlign
+ if (image == null)
+ return;
+
+ int image_x = 0;
+ int image_y = 0;
+ int image_height = image.Height;
+ int image_width = image.Width;
+
+ switch (button.ImageAlign) {
+ case System.Drawing.ContentAlignment.TopLeft:
+ image_x = 5;
+ image_y = 5;
+ break;
+ case System.Drawing.ContentAlignment.TopCenter:
+ image_x = (content_rect.Width - image_width) / 2;
+ image_y = 5;
+ break;
+ case System.Drawing.ContentAlignment.TopRight:
+ image_x = content_rect.Width - image_width - 5;
+ image_y = 5;
+ break;
+ case System.Drawing.ContentAlignment.MiddleLeft:
+ image_x = 5;
+ image_y = (content_rect.Height - image_height) / 2;
+ break;
+ case System.Drawing.ContentAlignment.MiddleCenter:
+ image_x = (content_rect.Width - image_width) / 2;
+ image_y = (content_rect.Height - image_height) / 2;
+ break;
+ case System.Drawing.ContentAlignment.MiddleRight:
+ image_x = content_rect.Width - image_width - 4;
+ image_y = (content_rect.Height - image_height) / 2;
+ break;
+ case System.Drawing.ContentAlignment.BottomLeft:
+ image_x = 5;
+ image_y = content_rect.Height - image_height - 4;
+ break;
+ case System.Drawing.ContentAlignment.BottomCenter:
+ image_x = (content_rect.Width - image_width) / 2;
+ image_y = content_rect.Height - image_height - 4;
+ break;
+ case System.Drawing.ContentAlignment.BottomRight:
+ image_x = content_rect.Width - image_width - 4;
+ image_y = content_rect.Height - image_height - 4;
+ break;
+ default:
+ image_x = 5;
+ image_y = 5;
+ break;
+ }
+
+ imageRectangle = new Rectangle (image_x, image_y, image_width, image_height);
+ break;
+ case TextImageRelation.ImageAboveText:
+ content_rect.Inflate (-4, -4);
+ LayoutTextAboveOrBelowImage (content_rect, false, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
+ break;
+ case TextImageRelation.TextAboveImage:
+ content_rect.Inflate (-4, -4);
+ LayoutTextAboveOrBelowImage (content_rect, true, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
+ break;
+ case TextImageRelation.ImageBeforeText:
+ content_rect.Inflate (-4, -4);
+ LayoutTextBeforeOrAfterImage (content_rect, false, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
+ break;
+ case TextImageRelation.TextBeforeImage:
+ content_rect.Inflate (-4, -4);
+ LayoutTextBeforeOrAfterImage (content_rect, true, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
+ break;
+ }
+ }
+
+ private void LayoutTextBeforeOrAfterImage (Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, System.Drawing.ContentAlignment textAlign, System.Drawing.ContentAlignment imageAlign, out Rectangle textRect, out Rectangle imageRect)
+ {
+ int element_spacing = 0; // Spacing between the Text and the Image
+ int total_width = textSize.Width + element_spacing + imageSize.Width;
+
+ if (!textFirst)
+ element_spacing += 2;
+
+ // If the text is too big, chop it down to the size we have available to it
+ if (total_width > totalArea.Width) {
+ textSize.Width = totalArea.Width - element_spacing - imageSize.Width;
+ total_width = totalArea.Width;
+ }
+
+ int excess_width = totalArea.Width - total_width;
+ int offset = 0;
+
+ Rectangle final_text_rect;
+ Rectangle final_image_rect;
+
+ HorizontalAlignment h_text = GetHorizontalAlignment (textAlign);
+ HorizontalAlignment h_image = GetHorizontalAlignment (imageAlign);
+
+ if (h_image == HorizontalAlignment.Left)
+ offset = 0;
+ else if (h_image == HorizontalAlignment.Right && h_text == HorizontalAlignment.Right)
+ offset = excess_width;
+ else if (h_image == HorizontalAlignment.Center && (h_text == HorizontalAlignment.Left || h_text == HorizontalAlignment.Center))
+ offset += (int)(excess_width / 3);
+ else
+ offset += (int)(2 * (excess_width / 3));
+
+ if (textFirst) {
+ final_text_rect = new Rectangle (totalArea.Left + offset, AlignInRectangle (totalArea, textSize, textAlign).Top, textSize.Width, textSize.Height);
+ final_image_rect = new Rectangle (final_text_rect.Right + element_spacing, AlignInRectangle (totalArea, imageSize, imageAlign).Top, imageSize.Width, imageSize.Height);
+ }
+ else {
+ final_image_rect = new Rectangle (totalArea.Left + offset, AlignInRectangle (totalArea, imageSize, imageAlign).Top, imageSize.Width, imageSize.Height);
+ final_text_rect = new Rectangle (final_image_rect.Right + element_spacing, AlignInRectangle (totalArea, textSize, textAlign).Top, textSize.Width, textSize.Height);
+ }
+
+ textRect = final_text_rect;
+ imageRect = final_image_rect;
+ }
+
+ private void LayoutTextAboveOrBelowImage (Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, System.Drawing.ContentAlignment textAlign, System.Drawing.ContentAlignment imageAlign, out Rectangle textRect, out Rectangle imageRect)
+ {
+ int element_spacing = 0; // Spacing between the Text and the Image
+ int total_height = textSize.Height + element_spacing + imageSize.Height;
+
+ if (textFirst)
+ element_spacing += 2;
+
+ if (textSize.Width > totalArea.Width)
+ textSize.Width = totalArea.Width;
+
+ // If the there isn't enough room and we're text first, cut out the image
+ if (total_height > totalArea.Height && textFirst) {
+ imageSize = Size.Empty;
+ total_height = totalArea.Height;
+ }
+
+ int excess_height = totalArea.Height - total_height;
+ int offset = 0;
+
+ Rectangle final_text_rect;
+ Rectangle final_image_rect;
+
+ VerticalAlignment v_text = GetVerticalAlignment (textAlign);
+ VerticalAlignment v_image = GetVerticalAlignment (imageAlign);
+
+ if (v_image == VerticalAlignment.Top)
+ offset = 0;
+ else if (v_image == VerticalAlignment.Bottom && v_text == VerticalAlignment.Bottom)
+ offset = excess_height;
+ else if (v_image == VerticalAlignment.Center && (v_text == VerticalAlignment.Top || v_text == VerticalAlignment.Center))
+ offset += (int)(excess_height / 3);
+ else
+ offset += (int)(2 * (excess_height / 3));
+
+ if (textFirst) {
+ final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, totalArea.Top + offset, textSize.Width, textSize.Height);
+ final_image_rect = new Rectangle (AlignInRectangle (totalArea, imageSize, imageAlign).Left, final_text_rect.Bottom + element_spacing, imageSize.Width, imageSize.Height);
+ }
+ else {
+ final_image_rect = new Rectangle (AlignInRectangle (totalArea, imageSize, imageAlign).Left, totalArea.Top + offset, imageSize.Width, imageSize.Height);
+ final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, final_image_rect.Bottom + element_spacing, textSize.Width, textSize.Height);
+
+ if (final_text_rect.Bottom > totalArea.Bottom)
+ final_text_rect.Y = totalArea.Top;
+ }
+
+ textRect = final_text_rect;
+ imageRect = final_image_rect;
+ }
+
+ private HorizontalAlignment GetHorizontalAlignment (System.Drawing.ContentAlignment align)
+ {
+ switch (align) {
+ case System.Drawing.ContentAlignment.BottomLeft:
+ case System.Drawing.ContentAlignment.MiddleLeft:
+ case System.Drawing.ContentAlignment.TopLeft:
+ return HorizontalAlignment.Left;
+ case System.Drawing.ContentAlignment.BottomCenter:
+ case System.Drawing.ContentAlignment.MiddleCenter:
+ case System.Drawing.ContentAlignment.TopCenter:
+ return HorizontalAlignment.Center;
+ case System.Drawing.ContentAlignment.BottomRight:
+ case System.Drawing.ContentAlignment.MiddleRight:
+ case System.Drawing.ContentAlignment.TopRight:
+ return HorizontalAlignment.Right;
+ }
+
+ return HorizontalAlignment.Left;
+ }
+
+ private enum VerticalAlignment
+ {
+ Top = 0,
+ Center = 1,
+ Bottom = 2
+ }
+
+ private VerticalAlignment GetVerticalAlignment (System.Drawing.ContentAlignment align)
+ {
+ switch (align) {
+ case System.Drawing.ContentAlignment.TopLeft:
+ case System.Drawing.ContentAlignment.TopCenter:
+ case System.Drawing.ContentAlignment.TopRight:
+ return VerticalAlignment.Top;
+ case System.Drawing.ContentAlignment.MiddleLeft:
+ case System.Drawing.ContentAlignment.MiddleCenter:
+ case System.Drawing.ContentAlignment.MiddleRight:
+ return VerticalAlignment.Center;
+ case System.Drawing.ContentAlignment.BottomLeft:
+ case System.Drawing.ContentAlignment.BottomCenter:
+ case System.Drawing.ContentAlignment.BottomRight:
+ return VerticalAlignment.Bottom;
+ }
+
+ return VerticalAlignment.Top;
+ }
+
+ internal Rectangle AlignInRectangle (Rectangle outer, Size inner, System.Drawing.ContentAlignment align)
+ {
+ int x = 0;
+ int y = 0;
+
+ if (align == System.Drawing.ContentAlignment.BottomLeft || align == System.Drawing.ContentAlignment.MiddleLeft || align == System.Drawing.ContentAlignment.TopLeft)
+ x = outer.X;
+ else if (align == System.Drawing.ContentAlignment.BottomCenter || align == System.Drawing.ContentAlignment.MiddleCenter || align == System.Drawing.ContentAlignment.TopCenter)
+ x = Math.Max (outer.X + ((outer.Width - inner.Width) / 2), outer.Left);
+ else if (align == System.Drawing.ContentAlignment.BottomRight || align == System.Drawing.ContentAlignment.MiddleRight || align == System.Drawing.ContentAlignment.TopRight)
+ x = outer.Right - inner.Width;
+ if (align == System.Drawing.ContentAlignment.TopCenter || align == System.Drawing.ContentAlignment.TopLeft || align == System.Drawing.ContentAlignment.TopRight)
+ y = outer.Y;
+ else if (align == System.Drawing.ContentAlignment.MiddleCenter || align == System.Drawing.ContentAlignment.MiddleLeft || align == System.Drawing.ContentAlignment.MiddleRight)
+ y = outer.Y + (outer.Height - inner.Height) / 2;
+ else if (align == System.Drawing.ContentAlignment.BottomCenter || align == System.Drawing.ContentAlignment.BottomRight || align == System.Drawing.ContentAlignment.BottomLeft)
+ y = outer.Bottom - inner.Height;
+
+ return new Rectangle (x, y, Math.Min (inner.Width, outer.Width), Math.Min (inner.Height, outer.Height));
+ }
+ #endregion
+ #endregion
+
#region ButtonBase
public override void DrawButtonBase(Graphics dc, Rectangle clip_area, ButtonBase button)
{
int height = button.ClientSize.Height;
if (button.ImageIndex != -1) { // We use ImageIndex instead of image_index since it will return -1 if image_list is null
- i = button.image_list.Images[button.image_index];
+ i = button.image_list.Images[button.ImageIndex];
} else {
i = button.image;
}
image_width = i.Width;
image_height = i.Height;
- switch (button.image_alignment) {
+ switch (button.ImageAlign) {
case ContentAlignment.TopLeft: {
image_x = 5;
image_y = 5;
public override void DataGridPaintColumnHeaders (Graphics g, Rectangle clip, DataGrid grid)
{
- Rectangle columns_area = grid.columnhdrs_area;
+ Rectangle columns_area = grid.column_headers_area;
if (grid.CurrentTableStyle.CurrentRowHeadersVisible) { // Paint corner shared between row and column header
- Rectangle rect_bloc = grid.columnhdrs_area;
+ Rectangle rect_bloc = grid.column_headers_area;
rect_bloc.Width = grid.RowHeaderWidth;
if (clip.IntersectsWith (rect_bloc)) {
if (grid.VisibleColumnCount > 0)
}
// Set unused area
- Rectangle columnhdrs_area_complete = columns_area;
- columnhdrs_area_complete.Width = grid.columnhdrs_maxwidth;
+ Rectangle column_headers_area_complete = columns_area;
+ column_headers_area_complete.Width = grid.column_headers_max_width;
if (grid.CurrentTableStyle.CurrentRowHeadersVisible) {
- columnhdrs_area_complete.Width -= grid.RowHeaderWidth;
+ column_headers_area_complete.Width -= grid.RowHeaderWidth;
}
// Set column painting
g.Clip = prev_clip;
- Rectangle not_usedarea = columnhdrs_area_complete;
+ Rectangle not_usedarea = column_headers_area_complete;
not_usedarea.X = rect_columnhdr.X + rect_columnhdr.Width;
not_usedarea.Width = grid.ClientRectangle.X + grid.ClientRectangle.Width - rect_columnhdr.X - rect_columnhdr.Height;
g.FillRectangle (ResPool.GetSolidBrush (grid.BackgroundColor), not_usedarea);
rect_row.Width = grid.ParentRowsArea.Width;
rect_row.Height = (grid.CaptionFont.Height + 3);
- object[] parentRows = grid.dataSourceStack.ToArray();
+ object[] parentRows = grid.data_source_stack.ToArray();
Region current_clip;
Region prev_clip = g.Clip;
#endregion // Label
#region LinkLabel
- public override void DrawLinkLabel (Graphics dc, Rectangle clip_rectangle, LinkLabel label)
+
+ private Color LinkLabelGetPieceColor (LinkLabel label, LinkLabel.Piece piece, int i)
+ {
+ if (!label.Enabled)
+ return label.DisabledLinkColor;
+
+ if (piece.link == null)
+ return label.ForeColor;
+
+ if (!piece.link.Enabled)
+ return label.DisabledLinkColor;
+
+ if (piece.link.Active)
+ return label.ActiveLinkColor;
+
+ if ((label.LinkVisited && i == 0) || piece.link.Visited)
+ return label.VisitedLinkColor;
+
+ return label.LinkColor;
+ }
+
+ public override void DrawLinkLabel (Graphics dc, Rectangle clip_rectangle, LinkLabel label)
{
dc.FillRectangle (GetControlBackBrush (label.BackColor), clip_rectangle);
if (label.pieces == null)
return;
- for (int i = 0; i < label.pieces.Length; i ++) {
- RectangleF clipf = new RectangleF (clip_rectangle.X, clip_rectangle.Y,
- clip_rectangle.Width, clip_rectangle.Height);
- RectangleF rectf = label.pieces[i].region.GetBounds (dc);
+ // Paint all text as disabled.
+ if (!label.Enabled) {
+ dc.SetClip (clip_rectangle);
+ CPDrawStringDisabled (dc, label.Text, label.Font, label.BackColor, label.ClientRectangle, label.string_format);
+ return;
+ }
+
+ Font font, link_font = GetLinkFont (label);
+
+ Region text_region = new Region (new Rectangle());
- if (!clipf.IntersectsWith (rectf))
+ // Draw links.
+ for (int i = 0; i < label.pieces.Length; i ++) {
+ LinkLabel.Piece piece = label.pieces[i];
+
+ if (piece.link == null) {
+ text_region.Union (piece.region);
continue;
+ }
- dc.DrawString (label.pieces[i].text, label.GetPieceFont (label.pieces[i]), ResPool.GetSolidBrush (label.GetPieceColor (label.pieces[i], i)),
- rectf, label.string_format);
+ Color color = LinkLabelGetPieceColor (label, piece, i);
- LinkLabel.Link link = label.pieces[i].link;
- if (link != null && link.Focused) {
- Rectangle rect = new Rectangle ((int)rectf.X, (int)rectf.Y,
- (int)rectf.Width, (int)rectf.Height);
- CPDrawFocusRectangle (dc, rect, label.ForeColor, label.BackColor);
+ if ( (label.LinkBehavior == LinkBehavior.AlwaysUnderline) ||
+ (label.LinkBehavior == LinkBehavior.SystemDefault) ||
+ ((label.LinkBehavior == LinkBehavior.HoverUnderline) && piece.link.Hovered) )
+ font = link_font;
+ else
+ font = label.Font;
+
+ dc.Clip = piece.region;
+ dc.Clip.Intersect (clip_rectangle);
+ dc.DrawString (label.Text, font, ResPool.GetSolidBrush (color), label.ClientRectangle, label.string_format);
+
+ // Draw focus rectangle
+ if ((piece.link != null) && piece.link.Focused) {
+ foreach (RectangleF rect in piece.region.GetRegionScans (dc.Transform))
+ ControlPaint.DrawFocusRectangle (dc, Rectangle.Round (rect), label.ForeColor, label.BackColor);
}
}
+
+ // Draw normal text (without links).
+ if (!text_region.IsEmpty (dc)) {
+ dc.Clip = text_region;
+ dc.Clip.Intersect (clip_rectangle);
+ if (!dc.Clip.IsEmpty (dc))
+ dc.DrawString(label.Text, label.Font, ResPool.GetSolidBrush(label.ForeColor), label.ClientRectangle, label.string_format);
+ }
}
+
#endregion // LinkLabel
+
#region ListBox
public override void DrawListBoxItem (ListBox ctrl, DrawItemEventArgs e)
public override void ManagedWindowSetButtonLocations (InternalWindowManager wm)
{
+ TitleButtons buttons = wm.TitleButtons;
+ Form form = wm.form;
+
+ buttons.HelpButton.Visible = form.HelpButton;
+
+ foreach (TitleButton button in buttons) {
+ button.Visible = false;
+ }
+
+ switch (form.FormBorderStyle) {
+ case FormBorderStyle.None:
+ if (form.WindowState != FormWindowState.Normal)
+ goto case FormBorderStyle.Sizable;
+ break;
+ case FormBorderStyle.FixedToolWindow:
+ case FormBorderStyle.SizableToolWindow:
+ buttons.CloseButton.Visible = true;
+ if (form.WindowState != FormWindowState.Normal)
+ goto case FormBorderStyle.Sizable;
+ break;
+ case FormBorderStyle.FixedSingle:
+ case FormBorderStyle.Fixed3D:
+ case FormBorderStyle.FixedDialog:
+ case FormBorderStyle.Sizable:
+ switch (form.WindowState) {
+ case FormWindowState.Normal:
+ buttons.MinimizeButton.Visible = true;
+ buttons.MaximizeButton.Visible = true;
+ buttons.RestoreButton.Visible = false;
+ break;
+ case FormWindowState.Maximized:
+ buttons.MinimizeButton.Visible = true;
+ buttons.MaximizeButton.Visible = false;
+ buttons.RestoreButton.Visible = true;
+ break;
+ case FormWindowState.Minimized:
+ buttons.MinimizeButton.Visible = false;
+ buttons.MaximizeButton.Visible = true;
+ buttons.RestoreButton.Visible = true;
+ break;
+ }
+ buttons.CloseButton.Visible = true;
+ break;
+ }
+
int bw = ManagedWindowBorderWidth (wm);
Size btsize = ManagedWindowButtonSize (wm);
int btw = btsize.Width;
int bth = btsize.Height;
-
+ int top = bw + 2;
+ int left = form.Width - bw - btw - 2;
+
if ((!wm.IsToolWindow || wm.IsMinimized) && wm.HasBorders) {
- if (!wm.IsMaximized) {
- wm.close_button.Rectangle = new Rectangle (wm.Form.Width - bw - btw - 2,
- bw + 2, btw, bth);
- wm.maximize_button.Rectangle = new Rectangle (wm.close_button.Rectangle.Left - 2 - btw,
- bw + 2, btw, bth);
- wm.minimize_button.Rectangle = new Rectangle (wm.maximize_button.Rectangle.Left - btw,
- bw + 2, btw, bth);
- } else {
- // Maximized
+ buttons.CloseButton.Rectangle = new Rectangle (left, top, btw, bth);
+ left -= 2 + btw;
+
+ if (buttons.MaximizeButton.Visible) {
+ buttons.MaximizeButton.Rectangle = new Rectangle (left, top, btw, bth);
+ left -= 2 + btw;
+ }
+ if (buttons.RestoreButton.Visible) {
+ buttons.RestoreButton.Rectangle = new Rectangle (left, top, btw, bth);
+ left -= 2 + btw;
}
+
+ buttons.MinimizeButton.Rectangle = new Rectangle (left, top, btw, bth);
+ left -= 2 + btw;
} else if (wm.IsToolWindow) {
- wm.close_button.Rectangle = new Rectangle (wm.Form.Width - bw - 2 - btw, bw + 2, btw, bth);
+ buttons.CloseButton.Rectangle = new Rectangle (left, top, btw, bth);
+ left -= 2 + btw;
}
}
Color color2 = Color.FromArgb (255, 192, 192, 192);
#if debug
- dc.FillRectangle (Brushes.Black, clip);
+ Console.WriteLine (DateTime.Now.ToLongTimeString () + " DrawManagedWindowDecorations");
+ dc.FillRectangle (Brushes.Black, clip);
#endif
if (wm.HasBorders) {
}
}
- if (wm.IsActive () && !wm.IsMaximized) {
+
+ bool draw_titlebar_enabled = false;
+ if (wm.Form.Parent != null && wm.Form.Parent is Form) {
+ draw_titlebar_enabled = false;
+ } else if (wm.IsActive && !wm.IsMaximized) {
+ draw_titlebar_enabled = true;
+ }
+ if (draw_titlebar_enabled) {
color = titlebar_color;
color2 = titlebar_color2;
}
Rectangle tb = new Rectangle (bdwidth, bdwidth, form.Width - (bdwidth * 2), tbheight - 1);
// HACK: For now always draw the titlebar until we get updates better
- // Rectangle vis = Rectangle.Intersect (tb, pe.ClipRectangle);
- //if (vis != Rectangle.Empty)
if (tb.Width > 0 && tb.Height > 0) {
using (System.Drawing.Drawing2D.LinearGradientBrush gradient = new LinearGradientBrush (tb, color, color2, LinearGradientMode.Horizontal))
{
tb.Width = (form.Width - 62) - tb.X;
}
- if (form.Text != null) {
+ if (form.Text != null && form.Text != string.Empty) {
StringFormat format = new StringFormat ();
format.FormatFlags = StringFormatFlags.NoWrap;
format.Trimming = StringTrimming.EllipsisCharacter;
}
if (wm.HasBorders) {
- if (!wm.IsToolWindow && form.Icon != null) {
+ bool draw_icon = false;
+#if NET_2_0
+ draw_icon = !wm.IsToolWindow && form.Icon != null && form.ShowIcon;
+#else
+ draw_icon = !wm.IsToolWindow && form.Icon != null;
+#endif
+ if (draw_icon) {
Rectangle icon = new Rectangle (bdwidth + 3,
bdwidth + 2, wm.IconWidth, wm.IconWidth);
if (icon.IntersectsWith (clip))
dc.DrawIcon (form.Icon, icon);
}
-
- if (!wm.IsMaximized) {
- if (!wm.IsToolWindow || wm.IsMinimized) {
- DrawTitleButton (dc, wm.minimize_button, clip);
- DrawTitleButton (dc, wm.maximize_button, clip);
- }
- DrawTitleButton (dc, wm.close_button, clip);
- } else {
- // DrawMaximizedButtons (pe, form.ActiveMenu);
+
+ foreach (TitleButton button in wm.TitleButtons.AllButtons) {
+ DrawTitleButton (dc, button, clip);
}
}
}
height - 5);
}
- private void DrawTitleButton (Graphics dc, InternalWindowManager.TitleButton button, Rectangle clip)
+ private void DrawTitleButton (Graphics dc, TitleButton button, Rectangle clip)
{
+ if (!button.Visible) {
+ return;
+ }
+
if (!button.Rectangle.IntersectsWith (clip))
return;
}
}
+ private void DrawStringDisabled20 (Graphics g, string s, Font font, Rectangle layoutRectangle, Color color, TextFormatFlags flags, bool useDrawString)
+ {
+ CPColor cpcolor = ResPool.GetCPColor (color);
+
+ layoutRectangle.Offset (1, 1);
+ TextRenderer.DrawTextInternal (g, s, font, layoutRectangle, cpcolor.LightLight, flags, useDrawString);
+
+ layoutRectangle.Offset (-1, -1);
+ TextRenderer.DrawTextInternal (g, s, font, layoutRectangle, cpcolor.Dark, flags, useDrawString);
+ }
+
public override void CPDrawStringDisabled (Graphics dc, string s, Font font, Color color, RectangleF layoutRectangle, StringFormat format)
{
CPColor cpcolor = ResPool.GetCPColor (color);
SetStyle (ControlStyles.SupportsTransparentBackColor, true);
this.SuspendLayout ();
+ this.items = new ToolStripItemCollection (this, items);
base.AutoSize = true;
this.back_color = Control.DefaultBackColor;
this.can_overflow = true;
this.grip_margin = this.DefaultGripMargin;
this.grip_style = ToolStripGripStyle.Visible;
this.image_scaling_size = new Size (16, 16);
- this.items = new ToolStripItemCollection (this, items);
this.layout_engine = new ToolStripSplitStackLayout ();
this.layout_style = ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.orientation = Orientation.Horizontal;
set { base.CausesValidation = value; }
}
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new ControlCollection Controls {
get { return base.Controls; }
}
set { base.Cursor = value; }
}
+ [Browsable (false)]
public virtual ToolStripDropDownDirection DefaultDropDownDirection {
get { return this.default_drop_down_direction; }
set {
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new bool HasChildren {
get { return base.HasChildren; }
[MonoTODO ("Always returns false, dragging not implemented yet.")]
[Browsable (false)]
- [EditorBrowsable (EditorBrowsableState.Never)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
public bool IsCurrentlyDragging {
get { return false; }
}
}
}
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public virtual ToolStripItemCollection Items {
get { return this.items; }
}
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public override LayoutEngine LayoutEngine {
get { return this.layout_engine;; }
}
[Browsable (false)]
[DefaultValue (null)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public LayoutSettings LayoutSettings {
get { return this.layout_settings; }
set { this.layout_settings = value; }
}
+ [AmbientValue (ToolStripLayoutStyle.StackWithOverflow)]
public ToolStripLayoutStyle LayoutStyle {
get { return layout_style; }
set {
get { return this.orientation; }
}
+ [Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
public ToolStripOverflowButton OverflowButton {
get { return this.overflow_button; }
}
protected internal virtual void OnItemAdded (ToolStripItemEventArgs e)
{
+ this.DoAutoSize ();
+ this.PerformLayout ();
+
ToolStripItemEventHandler eh = (ToolStripItemEventHandler)(Events [ItemAddedEvent]);
if (eh != null)
eh (this, e);
{
if (this.AutoSize == true && this.Dock == DockStyle.None)
this.Size = GetPreferredSize (Size.Empty);
+
+ if (this.AutoSize == true && this.Orientation == Orientation.Horizontal && (this.Dock == DockStyle.Top || this.Dock == DockStyle.Bottom))
+ this.Height = GetPreferredSize (Size.Empty).Height;
}
public override Size GetPreferredSize (Size proposedSize)
{
- Size new_size = Size.Empty;
+ Size new_size = new Size (0, this.Height);
if (this.orientation == Orientation.Vertical) {
foreach (ToolStripItem tsi in this.items)
new_size.Width = this.Width;
} else {
foreach (ToolStripItem tsi in this.items)
- if (tsi.Available)
- new_size.Width += tsi.GetPreferredSize (Size.Empty).Width + tsi.Margin.Left + tsi.Margin.Right;
-
- new_size.Height = this.Height;
+ if (tsi.Available) {
+ Size tsi_preferred = tsi.GetPreferredSize (Size.Empty);
+ new_size.Width += tsi_preferred.Width + tsi.Margin.Left + tsi.Margin.Right;
+
+ if (new_size.Height < (this.Padding.Vertical + tsi_preferred.Height))
+ new_size.Height = (this.Padding.Vertical + tsi_preferred.Height);
+ }
}
new_size.Width += (this.GripRectangle.Width + this.GripMargin.Horizontal + this.Padding.Horizontal + 4);
[Browsable (false)]
[EditorBrowsable (EditorBrowsableState.Never)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public override ContextMenuStrip ContextMenuStrip {
+ public new ContextMenuStrip ContextMenuStrip {
get { return base.ContextMenuStrip; }
set { base.ContextMenuStrip = value; }
}
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[DefaultEvent ("Load")]
[ToolboxItem (false)]
- [Docking (DockingBehavior.AutoDock)]
+ [Docking (DockingBehavior.Never)]
[InitializationEvent ("Load")]
public class ToolStripContentPanel : Panel
{
base.OnHandleCreated (e);
}
- [EditorBrowsable (EditorBrowsableState.Always)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected virtual void OnLoad (EventArgs e)
{
EventHandler eh = (EventHandler)(Events [LoadEvent]);
eh (this, e);
}
- [EditorBrowsable (EditorBrowsableState.Always)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override void OnPaintBackground (PaintEventArgs pevent)
{
base.OnPaintBackground (pevent);
get { return control.CanSelect; }
}
+ [DefaultValue (true)]
public bool CausesValidation {
get { return control.CausesValidation; }
set { control.CausesValidation = value; }
\r
this.auto_close = true;\r
is_visible = false;\r
- Hwnd.ObjectFromHandle (this.Handle).no_activate = true;\r
this.GripStyle = ToolStripGripStyle.Hidden;\r
}\r
#endregion\r
if ((XplatUI.SupportsTransparency () & TransparencySupport.Set) != 0) {\r
allow_transparency = value;\r
\r
- if (value) \r
- XplatUI.SetWindowTransparency (Handle, Opacity, Color.Empty);\r
- else\r
- UpdateStyles (); // Remove the WS_EX_LAYERED style\r
+ if (this.IsHandleCreated) {\r
+ if (value) \r
+ XplatUI.SetWindowTransparency (Handle, Opacity, Color.Empty);\r
+ else\r
+ UpdateStyles (); // Remove the WS_EX_LAYERED style\r
+ }\r
}\r
}\r
}\r
\r
[Browsable (false)]\r
+ [EditorBrowsable (EditorBrowsableState.Never)]\r
public override AnchorStyles Anchor {\r
get { return base.Anchor; }\r
set { base.Anchor = value; }\r
public double Opacity {\r
get { return this.opacity; }\r
set {\r
- if (this.opacity == value)\r
- return;\r
+ if (this.opacity == value)\r
+ return;\r
+ \r
+ this.opacity = value;\r
+ this.allow_transparency = true;\r
\r
- this.opacity = value;\r
- this.allow_transparency = true;\r
-\r
- UpdateStyles ();\r
- XplatUI.SetWindowTransparency (Handle, opacity, Color.Empty);\r
+ if (this.IsHandleCreated) {\r
+ UpdateStyles ();\r
+ XplatUI.SetWindowTransparency (Handle, opacity, Color.Empty);\r
+ }\r
}\r
}\r
\r
}\r
}\r
\r
- [Browsable (true)]\r
+ [Browsable (false)]\r
[EditorBrowsable (EditorBrowsableState.Always)]\r
public new Region Region {\r
get { return base.Region; }\r
set { SetTopLevel (value); }\r
}\r
\r
- [Localizable (true)]\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [Localizable (true)]\r
+ [DefaultValue (false)]\r
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
public new bool Visible {\r
get { return base.Visible; }\r
CreateParams cp = base.CreateParams;\r
\r
cp.Style = unchecked ((int)(WindowStyles.WS_POPUP | WindowStyles.WS_CLIPCHILDREN));\r
- cp.ClassStyle = unchecked ((int)0x82000000);\r
+ cp.ClassStyle |= (int)XplatUIWin32.ClassStyle.CS_DROPSHADOW;\r
cp.ExStyle |= (int)(WindowExStyles.WS_EX_TOOLWINDOW | WindowExStyles.WS_EX_TOPMOST);\r
\r
if (Opacity < 1.0 && allow_transparency)\r
this.OnClosed (new ToolStripDropDownClosedEventArgs (reason));\r
}\r
\r
- [Browsable (true)]\r
- [EditorBrowsable (EditorBrowsableState.Always)]\r
+ [Browsable (false)]\r
+ [EditorBrowsable (EditorBrowsableState.Never)]\r
public new void Show ()\r
{\r
CancelEventArgs e = new CancelEventArgs ();\r
base.OnVisibleChanged (e);\r
}\r
\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Advanced)]\r
protected override bool ProcessDialogChar (char charCode)\r
{\r
return base.ProcessDialogChar (charCode);\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event UICuesEventHandler ChangeUICues {\r
add { base.ChangeUICues += value; }\r
remove { base.ChangeUICues -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event EventHandler FontChanged {\r
add { base.FontChanged += value; }\r
remove { base.FontChanged -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event HelpEventHandler HelpRequested {\r
add { base.HelpRequested += value; }\r
remove { base.HelpRequested -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event EventHandler ImeModeChanged {\r
add { base.ImeModeChanged += value; }\r
remove { base.ImeModeChanged -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event KeyEventHandler KeyDown {\r
add { base.KeyDown += value; }\r
remove { base.KeyDown -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event KeyPressEventHandler KeyPress {\r
add { base.KeyPress += value; }\r
remove { base.KeyPress -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event KeyEventHandler KeyUp {\r
add { base.KeyUp += value; }\r
remove { base.KeyUp -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event EventHandler Leave {\r
add { base.Leave += value; }\r
remove { base.Leave -= value; }\r
}\r
\r
[Browsable (false)]\r
- [EditorBrowsable (EditorBrowsableState.Never)]\r
+ [EditorBrowsable (EditorBrowsableState.Always)]\r
public new event EventHandler StyleChanged {\r
add { base.StyleChanged += value; }\r
remove { base.StyleChanged -= value; }\r
this.Close (ToolStripDropDownCloseReason.AppClicked);\r
}\r
#endregion\r
+\r
+ #region Internal Properties\r
+ internal override bool ActivateOnShow { get { return false; } }\r
+ #endregion\r
}\r
}\r
#endif\r
namespace System.Windows.Forms
{
- [DefaultProperty ("Click")]
+ [DefaultProperty ("DropDownItems")]
public abstract class ToolStripDropDownItem : ToolStripItem
{
private ToolStripDropDown drop_down;
}
}
+ [Browsable (false)]
[DefaultValue (AnchorStyles.Top | AnchorStyles.Left)]
- public AnchorStyles Anchor {
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ public AnchorStyles Anchor
+ {
get { return this.anchor; }
set { this.anchor = value; }
}
[Localizable (true)]
[DefaultValue (true)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Visible)]
[RefreshProperties (RefreshProperties.All)]
public bool AutoSize {
get { return this.auto_size; }
this.bounds.Height = value;
this.explicit_size.Height = value;
- if (this.visible) {
+ if (this.Visible) {
this.CalculateAutoSize ();
this.OnBoundsChanged ();
this.Invalidate ();
[Localizable (true)]
[Browsable (false)]
- [Editor ("System.Windows.Forms.Design.ImageIndexEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
- [TypeConverter (typeof (ImageIndexConverter))]
+ [RelatedImageList ("Owner.ImageList")]
[RefreshProperties (RefreshProperties.Repaint)]
public int ImageIndex {
get { return this.image_index; }
}
[Localizable (true)]
- public string ImageKey {
+ [Browsable (false)]
+ [RelatedImageList ("Owner.ImageList")]
+ [RefreshProperties (RefreshProperties.Repaint)]
+ public string ImageKey
+ {
get { return this.image_key; }
set {
if (this.image_key != value) {
}
}
+ [Browsable (false)]
public bool IsOnOverflow {
get { return this.placement == ToolStripItemPlacement.Overflow; }
}
}
}
+ [Browsable (false)]
public ToolStripItemPlacement Placement {
get { return this.placement; }
}
[MonoTODO ("Stub, not implemented")]
[Localizable (true)]
- [DefaultValue (RightToLeft.Inherit)]
public virtual RightToLeft RightToLeft {
get { return this.right_to_left; }
set { this.right_to_left = value; }
[Localizable (true)]
public virtual Size Size {
get {
- if (this.explicit_size != Size.Empty)
+ if (!this.AutoSize && this.explicit_size != Size.Empty)
return this.explicit_size;
return this.bounds.Size;
this.bounds.Size = value;
this.explicit_size = value;
- if (this.visible) {
- this.CalculateAutoSize ();
- OnBoundsChanged (); }
+ if (this.Visible) {
+ this.CalculateAutoSize ();
+ this.OnBoundsChanged ();
+ }
}
}
this.bounds.Width = value;
this.explicit_size.Width = value;
- if (this.visible) {
+ if (this.Visible) {
this.CalculateAutoSize ();
this.OnBoundsChanged ();
this.Invalidate ();
Size final_size = this.CalculatePreferredSize (Size.Empty);
if (final_size != this.Size) {
- this.bounds.Size = final_size;
+ this.bounds.Width = final_size.Width;
if (this.parent != null)
this.parent.PerformLayout ();
}
}
- internal Size CalculatePreferredSize (Size constrainingSize)
+ internal virtual Size CalculatePreferredSize (Size constrainingSize)
{
if (!this.auto_size)
return this.explicit_size;
break;
case ToolStripItemDisplayStyle.Image:
if (this.Image != null)
- image_rect = AlignInRectangle (contentRectangle, this.Image.Size, this.image_align);
+ image_rect = AlignInRectangle (contentRectangle, GetImageSize (), this.image_align);
break;
case ToolStripItemDisplayStyle.ImageAndText:
if (this.text != string.Empty && this.Image == null)
text_rect = AlignInRectangle (contentRectangle, this.text_size, this.text_align);
else if (this.text == string.Empty && this.Image != null)
- image_rect = AlignInRectangle (contentRectangle, this.Image.Size, this.image_align);
+ image_rect = AlignInRectangle (contentRectangle, GetImageSize (), this.image_align);
else if (this.text == string.Empty && this.Image == null)
break;
else {
switch (this.text_image_relation) {
case TextImageRelation.Overlay:
text_rect = AlignInRectangle (contentRectangle, this.text_size, this.text_align);
- image_rect = AlignInRectangle (contentRectangle, this.Image.Size, this.image_align);
+ image_rect = AlignInRectangle (contentRectangle, GetImageSize (), this.image_align);
break;
case TextImageRelation.ImageAboveText:
text_area = new Rectangle (contentRectangle.Left, contentRectangle.Bottom - (text_size.Height - 4), contentRectangle.Width, text_size.Height - 4);
image_area = new Rectangle (contentRectangle.Left, contentRectangle.Top, contentRectangle.Width, contentRectangle.Height - text_area.Height);
text_rect = AlignInRectangle (text_area, this.text_size, this.text_align);
- image_rect = AlignInRectangle (image_area, this.Image.Size, this.image_align);
+ image_rect = AlignInRectangle (image_area, GetImageSize (), this.image_align);
break;
case TextImageRelation.TextAboveImage:
text_area = new Rectangle (contentRectangle.Left, contentRectangle.Top, contentRectangle.Width, text_size.Height - 4);
image_area = new Rectangle (contentRectangle.Left, text_area.Bottom, contentRectangle.Width, contentRectangle.Height - text_area.Height);
text_rect = AlignInRectangle (text_area, this.text_size, this.text_align);
- image_rect = AlignInRectangle (image_area, this.Image.Size, this.image_align);
+ image_rect = AlignInRectangle (image_area, GetImageSize (), this.image_align);
break;
case TextImageRelation.ImageBeforeText:
- LayoutTextBeforeOrAfterImage (contentRectangle, false, text_size, this.Image.Size, text_align, image_align, out text_rect, out image_rect);
+ LayoutTextBeforeOrAfterImage (contentRectangle, false, text_size, GetImageSize (), text_align, image_align, out text_rect, out image_rect);
break;
case TextImageRelation.TextBeforeImage:
- LayoutTextBeforeOrAfterImage (contentRectangle, true, text_size, this.Image.Size, text_align, image_align, out text_rect, out image_rect);
+ LayoutTextBeforeOrAfterImage (contentRectangle, true, text_size, GetImageSize (), text_align, image_align, out text_rect, out image_rect);
break;
}
}
return HorizontalAlignment.Left;
}
+ private Size GetImageSize ()
+ {
+ if (this.Image == null)
+ return Size.Empty;
+
+ if (this.image_scaling == ToolStripItemImageScaling.None)
+ return this.Image.Size;
+
+ if (this.Parent == null)
+ return Size.Empty;
+
+ return this.Parent.ImageScalingSize;
+ }
internal void FireEvent (EventArgs e, ToolStripItemEventType met)
{
switch (met) {
int index = base.Add (value);
- owner.PerformLayout ();
owner.OnItemAdded (new ToolStripItemEventArgs (value));
return index;
}
#region Public Constructors
public ToolStripMenuItem ()
- : base ()
+ : this (null, null, null, string.Empty)
{
}
public ToolStripMenuItem (Image image)
- : base (string.Empty, image, null, string.Empty)
+ : this (null, image, null, string.Empty)
{
}
public ToolStripMenuItem (string text)
- : base (text, null, null, string.Empty)
+ : this (text, null, null, string.Empty)
{
}
public ToolStripMenuItem (string text, Image image)
- : base (text, image, null, string.Empty)
+ : this (text, image, null, string.Empty)
{
}
public ToolStripMenuItem (string text, Image image, EventHandler onClick)
- : base (text, image, onClick, string.Empty)
+ : this (text, image, onClick, string.Empty)
{
}
public ToolStripMenuItem (string text, Image image, params ToolStripItem[] dropDownItems)
- : base (text, image, null, string.Empty)
+ : this (text, image, null, string.Empty)
{
if (dropDownItems != null)
foreach (ToolStripItem tsi in dropDownItems)
}
public ToolStripMenuItem (string text, Image image, EventHandler onClick, Keys shortcutKeys)
- : base (text, image, onClick, string.Empty)
+ : this (text, image, onClick, string.Empty)
{
}
public ToolStripMenuItem (string text, Image image, EventHandler onClick, string name)
: base (text, image, onClick, name)
{
+ base.Overflow = ToolStripItemOverflow.Never;
}
#endregion
#region Public Properties
[Bindable (true)]
[DefaultValue (false)]
- [RefreshProperties (RefreshProperties.Repaint)]
+ [RefreshProperties (RefreshProperties.All)]
public bool Checked {
get {
switch (this.checked_state) {
[Bindable (true)]
[DefaultValue (CheckState.Unchecked)]
- [RefreshProperties (RefreshProperties.Repaint)]
+ [RefreshProperties (RefreshProperties.All)]
public CheckState CheckState {
get { return this.checked_state; }
set
get { return this.mdi_client_form != null; }
}
+ [DefaultValue (ToolStripItemOverflow.Never)]
+ public new ToolStripItemOverflow Overflow {
+ get { return base.Overflow; }
+ set { base.Overflow = value; }
+ }
+
[MonoTODO ("Renderer doesn't support shortcut keys yet, they will never show.")]
[Localizable (true)]
+ [DefaultValue (true)]
public bool ShowShortcutKeys {
get { return this.show_shortcut_keys; }
set { this.show_shortcut_keys = value; }
[MonoTODO ("Keyboard navigation not implemented.")]
[Localizable (true)]
+ [DefaultValue (null)]
public string ShortcutKeyDisplayString {
get { return this.shortcut_display_string; }
set { this.shortcut_display_string = value; }
[MonoTODO ("Keyboard navigation not implemented.")]
[Localizable (true)]
+ [DefaultValue (Keys.None)]
public Keys ShortcutKeys {
get { return this.shortcut_keys; }
set { this.shortcut_keys = value; }
if (text_layout_rect != Rectangle.Empty)
this.Owner.Renderer.DrawItemText (new System.Windows.Forms.ToolStripItemTextRenderEventArgs (e.Graphics, this, this.Text, text_layout_rect, font_color, this.Font, this.TextAlign));
+ string key_string = GetShortcutDisplayString ();
+
+ if (!string.IsNullOrEmpty (key_string) && !this.HasDropDownItems) {
+ int offset = 15;
+ Size key_string_size = TextRenderer.MeasureText (key_string, this.Font);
+ Rectangle key_string_rect = new Rectangle (this.ContentRectangle.Right - key_string_size.Width - offset, text_layout_rect.Top, key_string_size.Width, text_layout_rect.Height);
+ this.Owner.Renderer.DrawItemText (new System.Windows.Forms.ToolStripItemTextRenderEventArgs (e.Graphics, this, key_string, key_string_rect, font_color, this.Font, this.TextAlign));
+ }
+
if (image_layout_rect != Rectangle.Empty)
this.Owner.Renderer.DrawItemImage (new System.Windows.Forms.ToolStripItemImageRenderEventArgs (e.Graphics, this, draw_image, image_layout_rect));
set { this.mdi_client_form = value; }
}
#endregion
+
+ #region Internal Methods
+ internal override Size CalculatePreferredSize (Size constrainingSize)
+ {
+ Size base_size = base.CalculatePreferredSize (constrainingSize);
+
+ string key_string = GetShortcutDisplayString ();
+
+ if (string.IsNullOrEmpty (key_string))
+ return base_size;
+
+ Size text_size = TextRenderer.MeasureText (key_string, this.Font);
+
+ return new Size (base_size.Width + text_size.Width - 25, base_size.Height);
+ }
+
+ internal string GetShortcutDisplayString ()
+ {
+ if (this.show_shortcut_keys == false || this.shortcut_keys == Keys.None)
+ return string.Empty;
+
+ string key_string;
+
+ if (!string.IsNullOrEmpty (this.shortcut_display_string))
+ key_string = this.shortcut_display_string;
+ else {
+ KeysConverter kc = new KeysConverter ();
+ key_string = kc.ConvertToString (this.shortcut_keys);
+ }
+
+ return key_string;
+ }
+ #endregion
}
}
#endif
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Drawing;
+using System.Windows.Forms.Design;
namespace System.Windows.Forms
{
+ [ToolStripItemDesignerAvailability (ToolStripItemDesignerAvailability.None)]
public class ToolStripOverflowButton : ToolStripDropDownButton
{
#region Internal Constructor
get { return new Layout.FlowLayout (); }
}
+ [Browsable (false)]
[DefaultValue (false)]
- [EditorBrowsable (EditorBrowsableState.Never)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
public bool Locked {
get { return this.locked; }
set { this.locked = value; }
this.Invalidate (FindBackgroundRegion ());
}
- [EditorBrowsable (EditorBrowsableState.Always)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override void OnPaintBackground (PaintEventArgs pevent)
{
base.OnPaintBackground (pevent);
private Region FindBackgroundRegion ()
{
- Region r = new Region (this.bounds);
+ Region r = new Region (this.Bounds);
foreach (Control c in this.Controls)
- r.Exclude (c.bounds);
+ r.Exclude (c.Bounds);
return r;
}
#endregion
#region Public Properties
- public Rectangle Bounds {
+ public virtual Rectangle Bounds {
get { return this.bounds; }
}
}
else
{
- e.Graphics.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (this.ColorTable.CheckBackground), e.ImageRectangle);
+ e.Graphics.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (this.ColorTable.CheckSelectedBackground), e.ImageRectangle);
e.Graphics.DrawRectangle (ThemeEngine.Current.ResPool.GetPen (this.ColorTable.ButtonSelectedBorder), e.ImageRectangle);
}
if (e.Item.Image == null)
this.OnButtonClick (EventArgs.Empty);
}
- [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
public virtual void ResetDropDownButtonWidth ()
{
this.DropDownButtonWidth = 11;
set { this.border_style = value; }
}
- [MonoTODO ("Stub, doesn't affect sizing yet")]
[DefaultValue (false)]
public bool Spring {
get { return this.spring; }
protected override void OnPaint (PaintEventArgs e)
{
base.OnPaint (e);
- if (this.Focused || is_entered || this.border_style == BorderStyle.FixedSingle) {
+ if (this.Focused || this.Entered || this.border_style == BorderStyle.FixedSingle) {
ToolStripRenderer tsr = (this.Parent as ToolStrip).Renderer;
if (tsr is ToolStripProfessionalRenderer)
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)\r
+//\r
+// Authors:\r
+// Rolf Bjarne Kvinge (RKvinge@novell.com)\r
+//\r
+//\r
+\r
+\r
+using System;\r
+using System.Drawing;\r
+using System.Runtime.InteropServices;\r
+\r
+namespace System.Windows.Forms\r
+{\r
+ internal class ToolWindowManager : InternalWindowManager\r
+ {\r
+ public ToolWindowManager (Form form)\r
+ : base (form)\r
+ {\r
+\r
+ }\r
+\r
+ public override void SetWindowState (FormWindowState old_state, FormWindowState window_state)\r
+ {\r
+ // Do nothing here.\r
+ }\r
+ }\r
+}\r
internal TreeNodeCollection nodes;
internal TreeViewAction check_reason = TreeViewAction.Unknown;
- internal int visible_order;
+ internal int visible_order = 0;
internal int width = -1;
internal bool is_expanded = false;
}
public bool IsExpanded {
- get { return is_expanded; }
+ get {
+ TreeView tv = TreeView;
+
+ if (tv != null && tv.IsHandleCreated) {
+ // This is ridiculous
+ bool found = false;
+ foreach (TreeNode walk in TreeView.Nodes) {
+ if (walk.Nodes.Count > 0)
+ found = true;
+ }
+
+ if (!found)
+ return false;
+ }
+
+ return is_expanded;
+ }
}
public bool IsSelected {
public bool IsVisible {
get {
- if (TreeView == null || visible_order < 0)
+ if (TreeView == null || !TreeView.IsHandleCreated || !TreeView.Visible)
return false;
- Rectangle bounds = Bounds;
- if (bounds.Y < 0 && bounds.Y > TreeView.ClientRectangle.Height)
+ if (visible_order < TreeView.skipped_nodes || visible_order - TreeView.skipped_nodes > TreeView.VisibleCount)
return false;
TreeNode parent = Parent;
while (parent != null) {
- if (!parent.IsExpanded)
+ if (!parent.is_expanded)
return false;
parent = parent.Parent;
}
}
public void Collapse () {
- Collapse(false);
+ CollapseInternal (false);
}
+#if NET_2_0
+ public void Collapse (bool ignore_children)
+ {
+ if (ignore_children)
+ Collapse ();
+ else
+ CollapseRecursive (this);
+ }
+#endif
public void EndEdit (bool cancel) {
TreeView tv = TreeView;
if (!cancel && tv != null)
}
- private void Collapse (bool byInternal)
+ private void CollapseInternal (bool byInternal)
{
if (!is_expanded || nodes.Count < 1)
return;
private int image_index = -1;
private int selected_image_index = -1;
+#if NET_2_0
+ private string image_key;
+ private string selected_image_key;
+#endif
private bool full_row_select;
private bool hot_tracking;
private int indent = 19;
private bool update_needed;
private Pen dash;
+ private Color line_color;
private StringFormat string_format;
private int drag_begin_x = 0;
private int drag_begin_y = 0;
private long handle_count = 1;
+ private TreeViewDrawMode draw_mode;
+
#endregion // Fields
#region Public Constructors
#region Public Instance Properties
public override Color BackColor {
get { return base.BackColor;}
- set { base.BackColor = value; }
+ set {
+ base.BackColor = value;
+
+ CreateDashPen ();
+ Invalidate ();
+ }
}
selected_node = value;
focused_node = value;
- if (full_row_select) {
+ if (full_row_select || draw_mode != TreeViewDrawMode.Normal) {
invalid.X = 0;
invalid.Width = ViewportRectangle.Width;
}
if (sorted != value)
sorted = value;
if (sorted) {
- Nodes.Sort ();
- RecalculateVisibleOrder (root_node);
- UpdateScrollBars ();
- Invalidate ();
+ Sort ();
}
}
}
one.MoveNext ();
return one.CurrentNode;
}
+#if NET_2_0
+ set {
+ SetTop (value);
+ }
+#endif
}
[Browsable(false)]
}
}
+#if NET_2_0
+ /// According to MSDN this property has no effect on the treeview
+ protected override bool DoubleBuffered {
+ get { return true; }
+ set { /* whatever */ }
+ }
+#endif
+
+#if NET_2_0
+ public
+#else
+ private
+#endif
+ Color LineColor {
+ get {
+ if (line_color == Color.Empty) {
+ Color res = ControlPaint.Dark (BackColor);
+ if (res == BackColor)
+ res = ControlPaint.Light (BackColor);
+ return res;
+ }
+ return line_color;
+ }
+ set {
+ line_color = value;
+ if (show_lines) {
+ CreateDashPen ();
+ Invalidate ();
+ }
+ }
+ }
+#if NET_2_0
+ [Localizable (true)]
+ public string ImageKey {
+ get { return image_key; }
+ set {
+ if (image_key == value)
+ return;
+ image_index = -1;
+ image_key = value;
+ Invalidate ();
+ }
+ }
+
+ public string SelectedImageKey {
+ get { return selected_image_key; }
+ set {
+ if (selected_image_key == value)
+ return;
+ selected_image_index = -1;
+ selected_image_key = value;
+ UpdateNode (SelectedNode);
+ }
+ }
+#endif
+
+#if NET_2_0
+ public override ImageLayout BackgroundImageLayout {
+ get { return base.BackgroundImageLayout; }
+ set { base.BackgroundImageLayout = value; }
+ }
+#endif
+
+#if NET_2_0
+ public TreeViewDrawMode DrawMode {
+ get { return draw_mode; }
+ set { draw_mode = value; }
+ }
+#endif
#endregion // Public Instance Properties
#region Protected Instance Properties
}
}
+#if NET_2_0
+ public
+#else
+ private
+#endif
+ void Sort ()
+ {
+ Nodes.Sort ();
+ RecalculateVisibleOrder (root_node);
+ UpdateScrollBars ();
+ Invalidate ();
+ }
+
public void ExpandAll ()
{
BeginUpdate ();
EndUpdate ();
+ ///
+ /// This is basically an emulation of a strange bug on MS
+ ///
+
+ bool found = false;
+ foreach (TreeNode child in Nodes) {
+ if (child.Nodes.Count > 0)
+ found = true;
+ }
+
+ if (!found)
+ return;
+
// Walk all the way to the end, then walk back visible count
//to find the new top node
OpenTreeNodeEnumerator walk = new OpenTreeNodeEnumerator (root_node);
while (walk.MoveNext ())
{ }
- walk.CurrentNode.EnsureVisible ();
+ SetTop (walk.CurrentNode);
}
#region Protected Instance Methods
protected override void CreateHandle () {
base.CreateHandle ();
-
+ RecalculateVisibleOrder (root_node);
UpdateScrollBars ();
}
eh (this, e);
}
+#if NET_2_0
+ protected virtual void OnDrawNode(DrawTreeNodeEventArgs e) {
+ DrawTreeNodeEventHandler eh = (DrawTreeNodeEventHandler)(Events[DrawNodeEvent]);
+ if (eh != null)
+ eh(this, e);
+ }
+#endif
+
protected internal virtual void OnAfterCheck (TreeViewEventArgs e) {
TreeViewEventHandler eh = (TreeViewEventHandler)(Events [AfterCheckEvent]);
if (eh != null)
internal void SetTop (TreeNode node)
{
- if (!vbar.is_visible)
+ if (!vbar.is_visible) {
+ skipped_nodes = node.visible_order;
return;
+ }
- TreeNode first = root_node.FirstNode;
-
- if (first == null)
- return; // I don't think its possible for this to happen
-
- OpenTreeNodeEnumerator walk = new OpenTreeNodeEnumerator (first);
- int offset = -1;
- int vc = VisibleCount;
- while (walk.CurrentNode != node && walk.MoveNext () && offset < vbar.Maximum - vc)
- offset++;
-
- SetVScrollTop (walk.CurrentNode);
+ vbar.Value = Math.Min (node.visible_order, vbar.Maximum - VisibleCount);
}
internal void SetBottom (TreeNode node)
Draw (pe.ClipRectangle, pe.Graphics);
}
+ internal void CreateDashPen ()
+ {
+ dash = new Pen (LineColor, 1);
+ dash.DashStyle = DashStyle.Dot;
+ }
+
private void Draw (Rectangle clip, Graphics dc)
{
dc.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (BackColor), clip);
- Color dash_color = ControlPaint.Dark (BackColor);
- if (dash_color == BackColor)
- dash_color = ControlPaint.Light (BackColor);
- dash = new Pen (dash_color, 1);
- dash.DashStyle = DashStyle.Dot;
+ if (dash == null)
+ CreateDashPen ();
Rectangle viewport = ViewportRectangle;
Rectangle original_clip = clip;
if (current.GetY () > clip.Bottom)
break;
- DrawNode (current, dc, clip);
+ DrawTreeNode (current, dc, clip);
}
if (hbar.Visible && vbar.Visible) {
private void DrawNodePlusMinus (TreeNode node, Graphics dc, int x, int middle)
{
- dc.DrawRectangle (SystemPens.ControlDark, x, middle - 4, 8, 8);
+ dc.DrawRectangle (SystemPens.ControlDarkDark, x, middle - 4, 8, 8);
if (node.IsExpanded) {
dc.DrawLine (SystemPens.ControlDarkDark, x + 2, middle, x + 6, middle);
return;
int use_index = -1;
- if (node.ImageIndex > -1 && node.ImageIndex < ImageList.Images.Count) {
- use_index = node.ImageIndex;
- } else if (ImageIndex > -1 && ImageIndex < ImageList.Images.Count) {
- use_index = ImageIndex;
+
+ if (!node.IsSelected) {
+ if (node.ImageIndex > -1 && node.ImageIndex < ImageList.Images.Count) {
+ use_index = node.ImageIndex;
+ } else if (ImageIndex > -1 && ImageIndex < ImageList.Images.Count) {
+ use_index = ImageIndex;
+ }
+ } else {
+ if (node.SelectedImageIndex > -1 && node.SelectedImageIndex < ImageList.Images.Count) {
+ use_index = node.SelectedImageIndex;
+ } else if (SelectedImageIndex > -1 && SelectedImageIndex < ImageList.Images.Count) {
+ use_index = SelectedImageIndex;
+ }
}
+#if NET_2_0
+
+ if (!node.IsSelected) {
+ if (use_index == -1 && !String.IsNullOrEmpty (node.ImageKey)) {
+ use_index = image_list.Images.IndexOfKey (node.ImageKey);
+ }
+
+ if (use_index == -1 && !String.IsNullOrEmpty (ImageKey)) {
+ use_index = image_list.Images.IndexOfKey (ImageKey);
+ }
+ } else {
+ if (use_index == -1 && !String.IsNullOrEmpty (node.SelectedImageKey)) {
+ use_index = image_list.Images.IndexOfKey (node.SelectedImageKey);
+ }
+
+ if (use_index == -1 && !String.IsNullOrEmpty (SelectedImageKey)) {
+ use_index = image_list.Images.IndexOfKey (SelectedImageKey);
+ }
+ }
+#endif
+
if (use_index == -1 && ImageList.Images.Count > 0) {
use_index = 0;
}
if (Focused && focused_node == node) {
ControlPaint.DrawFocusRectangle (dc, r, ForeColor, BackColor);
}
- r.Inflate(-1, -1);
+ if (draw_mode != TreeViewDrawMode.Normal)
+ return;
+
+ r.Inflate (-1, -1);
if (Focused && node == highlighted_node) {
dc.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (ThemeEngine.Current.ColorHighlight), r);
} else if (!hide_selection && node == highlighted_node) {
if (!full_row_select)
DrawSelectionAndFocus(node, dc, node.Bounds);
+
Font font = node.NodeFont;
if (node.NodeFont == null)
font = Font;
Color text_color = (Focused && node == highlighted_node ?
ThemeEngine.Current.ColorHighlightText : node.ForeColor);
+ if (text_color.IsEmpty)
+ text_color = ForeColor;
dc.DrawString (node.Text, font,
ThemeEngine.Current.ResPool.GetSolidBrush (text_color),
node.Bounds, string_format);
}
- private void DrawNode (TreeNode node, Graphics dc, Rectangle clip)
+ private void DrawTreeNode (TreeNode node, Graphics dc, Rectangle clip)
{
int child_count = node.nodes.Count;
int y = node.GetY ();
DrawSelectionAndFocus (node, dc, r);
}
- if ((show_root_lines || node.Parent != null) && show_plus_minus && child_count > 0)
- DrawNodePlusMinus (node, dc, node.GetLinesX () - Indent + 5, middle);
+ if (draw_mode == TreeViewDrawMode.Normal || draw_mode == TreeViewDrawMode.OwnerDrawText) {
+ if ((show_root_lines || node.Parent != null) && show_plus_minus && child_count > 0)
+ DrawNodePlusMinus (node, dc, node.GetLinesX () - Indent + 5, middle);
- if (checkboxes)
- DrawNodeCheckBox (node, dc, CheckBoxLeft (node) - 3, middle);
+ if (checkboxes)
+ DrawNodeCheckBox (node, dc, CheckBoxLeft (node) - 3, middle);
- if (show_lines)
- DrawNodeLines (node, dc, clip, dash, node.GetLinesX (), y, middle);
+ if (show_lines)
+ DrawNodeLines (node, dc, clip, dash, node.GetLinesX (), y, middle);
- if (ImageList != null)
- DrawNodeImage (node, dc, clip, node.GetImageX (), y);
+ if (ImageList != null)
+ DrawNodeImage (node, dc, clip, node.GetImageX (), y);
+ }
+
+
+#if NET_2_0
+ if (draw_mode != TreeViewDrawMode.Normal) {
+ dc.FillRectangle (Brushes.White, node.Bounds);
+ TreeNodeStates tree_node_state = TreeNodeStates.Default;;
+ if (node.IsSelected)
+ tree_node_state = TreeNodeStates.Selected;
+ if (node.Checked)
+ tree_node_state |= TreeNodeStates.Checked;
+ if (node == focused_node)
+ tree_node_state |= TreeNodeStates.Focused;
+ Rectangle node_bounds = node.Bounds;
+ if (draw_mode == TreeViewDrawMode.OwnerDrawText) {
+ node_bounds.X += 3;
+ node_bounds.Y += 1;
+ } else {
+ node_bounds.X = 0;
+ node_bounds.Width = Width;
+ }
+
+ DrawTreeNodeEventArgs e = new DrawTreeNodeEventArgs (dc, node, node_bounds, tree_node_state);
+
+ OnDrawNode (e);
+ if (!e.DrawDefault)
+ return;
+ }
+#endif
if (!node.IsEditing)
DrawStaticNode (node, dc);
hbar_bounds_set = false;
}
+
vbar.Visible = true;
+ if (skipped_nodes > 0) {
+ int skip = Math.Min (skipped_nodes, vbar.Maximum - VisibleCount);
+ skipped_nodes = 0;
+ vbar.Value = skip;
+ skipped_nodes = skip;
+ }
} else {
skipped_nodes = 0;
RecalculateVisibleOrder (root_node);
if (skipped_nodes == pos)
return;
- OpenTreeNodeEnumerator walk = new OpenTreeNodeEnumerator (TopNode);
-
- int old_skip = skipped_nodes;
+ int diff = skipped_nodes - pos;
skipped_nodes = pos;
- int diff = old_skip - skipped_nodes;
-
- // Determine the new top node if we have to
- if (new_top == null) {
-
-
- if (diff < 0) {
- for (int i = diff; i <= 0; i++)
- walk.MoveNext ();
- new_top = walk.CurrentNode;
- } else {
- for (int i = 0; i <= diff; i++)
- walk.MovePrevious ();
- new_top = walk.CurrentNode;
- }
- }
int y_move = diff * ActualItemHeight;
XplatUI.ScrollWindow (Handle, ViewportRectangle, 0, y_move, false);
private void SetVScrollTop (TreeNode new_top)
{
- OpenTreeNodeEnumerator walk = new OpenTreeNodeEnumerator (root_node);
-
- skipped_nodes = -1;
- while (walk.MoveNext () && walk.CurrentNode != new_top)
- skipped_nodes++;
-
- vbar.Value = skipped_nodes;
+ vbar.Value = new_top.visible_order - VisibleCount;
}
private void HScrollBarValueChanged(object sender, EventArgs e)
}
private void GotFocusHandler (object sender, EventArgs e)
- {
+ {
if (selected_node == null)
SelectedNode = TopNode;
else
Rectangle invalid;
if (!ce.Cancel) {
- if (focused_node != null) {
- invalid = Rectangle.Union (Bloat (focused_node.Bounds),
- Bloat (highlighted_node.Bounds));
- } else {
- invalid = Bloat (highlighted_node.Bounds);
- }
+ TreeNode prev_focused_node = focused_node;
+ TreeNode prev_highlighted_node = highlighted_node;
+
selected_node = highlighted_node;
focused_node = highlighted_node;
OnAfterSelect (new TreeViewEventArgs (selected_node, TreeViewAction.ByMouse));
+ if (prev_focused_node != null) {
+ invalid = Rectangle.Union (Bloat (prev_focused_node.Bounds),
+ Bloat (prev_highlighted_node.Bounds));
+ } else {
+ invalid = Bloat (prev_highlighted_node.Bounds);
+ }
+
Invalidate (invalid);
} else {
highlighted_node = focused_node;
static object BeforeExpandEvent = new object ();
static object BeforeLabelEditEvent = new object ();
static object BeforeSelectEvent = new object ();
+#if NET_2_0
+ static object DrawNodeEvent = new object ();
+ static object NodeMouseClickEvent = new object ();
+ static object NodeMouseDoubleClickEvent = new object();
+#endif
public event ItemDragEventHandler ItemDrag {
add { Events.AddHandler (ItemDragEvent, value); }
remove { Events.RemoveHandler (BeforeSelectEvent, value); }
}
+#if NET_2_0
+ public event DrawTreeNodeEventHandler DrawNode {
+ add { Events.AddHandler (DrawNodeEvent, value); }
+ remove { Events.RemoveHandler (DrawNodeEvent, value); }
+ }
+
+ public event TreeNodeMouseClickEventHandler NodeMouseClick {
+ add { Events.AddHandler (NodeMouseClickEvent, value); }
+ remove { Events.RemoveHandler (NodeMouseClickEvent, value); }
+ }
+
+
+ public event TreeNodeMouseClickEventHandler NodeMouseDoubleClick {
+ add { Events.AddHandler (NodeMouseDoubleClickEvent, value); }
+ remove { Events.RemoveHandler (NodeMouseDoubleClickEvent, value); }
+ }
+#endif
+
[Browsable (false)]
[EditorBrowsable (EditorBrowsableState.Never)]
public new event EventHandler BackgroundImageChanged {
//
-#if NET_2_0
namespace System.Windows.Forms
{
- public enum TreeViewDrawMode
+#if NET_2_0
+ public
+#endif
+ enum TreeViewDrawMode
{
Normal = 0,
OwnerDrawText = 1,
OwnerDrawAll = 2
}
-}
-#endif
\ No newline at end of file
+}
\ No newline at end of file
--- /dev/null
+//
+// TreeViewHitTestLocations.cs
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007 Novell, Inc.
+//
+// Authors:
+// Jackson Harper (jackson@ximian.com)
+//
+
+
+#if NET_2_0
+
+namespace System.Windows.Forms {
+
+ public class TreeViewHitTestInfo {
+
+ private TreeNode node;
+ private TreeViewHitTestLocations location;
+
+ public TreeViewHitTestInfo (TreeNode node, TreeViewHitTestLocations location)
+ {
+ this.node = node;
+ this.location = location;
+ }
+
+ public TreeNode Node {
+ get { return node; }
+ }
+
+ public TreeViewHitTestLocations Location {
+ get { return location; }
+ }
+ }
+}
+
+#endif
+
private PaintQueue paint; // Paint-only queue
internal ArrayList timer_list;
private Thread thread;
- private bool quit_posted;
private bool dispatch_idle;
private static readonly int InitialXEventSize = 100;
paint = new PaintQueue(InitialPaintSize);
timer_list = new ArrayList ();
this.thread = thread;
- this.quit_posted = false;
this.dispatch_idle = true;
}
}
}
- public bool PostQuitState {
- get {
- return quit_posted;
- }
-
- set {
- quit_posted = value;
- }
- }
-
public class PaintQueue {
private ArrayList hwnds;
static public int KeyboardDelay {
get {
- return driver.KeyboardSpeed;
+ return driver.KeyboardDelay;
}
}
WM_CLOSE_INTERNAL = WM_USER + 0x1c01
}
-#if notdef
- internal enum Msg {
- WM_NULL = 0x0000,
- WM_CREATE = 0x0001,
- WM_DESTROY = 0x0002,
- WM_MOVE = 0x0003,
- WM_SIZE = 0x0005,
- WM_ACTIVATE = 0x0006,
- WM_SETFOCUS = 0x0007,
- WM_KILLFOCUS = 0x0008,
- WM_SETVISIBLE = 0x0009,
- WM_ENABLE = 0x000A,
- // ...
- WM_PAINT = 0x000F,
- WM_CLOSE = 0x0010,
- WM_QUERYENDSESSION = 0x0011,
- WM_QUIT = 0x0012,
- WM_QUERYOPEN = 0x0013,
- WM_ERASEBKGND = 0x0014,
- WM_SYSCOLORCHANGE = 0x0015,
-
- // ...
- WM_WINDOWPOSCHANGED = 0x0046,
-
- // ...
- WM_KEYFIRST = 0x0100,
- WM_KEYDOWN = 0x0100,
- WM_KEYUP = 0x0101,
- WM_CHAR = 0x0102,
- WM_DEADCHAR = 0x0103,
- WM_SYSKEYDOWN = 0x0104,
- WM_SYSKEYUP = 0x0105,
- WM_SYS1CHAR = 0x0106,
- WM_SYSDEADCHAR = 0x0107,
- WM_KEYLAST = 0x0108,
-
- // ...
- WM_MOUSEFIRST = 0x0200,
- WM_MOUSEMOVE = 0x0200,
- WM_LBUTTONDOWN = 0x0201,
- WM_LBUTTONUP = 0x0202,
- WM_LBUTTONDBLCLK = 0x0203,
- WM_RBUTTONDOWN = 0x0204,
- WM_RBUTTONUP = 0x0205,
- WM_RBUTTONDBLCLK = 0x0206,
- WM_MBUTTONDOWN = 0x0207,
- WM_MBUTTONUP = 0x0208,
- WM_MBUTTONDBLCLK = 0x0209,
- WM_MOUSEWHEEL = 0x020A,
- WM_MOUSELAST = 0x020D,
- // ...
- WM_MOUSEHOVER = 0x02A1,
- WM_MOUSELEAVE = 0x02A3,
- }
-#endif
-
internal enum MsgButtons {
MK_LBUTTON = 0x0001,
MK_RBUTTON = 0x0002,
private static int scroll_height;
private static Hashtable wm_nc_registered;
private static RECT clipped_cursor_rect;
+ private Hashtable registered_classes;
+ private Hwnd HwndCreating; // the Hwnd we are currently creating (see CreateWindow)
#endregion // Local Variables
}
internal enum SPIAction {
+ SPI_GETKEYBOARDSPEED = 0x000A,
+ SPI_GETKEYBOARDDELAY = 0x0016,
SPI_GETWORKAREA = 0x0030,
SPI_GETMOUSEHOVERWIDTH = 0x0062,
SPI_GETMOUSEHOVERHEIGHT = 0x0064,
CS_BYTEALIGNCLIENT = 0x00001000,
CS_BYTEALIGNWINDOW = 0x00002000,
CS_GLOBALCLASS = 0x00004000,
- CS_IME = 0x00010000
+ CS_IME = 0x00010000,
+ // Windows XP+
+ CS_DROPSHADOW = 0x00020000
}
internal enum SetWindowPosZOrder {
#region Constructor & Destructor
private XplatUIWin32() {
- WNDCLASS wndClass;
- bool result;
-
// Handle singleton stuff first
ref_count=0;
themes_enabled = false;
- // Prepare 'our' window class
- wnd_proc = new WndProc(NativeWindow.WndProc);
- wndClass.style = (int)(ClassStyle.CS_OWNDC | ClassStyle.CS_DBLCLKS);
- wndClass.lpfnWndProc = wnd_proc;
- wndClass.cbClsExtra = 0;
- wndClass.cbWndExtra = 0;
- wndClass.hbrBackground = IntPtr.Zero;
- wndClass.hCursor = Win32LoadCursor(IntPtr.Zero, LoadCursorType.IDC_ARROW);
- wndClass.hIcon = IntPtr.Zero;
- wndClass.hInstance = IntPtr.Zero;
- wndClass.lpszClassName = XplatUI.DefaultClassName;
- wndClass.lpszMenuName = "";
-
- result=Win32RegisterClass(ref wndClass);
- if (result==false) {
- Win32MessageBox(IntPtr.Zero, "Could not register the "+XplatUI.DefaultClassName+" window class, win32 error " + Win32GetLastError().ToString(), "Oops", 0);
- }
+ wnd_proc = new WndProc(InternalWndProc);
FosterParent=Win32CreateWindow((int)WindowExStyles.WS_EX_TOOLWINDOW, "static", "Foster Parent Window", (int)WindowStyles.WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
scroll_width = Win32GetSystemMetrics(SystemMetrics.SM_CXVSCROLL);
timer_list = new Hashtable ();
+ registered_classes = new Hashtable ();
}
#endregion // Constructor & Destructor
#region Private Support Methods
+ private string RegisterWindowClass (int classStyle)
+ {
+ string class_name;
+
+ lock (registered_classes) {
+ class_name = (string)registered_classes[classStyle];
+
+ if (class_name != null)
+ return class_name;
+
+ class_name = string.Format ("Mono.WinForms.{0}.{1}", System.Threading.Thread.GetDomainID ().ToString (), classStyle);
+
+ WNDCLASS wndClass;
+
+ wndClass.style = classStyle;
+ wndClass.lpfnWndProc = wnd_proc;
+ wndClass.cbClsExtra = 0;
+ wndClass.cbWndExtra = 0;
+ wndClass.hbrBackground = (IntPtr)(GetSysColorIndex.COLOR_WINDOW + 1);
+ wndClass.hCursor = Win32LoadCursor (IntPtr.Zero, LoadCursorType.IDC_ARROW);
+ wndClass.hIcon = IntPtr.Zero;
+ wndClass.hInstance = IntPtr.Zero;
+ wndClass.lpszClassName = class_name;
+ wndClass.lpszMenuName = "";
+
+ bool result = Win32RegisterClass (ref wndClass);
+
+ if (result == false)
+ Win32MessageBox (IntPtr.Zero, "Could not register the window class, win32 error " + Win32GetLastError ().ToString (), "Oops", 0);
+
+ registered_classes[classStyle] = class_name;
+ }
+
+ return class_name;
+ }
+
private static bool RetrieveMessage(ref MSG msg) {
MSG message;
ParentHandle = FosterParent;
}
- // Since we fake MDI dont tell Windows that this is a real MDI window
- if ((cp.ExStyle & (int) WindowExStyles.WS_EX_MDICHILD) != 0) {
- SetMdiStyles (cp);
- }
+ FakeStyles (cp);
+
+ string class_name = RegisterWindowClass (cp.ClassStyle);
+ HwndCreating = hwnd;
+
+ WindowHandle = Win32CreateWindow ((uint)cp.ExStyle, class_name, cp.Caption, (uint)cp.Style, cp.X, cp.Y, cp.Width, cp.Height, ParentHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
- WindowHandle = Win32CreateWindow((uint)cp.ExStyle, cp.ClassName, cp.Caption, (uint)cp.Style, cp.X, cp.Y, cp.Width, cp.Height, ParentHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
+ HwndCreating = null;
if (WindowHandle==IntPtr.Zero) {
uint error = Win32GetLastError();
internal override void SetWindowStyle(IntPtr handle, CreateParams cp) {
- if ((cp.ExStyle & (int) WindowExStyles.WS_EX_MDICHILD) != 0) {
- SetMdiStyles (cp);
- }
+ FakeStyles (cp);
Win32SetWindowLong(handle, WindowLong.GWL_STYLE, (uint)cp.Style);
Win32SetWindowLong(handle, WindowLong.GWL_EXSTYLE, (uint)cp.ExStyle);
SetWindowPosFlags.SWP_DRAWFRAME);
}
+ private IntPtr InternalWndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam)
+ {
+ if (HwndCreating != null && HwndCreating.ClientWindow == IntPtr.Zero)
+ HwndCreating.ClientWindow = hWnd;
+ return NativeWindow.WndProc (hWnd, msg, wParam, lParam);
+ }
+
internal override IntPtr DefWndProc(ref Message msg) {
msg.Result=Win32DefWindowProc(msg.HWnd, (Msg)msg.Msg, msg.WParam, msg.LParam);
return msg.Result;
internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
{
if (visible) {
- if (Control.FromHandle (handle) is Form) {
+ Control c = Control.FromHandle (handle);
+ if (c is Form) {
Form f;
f = (Form)Control.FromHandle (handle);
case FormWindowState.Maximized: flags = WindowPlacementFlags.SW_MAXIMIZE; break;
}
- if (Hwnd.ObjectFromHandle (handle).no_activate)
+ if (!f.ActivateOnShow)
flags = WindowPlacementFlags.SW_SHOWNOACTIVATE;
Win32ShowWindow (handle, flags);
}
else {
- if (Hwnd.ObjectFromHandle (handle).no_activate)
- Win32ShowWindow (handle, WindowPlacementFlags.SW_SHOWNOACTIVATE);
- else
+ if (c.ActivateOnShow)
Win32ShowWindow (handle, WindowPlacementFlags.SW_SHOWNORMAL);
+ else
+ Win32ShowWindow (handle, WindowPlacementFlags.SW_SHOWNOACTIVATE);
}
}
else {
timer_list.Remove(index);
}
}
-
- private void SetMdiStyles (CreateParams cp)
+
+ private void FakeStyles (CreateParams cp)
{
- cp.Style = (int)WindowStyles.WS_CHILD | (int)WindowStyles.WS_CLIPCHILDREN | (int)WindowStyles.WS_CLIPSIBLINGS;
- cp.ExStyle = 0;
+ if (cp.HasWindowManager) {
+ // Remove all styles but WS_VISIBLE.
+ cp.WindowStyle &= WindowStyles.WS_VISIBLE;
+ // Set styles that enables us to use the window manager.
+ cp.WindowStyle |= WindowStyles.WS_CHILD | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_CLIPSIBLINGS;
+ cp.ExStyle = 0;
+ }
}
-
+
internal override void CreateCaret(IntPtr hwnd, int width, int height) {
Win32CreateCaret(hwnd, IntPtr.Zero, width, height);
caret_visible = false;
internal override int KeyboardSpeed {
get {
- Console.WriteLine ("KeyboardSpeed: need to query Windows");
-
+ int speed = 0;
+ Win32SystemParametersInfo(SPIAction.SPI_GETKEYBOARDSPEED, 0, ref speed, 0);
//
// Return values range from 0 to 31 which map to 2.5 to 30 repetitions per second.
//
- return 0;
+ return speed;
}
}
internal override int KeyboardDelay {
get {
- Console.WriteLine ("KeyboardDelay: need to query Windows");
-
+ int delay = 1;
+ Win32SystemParametersInfo(SPIAction.SPI_GETKEYBOARDDELAY, 0, ref delay, 0);
//
// Return values must range from 0 to 4, 0 meaning 250ms,
// and 4 meaning 1000 ms.
//
- return 1;
+ return delay;
}
}
private void DeriveStyles(int Style, int ExStyle, out FormBorderStyle border_style, out bool border_static, out TitleStyle title_style, out int caption_height, out int tool_caption_height) {
- // Only MDI windows get caption_heights
caption_height = 0;
tool_caption_height = 19;
border_static = false;
border_style = FormBorderStyle.FixedSingle;
}
title_style = TitleStyle.None;
+
+ if (StyleSet (Style, WindowStyles.WS_CAPTION)) {
+ caption_height = 19;
+ if (ExStyleSet (ExStyle, WindowExStyles.WS_EX_TOOLWINDOW)) {
+ title_style = TitleStyle.Tool;
+ } else {
+ title_style = TitleStyle.Normal;
+ }
+ }
if (ExStyleSet (ExStyle, WindowExStyles.WS_EX_MDICHILD)) {
caption_height = 19;
- if (StyleSet (Style, WindowStyles.WS_CAPTION)) {
- if (ExStyleSet (ExStyle, WindowExStyles.WS_EX_TOOLWINDOW)) {
- title_style = TitleStyle.Tool;
- } else {
- title_style = TitleStyle.Normal;
- }
- }
-
if (StyleSet (Style, WindowStyles.WS_OVERLAPPEDWINDOW) ||
ExStyleSet (ExStyle, WindowExStyles.WS_EX_TOOLWINDOW)) {
border_style = (FormBorderStyle) 0xFFFF;
int atom_count;
Rectangle client_rect;
- // Child windows don't need WM window styles
- if (StyleSet (cp.Style, WindowStyles.WS_CHILDWINDOW)) {
+ // Windows we manage ourselves don't need WM window styles.
+ if (cp.HasWindowManager && !cp.IsSet (WindowExStyles.WS_EX_TOOLWINDOW)) {
return;
}
}
}
+ private void WaitForHwndMessage (Hwnd hwnd, Msg message) {
+ MSG msg = new MSG ();
+ XEventQueue queue;
+
+ queue = ThreadQueue(Thread.CurrentThread);
+
+ queue.DispatchIdle = false;
+
+ bool done = false;
+ do {
+ if (PeekMessage(queue, ref msg, IntPtr.Zero, 0, 0, (uint)PeekMessageFlags.PM_REMOVE)) {
+ if ((Msg)msg.message == Msg.WM_QUIT) {
+ PostQuitMessage (0);
+ done = true;
+ }
+ else {
+ if ((msg.hwnd == hwnd.Handle) &&
+ ((Msg)msg.message == message || (Msg)msg.message == Msg.WM_DESTROY))
+ done = true;
+ TranslateMessage (ref msg);
+ DispatchMessage (ref msg);
+ }
+ }
+ } while (!done);
+
+ queue.DispatchIdle = true;
+
+ }
+
private void MapWindow(Hwnd hwnd, WindowType windows) {
- hwnd.mapped = true;
- if ((windows & WindowType.Whole) != 0) {
- XMapWindow(DisplayHandle, hwnd.whole_window);
- }
- if ((windows & WindowType.Client) != 0) {
- XMapWindow(DisplayHandle, hwnd.client_window);
+ if (!hwnd.mapped) {
+ bool need_to_wait = false;
+
+ if ((windows & WindowType.Whole) != 0) {
+ XMapWindow(DisplayHandle, hwnd.whole_window);
+ }
+ if ((windows & WindowType.Client) != 0) {
+ XMapWindow(DisplayHandle, hwnd.client_window);
+
+ need_to_wait = true;
+ }
+
+ hwnd.mapped = true;
+
+ if (need_to_wait && Control.FromHandle(hwnd.Handle) is Form)
+ WaitForHwndMessage (hwnd, Msg.WM_SHOWWINDOW);
}
}
private void UnmapWindow(Hwnd hwnd, WindowType windows) {
- hwnd.mapped = false;
- if ((windows & WindowType.Whole) != 0) {
- XUnmapWindow(DisplayHandle, hwnd.whole_window);
- }
- if ((windows & WindowType.Client) != 0) {
- XUnmapWindow(DisplayHandle, hwnd.client_window);
+ if (hwnd.mapped) {
+ bool need_to_wait = false;
+
+ if ((windows & WindowType.Client) != 0) {
+ XUnmapWindow(DisplayHandle, hwnd.client_window);
+
+ need_to_wait = true;
+ }
+ if ((windows & WindowType.Whole) != 0) {
+ XUnmapWindow(DisplayHandle, hwnd.whole_window);
+ }
+
+ hwnd.mapped = false;
+
+ if (need_to_wait && Control.FromHandle(hwnd.Handle) is Form)
+ WaitForHwndMessage (hwnd, Msg.WM_SHOWWINDOW);
}
}
break;
}
- case XEventName.MapNotify: {
- if (hwnd.client_window == xevent.MapEvent.window) {
- hwnd.mapped = true;
- }
- break;
- }
-
- case XEventName.UnmapNotify: {
- if (hwnd.client_window == xevent.MapEvent.window) {
- hwnd.mapped = false;
- }
- break;
- }
-
case XEventName.KeyRelease:
if (!detectable_key_auto_repeat && XPending (DisplayHandle) != 0) {
XEvent nextevent = new XEvent ();
case XEventName.FocusOut:
case XEventName.ClientMessage:
case XEventName.ReparentNotify:
+ case XEventName.MapNotify:
+ case XEventName.UnmapNotify:
hwnd.Queue.EnqueueLocked (xevent);
break;
internal override Size FrameBorderSize {
get {
- throw new NotImplementedException();
+ return new Size (4, 4);
}
}
}
}
- internal override void CreateCaret(IntPtr handle, int width, int height) {
+ internal override void CreateCaret (IntPtr handle, int width, int height)
+ {
XGCValues gc_values;
Hwnd hwnd;
XSetFunction(DisplayHandle, Caret.gc, GXFunction.GXinvert);
}
- internal override IntPtr CreateWindow(CreateParams cp) {
+ internal override IntPtr CreateWindow (CreateParams cp)
+ {
XSetWindowAttributes Attributes;
Hwnd hwnd;
int X;
lock (XlibLock) {
XSelectInput(DisplayHandle, hwnd.whole_window, new IntPtr ((int)(SelectInputMask | EventMask.StructureNotifyMask)));
if (hwnd.whole_window != hwnd.client_window)
- XSelectInput(DisplayHandle, hwnd.client_window, new IntPtr ((int)SelectInputMask));
-
- if (StyleSet (cp.Style, WindowStyles.WS_VISIBLE)) {
- MapWindow(hwnd, WindowType.Both);
- hwnd.visible = true;
- }
+ XSelectInput(DisplayHandle, hwnd.client_window, new IntPtr ((int)(SelectInputMask | EventMask.StructureNotifyMask)));
}
if (ExStyleSet (cp.ExStyle, WindowExStyles.WS_EX_TOPMOST)) {
// Set caption/window title
Text(hwnd.Handle, cp.Caption);
-
+
+ SendMessage (hwnd.Handle, Msg.WM_CREATE, (IntPtr)1, IntPtr.Zero /* XXX unused */);
SendParentNotify (hwnd.Handle, Msg.WM_CREATE, int.MaxValue, int.MaxValue);
+ if (StyleSet (cp.Style, WindowStyles.WS_VISIBLE)) {
+ hwnd.visible = true;
+ MapWindow(hwnd, WindowType.Both);
+ if (!(Control.FromHandle(hwnd.Handle) is Form))
+ SendMessage(hwnd.Handle, Msg.WM_SHOWWINDOW, (IntPtr)1, IntPtr.Zero);
+ }
+
return hwnd.Handle;
}
// This is where we one day will shut down the loop for the thread
}
-
internal override IntPtr GetActive() {
IntPtr actual_atom;
int actual_format;
} else if (((XEventQueue)queue_id).Paint.Count > 0) {
xevent = ((XEventQueue)queue_id).Paint.Dequeue();
} else {
- if (!ThreadQueue(Thread.CurrentThread).PostQuitState) {
- msg.hwnd= IntPtr.Zero;
- msg.message = Msg.WM_ENTERIDLE;
- return true;
- }
-
- // We reset ourselves so GetMessage can be called again
- ThreadQueue(Thread.CurrentThread).PostQuitState = false;
-
- return false;
+ msg.hwnd= IntPtr.Zero;
+ msg.message = Msg.WM_ENTERIDLE;
+ return true;
}
}
}
case XEventName.ConfigureNotify: {
- if (ThreadQueue(Thread.CurrentThread).PostQuitState|| !client && (xevent.ConfigureEvent.xevent == xevent.ConfigureEvent.window)) { // Ignore events for children (SubstructureNotify) and client areas
+ if (!client && (xevent.ConfigureEvent.xevent == xevent.ConfigureEvent.window)) { // Ignore events for children (SubstructureNotify) and client areas
#if DriverDebugExtra
Console.WriteLine("GetMessage(): Window {0:X} ConfigureNotify x={1} y={2} width={3} height={4}", hwnd.client_window.ToInt32(), xevent.ConfigureEvent.x, xevent.ConfigureEvent.y, xevent.ConfigureEvent.width, xevent.ConfigureEvent.height);
#endif
goto ProcessNextMessage;
}
+ case XEventName.MapNotify: {
+ if (client && (xevent.ConfigureEvent.xevent == xevent.ConfigureEvent.window)) { // Ignore events for children (SubstructureNotify) and client areas
+ hwnd.mapped = true;
+ msg.message = Msg.WM_SHOWWINDOW;
+ msg.wParam = (IntPtr) 1;
+ // XXX we're missing the lParam..
+ break;
+ }
+ goto ProcessNextMessage;
+ }
+
+ case XEventName.UnmapNotify: {
+ if (client && (xevent.ConfigureEvent.xevent == xevent.ConfigureEvent.window)) { // Ignore events for children (SubstructureNotify) and client areas
+ hwnd.mapped = false;
+ msg.message = Msg.WM_SHOWWINDOW;
+ msg.wParam = (IntPtr) 0;
+ // XXX we're missing the lParam..
+ break;
+ }
+ goto ProcessNextMessage;
+ }
+
case XEventName.Expose: {
- if (ThreadQueue(Thread.CurrentThread).PostQuitState || !hwnd.Mapped) {
+ if (!hwnd.Mapped) {
if (client) {
hwnd.expose_pending = false;
} else {
msg.message = (Msg) xevent.ClientMessageEvent.ptr2.ToInt32 ();
msg.wParam = xevent.ClientMessageEvent.ptr3;
msg.lParam = xevent.ClientMessageEvent.ptr4;
- return true;
+ if (msg.message == (Msg)Msg.WM_QUIT)
+ return false;
+ else
+ return true;
}
if (xevent.ClientMessageEvent.message_type == _XEMBED) {
}
internal override void PostQuitMessage(int exitCode) {
-
+ PostMessage (FosterParent, Msg.WM_QUIT, IntPtr.Zero, IntPtr.Zero);
XFlush(DisplayHandle);
- ThreadQueue(Thread.CurrentThread).PostQuitState = true;
}
internal override void RequestAdditionalWM_NCMessages(IntPtr hwnd, bool hover, bool leave)
Form form = Control.FromHandle (handle) as Form;
if (form != null && form.window_manager == null && (border_style == FormBorderStyle.FixedToolWindow ||
border_style == FormBorderStyle.SizableToolWindow)) {
- form.window_manager = new InternalWindowManager (form);
+ form.window_manager = new ToolWindowManager (form);
}
RequestNCRecalc(handle);
return true;
}
- internal override bool SetVisible(IntPtr handle, bool visible, bool activate) {
+ internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
+ {
Hwnd hwnd;
hwnd = Hwnd.ObjectFromHandle(handle);
lock (XlibLock) {
if (visible) {
+ MapWindow(hwnd, WindowType.Both);
+
if (Control.FromHandle(handle) is Form) {
FormWindowState s;
s = ((Form)Control.FromHandle(handle)).WindowState;
- MapWindow(hwnd, WindowType.Both);
-
switch(s) {
case FormWindowState.Minimized: SetWindowState(handle, FormWindowState.Minimized); break;
case FormWindowState.Maximized: SetWindowState(handle, FormWindowState.Maximized); break;
}
-
- } else {
- MapWindow(hwnd, WindowType.Both);
}
+
SendMessage(handle, Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
- } else {
- UnmapWindow(hwnd, WindowType.Whole);
+ }
+ else {
+ UnmapWindow(hwnd, WindowType.Both);
}
}
return true;
}
internal override object StartLoop(Thread thread) {
- return (Object) ThreadQueue(thread);
+ XEventQueue q = ThreadQueue(thread);
+ return q;
}
internal override TransparencySupport SupportsTransparency() {
System.Windows.Forms/ApplicationTest.cs
System.Windows.Forms/AutoCompleteStringCollectionTest.cs
System.Windows.Forms/ApplicationContextTest.cs
+System.Windows.Forms/BindingSourceTest.cs
System.Windows.Forms/BindingTest.cs
System.Windows.Forms/BindingContextTest.cs
System.Windows.Forms/BindingMemberInfoTest.cs
System.Windows.Forms/DataGridViewTest.cs
System.Windows.Forms/DateTimePickerTest.cs
System.Windows.Forms/DefaultLayoutTest.cs
+System.Windows.Forms/ErrorProviderTest.cs
System.Windows.Forms/FlowPanelTests.cs
System.Windows.Forms/FocusTest.cs
+System.Windows.Forms/FormHandleTest.cs
System.Windows.Forms/FormTest.cs
System.Windows.Forms/EventArgsTest.cs
System.Windows.Forms/EventLogger.cs
System.Windows.Forms/ImageListTest.cs
System.Windows.Forms/LabelTest.cs
System.Windows.Forms/LinkAreaTest.cs
+System.Windows.Forms/LinkLabelTest.cs
System.Windows.Forms/ListControlTest.cs
System.Windows.Forms/ListBoxEventTest.cs
System.Windows.Forms/ListBoxTest.cs
System.Windows.Forms/ListViewGroupTest.cs
System.Windows.Forms/ListViewGroupCollectionTest.cs
System.Windows.Forms/ListViewItemTest.cs
+System.Windows.Forms/MdiFormHandleTest.cs
System.Windows.Forms/MdiFormTest.cs
System.Windows.Forms/MessageTest.cs
System.Windows.Forms/MenuStripTest.cs
System.Windows.Forms/TrackBarTest.cs
System.Windows.Forms/TreeNodeCollectionTest.cs
System.Windows.Forms/TreeNodeTest.cs
+System.Windows.Forms/TreeViewHitTestInfoTest.cs
System.Windows.Forms/TreeViewTest.cs
System.Windows.Forms/UpDownTest.cs
System.Windows.Forms/UserControlTest.cs
+2007-03-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ResXResourceReaderTest.cs: Added test for special casing of .ico
+ files.
+
2007-02-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
* ResXFileRefTest.cs: Removed warnings.
using System;
using System.Collections;
+using System.Drawing;
using System.Globalization;
using System.IO;
using System.Resources;
}
}
+ [Test]
+ public void ExternalFileReference_Icon ()
+ {
+ string refFile = Path.Combine (_tempDirectory, "32x32.ico");
+ WriteEmbeddedResource ("32x32.ico", refFile);
+
+ string resxFile = Path.Combine (_tempDirectory, "resources.resx");
+ using (StreamWriter sw = new StreamWriter (resxFile, false, Encoding.UTF8)) {
+ sw.Write (string.Format (CultureInfo.InvariantCulture,
+ _resXFileRefTemplate, ResXResourceWriter.ResMimeType, "1.0",
+ Consts.AssemblySystem_Windows_Forms, refFile,
+ typeof (Bitmap).AssemblyQualifiedName, string.Empty));
+ }
+
+ using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
+ IDictionaryEnumerator enumerator = r.GetEnumerator ();
+ enumerator.MoveNext ();
+ Assert.IsNotNull (enumerator.Current, "#A1");
+ Assert.AreEqual ("foo", enumerator.Key, "#A2");
+ Bitmap bitmap = enumerator.Value as Bitmap;
+ Assert.IsNotNull (bitmap, "#A3");
+#if NET_2_0
+ Assert.AreEqual (32, bitmap.Height, "#A4");
+ Assert.AreEqual (32, bitmap.Width, "#A5");
+#else
+ Assert.AreEqual (96, bitmap.Height, "#A4");
+ Assert.AreEqual (96, bitmap.Width, "#A5");
+#endif
+ }
+
+ File.Delete (refFile);
+ File.Delete (resxFile);
+
+ refFile = Path.Combine (_tempDirectory, "32x32.ICO");
+ WriteEmbeddedResource ("32x32.ico", refFile);
+
+ using (StreamWriter sw = new StreamWriter (resxFile, false, Encoding.UTF8)) {
+ sw.Write (string.Format (CultureInfo.InvariantCulture,
+ _resXFileRefTemplate, ResXResourceWriter.ResMimeType, "1.0",
+ Consts.AssemblySystem_Windows_Forms, refFile,
+ typeof (Bitmap).AssemblyQualifiedName, string.Empty));
+ }
+
+ using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
+ IDictionaryEnumerator enumerator = r.GetEnumerator ();
+ enumerator.MoveNext ();
+ Assert.IsNotNull (enumerator.Current, "#B1");
+ Assert.AreEqual ("foo", enumerator.Key, "#B2");
+ Bitmap bitmap = enumerator.Value as Bitmap;
+ Assert.IsNotNull (bitmap, "#B3");
+ Assert.AreEqual (96, bitmap.Height, "#B4");
+ Assert.AreEqual (96, bitmap.Width, "#B5");
+ }
+ }
+
[Test]
public void ExternalFileReference_RelativePath ()
{
}
}
+ private static void WriteEmbeddedResource (string name, string filename)
+ {
+ const int size = 512;
+ byte [] buffer = new byte [size];
+ int count = 0;
+
+ Stream input = typeof (ResXResourceReaderTest).Assembly.
+ GetManifestResourceStream (name);
+ Stream output = File.Open (filename, FileMode.Create);
+
+ try {
+ while ((count = input.Read (buffer, 0, size)) > 0) {
+ output.Write (buffer, 0, count);
+ }
+ } finally {
+ output.Close ();
+ }
+ }
+
private const string _resXFileRefTemplate =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<root>" +
}
}
- class InfiniteEnumerable : IEnumerable {
- class InfiniteEnumerator : IEnumerator {
- public object Current {
- get { return 5; }
+ class GenericEnumerable : IEnumerable<int> {
+ int length;
+
+ public GenericEnumerable (int length) {
+ this.length = length;
+ }
+
+ class MyEnumerator : IEnumerator<int> {
+ public int count;
+ public int index;
+
+ public int Current {
+ get { return index; }
+ }
+
+ object IEnumerator.Current {
+ get { return Current; }
}
public void Reset () {
- // nada
+ index = 0;
}
public bool MoveNext () {
- return true;
+ if (index++ == count)
+ return false;
+ else
+ return true;
}
+ void IDisposable.Dispose () {
+ }
}
- public IEnumerator GetEnumerator () {
- return new InfiniteEnumerator ();
+ public IEnumerator<int> GetEnumerator () {
+ MyEnumerator e = new MyEnumerator ();
+ e.count = length;
+
+ return e;
+ }
+
+ IEnumerator IEnumerable.GetEnumerator () {
+ return GetEnumerator ();
}
}
Assert.IsTrue (source.List is BindingList<char>, "8");
Assert.AreEqual (0, source.List.Count, "9");
- // a non-string IEnumerable type with 0 items
+ // a generic enumerable with no elements.
+ // even though we can figure out the type
+ // through reflection, we shouldn't..
+ source.DataSource = new GenericEnumerable (0);
+ Console.WriteLine (source.List.GetType());
+ Assert.IsTrue (source.List is BindingList<char>, "10");
+ Assert.AreEqual (0, source.List.Count, "11");
+
+ // a non-generic IEnumerable type with 0 items
// this doesn't seem to change the type of the
// binding source's list, probably because it
// can't determine the type of the
// enumerable's elements.
source.DataSource = new EmptyEnumerable ();
- Assert.IsTrue (source.List is BindingList<char>, "10");
+ Assert.IsTrue (source.List is BindingList<char>, "12");
// an enumerable with some elements
source.DataSource = new WorkingEnumerable (5);
- Assert.IsTrue (source.List is BindingList<int>, "11");
- Assert.AreEqual (5, source.List.Count, "12");
+ Assert.IsTrue (source.List is BindingList<int>, "13");
+ Assert.AreEqual (5, source.List.Count, "14");
}
+ [Test]
+ public void ResetItem ()
+ {
+ BindingSource source = new BindingSource ();
+ bool delegate_reached = false;
+ int old_index = 5;
+ int new_index = 5;
+ ListChangedType type = ListChangedType.Reset;
+
+ source.ListChanged += delegate (object sender, ListChangedEventArgs e) {
+ delegate_reached = true;
+ type = e.ListChangedType;
+ old_index = e.OldIndex;
+ new_index = e.NewIndex;
+ };
+
+ source.ResetItem (0);
+
+ Assert.IsTrue (delegate_reached, "1");
+ Assert.AreEqual (-1, old_index, "2");
+ Assert.AreEqual (0, new_index, "3");
+ Assert.AreEqual (ListChangedType.ItemChanged, type, "3");
+ }
-#if false
[Test]
- [Ignore ("BindingSource seems to try to get all elements of the enumerator, probably copying them to a propertly typed BindingList")]
- public void InfiniteEnumeratorTest ()
+ public void Movement ()
{
BindingSource source = new BindingSource ();
+ source.DataSource = new WorkingEnumerable (5);
- // an infinite IEnumerable type
- source.DataSource = new InfiniteEnumerable ();
- Console.WriteLine (source.List.GetType());
- Assert.IsTrue (source.List is BindingList<int>, "10");
+ int raised = 0;
+ source.PositionChanged += delegate (object sender, EventArgs e) { raised ++; };
+
+ Console.WriteLine ("count = {0}", source.Count);
+ source.Position = 3;
+ Assert.AreEqual (3, source.Position, "1");
+
+ source.MoveFirst ();
+ Assert.AreEqual (0, source.Position, "2");
+
+ source.MoveNext ();
+ Assert.AreEqual (1, source.Position, "3");
+
+ source.MovePrevious ();
+ Assert.AreEqual (0, source.Position, "4");
+
+ source.MoveLast ();
+ Assert.AreEqual (4, source.Position, "5");
+
+ Assert.AreEqual (5, raised, "6");
+ }
+
+ [Test]
+ public void Position ()
+ {
+ BindingSource source = new BindingSource ();
+
+ Assert.AreEqual (-1, source.Position, "0");
+
+ source.DataSource = new WorkingEnumerable (5);
+
+ int raised = 0;
+ source.PositionChanged += delegate (object sender, EventArgs e) { raised ++; };
+
+
+ Assert.AreEqual (0, source.Position, "1");
+
+ source.Position = -1;
+ Assert.AreEqual (0, source.Position, "2");
+ Assert.AreEqual (0, raised, "3");
+
+ source.Position = 10;
+ Assert.AreEqual (4, source.Position, "4");
+ Assert.AreEqual (1, raised, "5");
+
+ source.Position = 10;
+ Assert.AreEqual (4, source.Position, "6");
+ Assert.AreEqual (1, raised, "7");
+ }
+
+ [Test]
+ public void ResetCurrentItem ()
+ {
+ BindingSource source = new BindingSource ();
+ bool delegate_reached = false;
+ int old_index = 5;
+ int new_index = 5;
+ ListChangedType type = ListChangedType.Reset;
+
+ source.DataSource = new WorkingEnumerable (5);
+ source.Position = 2;
+
+ source.ListChanged += delegate (object sender, ListChangedEventArgs e) {
+ delegate_reached = true;
+ type = e.ListChangedType;
+ old_index = e.OldIndex;
+ new_index = e.NewIndex;
+ };
+
+ source.ResetCurrentItem ();
+
+ Assert.IsTrue (delegate_reached, "1");
+ Assert.AreEqual (-1, old_index, "2");
+ Assert.AreEqual (2, new_index, "3");
+ Assert.AreEqual (ListChangedType.ItemChanged, type, "3");
+ }
+
+ [Test]
+ public void ResetBindings ()
+ {
+ BindingSource source;
+ int event_count = 0;
+
+ ListChangedType[] types = new ListChangedType[2];
+ int[] old_index = new int[2];
+ int[] new_index = new int[2];
+
+ source = new BindingSource ();
+ source.ListChanged += delegate (object sender, ListChangedEventArgs e) {
+ types[event_count] = e.ListChangedType;
+ old_index[event_count] = e.OldIndex;
+ new_index[event_count] = e.NewIndex;
+ event_count ++;
+ };
+
+ event_count = 0;
+ source.ResetBindings (false);
+
+ Assert.AreEqual (1, event_count, "1");
+ Assert.AreEqual (ListChangedType.Reset, types[0], "2");
+ Assert.AreEqual (-1, old_index[0], "3");
+ Assert.AreEqual (-1, new_index[0], "4");
+
+ event_count = 0;
+ source.ResetBindings (true);
+ Assert.AreEqual (2, event_count, "5");
+ Assert.AreEqual (ListChangedType.PropertyDescriptorChanged, types[0], "6");
+ Assert.AreEqual (0, old_index[0], "7");
+ Assert.AreEqual (0, new_index[0], "8");
+
+ Assert.AreEqual (ListChangedType.Reset, types[1], "9");
+ Assert.AreEqual (-1, old_index[1], "10");
+ Assert.AreEqual (-1, new_index[1], "11");
+ }
+
+ [Test]
+ public void AllowRemove ()
+ {
+ BindingSource source = new BindingSource ();
+
+ Assert.IsTrue (source.AllowRemove, "1");
+
+ source.DataSource = "";
+ Assert.IsTrue (source.AllowRemove, "2");
+
+ source.DataSource = new ArrayList ();
+ Assert.IsTrue (source.AllowRemove, "3");
+
+ source.DataSource = new int[10];
+ Assert.IsFalse (source.AllowRemove, "4");
+
+ source.DataSource = new WorkingEnumerable (5);
+ Assert.IsTrue (source.AllowRemove, "5");
}
-#endif
[Test]
public void DataMember_ListRelationship ()
throw new Exception ();
}
- public void Clear () {
- throw new Exception ();
- }
public bool Contains (object value) {
throw new Exception ();
}
public void Remove (object value) {
throw new Exception ();
}
- public void RemoveAt (int index) {
- throw new Exception ();
- }
public bool IsFixedSize {
get { return false; }
public bool IsReadOnly {
get { return true; }
}
- public object this [int index] {
- get { throw new Exception (); }
- set { }
- }
}
[Test]
{
}
- public object AddNew ()
- {
- throw new NotImplementedException ();
- }
-
public void ApplySort (PropertyDescriptor property, ListSortDirection direction)
{
}
{
}
- public bool AllowEdit {
- get { throw new NotImplementedException (); }
- }
-
- public bool AllowNew {
- get { throw new NotImplementedException (); }
- }
-
- public bool AllowRemove {
- get { throw new NotImplementedException (); }
- }
-
public bool IsSorted {
get { throw new NotImplementedException (); }
}
get { return supports_sorting; }
}
- public event ListChangedEventHandler ListChanged;
-
public bool supports_change_notification;
public bool supports_searching;
public bool supports_sorting;
+2007-03-13 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ErrorProviderTest.cs: Improved GetandSetErrorTest. Marked failing
+ test NotWorking. Removed extra tabs.
+
+2007-03-13 Jonathan Pobst <monkey@jpobst.com>
+
+ * FormTest.cs: Add test for bug #80773.
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * ControlTest.cs: Add test for bug #81125.
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * FormTest.cs: Add a test showing we do not recreate the handle when
+ MinimizeBox or MaximizeBox is changed. [Part of bug #80640]
+
+2007-03-12 Jonathan Pobst <monkey@jpobst.com>
+
+ * ControlTest.cs: Add test for bug #80621.
+
+2007-03-11 Everaldo Canuto <everaldo@simios.org>
+
+ * LinkLabelTest.cs: LinkLabel tests added.
+
+2007-03-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * FormHandleTest.cs: Fixed build using csc 1.x.
+ * MdiFormHandleTest.cs: Fixed build using csc 1.x. Removed extra tabs.
+ * ControlHandleTest.cs: Fixed build using csc 1.x.
+ * TextBoxTest.cs: Improved test for BackColor. Added test for
+ ForeColor.
+
+2007-03-10 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * TextBoxTest.cs: Isolate BackColor tests.
+
+2007-03-09 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * FormHandleTest.cs: Added.
+ * MdiFormHandleTest.cs: Added.
+
+2007-03-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListViewTest.cs: Added tests for the ListView and
+ Index properties of ListViewItems in VirtualMode.
+
+ * ListViewCollectionsTest.cs: Remove warning when building
+ tests.
+
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * FormTest.cs: Added tests for bug #80791 and #80574.
+
+2007-03-08 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * SendKeysTest.cs: Fixed to not hang keyboard on Windows.
+
+2007-03-08 Jonathan Pobst <monkey@jpobst.com>
+
+ * FormTest.cs: Add tests for bugs #80574, #80791.
+
+2007-03-05 Chris Toshok <toshok@ximian.com>
+
+ [merge -r72718:73765 from mwf-handle-branch]
+
+ 2007-03-05 Chris Toshok <toshok@ximian.com>
+
+ * ControlHandleTest.cs: make this build on both 1.1 and 2.0
+ profiles.
+
+ 2007-02-28 Chris Toshok <toshok@ximian.com>
+
+ * ControlTest.cs: Flesh out ControlInvokeTest to make sure that
+ the Control thread dies (that Application.Run returns, basically).
+ This works in isolation, but for some reason it isn't exiting when
+ run in concert with other tests (this test is the cause of the
+ hangs running the unit tests.) Marking NotWorking for the time
+ being. This needs to be fixed before merging back to the
+ mainline, imo.
+
+2007-03-02 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * FormTest.cs: Added MaximizedParentedFormTest.
+
+2007-03-02 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListViewCollectionsTest.cs: Added tests for the exceptions thrown
+ by ListViewItemCollection when virtual mode is used.
+
+2007-03-01 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ListViewCollectionsTest.cs: Added ColumnHeader.Index tests.
+ * ColumnHeaderTest.cs: Added more DisplayIndex tests.
+
+2007-02-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ListViewTest.cs: Add test for VirtualMode and VirtualSize,
+ as well as for the exceptions they throw.
+
+2007-02-28 Jonathan Pobst <monkey@jpobst.com>
+
+ * DefaultLayoutTest.cs: Add test for bug #80917.
+
2007-02-26 Gert Driesen <drieseng@users.sourceforge.net>
* ListViewCollectionsTest.cs: Added and improved tests for removing
[TestFixture]
public class ColumnHeaderTest
{
+#if NET_2_0
+ [SetUp]
+ public void SetUp ()
+ {
+ columnReordered = 0;
+ }
+#endif
+
[Test]
public void DefaultValuesTest ()
{
#if NET_2_0
[Test]
- public void DisplayIndexTest ()
+ public void DisplayIndex_ListView_Created ()
{
- ColumnHeader col = new ColumnHeader ();
- col.DisplayIndex = -66;
- col.DisplayIndex = 66;
+ ColumnHeader colA = new ColumnHeader ();
+ ColumnHeader colB = new ColumnHeader ();
+ ColumnHeader colC = new ColumnHeader ();
+ ColumnHeader colD = new ColumnHeader ();
+ colA.DisplayIndex = 2;
+ colD.DisplayIndex = 0;
+ colB.DisplayIndex = 3;
+ colC.DisplayIndex = 1;
+ Form form = new Form ();
+ form.ShowInTaskbar = false;
ListView lv = new ListView ();
- lv.Columns.Add (col);
+ lv.ColumnReordered += new ColumnReorderedEventHandler (ColumnReordered);
+ lv.View = View.Details;
+ lv.Columns.Add (colA);
+ lv.Columns.Add (colB);
+ lv.Columns.Add (colC);
+ form.Controls.Add (lv);
+ form.Show ();
- try {
- col.DisplayIndex = -1;
- Assert.Fail ("1");
- } catch (ArgumentOutOfRangeException) {
- }
+ Assert.AreEqual (0, colA.DisplayIndex, "#A1");
+ Assert.AreEqual (1, colB.DisplayIndex, "#A2");
+ Assert.AreEqual (2, colC.DisplayIndex, "#A3");
+ Assert.AreEqual (0, colD.DisplayIndex, "#A4");
+ Assert.AreEqual (0, columnReordered, "#A5");
- try {
- col.DisplayIndex = lv.Columns.Count;
- Assert.Fail ("2");
- } catch (ArgumentOutOfRangeException) {
- }
+ colC.DisplayIndex = 0;
+ Assert.AreEqual (1, colA.DisplayIndex, "#B1");
+ Assert.AreEqual (2, colB.DisplayIndex, "#B2");
+ Assert.AreEqual (0, colC.DisplayIndex, "#B3");
+ Assert.AreEqual (0, colD.DisplayIndex, "#B4");
+ Assert.AreEqual (0, columnReordered, "#B5");
+
+ colC.DisplayIndex = 2;
+ Assert.AreEqual (0, colA.DisplayIndex, "#C1");
+ Assert.AreEqual (1, colB.DisplayIndex, "#C2");
+ Assert.AreEqual (2, colC.DisplayIndex, "#C3");
+ Assert.AreEqual (0, colD.DisplayIndex, "#C4");
+ Assert.AreEqual (0, columnReordered, "#C5");
+
+ colB.DisplayIndex = 2;
+ Assert.AreEqual (0, colA.DisplayIndex, "#D1");
+ Assert.AreEqual (2, colB.DisplayIndex, "#D2");
+ Assert.AreEqual (1, colC.DisplayIndex, "#D3");
+ Assert.AreEqual (0, colD.DisplayIndex, "#D4");
+ Assert.AreEqual (0, columnReordered, "#D5");
- Assert.AreEqual (0, col.DisplayIndex, "3");
+ colD.DisplayIndex = 1;
+ lv.Columns.Add (colD);
+
+ Assert.AreEqual (0, colA.DisplayIndex, "#E1");
+ Assert.AreEqual (2, colB.DisplayIndex, "#E2");
+ Assert.AreEqual (1, colC.DisplayIndex, "#E3");
+ Assert.AreEqual (3, colD.DisplayIndex, "#E4");
+ Assert.AreEqual (0, columnReordered, "#E5");
}
- [Test]
+ [Test]
public void DisplayIndex_ListView_Disposed ()
{
ListView lv = new ListView ();
lv.Columns.Add (colA);
ColumnHeader colB = new ColumnHeader ();
lv.Columns.Add (colB);
+ ColumnHeader colC = new ColumnHeader ();
+ lv.Columns.Add (colC);
+ Assert.AreEqual (0, colA.DisplayIndex, "#A1");
+ Assert.AreEqual (1, colB.DisplayIndex, "#A2");
+ Assert.AreEqual (2, colC.DisplayIndex, "#A3");
+ colA.DisplayIndex = 2;
+ lv.Columns.Remove (colB);
lv.Dispose ();
- colA.DisplayIndex = 1;
- Assert.AreEqual (1, colA.DisplayIndex, "#1");
- Assert.AreEqual (1, colB.DisplayIndex, "#2");
+ Assert.AreEqual (1, colA.DisplayIndex, "#B1");
+ Assert.AreEqual (-1, colB.DisplayIndex, "#B2");
+ Assert.AreEqual (0, colC.DisplayIndex, "#B3");
+ colA.DisplayIndex = 255;
+ Assert.AreEqual (255, colA.DisplayIndex, "#C1");
+ Assert.AreEqual (-1, colB.DisplayIndex, "#C2");
+ Assert.AreEqual (0, colC.DisplayIndex, "#C3");
+ }
+
+ [Test]
+ public void DisplayIndex_ListView_NotCreated ()
+ {
+ ColumnHeader colA = new ColumnHeader ();
+ colA.DisplayIndex = -66;
+ Assert.AreEqual (-66, colA.DisplayIndex, "#A1");
+ colA.DisplayIndex = 66;
+ Assert.AreEqual (66, colA.DisplayIndex, "#A2");
+
+ ColumnHeader colB = new ColumnHeader ();
+ colB.DisplayIndex = 0;
+ Assert.AreEqual (0, colB.DisplayIndex, "#A3");
+
+ ColumnHeader colC = new ColumnHeader ();
+ colC.DisplayIndex = 1;
+ Assert.AreEqual (1, colC.DisplayIndex, "#A4");
+
+ ListView lv = new ListView ();
+ lv.ColumnReordered += new ColumnReorderedEventHandler (ColumnReordered);
+ lv.View = View.Details;
+ lv.Columns.Add (colA);
+ lv.Columns.Add (colB);
+ lv.Columns.Add (colC);
+
+ try {
+ colA.DisplayIndex = -1;
+ Assert.Fail ("#B1");
+ } catch (ArgumentOutOfRangeException ex) {
+ Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
+ Assert.IsNull (ex.InnerException, "#B3");
+ Assert.IsNotNull (ex.Message, "#B4");
+ Assert.IsNotNull (ex.ParamName, "#B5");
+ Assert.AreEqual ("DisplayIndex", ex.ParamName, "#B6");
+ }
+
+ try {
+ colA.DisplayIndex = lv.Columns.Count;
+ Assert.Fail ("#C1");
+ } catch (ArgumentOutOfRangeException ex) {
+ Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
+ Assert.IsNull (ex.InnerException, "#C3");
+ Assert.IsNotNull (ex.Message, "#C4");
+ Assert.IsNotNull (ex.ParamName, "#C5");
+ Assert.AreEqual ("DisplayIndex", ex.ParamName, "#C6");
+ }
+
+ Assert.AreEqual (0, colA.DisplayIndex, "#D1");
+ Assert.AreEqual (1, colB.DisplayIndex, "#D2");
+ Assert.AreEqual (2, colC.DisplayIndex, "#D3");
+ Assert.AreEqual (0, columnReordered, "#D4");
}
[Test]
col.Width = 10;
Assert.AreEqual (10, col.Width);
}
+
+#if NET_2_0
+ public void ColumnReordered (object sender, ColumnReorderedEventArgs e)
+ {
+ columnReordered++;
+ }
+
+ private int columnReordered;
+#endif
}
}
-#if NET_2_0
// This test is designed to find exactly what conditions cause the control's
// Handle to be created.
using System;
Assert.IsFalse (c.IsHandleCreated, "A5");
// If we don't reset the control, handle creation will fail
// because AllowDrop requires STAThread, which Nunit doesn't do
- c = new Control();
+ c = new Control();
o = c.Anchor;
c.Anchor = AnchorStyles.Right;
Assert.IsFalse (c.IsHandleCreated, "A6");
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
o = c.AutoScrollOffset;
c.AutoScrollOffset = new Point (40, 40);
Assert.IsFalse (c.IsHandleCreated, "A7");
#endif
+#if NET_2_0
o = c.AutoSize;
c.AutoSize = true;
Assert.IsFalse (c.IsHandleCreated, "A8");
+#endif
// B
o = c.BackColor;
o = c.BackgroundImage;
c.BackgroundImage = new Bitmap (1, 1);
Assert.IsFalse (c.IsHandleCreated, "A10");
+#if NET_2_0
o = c.BackgroundImageLayout;
c.BackgroundImageLayout = ImageLayout.Stretch;
Assert.IsFalse (c.IsHandleCreated, "A11");
+#endif
o = c.BindingContext;
c.BindingContext = new BindingContext ();
Assert.IsFalse (c.IsHandleCreated, "A12");
o = c.ContextMenu;
c.ContextMenu = new ContextMenu ();
Assert.IsFalse (c.IsHandleCreated, "A24");
+#if NET_2_0
o = c.ContextMenuStrip;
c.ContextMenuStrip = new ContextMenuStrip ();
Assert.IsFalse (c.IsHandleCreated, "A25");
+#endif
o = c.Controls;
Assert.IsFalse (c.IsHandleCreated, "A26");
o = c.Created;
Assert.IsFalse (c.IsHandleCreated, "A42");
o = c.IsDisposed;
Assert.IsFalse (c.IsHandleCreated, "A43");
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
o = c.IsMirrored;
Assert.IsFalse (c.IsHandleCreated, "A44");
#endif
+#if NET_2_0
o = c.LayoutEngine;
Assert.IsFalse (c.IsHandleCreated, "A45");
+#endif
o = c.Left;
c.Left = 15;
Assert.IsFalse (c.IsHandleCreated, "A46");
Assert.IsFalse (c.IsHandleCreated, "A47");
// M - N
+#if NET_2_0
o = c.Margin;
c.Margin = new Padding (6);
Assert.IsFalse (c.IsHandleCreated, "A48");
o = c.MinimumSize;
c.MinimumSize = new Size (100, 100);
Assert.IsFalse (c.IsHandleCreated, "A50");
+#endif
o = c.Name;
c.Name = "web";
Assert.IsFalse (c.IsHandleCreated, "A51");
// P - R
+#if NET_2_0
o = c.Padding;
c.Padding = new Padding (4);
Assert.IsFalse (c.IsHandleCreated, "A52");
+#endif
o = c.Parent;
c.Parent = new Control ();
Assert.IsFalse (c.IsHandleCreated, "A53");
+#if NET_2_0
o = c.PreferredSize;
Assert.IsFalse (c.IsHandleCreated, "A54");
+#endif
o = c.ProductName;
Assert.IsFalse (c.IsHandleCreated, "A55");
o = c.ProductVersion;
Assert.IsFalse (c.IsHandleCreated, "A66");
o = c.TopLevelControl;
Assert.IsFalse (c.IsHandleCreated, "A67");
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
o = c.UseWaitCursor;
c.UseWaitCursor = true;
Assert.IsFalse (c.IsHandleCreated, "A68");
ProtectedPropertyControl c = new ProtectedPropertyControl ();
object o;
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
o = c.PublicCanRaiseEvents;
Assert.IsFalse (c.IsHandleCreated, "A1");
#endif
o = c.PublicCreateParams;
Assert.IsFalse (c.IsHandleCreated, "A2");
+#if NET_2_0
o = c.PublicDefaultCursor;
Assert.IsFalse (c.IsHandleCreated, "A3");
+#endif
o = c.PublicDefaultImeMode;
Assert.IsFalse (c.IsHandleCreated, "A4");
+#if NET_2_0
o = c.PublicDefaultMargin;
Assert.IsFalse (c.IsHandleCreated, "A5");
o = c.PublicDefaultMaximumSize;
o = c.PublicDoubleBuffered;
c.PublicDoubleBuffered = !c.PublicDoubleBuffered;
Assert.IsFalse (c.IsHandleCreated, "A10");
+#endif
o = c.PublicFontHeight;
c.PublicFontHeight = c.PublicFontHeight + 1;
Assert.IsFalse (c.IsHandleCreated, "A11");
o = c.PublicResizeRedraw;
c.PublicResizeRedraw = !c.PublicResizeRedraw;
Assert.IsFalse (c.IsHandleCreated, "A13");
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
o = c.PublicScaleChildren;
Assert.IsFalse (c.IsHandleCreated, "A14");
#endif
Assert.IsFalse (c.IsHandleCreated, "A11");
c.GetNextControl (new Control (), true);
Assert.IsFalse (c.IsHandleCreated, "A12");
+#if NET_2_0
c.GetPreferredSize (Size.Empty);
Assert.IsFalse (c.IsHandleCreated, "A13");
+#endif
c.Hide ();
Assert.IsFalse (c.IsHandleCreated, "A14");
c.Invalidate ();
Assert.IsFalse (c.IsHandleCreated, "A31");
c.ResumeLayout ();
Assert.IsFalse (c.IsHandleCreated, "A32");
+#if NET_2_0
c.Scale (new SizeF (1.5f, 1.5f));
Assert.IsFalse (c.IsHandleCreated, "A33");
+#endif
c.Select ();
Assert.IsFalse (c.IsHandleCreated, "A34");
c.SelectNextControl (new Control (), true, true, true, true);
{
Control c = new Control ();
Assert.IsFalse (c.IsHandleCreated, "A1");
- c.HandleCreated += delegate (object sender, EventArgs e) { Console.WriteLine (Environment.StackTrace); };
+ c.HandleCreated += new EventHandler (HandleCreated_WriteStackTrace);
c.Show ();
Assert.IsFalse (c.IsHandleCreated, "A2");
}
+ void HandleCreated_WriteStackTrace (object sender, EventArgs e)
+ {
+ Console.WriteLine (Environment.StackTrace);
+ }
+
public delegate void InvokeDelegate ();
public void InvokeMethod () { invokecontrol.Text = "methodinvoked"; }
private class ProtectedPropertyControl : Control
{
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
public bool PublicCanRaiseEvents { get { return base.CanRaiseEvents; } }
#endif
public CreateParams PublicCreateParams { get { return base.CreateParams; } }
+#if NET_2_0
public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }
+#endif
public ImeMode PublicDefaultImeMode { get { return base.DefaultImeMode; } }
+#if NET_2_0
public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }
public Size PublicDefaultMaximumSize { get { return base.DefaultMaximumSize; } }
public Size PublicDefaultMinimumSize { get { return base.DefaultMinimumSize; } }
public Padding PublicDefaultPadding { get { return base.DefaultPadding; } }
public Size PublicDefaultSize { get { return base.DefaultSize; } }
public bool PublicDoubleBuffered { get { return base.DoubleBuffered; } set { base.DoubleBuffered = value; } }
+#endif
public int PublicFontHeight { get { return base.FontHeight; } set { base.FontHeight = value; } }
public bool PublicRenderRightToLeft { get { return base.RenderRightToLeft; } }
public bool PublicResizeRedraw { get { return base.ResizeRedraw; } set { base.ResizeRedraw = value; } }
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
public bool PublicScaleChildren { get { return base.ScaleChildren; } }
#endif
public bool PublicShowFocusCues { get { return base.ShowFocusCues; } }
ProtectedMethodsControl c = new ProtectedMethodsControl ();
c.PublicAccessibilityNotifyClients (AccessibleEvents.Focus, 0);
+#if NET_2_0
Assert.IsFalse (c.IsHandleCreated, "A1");
+#else
+ Assert.IsTrue (c.IsHandleCreated, "A1");
+#endif
c.PublicCreateAccessibilityInstance ();
Assert.IsTrue (c.IsHandleCreated, "A2");
c = new ProtectedMethodsControl ();
c.PublicDestroyHandle ();
Assert.IsFalse (c.IsHandleCreated, "A5");
c = new ProtectedMethodsControl ();
+#if NET_2_0
c.PublicGetAccessibilityObjectById (0);
Assert.IsFalse (c.IsHandleCreated, "A6");
-#if !__MonoCS__
+#endif
+#if !__MonoCS__ && NET_2_0
c.PublicGetAutoSizeMode ();
Assert.IsFalse (c.IsHandleCreated, "A7");
c.PublicGetScaledBounds (new Rectangle (0, 0, 100, 100), new SizeF (1.5f, 1.5f), BoundsSpecified.All);
Assert.IsFalse (c.IsHandleCreated, "A18");
c.PublicNotifyInvalidate (Rectangle.Empty);
Assert.IsFalse (c.IsHandleCreated, "A19");
- c.PublicRaiseDragEvent (null, null);
+ Form f = new Form ();
+ f.Controls.Add (c);
+ c.PublicOnVisibleChanged (EventArgs.Empty);
Assert.IsFalse (c.IsHandleCreated, "A20");
- c.PublicRaiseKeyEvent (null, null);
+ c = new ProtectedMethodsControl ();
+ c.PublicRaiseDragEvent (null, null);
Assert.IsFalse (c.IsHandleCreated, "A21");
- c.PublicRaiseMouseEvent (null, null);
+ c.PublicRaiseKeyEvent (null, null);
Assert.IsFalse (c.IsHandleCreated, "A22");
- c.PublicRaisePaintEvent (null, null);
+ c.PublicRaiseMouseEvent (null, null);
Assert.IsFalse (c.IsHandleCreated, "A23");
- c.PublicRecreateHandle ();
+ c.PublicRaisePaintEvent (null, null);
Assert.IsFalse (c.IsHandleCreated, "A24");
- c.PublicResetMouseEventArgs ();
+ c.PublicRecreateHandle ();
Assert.IsFalse (c.IsHandleCreated, "A25");
- c.PublicRtlTranslateAlignment (ContentAlignment.BottomLeft);
+ c.PublicResetMouseEventArgs ();
Assert.IsFalse (c.IsHandleCreated, "A26");
- c.PublicRtlTranslateContent (ContentAlignment.BottomLeft);
+ c.PublicRtlTranslateAlignment (ContentAlignment.BottomLeft);
Assert.IsFalse (c.IsHandleCreated, "A27");
- c.PublicRtlTranslateHorizontal (HorizontalAlignment.Left);
+ c.PublicRtlTranslateContent (ContentAlignment.BottomLeft);
Assert.IsFalse (c.IsHandleCreated, "A28");
- c.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);
+ c.PublicRtlTranslateHorizontal (HorizontalAlignment.Left);
Assert.IsFalse (c.IsHandleCreated, "A29");
-#if !__MonoCS__
- c.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);
+ c.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);
Assert.IsFalse (c.IsHandleCreated, "A30");
+#if !__MonoCS__ && NET_2_0
+ c.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);
+ Assert.IsFalse (c.IsHandleCreated, "A31");
#endif
c.PublicScaleCore (1.5f, 1.5f);
- Assert.IsFalse (c.IsHandleCreated, "A31");
- c.PublicSelect ();
Assert.IsFalse (c.IsHandleCreated, "A32");
-#if !__MonoCS__
- c.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);
+ c.PublicSelect ();
Assert.IsFalse (c.IsHandleCreated, "A33");
+#if !__MonoCS__ && NET_2_0
+ c.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);
+ Assert.IsFalse (c.IsHandleCreated, "A34");
#endif
c.PublicSetBoundsCore (0, 0, 100, 100, BoundsSpecified.All);
- Assert.IsFalse (c.IsHandleCreated, "A34");
- c.PublicSetClientSizeCore (122, 122);
Assert.IsFalse (c.IsHandleCreated, "A35");
- c.PublicSetStyle (ControlStyles.FixedHeight, true);
+ c.PublicSetClientSizeCore (122, 122);
Assert.IsFalse (c.IsHandleCreated, "A36");
+ c.PublicSetStyle (ControlStyles.FixedHeight, true);
+ Assert.IsFalse (c.IsHandleCreated, "A37");
c.PublicSetTopLevel (true);
- Assert.IsTrue (c.IsHandleCreated, "A37");
+ Assert.IsTrue (c.IsHandleCreated, "A38");
c = new ProtectedMethodsControl ();
c.PublicSetVisibleCore (true);
- Assert.IsFalse (c.IsHandleCreated, "A38");
- c.PublicSizeFromClientSize (new Size (160, 160));
Assert.IsFalse (c.IsHandleCreated, "A39");
- c.PublicUpdateBounds ();
+#if NET_2_0
+ c.PublicSizeFromClientSize (new Size (160, 160));
Assert.IsFalse (c.IsHandleCreated, "A40");
- c.PublicUpdateStyles ();
+#endif
+ c.PublicUpdateBounds ();
Assert.IsFalse (c.IsHandleCreated, "A41");
- c.PublicUpdateZOrder ();
+ c.PublicUpdateStyles ();
Assert.IsFalse (c.IsHandleCreated, "A42");
+ c.PublicUpdateZOrder ();
+ Assert.IsFalse (c.IsHandleCreated, "A43");
}
private class ProtectedMethodsControl : Control
public void PublicCreateControlsInstance () { base.CreateControlsInstance (); }
public void PublicCreateHandle () { base.CreateHandle (); }
public void PublicDestroyHandle () { base.DestroyHandle (); }
+#if NET_2_0
public AccessibleObject PublicGetAccessibilityObjectById (int objectId) { return base.GetAccessibilityObjectById (objectId); }
-#if !__MonoCS__
+#endif
+#if !__MonoCS__ && NET_2_0
public AutoSizeMode PublicGetAutoSizeMode () { return base.GetAutoSizeMode (); }
public Rectangle PublicGetScaledBounds (Rectangle bounds, SizeF factor, BoundsSpecified specified) { return base.GetScaledBounds (bounds, factor, specified); }
#endif
public bool PublicIsInputChar (char charCode) { return base.IsInputChar (charCode); }
public bool PublicIsInputKey (Keys keyData) { return base.IsInputKey (keyData); }
public void PublicNotifyInvalidate (Rectangle invalidatedArea) { base.NotifyInvalidate (invalidatedArea); }
+ public void PublicOnVisibleChanged (EventArgs e) { base.OnVisibleChanged (e); }
public void PublicRaiseDragEvent (Object key, DragEventArgs e) { base.RaiseDragEvent (key, e); }
public void PublicRaiseKeyEvent (Object key, KeyEventArgs e) { base.RaiseKeyEvent (key, e); }
public void PublicRaiseMouseEvent (Object key, MouseEventArgs e) { base.RaiseMouseEvent (key, e); }
public ContentAlignment PublicRtlTranslateContent (ContentAlignment align) { return base.RtlTranslateContent (align); }
public HorizontalAlignment PublicRtlTranslateHorizontal (HorizontalAlignment align) { return base.RtlTranslateHorizontal (align); }
public LeftRightAlignment PublicRtlTranslateLeftRight (LeftRightAlignment align) { return base.RtlTranslateLeftRight (align); }
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
public void PublicScaleControl (SizeF factor, BoundsSpecified specified) { base.ScaleControl (factor, specified); }
#endif
public void PublicScaleCore (float dx, float dy) { base.ScaleCore (dx, dy); }
public void PublicSelect () { base.Select (); }
-#if !__MonoCS__
+#if !__MonoCS__ && NET_2_0
public void PublicSetAutoSizeMode (AutoSizeMode mode) { base.SetAutoSizeMode (mode); }
#endif
public void PublicSetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) { base.SetBoundsCore (x, y, width, height, specified); }
public void PublicSetStyle (ControlStyles flag, bool value) { base.SetStyle (flag, value); }
public void PublicSetTopLevel (bool value) { base.SetTopLevel (value); }
public void PublicSetVisibleCore (bool value) { base.SetVisibleCore (value); }
+#if NET_2_0
public Size PublicSizeFromClientSize (Size clientSize) { return base.SizeFromClientSize (clientSize); }
+#endif
public void PublicUpdateBounds () { base.UpdateBounds (); }
public void PublicUpdateStyles () { base.UpdateStyles (); }
public void PublicUpdateZOrder () { base.UpdateZOrder (); }
}
}
}
-#endif
}
[Test]
- public void CreateHandleTest ()
- {
- Control parent;
- Control child;
-
- parent = null;
- child = null;
-
- try {
- parent = new Control ();
- child = new Control ();
-
- parent.Visible = true;
- parent.Controls.Add (child);
-
- Assert.IsFalse (parent.IsHandleCreated, "CH1");
- Assert.IsFalse (child.IsHandleCreated, "CH2");
-
- parent.CreateControl ();
- Assert.IsNotNull (parent.Handle, "CH3");
- Assert.IsNotNull (child.Handle, "CH4");
- Assert.IsTrue (parent.IsHandleCreated, "CH5");
- Assert.IsTrue (child.IsHandleCreated, "CH6");
- } finally {
- if (parent != null)
- parent.Dispose ();
- if (child != null)
- child.Dispose ();
- }
-
- // Accessing Handle Property creates the handle
- try {
- parent = new Control ();
- parent.Visible = true;
- child = new Control ();
- parent.Controls.Add (child);
- Assert.IsFalse (parent.IsHandleCreated, "CH7");
- Assert.IsFalse (child.IsHandleCreated, "CH8");
- Assert.IsNotNull (parent.Handle, "CH9");
- Assert.IsTrue (parent.IsHandleCreated, "CH10");
- Assert.IsTrue (child.IsHandleCreated, "CH11");
- } finally {
- if (parent != null)
- parent.Dispose ();
- if (child != null)
- child.Dispose ();
- }
- }
-
- [Test]
- [Category ("NotWorking")]
- public void CreateHandleTest2 ()
- {
- // This should eventually test all operations
- // that can be performed on a control (within
- // reason)
- Control c = new Control ();
-
- Assert.IsFalse (c.IsHandleCreated, "0");
-
- c.Width = 100;
- Assert.IsFalse (c.IsHandleCreated, "1");
-
- c.Height = 100;
- Assert.IsFalse (c.IsHandleCreated, "2");
-
- c.Name = "hi";
- Assert.IsFalse (c.IsHandleCreated, "3");
-
- c.Left = 5;
- Assert.IsFalse (c.IsHandleCreated, "5");
-
- c.Top = 5;
- Assert.IsFalse (c.IsHandleCreated, "6");
-
- c.Location = new Point (1, 1);
- Assert.IsFalse (c.IsHandleCreated, "7");
-
- c.Region = new Region ();
- Assert.IsFalse (c.IsHandleCreated, "8");
-
- c.Size = new Size (100, 100);
- Assert.IsFalse (c.IsHandleCreated, "9");
-
- c.Text = "bye";
- Assert.IsFalse (c.IsHandleCreated, "10");
-
- c.Visible = !c.Visible;
- Assert.IsFalse (c.IsHandleCreated, "11");
- }
-
- [Test]
- [Category ("NotWorking")]
public void IsHandleCreated_NotVisible ()
{
Control c = new Control ();
Assert.IsTrue (c.IsHandleCreated, "#3");
}
+ class OnCreateControlTest : Control {
+ public bool reached = false;
+ protected override void OnCreateControl () {
+ reached = true;
+ }
+ }
+
+ [Test]
+ public void CreateControlVisibleTest ()
+ {
+ OnCreateControlTest test = new OnCreateControlTest ();
+ test.Visible = false;
+ Assert.IsFalse (test.IsHandleCreated, "0");
+ Assert.IsFalse (test.Visible, "1");
+ test.Visible = true;
+ Assert.IsTrue (test.Visible, "2");
+ Assert.IsTrue (test.reached, "3");
+ }
+
+
[Test]
public void CreateGraphicsTest ()
{
((Control) sender).Tag = false;
}
+#if NET_2_0
+ [Test] // bug #80621, #81125
+ public void DontCallSizeFromClientSize ()
+ {
+ SizeControl sc = new SizeControl ();
+
+ Assert.AreEqual (0, sc.size_from_client_size_count, "A1");
+
+ sc.ClientSize = new Size (300, 300);
+ Assert.AreEqual (0, sc.size_from_client_size_count, "A2");
+
+ SizeForm sf = new SizeForm ();
+ sf.ShowInTaskbar = false;
+ sf.Show ();
+
+ Assert.AreEqual (0, sc.size_from_client_size_count, "A3");
+
+ sc.ClientSize = new Size (300, 300);
+ Assert.AreEqual (0, sc.size_from_client_size_count, "A4");
+
+ sf.Dispose ();
+ }
+
+ private class SizeControl : Control
+ {
+ public int size_from_client_size_count = 0;
+
+ protected override Size SizeFromClientSize (Size clientSize)
+ {
+ size_from_client_size_count++;
+ return base.SizeFromClientSize (clientSize);
+ }
+ }
+
+ private class SizeForm : Form
+ {
+ public int size_from_client_size_count = 0;
+
+ protected override Size SizeFromClientSize (Size clientSize)
+ {
+ size_from_client_size_count++;
+ return base.SizeFromClientSize (clientSize);
+ }
+ }
+#endif
+
public class MockControl : Control
{
public int font_height {
}
[TestFixture]
+ [Category ("NotWorking")]
public class ControlInvokeTest {
public delegate void TestDelegate ();
Thread control_t;
ApplicationContext control_context;
bool delegateCalled = false;
+ bool threadDied = false;
object m;
void CreateControl ()
{
+ try {
f = new Form ();
f.ShowInTaskbar = false;
Console.WriteLine ("control thread running");
Application.Run (control_context);
c.Dispose ();
+ Console.WriteLine ("dying");
+ threadDied = true;
+ Monitor.Enter (m);
+ Console.WriteLine ("pulsing again");
+ Monitor.Pulse (m);
+ Monitor.Exit (m);
+ } catch (Exception e) { Console.WriteLine (e); }
}
[Test]
result = c.BeginInvoke (new TestDelegate (delegate_call));
c.EndInvoke (result);
- Assert.AreEqual (true, delegateCalled, "Invoke1");
+ Assert.IsTrue (delegateCalled, "Invoke1");
+
+ Monitor.Wait (m);
+ Assert.IsTrue (threadDied, "Invoke2");
}
public void delegate_call () {
+ try {
/* invoked on control_context's thread */
delegateCalled = true;
f.Dispose ();
- Application.Exit ();
+ Console.WriteLine ("calling Application.Exit");
+ control_context.ExitThread ();
+ } catch (Exception e) { Console.WriteLine (e); }
}
}
public void DockChanged_Handler (object sender, EventArgs e)
{
event_raised += "DockStyleChanged";
+ }\r
+\r
+ [Test] // bug #80917\r
+ public void BehaviorOverriddenDisplayRectangle ()\r
+ {\r
+ Control c = new Control ();\r
+ c.Anchor |= AnchorStyles.Bottom;\r
+ c.Size = new Size (100, 100);\r
+\r
+ Form f = new DisplayRectangleForm ();\r
+ f.Controls.Add (c);\r
+ f.ShowInTaskbar = false;\r
+ f.Show ();\r
+ \r
+ Assert.AreEqual (new Size (100, 100), c.Size, "A1");\r
+ \r
+ f.Dispose ();\r
+ }\r
+\r
+ private class DisplayRectangleForm : Form\r
+ {\r
+ public override Rectangle DisplayRectangle\r
+ {\r
+ get { return Rectangle.Empty; }\r
+ }\r
}
}
[Test]
public void TestDockFillFirst ()
{
- Form f = new Form ();
+ Form f = new Form ();\r
+ f.ShowInTaskbar = false;\r
Panel b1 = new Panel ();
Panel b2 = new Panel ();
[Test]
public void TestDockFillLast ()
{
- Form f = new Form ();
+ Form f = new Form ();\r
+ f.ShowInTaskbar = false;\r
Panel b1 = new Panel ();
Panel b2 = new Panel ();
[TestFixture]
public class ErrorProviderTest
{
-
[Test]
public void ErrorProviderPropertyTest ()
- {
+ {
ErrorProvider myErrorProvider = new ErrorProvider ();
-
+
// B
Assert.AreEqual (250, myErrorProvider.BlinkRate, "#B1");
Assert.AreEqual (ErrorBlinkStyle.BlinkIfDifferentError, myErrorProvider.BlinkStyle, "#B2");
-
+
// C
Assert.AreEqual (null, myErrorProvider.ContainerControl, "#C1");
// S
Assert.AreEqual (null, myErrorProvider.Site, "#S1");
}
-
+
[Test]
public void BindToDateAndErrorsTest ()
{
Assert.AreEqual (myDataSet, myErrorProvider.DataSource, "#Bind1");
Assert.AreEqual ("Customers", myErrorProvider.DataMember, "#Bind2");
}
-
+
[Test]
public void CanExtendTest ()
{
Assert.AreEqual (myErrorProvider.CanExtend (myForm), false, "#ext3");
myForm.Dispose ();
}
-
+
[Test]
+ [Category ("NotWorking")]
public void GetandSetErrorTest ()
{
Form myForm = new Form ();
myForm.ShowInTaskbar = false;
- Label myLabel = new Label ();
+ Label label1 = new Label ();
+ Label label2 = new Label ();
ErrorProvider myErrorProvider = new ErrorProvider ();
- myErrorProvider.SetError(myLabel, "New Error msg for Label");
- Assert.AreEqual ("New Error msg for Label", myErrorProvider.GetError (myLabel), "#getset1");
+ Assert.AreEqual (string.Empty, myErrorProvider.GetError (label1), "#1");
+ myErrorProvider.SetError (label1, "ErrorMsg1");
+ Assert.AreEqual ("ErrorMsg1", myErrorProvider.GetError (label1), "#2");
+ Assert.AreEqual (string.Empty, myErrorProvider.GetError (label2), "#3");
+ myErrorProvider.SetError (label2, "ErrorMsg2");
+ Assert.AreEqual ("ErrorMsg2", myErrorProvider.GetError (label2), "#4");
+ myErrorProvider.SetError (label2, null);
+ Assert.AreEqual ("ErrorMsg1", myErrorProvider.GetError (label1), "#5");
+ Assert.AreEqual (string.Empty, myErrorProvider.GetError (label2), "#6");
myForm.Dispose ();
}
-
+
[Test]
+ [Category ("NotWorking")]
public void GetandSetIconAlignmentTest ()
{
TextBox myTextBox = new TextBox ();
myErrorProvider.SetIconAlignment (myTextBox, ErrorIconAlignment.MiddleRight);
Assert.AreEqual (ErrorIconAlignment.MiddleRight, myErrorProvider.GetIconAlignment (myTextBox), "#getset2");
}
-
+
[Test]
+ [Category ("NotWorking")]
public void GetandSetIconPaddingTest ()
{
Form myForm = new Form ();
[Test]
public void EnterLeaveFocusEventTest ()
{
+ if (RunningOnUnix) {
+ Assert.Ignore ("Relies on form.Show() synchronously generating WM_ACTIVATE");
+ }
+
Form f = new Form();
f.ShowInTaskbar = false;
--- /dev/null
+//\r
+// FormTest.cs: Test cases for Form.\r
+//\r
+// Author:\r
+// Ritvik Mayank (mritvik@novell.com)\r
+//\r
+// (C) 2005 Novell, Inc. (http://www.novell.com)\r
+//\r
+\r
+using System;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Reflection;\r
+using System.Windows.Forms;\r
+\r
+using NUnit.Framework;\r
+\r
+using CategoryAttribute = NUnit.Framework.CategoryAttribute;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+ \r
+ [TestFixture]\r
+ [Category ("NotWorking")]\r
+ public class FormHandleTest\r
+ {\r
+ [Test]\r
+ public void TestConstructors ()\r
+ {\r
+ Form c = new Form ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A1");\r
+ }\r
+\r
+ [Test]\r
+ public void TestPublicProperties ()\r
+ {\r
+ // This long, carpal-tunnel syndrome inducing test shows us that\r
+ // the following properties cause the Handle to be created:\r
+ // - AccessibilityObject [get]\r
+ // - Capture [set]\r
+ // - Handle [get]\r
+ // - Visible [set]\r
+ \r
+ Form c = new Form ();\r
+ // A\r
+ object o = c.AccessibilityObject;\r
+ Assert.IsTrue (c.IsHandleCreated, "A0");\r
+ c = new Form ();\r
+ o = c.AccessibleDefaultActionDescription;\r
+ c.AccessibleDefaultActionDescription = "playdoh";\r
+ Assert.IsFalse (c.IsHandleCreated, "A1");\r
+ o = c.AccessibleDescription;\r
+ c.AccessibleDescription = "more playdoh!";\r
+ Assert.IsFalse (c.IsHandleCreated, "A2");\r
+ o = c.AccessibleName;\r
+ c.AccessibleName = "playdoh fun factory";\r
+ Assert.IsFalse (c.IsHandleCreated, "A3");\r
+ o = c.AccessibleRole;\r
+ c.AccessibleRole = AccessibleRole.Border;\r
+ Assert.IsFalse (c.IsHandleCreated, "A4");\r
+ o = c.AllowDrop;\r
+ c.AllowDrop = true;\r
+ Assert.IsFalse (c.IsHandleCreated, "A5");\r
+ // If we don't reset the control, handle creation will fail\r
+ // because AllowDrop requires STAThread, which Nunit doesn't do\r
+ c = new Form ();\r
+ o = c.Anchor;\r
+ c.Anchor = AnchorStyles.Right;\r
+ Assert.IsFalse (c.IsHandleCreated, "A6");\r
+#if !__MonoCS__ && NET_2_0\r
+ o = c.AutoScrollOffset;\r
+ c.AutoScrollOffset = new Point (40, 40);\r
+ Assert.IsFalse (c.IsHandleCreated, "A7");\r
+#endif\r
+#if NET_2_0\r
+ o = c.AutoSize;\r
+ c.AutoSize = true;\r
+ Assert.IsFalse (c.IsHandleCreated, "A8");\r
+#endif\r
+\r
+ // A - Form \r
+ o = c.AcceptButton;\r
+ c.AcceptButton = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA1");\r
+ \r
+ o = c.ActiveControl;\r
+ c.ActiveControl = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA2");\r
+ \r
+ o = c.ActiveMdiChild;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA3");\r
+ \r
+ o = c.AllowTransparency;\r
+ c.AllowTransparency = !c.AllowTransparency;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA4");\r
+\r
+#if NET_2_0\r
+ o = c.AutoScaleDimensions;\r
+ c.AutoScaleDimensions = SizeF.Empty;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA5");\r
+ \r
+ o = c.AutoScaleMode;\r
+ c.AutoScaleMode = AutoScaleMode.Dpi;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA6");\r
+#endif\r
+ o = c.AutoScroll;\r
+ c.AutoScroll = !c.AutoScroll;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA7");\r
+ \r
+ o = c.AutoScrollMargin;\r
+ c.AutoScrollMargin = new Size (c.AutoScrollMargin.Width + 1, c.AutoScrollMargin.Height + 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FA8");\r
+ \r
+ o = c.AutoScrollMinSize;\r
+ c.AutoScrollMinSize = new Size (c.AutoScrollMinSize.Width + 1, c.AutoScrollMinSize.Height + 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FA9");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ o = c.AutoScrollOffset;\r
+ c.AutoScrollOffset = new Point (c.AutoScrollOffset.X + 1, c.AutoScrollOffset.Y + 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FA10"); \r
+#endif\r
+ \r
+ o = c.AutoScrollPosition;\r
+ c.AutoScrollPosition = new Point (c.AutoScrollPosition.X + 1, c.AutoScrollPosition.Y + 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FA11");\r
+#if NET_2_0\r
+\r
+ o = c.AutoSize;\r
+ c.AutoSize = !c.AutoSize;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA12"); \r
+#if !__MonoCS__\r
+ o = c.AutoSizeMode;\r
+ c.AutoSizeMode = AutoSizeMode.GrowAndShrink;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA13");\r
+#endif \r
+ o = c.AutoValidate;\r
+ c.AutoValidate = AutoValidate.EnableAllowFocusChange;\r
+ Assert.IsFalse (c.IsHandleCreated, "FA14");\r
+\r
+#endif\r
+ // B\r
+ o = c.BackColor;\r
+ c.BackColor = Color.Green;\r
+ Assert.IsFalse (c.IsHandleCreated, "A9");\r
+ o = c.BackgroundImage;\r
+ c.BackgroundImage = new Bitmap (1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "A10");\r
+#if NET_2_0\r
+ o = c.BackgroundImageLayout;\r
+ c.BackgroundImageLayout = ImageLayout.Stretch;\r
+ Assert.IsFalse (c.IsHandleCreated, "A11");\r
+#endif\r
+ o = c.BindingContext;\r
+ c.BindingContext = new BindingContext ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A12");\r
+ o = c.Bottom;\r
+ Assert.IsFalse (c.IsHandleCreated, "A13");\r
+ o = c.Bounds;\r
+ c.Bounds = new Rectangle (0, 0, 12, 12);\r
+ Assert.IsFalse (c.IsHandleCreated, "A14");\r
+\r
+\r
+ // B - Form\r
+ o = c.BindingContext;\r
+ c.BindingContext = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FB1");\r
+ \r
+ // C\r
+ o = c.CanFocus;\r
+ Assert.IsFalse (c.IsHandleCreated, "A15");\r
+ o = c.CanSelect;\r
+ Assert.IsFalse (c.IsHandleCreated, "A16");\r
+ o = c.Capture;\r
+ Assert.IsFalse (c.IsHandleCreated, "A17a");\r
+ c.Capture = true;\r
+ Assert.IsTrue (c.IsHandleCreated, "A17b");\r
+ c = new Form ();\r
+ o = c.CausesValidation;\r
+ c.CausesValidation = false;\r
+ Assert.IsFalse (c.IsHandleCreated, "A18");\r
+ o = c.ClientRectangle;\r
+ Assert.IsFalse (c.IsHandleCreated, "A19");\r
+ o = c.ClientSize;\r
+ c.ClientSize = new Size (30, 30);\r
+ Assert.IsFalse (c.IsHandleCreated, "A20");\r
+ o = c.CompanyName;\r
+ Assert.IsFalse (c.IsHandleCreated, "A21");\r
+ o = c.Container;\r
+ Assert.IsFalse (c.IsHandleCreated, "A22");\r
+ o = c.ContainsFocus;\r
+ Assert.IsFalse (c.IsHandleCreated, "A23");\r
+ o = c.ContextMenu;\r
+ c.ContextMenu = new ContextMenu ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A24");\r
+#if NET_2_0\r
+ o = c.ContextMenuStrip;\r
+ c.ContextMenuStrip = new ContextMenuStrip ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A25");\r
+#endif\r
+ o = c.Controls;\r
+ Assert.IsFalse (c.IsHandleCreated, "A26");\r
+ o = c.Created;\r
+ Assert.IsFalse (c.IsHandleCreated, "A27");\r
+ o = c.Cursor;\r
+ c.Cursor = Cursors.Arrow;\r
+ Assert.IsFalse (c.IsHandleCreated, "A28");\r
+\r
+ // C - Form\r
+ o = c.CancelButton;\r
+ c.CancelButton = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FC1");\r
+ \r
+ o = c.ClientSize;\r
+ c.ClientSize = new Size (c.ClientSize.Width + 1, c.ClientSize.Height + 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FC2");\r
+ \r
+ o = c.Container;\r
+ Assert.IsFalse (c.IsHandleCreated, "FC3");\r
+ \r
+ o = c.ControlBox;\r
+ c.ControlBox = !c.ControlBox;\r
+ Assert.IsFalse (c.IsHandleCreated, "FC4");\r
+#if NET_2_0\r
+\r
+ o = c.CurrentAutoScaleDimensions;\r
+ Assert.IsFalse (c.IsHandleCreated, "FC5"); \r
+#endif\r
+\r
+ // D\r
+ o = c.DataBindings;\r
+ Assert.IsFalse (c.IsHandleCreated, "A29");\r
+ o = c.DisplayRectangle;\r
+ Assert.IsFalse (c.IsHandleCreated, "A30");\r
+ o = c.Disposing;\r
+ Assert.IsFalse (c.IsHandleCreated, "A31");\r
+ o = c.Dock;\r
+ c.Dock = DockStyle.Fill;\r
+ Assert.IsFalse (c.IsHandleCreated, "A32");\r
+\r
+ // D - Form\r
+ o = c.DataBindings;\r
+ Assert.IsFalse (c.IsHandleCreated, "FD6");\r
+ \r
+ o = c.DesktopBounds;\r
+ c.DesktopBounds = new Rectangle (3, 5, c.DesktopBounds.Width + 1, c.DesktopBounds.Height + 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FD7");\r
+ \r
+ o = c.DesktopLocation;\r
+ c.DesktopLocation = c.DesktopLocation + new Size (1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FD8");\r
+ \r
+ o = c.DialogResult;\r
+ c.DialogResult = DialogResult.Abort;\r
+ Assert.IsFalse (c.IsHandleCreated, "FD9");\r
+ \r
+ o = c.DisplayRectangle;\r
+ Assert.IsFalse (c.IsHandleCreated, "FD10");\r
+ \r
+ o = c.Disposing;\r
+ Assert.IsFalse (c.IsHandleCreated, "FD11");\r
+ \r
+ o = c.Dock;\r
+ c.Dock = DockStyle.Right;\r
+ Assert.IsFalse (c.IsHandleCreated, "FD12");\r
+\r
+ // E-H\r
+ o = c.Enabled;\r
+ c.Enabled = false;\r
+ Assert.IsFalse (c.IsHandleCreated, "A33");\r
+ c = new Form (); //Reset just in case enable = false affects things\r
+ o = c.Focused;\r
+ Assert.IsFalse (c.IsHandleCreated, "A34");\r
+ o = c.Font;\r
+ c.Font = new Font (c.Font, FontStyle.Bold);\r
+ Assert.IsFalse (c.IsHandleCreated, "A35");\r
+ o = c.ForeColor;\r
+ c.ForeColor = Color.Green;\r
+ Assert.IsFalse (c.IsHandleCreated, "A36");\r
+ o = c.Handle;\r
+ Assert.IsTrue (c.IsHandleCreated, "A37");\r
+ c = new Form ();\r
+ o = c.HasChildren;\r
+ Assert.IsFalse (c.IsHandleCreated, "A38");\r
+ o = c.Height;\r
+ c.Height = 12;\r
+ Assert.IsFalse (c.IsHandleCreated, "A39");\r
+\r
+ // E-H - Form\r
+ o = c.FormBorderStyle;\r
+ c.FormBorderStyle = FormBorderStyle.FixedToolWindow;\r
+ Assert.IsFalse (c.IsHandleCreated, "FF1");\r
+ \r
+ o = c.HelpButton;\r
+ c.HelpButton = !c.HelpButton;\r
+ Assert.IsFalse (c.IsHandleCreated, "FH1");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ o = c.HorizontalScroll;\r
+ Assert.IsFalse (c.IsHandleCreated, "FH2"); \r
+#endif\r
+ // I - L\r
+ c.ImeMode = ImeMode.On;\r
+ Assert.IsFalse (c.IsHandleCreated, "A40");\r
+ o = c.InvokeRequired;\r
+ Assert.IsFalse (c.IsHandleCreated, "A41");\r
+ o = c.IsAccessible;\r
+ Assert.IsFalse (c.IsHandleCreated, "A42");\r
+ o = c.IsDisposed;\r
+ Assert.IsFalse (c.IsHandleCreated, "A43");\r
+#if !__MonoCS__ && NET_2_0\r
+ o = c.IsMirrored;\r
+ Assert.IsFalse (c.IsHandleCreated, "A44");\r
+#endif\r
+#if NET_2_0\r
+ o = c.LayoutEngine;\r
+ Assert.IsFalse (c.IsHandleCreated, "A45");\r
+#endif\r
+ o = c.Left;\r
+ c.Left = 15;\r
+ Assert.IsFalse (c.IsHandleCreated, "A46");\r
+ o = c.Location;\r
+ c.Location = new Point (20, 20);\r
+ Assert.IsFalse (c.IsHandleCreated, "A47");\r
+\r
+ // I - L - Form\r
+ \r
+ o = c.Icon;\r
+ c.Icon = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FI1");\r
+ \r
+ o = c.IsMdiChild;\r
+ Assert.IsFalse (c.IsHandleCreated, "FI2");\r
+\r
+ o = c.IsMdiContainer;\r
+ c.IsMdiContainer = false;\r
+ Assert.IsFalse (c.IsHandleCreated, "FI3");\r
+ \r
+ o = c.IsRestrictedWindow;\r
+ Assert.IsFalse (c.IsHandleCreated, "FI4");\r
+ \r
+ o = c.KeyPreview;\r
+ c.KeyPreview = !c.KeyPreview;\r
+ Assert.IsFalse (c.IsHandleCreated, "FK1");\r
+ \r
+ o = c.Location;\r
+ c.Location = c.Location + new Size (1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FL1");\r
+ \r
+ \r
+ // M - N\r
+#if NET_2_0\r
+ o = c.Margin;\r
+ c.Margin = new Padding (6);\r
+ Assert.IsFalse (c.IsHandleCreated, "A48");\r
+ o = c.MaximumSize;\r
+ c.MaximumSize = new Size (500, 500);\r
+ Assert.IsFalse (c.IsHandleCreated, "A49");\r
+ o = c.MinimumSize;\r
+ c.MinimumSize = new Size (100, 100);\r
+ Assert.IsFalse (c.IsHandleCreated, "A50");\r
+#endif\r
+ o = c.Name;\r
+ c.Name = "web";\r
+ Assert.IsFalse (c.IsHandleCreated, "A51");\r
+\r
+#if NET_2_0\r
+ // M - O - Form\r
+ o = c.MainMenuStrip;\r
+ c.MainMenuStrip = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM1"); \r
+#endif\r
+ \r
+ o = c.MaximizeBox;\r
+ c.MaximizeBox = !c.MaximizeBox;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM2");\r
+ \r
+ o = c.MaximumSize;\r
+ c.MaximumSize = c.MaximumSize + new Size (1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FM3");\r
+ \r
+ o = c.MdiChildren;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM4");\r
+ \r
+ o = c.MdiParent;\r
+ c.MdiParent = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM5");\r
+ \r
+ o = c.Menu;\r
+ c.Menu = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM6");\r
+ \r
+ o = c.MergedMenu;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM7");\r
+ \r
+ o = c.MinimizeBox;\r
+ c.MinimizeBox = !c.MinimizeBox;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM8");\r
+ \r
+ o = c.MinimumSize;\r
+ c.MinimumSize = c.MinimumSize + new Size (1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FM9");\r
+ \r
+ o = c.Modal;\r
+ Assert.IsFalse (c.IsHandleCreated, "FM10");\r
+ \r
+ o = c.Opacity;\r
+ c.Opacity = 0.9;\r
+ Assert.IsFalse (c.IsHandleCreated, "FO1");\r
+ \r
+ o = c.OwnedForms;\r
+ Assert.IsFalse (c.IsHandleCreated, "FO2");\r
+ \r
+ o = c.Owner;\r
+ c.Owner = null;\r
+ Assert.IsFalse (c.IsHandleCreated, "FO3");\r
+ \r
+ // P - R\r
+#if NET_2_0\r
+ o = c.Padding;\r
+ c.Padding = new Padding (4);\r
+ Assert.IsFalse (c.IsHandleCreated, "A52");\r
+#endif\r
+ o = c.Parent;\r
+ c.TopLevel = false;\r
+ c.Parent = new Form ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A53");\r
+#if NET_2_0\r
+ o = c.PreferredSize;\r
+ Assert.IsFalse (c.IsHandleCreated, "A54");\r
+#endif\r
+ o = c.ProductName;\r
+ Assert.IsFalse (c.IsHandleCreated, "A55");\r
+ o = c.ProductVersion;\r
+ Assert.IsFalse (c.IsHandleCreated, "A56");\r
+ o = c.RecreatingHandle;\r
+ Assert.IsFalse (c.IsHandleCreated, "A57");\r
+ o = c.Region;\r
+ c.Region = new Region (new Rectangle (0, 0, 177, 177));\r
+ Assert.IsFalse (c.IsHandleCreated, "A58");\r
+ o = c.Right;\r
+ Assert.IsFalse (c.IsHandleCreated, "A59");\r
+ o = c.RightToLeft;\r
+ c.RightToLeft = RightToLeft.Yes;\r
+ Assert.IsFalse (c.IsHandleCreated, "A60");\r
+\r
+ // P - R - Form \r
+ o = c.ParentForm;\r
+ Assert.IsFalse (c.IsHandleCreated, "FP1");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ o = c.RestoreBounds;\r
+ Assert.IsFalse (c.IsHandleCreated, "FR1"); \r
+#endif\r
+ \r
+\r
+ // S - W\r
+ o = c.Site;\r
+ Assert.IsFalse (c.IsHandleCreated, "A61");\r
+ o = c.Size;\r
+ c.Size = new Size (188, 188);\r
+ Assert.IsFalse (c.IsHandleCreated, "A62");\r
+ o = c.TabIndex;\r
+ c.TabIndex = 5;\r
+ Assert.IsFalse (c.IsHandleCreated, "A63");\r
+ o = c.Tag;\r
+ c.Tag = "moooooooo";\r
+ Assert.IsFalse (c.IsHandleCreated, "A64");\r
+ o = c.Text;\r
+ c.Text = "meoooowww";\r
+ Assert.IsFalse (c.IsHandleCreated, "A65");\r
+ o = c.Top;\r
+ c.Top = 16;\r
+ Assert.IsFalse (c.IsHandleCreated, "A66");\r
+ o = c.TopLevelControl;\r
+ Assert.IsFalse (c.IsHandleCreated, "A67");\r
+#if !__MonoCS__ && NET_2_0\r
+ o = c.UseWaitCursor;\r
+ c.UseWaitCursor = true;\r
+ Assert.IsFalse (c.IsHandleCreated, "A68");\r
+#endif\r
+ o = c.Visible;\r
+ Assert.IsFalse (c.IsHandleCreated, "A69");\r
+ \r
+ c.Visible = true;\r
+ Assert.IsTrue (c.IsHandleCreated, "A69-b");\r
+ c = new Form ();\r
+ \r
+ o = c.Width;\r
+ c.Width = 190;\r
+ Assert.IsFalse (c.IsHandleCreated, "A70");\r
+ o = c.WindowTarget;\r
+ Assert.IsFalse (c.IsHandleCreated, "A71");\r
+\r
+ // S - W - Form\r
+\r
+#if NET_2_0\r
+ o = c.ShowIcon;\r
+ c.ShowIcon = !c.ShowIcon;\r
+ Assert.IsFalse (c.IsHandleCreated, "FS1"); \r
+#endif\r
+ \r
+ o = c.ShowInTaskbar;\r
+ c.ShowInTaskbar = !c.ShowInTaskbar;\r
+ Assert.IsFalse (c.IsHandleCreated, "FS2");\r
+ \r
+ o = c.Size;\r
+ c.Size = c.Size + new Size (1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "FS3");\r
+ \r
+ o = c.SizeGripStyle;\r
+ c.SizeGripStyle = SizeGripStyle.Show;\r
+ Assert.IsFalse (c.IsHandleCreated, "FS4");\r
+ \r
+ o = c.StartPosition;\r
+ c.StartPosition = FormStartPosition.Manual;\r
+ Assert.IsFalse (c.IsHandleCreated, "FS5");\r
+ \r
+ o = c.Text;\r
+ c.Text = "hooray!";\r
+ Assert.IsFalse (c.IsHandleCreated, "FT1");\r
+ \r
+ o = c.TopLevel;\r
+ c.TopLevel = !c.TopLevel;\r
+ Assert.IsFalse (c.IsHandleCreated, "FT2");\r
+ \r
+ o = c.TopMost;\r
+ c.TopMost = !c.TopMost;\r
+ Assert.IsFalse (c.IsHandleCreated, "FT3");\r
+ \r
+ o = c.TransparencyKey;\r
+ c.TransparencyKey = Color.BurlyWood;\r
+ Assert.IsFalse (c.IsHandleCreated, "FT4");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ o = c.VerticalScroll;\r
+ Assert.IsFalse (c.IsHandleCreated, "FV1"); \r
+#endif\r
+ \r
+ o = c.WindowState;\r
+ c.WindowState = FormWindowState.Maximized;\r
+ Assert.IsFalse (c.IsHandleCreated, "FW1");\r
+\r
+ TestHelper.RemoveWarning (o);\r
+ }\r
+\r
+ [Test]\r
+ public void TestProtectedProperties ()\r
+ {\r
+ // Not a surprise, but none of these cause handle creation.\r
+ // Included just to absolutely certain.\r
+ ProtectedPropertyForm c = new ProtectedPropertyForm ();\r
+\r
+ object o;\r
+#if !__MonoCS__ && NET_2_0\r
+ o = c.PublicCanRaiseEvents;\r
+ Assert.IsFalse (c.IsHandleCreated, "A1");\r
+#endif\r
+ o = c.PublicCreateParams;\r
+ Assert.IsFalse (c.IsHandleCreated, "A2");\r
+#if NET_2_0\r
+ o = c.PublicDefaultCursor;\r
+ Assert.IsFalse (c.IsHandleCreated, "A3");\r
+#endif\r
+ o = c.PublicDefaultImeMode;\r
+ Assert.IsFalse (c.IsHandleCreated, "A4");\r
+#if NET_2_0\r
+ o = c.PublicDefaultMargin;\r
+ Assert.IsFalse (c.IsHandleCreated, "A5");\r
+ o = c.PublicDefaultMaximumSize;\r
+ Assert.IsFalse (c.IsHandleCreated, "A6");\r
+ o = c.PublicDefaultMinimumSize;\r
+ Assert.IsFalse (c.IsHandleCreated, "A7");\r
+ o = c.PublicDefaultPadding;\r
+ Assert.IsFalse (c.IsHandleCreated, "A8");\r
+ o = c.PublicDefaultSize;\r
+ Assert.IsFalse (c.IsHandleCreated, "A9");\r
+ o = c.PublicDoubleBuffered;\r
+ c.PublicDoubleBuffered = !c.PublicDoubleBuffered;\r
+ Assert.IsFalse (c.IsHandleCreated, "A10");\r
+#endif\r
+ o = c.PublicFontHeight;\r
+ c.PublicFontHeight = c.PublicFontHeight + 1;\r
+ Assert.IsFalse (c.IsHandleCreated, "A11");\r
+ o = c.PublicRenderRightToLeft;\r
+ Assert.IsFalse (c.IsHandleCreated, "A12");\r
+ o = c.PublicResizeRedraw;\r
+ c.PublicResizeRedraw = !c.PublicResizeRedraw;\r
+ Assert.IsFalse (c.IsHandleCreated, "A13");\r
+#if !__MonoCS__ && NET_2_0\r
+ o = c.PublicScaleChildren;\r
+ Assert.IsFalse (c.IsHandleCreated, "A14");\r
+#endif\r
+ o = c.PublicShowFocusCues;\r
+ Assert.IsFalse (c.IsHandleCreated, "A15");\r
+ o = c.PublicShowKeyboardCues;\r
+ Assert.IsFalse (c.IsHandleCreated, "A16");\r
+\r
+#if NET_2_0\r
+ o = c.PublicAutoScaleFactor;\r
+ Assert.IsFalse (c.IsHandleCreated, "F1"); \r
+#endif\r
+ \r
+ o = c.PublicDesignMode;\r
+ Assert.IsFalse (c.IsHandleCreated, "F2");\r
+ \r
+ o = c.PublicEvents;\r
+ Assert.IsFalse (c.IsHandleCreated, "F3");\r
+ \r
+ o = c.PublicHScroll;\r
+ c.PublicHScroll = !c.PublicHScroll;\r
+ Assert.IsFalse (c.IsHandleCreated, "F4");\r
+ \r
+ o = c.PublicMaximizedBounds;\r
+ c.PublicMaximizedBounds = new Rectangle (1, 1, 1, 1);\r
+ Assert.IsFalse (c.IsHandleCreated, "F5");\r
+\r
+#if NET_2_0\r
+ o = c.PublicShowWithoutActivation;\r
+ Assert.IsFalse (c.IsHandleCreated, "F6"); \r
+#endif\r
+ \r
+ o = c.PublicVScroll;\r
+ c.PublicVScroll = !c.PublicVScroll;\r
+ Assert.IsFalse (c.IsHandleCreated, "F7");\r
+ \r
+\r
+ TestHelper.RemoveWarning (o);\r
+ }\r
+\r
+ Form invokeform = new Form ();\r
+\r
+ [Test]\r
+ public void TestPublicMethods ()\r
+ {\r
+ // Public Methods that force Handle creation:\r
+ // - CreateGraphics ()\r
+ // - GetChildAtPoint ()\r
+ // - Invoke, BeginInvoke throws InvalidOperationException if Handle has not been created\r
+ // - PointToClient ()\r
+ // - PointToScreen ()\r
+ // - RectangleToClient ()\r
+ // - RectangleToScreen ()\r
+ // - Select ()\r
+ // - Show (IWin32Window)\r
+ // Notes:\r
+ // - CreateControl does NOT force Handle creation!\r
+ \r
+ Form c = new Form ();\r
+\r
+ c.BringToFront ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A1");\r
+ \r
+ c.Contains (new Form ());\r
+ Assert.IsFalse (c.IsHandleCreated, "A2");\r
+ \r
+ c.CreateControl ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A3");\r
+ \r
+ c = new Form ();\r
+ Graphics g = c.CreateGraphics ();\r
+ g.Dispose ();\r
+ Assert.IsTrue (c.IsHandleCreated, "A4");\r
+ c.Dispose ();\r
+ c = new Form ();\r
+ \r
+ c.Dispose ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A5");\r
+ c = new Form ();\r
+\r
+ // This is weird, it causes a form to appear that won't go away until you move the mouse over it, \r
+ // but it doesn't create a handle??\r
+ //DragDropEffects d = c.DoDragDrop ("yo", DragDropEffects.None);\r
+ //Assert.IsFalse (c.IsHandleCreated, "A6");\r
+ //Assert.AreEqual (DragDropEffects.None, d, "A6b");\r
+ \r
+ //Bitmap b = new Bitmap (100, 100);\r
+ //c.DrawToBitmap (b, new Rectangle (0, 0, 100, 100));\r
+ //Assert.IsFalse (c.IsHandleCreated, "A7");\r
+ //b.Dispose ();\r
+ c.FindForm ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A8");\r
+ \r
+ c.Focus ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A9");\r
+\r
+ c.GetChildAtPoint (new Point (10, 10));\r
+ Assert.IsTrue (c.IsHandleCreated, "A10");\r
+ c.GetContainerControl ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A11");\r
+ \r
+ c = new Form ();\r
+ c.GetNextControl (new Control (), true);\r
+ Assert.IsFalse (c.IsHandleCreated, "A12");\r
+#if NET_2_0\r
+ c.GetPreferredSize (Size.Empty);\r
+ Assert.IsFalse (c.IsHandleCreated, "A13");\r
+#endif\r
+ c.Hide ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A14");\r
+ \r
+ c.Invalidate ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A15");\r
+ \r
+ //c.Invoke (new InvokeDelegate (InvokeMethod));\r
+ //Assert.IsFalse (c.IsHandleCreated, "A16");\r
+ c.PerformLayout ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A17");\r
+ \r
+ c.PointToClient (new Point (100, 100));\r
+ Assert.IsTrue (c.IsHandleCreated, "A18");\r
+ c = new Form ();\r
+ \r
+ c.PointToScreen (new Point (100, 100));\r
+ Assert.IsTrue (c.IsHandleCreated, "A19");\r
+ c = new Form ();\r
+ \r
+ //c.PreProcessControlMessage ???\r
+ //c.PreProcessMessage ???\r
+ c.RectangleToClient (new Rectangle (0, 0, 100, 100));\r
+ Assert.IsTrue (c.IsHandleCreated, "A20");\r
+ c = new Form ();\r
+ c.RectangleToScreen (new Rectangle (0, 0, 100, 100));\r
+ Assert.IsTrue (c.IsHandleCreated, "A21");\r
+ c = new Form ();\r
+ c.Refresh ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A22");\r
+ c.ResetBackColor ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A23");\r
+ c.ResetBindings ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A24");\r
+ c.ResetCursor ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A25");\r
+ c.ResetFont ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A26");\r
+ c.ResetForeColor ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A27");\r
+ c.ResetImeMode ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A28");\r
+ c.ResetRightToLeft ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A29");\r
+ c.ResetText ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A30");\r
+ c.SuspendLayout ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A31");\r
+ c.ResumeLayout ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A32");\r
+#if NET_2_0\r
+ c.Scale (new SizeF (1.5f, 1.5f));\r
+ Assert.IsFalse (c.IsHandleCreated, "A33");\r
+#endif\r
+ c.Select ();\r
+ Assert.IsTrue (c.IsHandleCreated, "A34");\r
+ c = new Form ();\r
+ \r
+ c.SelectNextControl (new Control (), true, true, true, true);\r
+ Assert.IsFalse (c.IsHandleCreated, "A35");\r
+ c.SetBounds (0, 0, 100, 100);\r
+ Assert.IsFalse (c.IsHandleCreated, "A36");\r
+ c.Update ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A37");\r
+ \r
+ // Form\r
+ \r
+ c.Activate ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F1");\r
+ \r
+ c.AddOwnedForm (new Form ());\r
+ Assert.IsFalse (c.IsHandleCreated, "F2");\r
+ \r
+ c.Close ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F3");\r
+ \r
+ c.Hide ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F4");\r
+ \r
+ c.LayoutMdi (MdiLayout.Cascade);\r
+ Assert.IsFalse (c.IsHandleCreated, "F5");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ c.PerformAutoScale ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F6"); \r
+#endif\r
+ \r
+ c.PerformLayout ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F7");\r
+ \r
+ c.AddOwnedForm (new Form ());\r
+ c.RemoveOwnedForm (c.OwnedForms [c.OwnedForms.Length - 1]);\r
+ Assert.IsFalse (c.IsHandleCreated, "F8");\r
+ \r
+ c.ScrollControlIntoView (null);\r
+ Assert.IsFalse (c.IsHandleCreated, "F9");\r
+ \r
+ c.SetAutoScrollMargin (7, 13);\r
+ Assert.IsFalse (c.IsHandleCreated, "F10");\r
+ \r
+ c.SetDesktopBounds (-1, -1, 144, 169);\r
+ Assert.IsFalse (c.IsHandleCreated, "F11");\r
+ \r
+ c.SetDesktopLocation (7, 13);\r
+ Assert.IsFalse (c.IsHandleCreated, "F12");\r
+\r
+#if NET_2_0\r
+ c = new Form ();\r
+ c.Show (null);\r
+ Assert.IsTrue (c.IsHandleCreated, "F13");\r
+ c.Close ();\r
+ c = new Form (); \r
+#endif\r
+ \r
+ //c.ShowDialog ()\r
+ \r
+ c.ToString ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F14");\r
+ \r
+ c.Validate ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F15");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ c.ValidateChildren ();\r
+ Assert.IsFalse (c.IsHandleCreated, "F16"); \r
+#endif\r
+ }\r
+\r
+ [Test]\r
+ public void Show ()\r
+ {\r
+ Form c = new Form ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A1");\r
+ c.HandleCreated += new EventHandler (HandleCreated_WriteStackTrace);\r
+ c.Show ();\r
+ Assert.IsTrue (c.IsHandleCreated, "A2");\r
+ c.Dispose ();\r
+ }\r
+\r
+ void HandleCreated_WriteStackTrace (object sender, EventArgs e)\r
+ {\r
+ Console.WriteLine (Environment.StackTrace);\r
+ }\r
+\r
+ public delegate void InvokeDelegate ();\r
+ public void InvokeMethod () { invokeform.Text = "methodinvoked"; }\r
+\r
+ [Test]\r
+ [ExpectedException (typeof (InvalidOperationException))]\r
+ public void InvokeIOE ()\r
+ {\r
+ Form c = new Form ();\r
+ c.Invoke (new InvokeDelegate (InvokeMethod));\r
+ }\r
+\r
+ private class ProtectedPropertyForm : Form\r
+ {\r
+#if NET_2_0\r
+ public SizeF PublicAutoScaleFactor { get { return base.AutoScaleFactor; } } \r
+#endif\r
+#if !__MonoCS__ && NET_2_0\r
+ public bool PublicCanRaiseEvents { get { return base.CanRaiseEvents; } }\r
+#endif\r
+ public CreateParams PublicCreateParams { get { return base.CreateParams; } }\r
+#if NET_2_0\r
+ public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }\r
+#endif\r
+ public ImeMode PublicDefaultImeMode { get { return base.DefaultImeMode; } }\r
+#if NET_2_0\r
+ public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }\r
+ public Size PublicDefaultMaximumSize { get { return base.DefaultMaximumSize; } }\r
+ public Size PublicDefaultMinimumSize { get { return base.DefaultMinimumSize; } }\r
+ public Padding PublicDefaultPadding { get { return base.DefaultPadding; } }\r
+ public Size PublicDefaultSize { get { return base.DefaultSize; } }\r
+#endif\r
+ public bool PublicDesignMode { get {return base.DesignMode; } }\r
+#if NET_2_0\r
+ public bool PublicDoubleBuffered { get { return base.DoubleBuffered; } set { base.DoubleBuffered = value; } }\r
+#endif\r
+ public EventHandlerList PublicEvents { get {return base.Events; } } \r
+ public int PublicFontHeight { get { return base.FontHeight; } set { base.FontHeight = value; } }\r
+ public bool PublicHScroll { get {return base.HScroll; } set { base.HScroll = value;} }\r
+ public Rectangle PublicMaximizedBounds { get {return base.MaximizedBounds; } set { base.MaximizedBounds = value; }}\r
+ public bool PublicRenderRightToLeft { get { return base.RenderRightToLeft; } }\r
+ public bool PublicResizeRedraw { get { return base.ResizeRedraw; } set { base.ResizeRedraw = value; } }\r
+#if !__MonoCS__ && NET_2_0\r
+ public bool PublicScaleChildren { get { return base.ScaleChildren; } }\r
+#endif\r
+ public bool PublicShowFocusCues { get { return base.ShowFocusCues; } }\r
+ public bool PublicShowKeyboardCues { get { return base.ShowKeyboardCues; } }\r
+#if NET_2_0\r
+ public bool PublicShowWithoutActivation { get { return base.ShowWithoutActivation; } } \r
+#endif\r
+ public bool PublicVScroll { get { return base.VScroll; } set { base.VScroll = value; } }\r
+ }\r
+\r
+ [Test]\r
+ public void TestProtectedMethods ()\r
+ {\r
+ // Protected Methods that force Handle creation:\r
+ // - CreateAccessibilityInstance ()\r
+ // - CreateHandle ()\r
+ // - IsInputChar ()\r
+ // - Select ()\r
+ // - SetVisibleCore ()\r
+ // - CenterToParent ()\r
+ // - CenterToScreen ()\r
+ ProtectedMethodsForm c = new ProtectedMethodsForm ();\r
+\r
+ c.PublicAccessibilityNotifyClients (AccessibleEvents.Focus, 0);\r
+#if NET_2_0\r
+ Assert.IsFalse (c.IsHandleCreated, "A1");\r
+#else\r
+ Assert.IsTrue (c.IsHandleCreated, "A1");\r
+#endif\r
+ c.PublicCreateAccessibilityInstance ();\r
+ Assert.IsTrue (c.IsHandleCreated, "A2");\r
+ c = new ProtectedMethodsForm ();\r
+ c.PublicCreateControlsInstance ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A3");\r
+ c.PublicCreateHandle ();\r
+ Assert.IsTrue (c.IsHandleCreated, "A4");\r
+ c = new ProtectedMethodsForm ();\r
+ c.PublicDestroyHandle ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A5");\r
+ c = new ProtectedMethodsForm ();\r
+#if NET_2_0\r
+ c.PublicGetAccessibilityObjectById (0);\r
+ Assert.IsFalse (c.IsHandleCreated, "A6");\r
+#endif\r
+#if !__MonoCS__ && NET_2_0\r
+ c.PublicGetAutoSizeMode ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A7");\r
+ c.PublicGetScaledBounds (new Rectangle (0, 0, 100, 100), new SizeF (1.5f, 1.5f), BoundsSpecified.All);\r
+ Assert.IsFalse (c.IsHandleCreated, "A8");\r
+#endif\r
+ c.PublicGetStyle (ControlStyles.FixedHeight);\r
+ Assert.IsFalse (c.IsHandleCreated, "A9");\r
+ c.PublicGetTopLevel ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A10");\r
+ c.PublicInitLayout ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A11");\r
+ c.PublicInvokeGotFocus (c, EventArgs.Empty);\r
+ Assert.IsFalse (c.IsHandleCreated, "A12");\r
+ c.PublicInvokeLostFocus (c, EventArgs.Empty);\r
+ Assert.IsFalse (c.IsHandleCreated, "A13");\r
+ c.PublicInvokeOnClick (c, EventArgs.Empty);\r
+ Assert.IsFalse (c.IsHandleCreated, "A14");\r
+ c.PublicInvokePaint (c, new PaintEventArgs (Graphics.FromImage (new Bitmap (1, 1)), Rectangle.Empty));\r
+ Assert.IsFalse (c.IsHandleCreated, "A15");\r
+ c.PublicInvokePaintBackground (c, new PaintEventArgs (Graphics.FromImage (new Bitmap (1, 1)), Rectangle.Empty));\r
+ Assert.IsFalse (c.IsHandleCreated, "A16");\r
+ c.PublicIsInputChar ('c');\r
+ Assert.IsTrue (c.IsHandleCreated, "A17");\r
+ c = new ProtectedMethodsForm ();\r
+ c.PublicIsInputKey (Keys.B);\r
+ Assert.IsFalse (c.IsHandleCreated, "A18");\r
+ c.PublicNotifyInvalidate (Rectangle.Empty);\r
+ Assert.IsFalse (c.IsHandleCreated, "A19");\r
+ Form f = new Form ();\r
+ c.TopLevel = false;\r
+ f.Controls.Add (c);\r
+ c.PublicOnVisibleChanged (EventArgs.Empty);\r
+ Assert.IsFalse (c.IsHandleCreated, "A20");\r
+ c = new ProtectedMethodsForm ();\r
+ c.PublicRaiseDragEvent (null, null);\r
+ Assert.IsFalse (c.IsHandleCreated, "A21");\r
+ c.PublicRaiseKeyEvent (null, null);\r
+ Assert.IsFalse (c.IsHandleCreated, "A22");\r
+ c.PublicRaiseMouseEvent (null, null);\r
+ Assert.IsFalse (c.IsHandleCreated, "A23");\r
+ c.PublicRaisePaintEvent (null, null);\r
+ Assert.IsFalse (c.IsHandleCreated, "A24");\r
+ c.PublicRecreateHandle ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A25");\r
+ c.PublicResetMouseEventArgs ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A26");\r
+ c.PublicRtlTranslateAlignment (ContentAlignment.BottomLeft);\r
+ Assert.IsFalse (c.IsHandleCreated, "A27");\r
+ c.PublicRtlTranslateContent (ContentAlignment.BottomLeft);\r
+ Assert.IsFalse (c.IsHandleCreated, "A28");\r
+ c.PublicRtlTranslateHorizontal (HorizontalAlignment.Left);\r
+ Assert.IsFalse (c.IsHandleCreated, "A29");\r
+ c.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);\r
+ Assert.IsFalse (c.IsHandleCreated, "A30");\r
+#if !__MonoCS__ && NET_2_0\r
+ c.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);\r
+ Assert.IsFalse (c.IsHandleCreated, "A31");\r
+#endif\r
+ c.PublicScaleCore (1.5f, 1.5f);\r
+ Assert.IsFalse (c.IsHandleCreated, "A32");\r
+ c.PublicSelect ();\r
+ Assert.IsTrue (c.IsHandleCreated, "A33");\r
+ c = new ProtectedMethodsForm ();\r
+#if !__MonoCS__ && NET_2_0\r
+ c.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);\r
+ Assert.IsFalse (c.IsHandleCreated, "A34");\r
+#endif\r
+ c.PublicSetBoundsCore (0, 0, 100, 100, BoundsSpecified.All);\r
+ Assert.IsFalse (c.IsHandleCreated, "A35");\r
+ c.PublicSetClientSizeCore (122, 122);\r
+ Assert.IsFalse (c.IsHandleCreated, "A36");\r
+ c.PublicSetStyle (ControlStyles.FixedHeight, true);\r
+ Assert.IsFalse (c.IsHandleCreated, "A37");\r
+ c.PublicSetTopLevel (true);\r
+ Assert.IsFalse (c.IsHandleCreated, "A38");\r
+ c = new ProtectedMethodsForm ();\r
+ \r
+ c.PublicSetVisibleCore (true);\r
+ Assert.IsTrue (c.IsHandleCreated, "A39");\r
+ c = new ProtectedMethodsForm ();\r
+#if NET_2_0\r
+ c.PublicSizeFromClientSize (new Size (160, 160));\r
+ Assert.IsFalse (c.IsHandleCreated, "A40");\r
+#endif\r
+ c.PublicUpdateBounds ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A41");\r
+ c.PublicUpdateStyles ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A42");\r
+ c.PublicUpdateZOrder ();\r
+ Assert.IsFalse (c.IsHandleCreated, "A43");\r
+ \r
+ \r
+ // Form\r
+ c = new ProtectedMethodsForm ();\r
+ c.IsMdiContainer = true;\r
+ new Form ().MdiParent = c;\r
+ new Form ().MdiParent = c;\r
+ c.PublicActivateMdiChild (c.MdiChildren [0]);\r
+ c.PublicActivateMdiChild (c.MdiChildren [1]);\r
+ Assert.IsFalse (c.IsHandleCreated, "F1");\r
+ c.Dispose ();\r
+ c = new ProtectedMethodsForm();\r
+\r
+ c.PublicAdjustFormScrollbars (true);\r
+ Assert.IsFalse (c.IsHandleCreated, "F2");\r
+ \r
+ c.PublicCenterToParent ();\r
+ Assert.IsTrue (c.IsHandleCreated, "F3");\r
+ c = new ProtectedMethodsForm ();\r
+ \r
+ c.PublicCenterToScreen ();\r
+ Assert.IsTrue (c.IsHandleCreated, "F4");\r
+ c = new ProtectedMethodsForm ();\r
+ \r
+ c.PublicGetScrollState (1);\r
+ Assert.IsFalse (c.IsHandleCreated, "F5");\r
+ \r
+ c.PublicGetService (typeof (int));\r
+ Assert.IsFalse (c.IsHandleCreated, "F6");\r
+\r
+ Message m = new Message ();\r
+ c.PublicProcessCmdKey (ref m, Keys.C);\r
+ Assert.IsFalse (c.IsHandleCreated, "F7");\r
+ \r
+ c.PublicProcessDialogChar ('p');\r
+ Assert.IsFalse (c.IsHandleCreated, "F8");\r
+ \r
+ c.PublicProcessDialogKey (Keys.D);\r
+ Assert.IsFalse (c.IsHandleCreated, "F9");\r
+ \r
+ c.PublicProcessKeyEventArgs (ref m);\r
+ Assert.IsFalse (c.IsHandleCreated, "F10");\r
+ \r
+ c.PublicProcessKeyMessage (ref m);\r
+ Assert.IsFalse (c.IsHandleCreated, "F11");\r
+ \r
+ c.PublicProcessKeyPreview (ref m);\r
+ Assert.IsFalse (c.IsHandleCreated, "F12");\r
+\r
+ c.PublicProcessMnemonic ('Z');\r
+ Assert.IsFalse (c.IsHandleCreated, "F13");\r
+ \r
+ c.PublicProcessTabKey (true);\r
+ Assert.IsFalse (c.IsHandleCreated, "F14");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ c.Controls.Add (new Control ());\r
+ c.PublicScrollToControl (c.Controls [0]);\r
+ Assert.IsFalse (c.IsHandleCreated, "F15");\r
+ c.Dispose ();\r
+ c = new ProtectedMethodsForm (); \r
+#endif\r
+ \r
+ c.PublicSelect (true, true);\r
+ Assert.IsTrue (c.IsHandleCreated, "F16");\r
+ c = new ProtectedMethodsForm();\r
+ \r
+ c.PublicSetDisplayRectLocation (13, 17);\r
+ Assert.IsFalse (c.IsHandleCreated, "F17");\r
+ \r
+ c.PublicSetScrollState (5, false);\r
+ Assert.IsFalse (c.IsHandleCreated, "F18");\r
+ \r
+ c.PublicUpdateDefaultButton (3, false);\r
+ Assert.IsFalse (c.IsHandleCreated, "F19");\r
+ }\r
+\r
+ private class ProtectedMethodsForm : Form\r
+ {\r
+ public void PublicAccessibilityNotifyClients (AccessibleEvents accEvent, int childID) { base.AccessibilityNotifyClients (accEvent, childID); }\r
+ public void PublicActivateMdiChild (Form form) { base.ActivateMdiChild (form); }\r
+ public void PublicAdjustFormScrollbars (bool displayScrollbars) {base.AdjustFormScrollbars (displayScrollbars); }\r
+ public void PublicCenterToParent () { base.CenterToParent (); }\r
+ public void PublicCenterToScreen () { base.CenterToScreen (); }\r
+ public void PublicCreateAccessibilityInstance () { base.CreateAccessibilityInstance (); }\r
+ public void PublicCreateControlsInstance () { base.CreateControlsInstance (); }\r
+ public void PublicCreateHandle () { base.CreateHandle (); }\r
+ public void PublicDestroyHandle () { base.DestroyHandle (); }\r
+#if NET_2_0\r
+ public AccessibleObject PublicGetAccessibilityObjectById (int objectId) { return base.GetAccessibilityObjectById (objectId); }\r
+#endif\r
+#if !__MonoCS__ && NET_2_0\r
+ public AutoSizeMode PublicGetAutoSizeMode () { return base.GetAutoSizeMode (); }\r
+ public Rectangle PublicGetScaledBounds (Rectangle bounds, SizeF factor, BoundsSpecified specified) { return base.GetScaledBounds (bounds, factor, specified); }\r
+#endif\r
+ public bool PublicGetScrollState (int bit) { return base.GetScrollState (bit); }\r
+ public object PublicGetService (Type service) { return base.GetService (service); }\r
+ public bool PublicGetStyle (ControlStyles flag) { return base.GetStyle (flag); }\r
+ public bool PublicGetTopLevel () { return base.GetTopLevel (); }\r
+ public void PublicInitLayout () { base.InitLayout (); }\r
+ public void PublicInvokeGotFocus (Control toInvoke, EventArgs e) { base.InvokeGotFocus (toInvoke, e); }\r
+ public void PublicInvokeLostFocus (Control toInvoke, EventArgs e) { base.InvokeLostFocus (toInvoke, e); }\r
+ public void PublicInvokeOnClick (Control toInvoke, EventArgs e) { base.InvokeOnClick (toInvoke, e); }\r
+ public void PublicInvokePaint (Control c, PaintEventArgs e) { base.InvokePaint (c, e); }\r
+ public void PublicInvokePaintBackground (Control c, PaintEventArgs e) { base.InvokePaintBackground (c, e); }\r
+ public bool PublicIsInputChar (char charCode) { return base.IsInputChar (charCode); }\r
+ public bool PublicIsInputKey (Keys keyData) { return base.IsInputKey (keyData); }\r
+ public void PublicNotifyInvalidate (Rectangle invalidatedArea) { base.NotifyInvalidate (invalidatedArea); }\r
+ public void PublicOnVisibleChanged (EventArgs e) { base.OnVisibleChanged (e); }\r
+ public void PublicProcessCmdKey (ref Message msg, Keys keyData) { base.ProcessCmdKey (ref msg, keyData); }\r
+ public void PublicProcessDialogChar (char charCode) { base.ProcessDialogChar (charCode); }\r
+ public void PublicProcessDialogKey (Keys keyData) { base.ProcessDialogKey (keyData); }\r
+ public void PublicProcessKeyEventArgs (ref Message m) { base.ProcessKeyEventArgs (ref m); }\r
+ public void PublicProcessKeyMessage (ref Message m) { base.ProcessKeyMessage (ref m); }\r
+ public void PublicProcessKeyPreview (ref Message m) { base.ProcessKeyPreview (ref m); }\r
+ public void PublicProcessMnemonic (char charCode) { base.ProcessMnemonic (charCode); }\r
+ public void PublicProcessTabKey (bool forward) { base.ProcessTabKey (forward); }\r
+ public void PublicRaiseDragEvent (Object key, DragEventArgs e) { base.RaiseDragEvent (key, e); }\r
+ public void PublicRaiseKeyEvent (Object key, KeyEventArgs e) { base.RaiseKeyEvent (key, e); }\r
+ public void PublicRaiseMouseEvent (Object key, MouseEventArgs e) { base.RaiseMouseEvent (key, e); }\r
+ public void PublicRaisePaintEvent (Object key, PaintEventArgs e) { base.RaisePaintEvent (key, e); }\r
+ public void PublicRecreateHandle () { base.RecreateHandle (); }\r
+ public void PublicResetMouseEventArgs () { base.ResetMouseEventArgs (); }\r
+ public ContentAlignment PublicRtlTranslateAlignment (ContentAlignment align) { return base.RtlTranslateAlignment (align); }\r
+ public ContentAlignment PublicRtlTranslateContent (ContentAlignment align) { return base.RtlTranslateContent (align); }\r
+ public HorizontalAlignment PublicRtlTranslateHorizontal (HorizontalAlignment align) { return base.RtlTranslateHorizontal (align); }\r
+ public LeftRightAlignment PublicRtlTranslateLeftRight (LeftRightAlignment align) { return base.RtlTranslateLeftRight (align); }\r
+#if !__MonoCS__ && NET_2_0\r
+ public void PublicScaleControl (SizeF factor, BoundsSpecified specified) { base.ScaleControl (factor, specified); }\r
+#endif\r
+ public void PublicScaleCore (float dx, float dy) { base.ScaleCore (dx, dy); }\r
+#if NET_2_0 && !__MonoCS__\r
+ public void PublicScrollToControl (Control activeControl) { base.ScrollToControl (activeControl); } \r
+#endif\r
+ public void PublicSelect () { base.Select (); }\r
+ public void PublicSelect (bool directed, bool forward) { base.Select (directed, forward); }\r
+\r
+#if !__MonoCS__ && NET_2_0\r
+ public void PublicSetAutoSizeMode (AutoSizeMode mode) { base.SetAutoSizeMode (mode); }\r
+#endif\r
+ public void PublicSetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) { base.SetBoundsCore (x, y, width, height, specified); }\r
+ public void PublicSetClientSizeCore (int x, int y) { base.SetClientSizeCore (x, y); }\r
+ public void PublicSetDisplayRectLocation (int x, int y) { base.SetDisplayRectLocation (x, y); }\r
+ public void PublicSetScrollState (int bit, bool value) { base.SetScrollState (bit, value); }\r
+ public void PublicSetStyle (ControlStyles flag, bool value) { base.SetStyle (flag, value); }\r
+ public void PublicSetTopLevel (bool value) { base.SetTopLevel (value); }\r
+ public void PublicSetVisibleCore (bool value) { base.SetVisibleCore (value); }\r
+#if NET_2_0\r
+ public Size PublicSizeFromClientSize (Size clientSize) { return base.SizeFromClientSize (clientSize); }\r
+#endif\r
+ public void PublicUpdateBounds () { base.UpdateBounds (); }\r
+ public void PublicUpdateDefaultButton (int bit, bool value) { base.UpdateDefaultButton (); }\r
+ public void PublicUpdateStyles () { base.UpdateStyles (); }\r
+ public void PublicUpdateZOrder () { base.UpdateZOrder (); }\r
+ }\r
+ }\r
+}
\ No newline at end of file
using NUnit.Framework;
+using CategoryAttribute = NUnit.Framework.CategoryAttribute;
+
namespace MonoTests.System.Windows.Forms
{
[TestFixture]
public class FormTest
{
+ [Test] // bug #80791
+ public void ClientSizeTest ()
+ {
+ Form form = new Form ();
+ Assert.IsFalse (form.ClientSize == form.Size);
+ }
+
+ [Test] // bug #80574
+ public void FormBorderStyleTest ()
+ {
+ Form form = new Form ();
+ Rectangle boundsBeforeBorderStyleChange = form.Bounds;
+ Rectangle clientRectangleBeforeBorderStyleChange = form.ClientRectangle;
+ form.FormBorderStyle = FormBorderStyle.None;
+ Assert.AreEqual (form.Bounds, boundsBeforeBorderStyleChange, "#A1");
+ Assert.AreEqual (form.ClientRectangle, clientRectangleBeforeBorderStyleChange, "#A2");
+
+ form.Visible = true;
+ form.FormBorderStyle = FormBorderStyle.Sizable;
+ boundsBeforeBorderStyleChange = form.Bounds;
+ clientRectangleBeforeBorderStyleChange = form.ClientRectangle;
+ form.FormBorderStyle = FormBorderStyle.None;
+ Assert.IsFalse (form.Bounds == boundsBeforeBorderStyleChange, "#B1");
+ Assert.AreEqual (form.ClientRectangle, clientRectangleBeforeBorderStyleChange, "#B2");
+
+ form.Visible = false;
+ form.FormBorderStyle = FormBorderStyle.Sizable;
+ boundsBeforeBorderStyleChange = form.Bounds;
+ clientRectangleBeforeBorderStyleChange = form.ClientRectangle;
+ form.FormBorderStyle = FormBorderStyle.None;
+ Assert.IsFalse (form.Bounds == boundsBeforeBorderStyleChange, "#C1");
+ Assert.AreEqual (form.ClientRectangle, clientRectangleBeforeBorderStyleChange, "#C2");
+ }
+
+ [Test]
+ public void MaximizedParentedFormTest ()
+ {
+ using (Form Main = new Form ()) {
+ Form Child = new Form ();
+ Child.TopLevel = false;
+ Main.Controls.Add (Child);
+ Main.ShowInTaskbar = false;
+ Main.Show ();
+
+ Child.WindowState = FormWindowState.Maximized;
+ // The exact negative value depends on the border with, but it should always be < 0.
+ Assert.IsTrue (Child.Location.X < 0 && Child.Location.Y < 0, "#A1");
+ }
+ }
[Test]
- [NUnit.Framework.Category ("NotWorking")]
+ [Category ("NotWorking")]
public void FormCreateParamsStyleTest ()
{
Form frm;
}
[Test]
- [NUnit.Framework.Category ("NotWorking")]
+ [Category ("NotWorking")]
public void ActivateTest ()
{
Form myform = new Form ();
}
[Test] // bug #80020
- [NUnit.Framework.Category ("NotWorking")]
+ [Category ("NotWorking")]
public void IsHandleCreated ()
{
Form main = new Form ();
}
[Test]
- [NUnit.Framework.Category ("NotWorking")]
+ [Category ("NotWorking")]
public void ShowDialog_Owner_Circular ()
{
Form main = new Form ();
}
[Test] // bug #80773
- [NUnit.Framework.Category ("NotWorking")]
+ [Category ("NotWorking")]
public void ShowDialog_Owner_Self ()
{
Form form = new Form ();
}
[Test] // bug #80604
- [NUnit.Framework.Category ("NotWorking")]
public void VisibleOnLoad ()
{
MockForm form = new MockForm ();
}
[Test] // bug #80052
- [NUnit.Framework.Category ("NotWorking")]
+ [Category ("NotWorking")]
public void Location ()
{
//
f.Show (f);
}
- [Test] // Bug #79959
- [NUnit.Framework.Category ("NotWorking")]
+ [Test] // Bug #79959, #80574, #80791
+ [Category ("NotWorking")]
public void BehaviorResizeOnBorderStyleChanged ()
{
- // Marked NotWorking because the ClientSize is probably dependent on the WM.
- // The values below match .Net to make sure our behavior is the same.
+ // Marked NotWorking because the ClientSize is dependent on the WM.
+ // The values below match XP Luna to make sure our behavior is the same.
Form f = new Form ();
+ f.ShowInTaskbar = false;
f.Show ();
+ Assert.AreEqual (true, f.IsHandleCreated, "A0");
+
Assert.AreEqual (new Size (300, 300), f.Size, "A1");
Assert.AreEqual (new Size (292, 266), f.ClientSize, "A2");
- f.FormBorderStyle = FormBorderStyle.FixedSingle;
- Assert.AreEqual (new Size (298, 298), f.Size, "A3");
+ f.FormBorderStyle = FormBorderStyle.Fixed3D;
+ Assert.AreEqual (new Size (302, 302), f.Size, "A3");
Assert.AreEqual (new Size (292, 266), f.ClientSize, "A4");
- f.FormBorderStyle = FormBorderStyle.Sizable;
- Assert.AreEqual (new Size (300, 300), f.Size, "A5");
+ f.FormBorderStyle = FormBorderStyle.FixedDialog;
+ Assert.AreEqual (new Size (298, 298), f.Size, "A5");
Assert.AreEqual (new Size (292, 266), f.ClientSize, "A6");
+
+ f.FormBorderStyle = FormBorderStyle.FixedSingle;
+ Assert.AreEqual (new Size (298, 298), f.Size, "A7");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A8");
+
+ f.FormBorderStyle = FormBorderStyle.FixedToolWindow;
+ Assert.AreEqual (new Size (298, 290), f.Size, "A9");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A0");
+
+ f.FormBorderStyle = FormBorderStyle.None;
+ Assert.AreEqual (new Size (292, 266), f.Size, "A11");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A12");
+
+ f.FormBorderStyle = FormBorderStyle.SizableToolWindow;
+ Assert.AreEqual (new Size (300, 292), f.Size, "A13");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A14");
+
+ f.FormBorderStyle = FormBorderStyle.Sizable;
+ Assert.AreEqual (new Size (300, 300), f.Size, "A15");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A16");
f.Close ();
}
-
- [Test] // bug #80574
- [NUnit.Framework.Category ("NotWorking")]
+
+ [Test] // Bug #80574, #80791
+ [Category ("NotWorking")]
public void BehaviorResizeOnBorderStyleChangedNotVisible ()
{
- // Marked NotWorking because the ClientSize is probably dependent on the WM.
- // The values below match .Net to make sure our behavior is the same.
+ // Marked NotWorking because the ClientSize is dependent on the WM.
+ // The values below match XP Luna to make sure our behavior is the same.
Form f = new Form ();
+ f.ShowInTaskbar = false;
+ Assert.AreEqual (false, f.IsHandleCreated, "A0");
+
Assert.AreEqual (new Size (300, 300), f.Size, "A1");
Assert.AreEqual (new Size (292, 266), f.ClientSize, "A2");
Assert.AreEqual (new Size (300, 300), f.Size, "A15");
Assert.AreEqual (new Size (292, 266), f.ClientSize, "A16");
}
+
+ [Test] // Bug #80574, #80791
+ [Category ("NotWorking")]
+ public void MoreBehaviorResizeOnBorderStyleChangedNotVisible ()
+ {
+ // Marked NotWorking because the ClientSize is dependent on the WM.
+ // The values below match XP Luna to make sure our behavior is the same.
+ Form f = new Form ();
+ f.ShowInTaskbar = false;
+
+ f.Show ();
+ f.Hide ();
+
+ Assert.AreEqual (true, f.IsHandleCreated, "A0");
+
+ f.FormBorderStyle = FormBorderStyle.Sizable;
+ Assert.AreEqual (new Size (300, 300), f.Size, "A1");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A2");
+ f.FormBorderStyle = FormBorderStyle.None;
+ Assert.AreEqual (new Size (292, 266), f.Size, "A3");
+ Assert.AreEqual (new Size (292, 266), f.ClientSize, "A4");
+ }
#endif
+
+ [Test] // Bug #80773
+ public void DontSetOwnerOnShowDialogException ()
+ {
+ Form f = new Form ();
+ f.ShowInTaskbar = false;
+
+ try { f.ShowDialog (f); }
+ catch { }
+
+ Assert.AreEqual (null, f.Owner, "H1");
+ }
private bool RunningOnUnix {
get {
--- /dev/null
+//
+// LinkLabelTest.cs: MWF LinkLabel unit tests.
+//
+// Author:
+// Everaldo Canuto (ecanuto@novell.com)
+//
+// (C) 2007 Novell, Inc. (http://www.novell.com)
+//
+
+using System;
+using NUnit.Framework;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace MonoTests.System.Windows.Forms
+{
+ [TestFixture]
+ public class LinkLabelTest
+ {
+ [Test]
+ public void LinkLabelAccessibility ()
+ {
+ LinkLabel l = new LinkLabel ();
+ Assert.IsNotNull (l.AccessibilityObject, "#1");
+ }
+
+ [Test]
+ public void TestTabStop ()
+ {
+ LinkLabel l = new LinkLabel();
+
+ Assert.IsFalse (l.TabStop, "#1");
+ l.Text = "Hello";
+ Assert.IsTrue (l.TabStop, "#2");
+ l.Text = "";
+ Assert.IsFalse (l.TabStop, "#3");
+ }
+
+ [Test]
+ [Category ("NotWorking")]
+ public void TestLinkArea ()
+ {
+ LinkLabel l = new LinkLabel();
+
+ Assert.AreEqual (0, l.LinkArea.Start, "#1");
+ Assert.AreEqual (0, l.LinkArea.Length, "#2");
+ l.Text = "Hello";
+ Assert.AreEqual (0, l.LinkArea.Start, "#3");
+ Assert.AreEqual (5, l.LinkArea.Length, "#4");
+ l.Text = "";
+ Assert.AreEqual (0, l.LinkArea.Start, "#5");
+ Assert.AreEqual (0, l.LinkArea.Length, "#6");
+ }
+ }
+}
Assert.AreSame (listview, colA.ListView, "#A4");
Assert.IsNull (colB.ListView, "#A5");
Assert.AreSame (listview, colC.ListView, "#A6");
+ Assert.AreEqual (0, colA.Index, "#A7");
+ Assert.AreEqual (-1, colB.Index, "#A8");
+ Assert.AreEqual (1, colC.Index, "#A9");
listview.Columns.Remove (colC);
Assert.AreEqual (1, listview.Columns.Count, "#B1");
Assert.AreSame (listview, colA.ListView, "#B3");
Assert.IsNull (colB.ListView, "#B4");
Assert.IsNull (colC.ListView, "#B5");
+ Assert.AreEqual (0, colA.Index, "#B6");
+ Assert.AreEqual (-1, colB.Index, "#B7");
+ Assert.AreEqual (-1, colC.Index, "#B8");
listview.Columns.Remove (colA);
Assert.AreEqual (0, listview.Columns.Count, "#C1");
Assert.IsNull (colA.ListView, "#C2");
Assert.IsNull (colB.ListView, "#C3");
Assert.IsNull (colC.ListView, "#C4");
+ Assert.AreEqual (-1, colA.Index, "#C5");
+ Assert.AreEqual (-1, colB.Index, "#C6");
+ Assert.AreEqual (-1, colC.Index, "#C7");
}
[Test]
Assert.AreEqual (si5, lvi.SubItems ["E name"], "#B1");
}
+ static ListViewItem [] items;
+
+ [Test]
+ public void ListViewItemCollectionTest_VirtualMode_Exceptions ()
+ {
+ ListView lvw = new ListView ();
+ lvw.VirtualMode = true;
+ lvw.VirtualListSize = 1;
+ lvw.RetrieveVirtualItem += ListViewRetrieveVirtualItemHandler;
+
+ ListViewItem item = new ListViewItem ("Item 1");
+ item.Name = "A";
+ items = new ListViewItem [1];
+ items [0] = item;
+
+ try {
+ lvw.Items.Add ("Item 2");
+ Assert.Fail ("#A1");
+ } catch (InvalidOperationException) {
+ }
+
+ try {
+ lvw.Items.AddRange (new ListViewItem [0]);
+ Assert.Fail ("#A2");
+ } catch (InvalidOperationException) {
+ }
+
+ try {
+ lvw.Items.Insert (0, new ListViewItem ("Item 1"));
+ Assert.Fail ("#A3");
+ } catch (InvalidOperationException) {
+ }
+
+ try {
+ lvw.Items.Remove (new ListViewItem ("Item 99"));
+ Assert.Fail ("#A4");
+ } catch (InvalidOperationException) {
+ }
+
+ try {
+ lvw.Items.RemoveAt (0);
+ Assert.Fail ("#A5");
+ } catch (InvalidOperationException) {
+ }
+
+ try {
+ lvw.Items.RemoveByKey ("A");
+ Assert.Fail ("#A6");
+ } catch (InvalidOperationException) {
+ }
+
+ try {
+ lvw.Items.GetEnumerator ();
+ Assert.Fail ("#A7");
+ } catch (InvalidOperationException) {
+ }
+ }
+
+ void ListViewRetrieveVirtualItemHandler (object o, RetrieveVirtualItemEventArgs args)
+ {
+ args.Item = items [args.ItemIndex];
+ }
#endif
}
} catch (ArgumentOutOfRangeException) {
}
}
+
+ const int item_count = 3;
+ ListViewItem [] items = new ListViewItem [item_count];
+
+ [Test]
+ public void VirtualMode ()
+ {
+ ListView lvw = new ListView ();
+ lvw.VirtualListSize = item_count;
+ lvw.RetrieveVirtualItem += ListViewRetrieveVirtualItemHandler;
+ lvw.VirtualMode = true;
+
+ CreateListViewItems (item_count);
+
+ Assert.AreEqual (item_count, lvw.Items.Count, "#A1");
+ Assert.AreEqual (true, lvw.VirtualMode, "#A2");
+
+ Assert.AreEqual (items [0], lvw.Items [0], "#B1");
+ Assert.AreEqual (items [1], lvw.Items [1], "#B2");
+ Assert.AreEqual (items [2], lvw.Items [2], "#B3");
+ Assert.AreEqual (0, lvw.Items [0].Index, "#B4");
+ Assert.AreEqual (1, lvw.Items [1].Index, "#B5");
+ Assert.AreEqual (2, lvw.Items [2].Index, "#B6");
+ Assert.AreEqual (lvw, lvw.Items [0].ListView, "#B7");
+ Assert.AreEqual (lvw, lvw.Items [1].ListView, "#B8");
+ Assert.AreEqual (lvw, lvw.Items [2].ListView, "#B9");
+
+ // force to re-create the items, because we need a blank state
+ // for our items
+ CreateListViewItems (item_count);
+ items [0].Name = "A";
+ items [1].Name = "B";
+ items [2].Name = "C";
+
+ Assert.AreEqual (items [0], lvw.Items ["A"], "#C1");
+ Assert.AreEqual (items [1], lvw.Items ["B"], "#C2");
+ Assert.AreEqual (items [2], lvw.Items ["C"], "#C3");
+ Assert.AreEqual (0, lvw.Items ["A"].Index, "#C4");
+ Assert.AreEqual (1, lvw.Items ["B"].Index, "#C5");
+ Assert.AreEqual (2, lvw.Items ["C"].Index, "#C6");
+ Assert.AreEqual (lvw, lvw.Items ["A"].ListView, "#C7");
+ Assert.AreEqual (lvw, lvw.Items ["B"].ListView, "#C8");
+ Assert.AreEqual (lvw, lvw.Items ["C"].ListView, "#C9");
+ Assert.IsNull (lvw.Items ["Invalid key"], "#C10");
+ Assert.IsNull (lvw.Items [String.Empty], "#C11");
+
+ Assert.AreEqual (false, lvw.Items.ContainsKey (String.Empty), "#D1");
+ Assert.AreEqual (false, lvw.Items.ContainsKey (null), "#D2");
+ Assert.AreEqual (true, lvw.Items.ContainsKey ("A"), "#D3");
+ Assert.AreEqual (true, lvw.Items.ContainsKey ("a"), "#D4");
+ Assert.AreEqual (true, lvw.Items.ContainsKey ("B"), "#D5");
+ }
+
+ void ListViewRetrieveVirtualItemHandler (object o, RetrieveVirtualItemEventArgs args)
+ {
+ args.Item = items [args.ItemIndex];
+ }
+
+ void CreateListViewItems(int count)
+ {
+ items = new ListViewItem [count];
+
+ for (int i = 0; i < count; i++)
+ items [i] = new ListViewItem (String.Empty);
+ }
+
+ [Test]
+ public void VirtualMode_Exceptions()
+ {
+ ListView lvw = new ListView ();
+
+ lvw.Items.Add ("Simple item");
+ try {
+ lvw.VirtualMode = true;
+ Assert.Fail ("#A1");
+ } catch (InvalidOperationException) {
+ }
+
+ lvw.Items.Clear();
+ lvw.VirtualMode = true;
+ lvw.VirtualListSize = 1;
+
+ lvw.RetrieveVirtualItem += ListViewRetrieveVirtualItemHandler;
+ CreateListViewItems (1);
+
+ try {
+ lvw.Sort ();
+ Assert.Fail ("#A3");
+ } catch (InvalidOperationException) {
+ }
+ }
+
+ [Test]
+ public void VirtualListSize ()
+ {
+ ListView lvw = new ListView ();
+
+ lvw.VirtualListSize = item_count;
+ Assert.AreEqual (item_count, lvw.VirtualListSize, "#A1");
+ Assert.AreEqual (0, lvw.Items.Count, "#A2");
+
+ lvw.VirtualMode = true;
+ Assert.AreEqual (item_count, lvw.VirtualListSize, "#B1");
+ Assert.AreEqual (item_count, lvw.Items.Count, "#B2");
+
+ lvw.VirtualMode = false;
+ Assert.AreEqual (item_count, lvw.VirtualListSize, "#C1");
+ Assert.AreEqual (0, lvw.Items.Count, "#C2");
+ }
+
+ [Test]
+ public void VirtualListSize_Exceptions ()
+ {
+ ListView lvw = new ListView ();
+ try {
+ lvw.VirtualListSize = -1;
+ Assert.Fail ("#A1");
+ } catch (ArgumentException) {
+ }
+ }
#endif
[Test]
--- /dev/null
+//\r
+// FormTest.cs: Test cases for Form.\r
+//\r
+// Author:\r
+// Ritvik Mayank (mritvik@novell.com)\r
+//\r
+// (C) 2005 Novell, Inc. (http://www.novell.com)\r
+//\r
+\r
+using System;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Reflection;\r
+using System.Windows.Forms;\r
+\r
+using NUnit.Framework;\r
+\r
+using CategoryAttribute = NUnit.Framework.CategoryAttribute;\r
+\r
+namespace MonoTests.System.Windows.Forms\r
+{\r
+ [TestFixture]\r
+ [Category ("NotWorking")]\r
+ public class MdiFormHandleTest\r
+ {\r
+ private ProtectedForm main;\r
+ private ProtectedForm child1;\r
+ private ProtectedForm child2;\r
+ \r
+ [TearDown]\r
+ public void TearDown ()\r
+ {\r
+ if (main != null) {\r
+ main.Dispose ();\r
+ main = null;\r
+ }\r
+ \r
+ if (child1 != null) {\r
+ child1.Dispose ();\r
+ child1 = null;\r
+ }\r
+ \r
+ if (child2 != null) {\r
+ child2.Dispose ();\r
+ child2 = null;\r
+ }\r
+ }\r
+ \r
+ public void SetUp ()\r
+ {\r
+ TearDown ();\r
+ main = new ProtectedForm ();\r
+ main.IsMdiContainer = true;\r
+ main.ShowInTaskbar = false;\r
+\r
+ child1 = new ProtectedForm ();\r
+ child1.MdiParent = main;\r
+\r
+ child2 = new ProtectedForm ();\r
+ child2.MdiParent = main;\r
+ \r
+ main.Show ();\r
+ }\r
+ \r
+ [Test]\r
+ public void TestPublicProperties ()\r
+ {\r
+ // This long, carpal-tunnel syndrome inducing test shows us that\r
+ // the following properties cause the Handle to be created:\r
+ // - AccessibilityObject [get]\r
+ // - Capture [set]\r
+ // - Handle [get]\r
+ // - Visible [set]\r
+\r
+ // A\r
+ SetUp ();\r
+ object o = child1.AccessibilityObject;\r
+ Assert.IsTrue (child1.IsHandleCreated, "A0");\r
+ \r
+ SetUp ();\r
+ o = child1.AccessibleDefaultActionDescription;\r
+ child1.AccessibleDefaultActionDescription = "playdoh";\r
+ Assert.IsFalse (child1.IsHandleCreated, "A1");\r
+ \r
+ SetUp ();\r
+ o = child1.AccessibleDescription;\r
+ child1.AccessibleDescription = "more playdoh!";\r
+ Assert.IsFalse (child1.IsHandleCreated, "A2");\r
+\r
+ SetUp ();\r
+ o = child1.AccessibleName;\r
+ child1.AccessibleName = "playdoh fun factory";\r
+ Assert.IsFalse (child1.IsHandleCreated, "A3");\r
+\r
+ SetUp ();\r
+ o = child1.AccessibleRole;\r
+ child1.AccessibleRole = AccessibleRole.Border;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A4");\r
+\r
+ SetUp ();\r
+ o = child1.AllowDrop;\r
+ child1.AllowDrop = true;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A5");\r
+ \r
+ // If we don't reset the control, handle creation will fail\r
+ // because AllowDrop requires STAThread, which Nunit doesn't do\r
+\r
+ SetUp ();\r
+ o = child1.Anchor;\r
+ child1.Anchor = AnchorStyles.Right;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A6");\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ o = child1.AutoScrollOffset;\r
+ child1.AutoScrollOffset = new Point (40, 40);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A7");\r
+#endif\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.AutoSize;\r
+ child1.AutoSize = true;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A8");\r
+#endif\r
+\r
+ // A - Form \r
+ SetUp ();\r
+ o = child1.AcceptButton;\r
+ child1.AcceptButton = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA1");\r
+\r
+ SetUp ();\r
+ o = child1.ActiveControl;\r
+ child1.ActiveControl = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA2");\r
+\r
+ SetUp ();\r
+ o = child1.ActiveMdiChild;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA3");\r
+\r
+ SetUp ();\r
+ o = child1.AllowTransparency;\r
+ child1.AllowTransparency = !child1.AllowTransparency;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA4");\r
+\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.AutoScaleDimensions;\r
+ child1.AutoScaleDimensions = SizeF.Empty;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA5");\r
+\r
+ SetUp ();\r
+ o = child1.AutoScaleMode;\r
+ child1.AutoScaleMode = AutoScaleMode.Dpi;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA6");\r
+#endif\r
+ SetUp ();\r
+ o = child1.AutoScroll;\r
+ child1.AutoScroll = !child1.AutoScroll;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA7");\r
+\r
+ SetUp ();\r
+ o = child1.AutoScrollMargin;\r
+ child1.AutoScrollMargin = new Size (child1.AutoScrollMargin.Width + 1, child1.AutoScrollMargin.Height + 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA8");\r
+\r
+ SetUp ();\r
+ o = child1.AutoScrollMinSize;\r
+ child1.AutoScrollMinSize = new Size (child1.AutoScrollMinSize.Width + 1, child1.AutoScrollMinSize.Height + 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA9");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ o = child1.AutoScrollOffset;\r
+ child1.AutoScrollOffset = new Point (child1.AutoScrollOffset.X + 1, child1.AutoScrollOffset.Y + 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA10"); \r
+#endif\r
+\r
+ SetUp ();\r
+ o = child1.AutoScrollPosition;\r
+ child1.AutoScrollPosition = new Point (child1.AutoScrollPosition.X + 1, child1.AutoScrollPosition.Y + 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA11");\r
+#if NET_2_0\r
+\r
+ SetUp ();\r
+ o = child1.AutoSize;\r
+ child1.AutoSize = !child1.AutoSize;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA12");\r
+#if !__MonoCS__\r
+ SetUp ();\r
+ o = child1.AutoSizeMode;\r
+ child1.AutoSizeMode = AutoSizeMode.GrowAndShrink;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA13");\r
+#endif\r
+ SetUp ();\r
+ o = child1.AutoValidate;\r
+ child1.AutoValidate = AutoValidate.EnableAllowFocusChange;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FA14");\r
+\r
+#endif\r
+ // B\r
+ SetUp ();\r
+ o = child1.BackColor;\r
+ child1.BackColor = Color.Green;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A9");\r
+\r
+ SetUp ();\r
+ o = child1.BackgroundImage;\r
+ child1.BackgroundImage = new Bitmap (1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A10");\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.BackgroundImageLayout;\r
+ child1.BackgroundImageLayout = ImageLayout.Stretch;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A11");\r
+#endif\r
+ SetUp ();\r
+ o = child1.BindingContext;\r
+ child1.BindingContext = new BindingContext ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A12");\r
+\r
+ SetUp ();\r
+ o = child1.Bottom;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A13");\r
+\r
+ SetUp ();\r
+ o = child1.Bounds;\r
+ child1.Bounds = new Rectangle (0, 0, 12, 12);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A14");\r
+\r
+\r
+ // B - Form\r
+ SetUp ();\r
+ o = child1.BindingContext;\r
+ child1.BindingContext = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FB1");\r
+\r
+ // C\r
+ SetUp ();\r
+ o = child1.CanFocus;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A15");\r
+\r
+ SetUp ();\r
+ o = child1.CanSelect;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A16");\r
+\r
+ SetUp ();\r
+ o = child1.Capture;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A17a");\r
+\r
+ SetUp ();\r
+ child1.Capture = true;\r
+ Assert.IsTrue (child1.IsHandleCreated, "A17b");\r
+\r
+ SetUp ();\r
+ o = child1.CausesValidation;\r
+ child1.CausesValidation = false;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A18");\r
+\r
+ SetUp ();\r
+ o = child1.ClientRectangle;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A19");\r
+\r
+ SetUp ();\r
+ o = child1.ClientSize;\r
+ child1.ClientSize = new Size (30, 30);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A20");\r
+\r
+ SetUp ();\r
+ o = child1.CompanyName;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A21");\r
+\r
+ SetUp ();\r
+ o = child1.Container;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A22");\r
+\r
+ SetUp ();\r
+ o = child1.ContainsFocus;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A23");\r
+\r
+ SetUp ();\r
+ o = child1.ContextMenu;\r
+ child1.ContextMenu = new ContextMenu ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A24");\r
+\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.ContextMenuStrip;\r
+ child1.ContextMenuStrip = new ContextMenuStrip ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A25");\r
+#endif\r
+ SetUp ();\r
+ o = child1.Controls;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A26");\r
+\r
+ SetUp ();\r
+ o = child1.Created;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A27");\r
+\r
+ SetUp ();\r
+ o = child1.Cursor;\r
+ child1.Cursor = Cursors.Arrow;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A28");\r
+\r
+ // C - Form\r
+ SetUp ();\r
+ o = child1.CancelButton;\r
+ child1.CancelButton = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FC1");\r
+\r
+ SetUp ();\r
+ o = child1.ClientSize;\r
+ child1.ClientSize = new Size (child1.ClientSize.Width + 1, child1.ClientSize.Height + 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FC2");\r
+\r
+ SetUp ();\r
+ o = child1.Container;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FC3");\r
+\r
+ SetUp ();\r
+ o = child1.ControlBox;\r
+ child1.ControlBox = !child1.ControlBox;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FC4");\r
+#if NET_2_0\r
+\r
+ SetUp ();\r
+ o = child1.CurrentAutoScaleDimensions;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FC5"); \r
+#endif\r
+\r
+ // D\r
+ SetUp ();\r
+ o = child1.DataBindings;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A29");\r
+\r
+ SetUp ();\r
+ o = child1.DisplayRectangle;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A30");\r
+\r
+ SetUp ();\r
+ o = child1.Disposing;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A31");\r
+\r
+ SetUp ();\r
+ o = child1.Dock;\r
+ child1.Dock = DockStyle.Fill;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A32");\r
+\r
+ // D - Form\r
+ SetUp ();\r
+ o = child1.DataBindings;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD6");\r
+\r
+ SetUp ();\r
+ o = child1.DesktopBounds;\r
+ child1.DesktopBounds = new Rectangle (3, 5, child1.DesktopBounds.Width + 1, child1.DesktopBounds.Height + 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD7");\r
+\r
+ SetUp ();\r
+ o = child1.DesktopLocation;\r
+ child1.DesktopLocation = child1.DesktopLocation + new Size (1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD8");\r
+\r
+ SetUp ();\r
+ o = child1.DialogResult;\r
+ child1.DialogResult = DialogResult.Abort;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD9");\r
+\r
+ SetUp ();\r
+ o = child1.DisplayRectangle;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD10");\r
+\r
+ SetUp ();\r
+ o = child1.Disposing;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD11");\r
+\r
+ SetUp ();\r
+ o = child1.Dock;\r
+ child1.Dock = DockStyle.Right;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FD12");\r
+\r
+ // E-H\r
+ SetUp ();\r
+ o = child1.Enabled;\r
+ child1.Enabled = false;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A33");\r
+\r
+ SetUp ();\r
+ o = child1.Focused;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A34");\r
+\r
+ SetUp ();\r
+ o = child1.Font;\r
+ child1.Font = new Font (child1.Font, FontStyle.Bold);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A35");\r
+\r
+ SetUp ();\r
+ o = child1.ForeColor;\r
+ child1.ForeColor = Color.Green;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A36");\r
+\r
+ SetUp ();\r
+ o = child1.Handle;\r
+ Assert.IsTrue (child1.IsHandleCreated, "A37");\r
+\r
+ SetUp ();\r
+ o = child1.HasChildren;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A38");\r
+\r
+ SetUp ();\r
+ o = child1.Height;\r
+ child1.Height = 12;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A39");\r
+\r
+ // E-H - Form\r
+ SetUp ();\r
+ o = child1.FormBorderStyle;\r
+ child1.FormBorderStyle = FormBorderStyle.FixedToolWindow;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FF1");\r
+\r
+ SetUp ();\r
+ o = child1.HelpButton;\r
+ child1.HelpButton = !child1.HelpButton;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FH1");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ o = child1.HorizontalScroll;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FH2"); \r
+#endif\r
+ // I - L\r
+ SetUp ();\r
+ child1.ImeMode = ImeMode.On;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A40");\r
+\r
+ SetUp ();\r
+ o = child1.InvokeRequired;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A41");\r
+\r
+ SetUp ();\r
+ o = child1.IsAccessible;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A42");\r
+\r
+ SetUp ();\r
+ o = child1.IsDisposed;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A43");\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ o = child1.IsMirrored;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A44");\r
+#endif\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.LayoutEngine;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A45");\r
+#endif\r
+ SetUp ();\r
+ o = child1.Left;\r
+ child1.Left = 15;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A46");\r
+\r
+ SetUp ();\r
+ o = child1.Location;\r
+ child1.Location = new Point (20, 20);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A47");\r
+\r
+ // I - L - Form\r
+\r
+ SetUp ();\r
+ o = child1.Icon;\r
+ child1.Icon = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FI1");\r
+\r
+ SetUp ();\r
+ o = child1.IsMdiChild;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FI2");\r
+\r
+ SetUp ();\r
+ o = child1.IsMdiContainer;\r
+ child1.IsMdiContainer = false;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FI3");\r
+\r
+ SetUp ();\r
+ o = child1.IsRestrictedWindow;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FI4");\r
+\r
+ SetUp ();\r
+ o = child1.KeyPreview;\r
+ child1.KeyPreview = !child1.KeyPreview;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FK1");\r
+\r
+ SetUp ();\r
+ o = child1.Location;\r
+ child1.Location = child1.Location + new Size (1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FL1");\r
+ \r
+ \r
+ // M - N\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.Margin;\r
+ child1.Margin = new Padding (6);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A48");\r
+\r
+ SetUp ();\r
+ o = child1.MaximumSize;\r
+ child1.MaximumSize = new Size (500, 500);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A49");\r
+\r
+ SetUp ();\r
+ o = child1.MinimumSize;\r
+ child1.MinimumSize = new Size (100, 100);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A50");\r
+#endif\r
+ SetUp ();\r
+ o = child1.Name;\r
+ child1.Name = "web";\r
+ Assert.IsFalse (child1.IsHandleCreated, "A51");\r
+\r
+#if NET_2_0\r
+ // M - O - Form\r
+ SetUp ();\r
+ o = child1.MainMenuStrip;\r
+ child1.MainMenuStrip = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM1"); \r
+#endif\r
+\r
+ SetUp ();\r
+ o = child1.MaximizeBox;\r
+ child1.MaximizeBox = !child1.MaximizeBox;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM2");\r
+\r
+ SetUp ();\r
+ o = child1.MaximumSize;\r
+ child1.MaximumSize = child1.MaximumSize + new Size (1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM3");\r
+\r
+ SetUp ();\r
+ o = child1.MdiChildren;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM4");\r
+\r
+ SetUp ();\r
+ o = child1.MdiParent;\r
+ child1.MdiParent = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM5");\r
+\r
+ SetUp ();\r
+ o = child1.Menu;\r
+ child1.Menu = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM6");\r
+\r
+ SetUp ();\r
+ o = child1.MergedMenu;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM7");\r
+\r
+ SetUp ();\r
+ o = child1.MinimizeBox;\r
+ child1.MinimizeBox = !child1.MinimizeBox;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM8");\r
+\r
+ SetUp ();\r
+ o = child1.MinimumSize;\r
+ child1.MinimumSize = child1.MinimumSize + new Size (1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM9");\r
+\r
+ SetUp ();\r
+ o = child1.Modal;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FM10");\r
+\r
+ SetUp ();\r
+ o = child1.Opacity;\r
+ child1.Opacity = 0.9;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FO1");\r
+\r
+ SetUp ();\r
+ o = child1.OwnedForms;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FO2");\r
+\r
+ SetUp ();\r
+ o = child1.Owner;\r
+ child1.Owner = null;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FO3");\r
+ \r
+ // P - R\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.Padding;\r
+ child1.Padding = new Padding (4);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A52");\r
+#endif\r
+ try {\r
+ SetUp ();\r
+ o = child1.Parent;\r
+ child1.TopLevel = false;\r
+ child1.Parent = new Form ();\r
+ Assert.Fail ("A53 - Expected ArgumentException, got no exception");\r
+ } catch (ArgumentException ex) {\r
+ TestHelper.RemoveWarning (ex);\r
+ } catch (Exception ex) {\r
+ Assert.Fail ("A53 - Expected ArgumentException, got " + ex.GetType ().Name);\r
+ } finally {\r
+ Assert.IsFalse (child1.IsHandleCreated, "A53");\r
+ }\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.PreferredSize;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A54");\r
+#endif\r
+ SetUp ();\r
+ o = child1.ProductName;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A55");\r
+\r
+ SetUp ();\r
+ o = child1.ProductVersion;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A56");\r
+\r
+ SetUp ();\r
+ o = child1.RecreatingHandle;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A57");\r
+\r
+ SetUp ();\r
+ o = child1.Region;\r
+ child1.Region = new Region (new Rectangle (0, 0, 177, 177));\r
+ Assert.IsFalse (child1.IsHandleCreated, "A58");\r
+\r
+ SetUp ();\r
+ o = child1.Right;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A59");\r
+\r
+ SetUp ();\r
+ o = child1.RightToLeft;\r
+ child1.RightToLeft = RightToLeft.Yes;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A60");\r
+\r
+ // P - R - Form\r
+ SetUp ();\r
+ o = child1.ParentForm;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FP1");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ o = child1.RestoreBounds;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FR1"); \r
+#endif\r
+\r
+\r
+ // S - W\r
+ SetUp ();\r
+ o = child1.Site;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A61");\r
+\r
+ SetUp ();\r
+ o = child1.Size;\r
+ child1.Size = new Size (188, 188);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A62");\r
+\r
+ SetUp ();\r
+ o = child1.TabIndex;\r
+ child1.TabIndex = 5;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A63");\r
+\r
+ SetUp ();\r
+ o = child1.Tag;\r
+ child1.Tag = "moooooooo";\r
+ Assert.IsFalse (child1.IsHandleCreated, "A64");\r
+\r
+ SetUp ();\r
+ o = child1.Text;\r
+ child1.Text = "meoooowww";\r
+ Assert.IsFalse (child1.IsHandleCreated, "A65");\r
+\r
+ SetUp ();\r
+ o = child1.Top;\r
+ child1.Top = 16;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A66");\r
+\r
+ SetUp ();\r
+ o = child1.TopLevelControl;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A67");\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ o = child1.UseWaitCursor;\r
+ child1.UseWaitCursor = true;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A68");\r
+#endif\r
+ SetUp ();\r
+ o = child1.Visible;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A69-a");\r
+ \r
+ SetUp ();\r
+ child1.Visible = true;\r
+ Assert.IsTrue (child1.IsHandleCreated, "A69-b");\r
+ \r
+ SetUp ();\r
+ o = child1.Width;\r
+ child1.Width = 190;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A70");\r
+\r
+ SetUp ();\r
+ o = child1.WindowTarget;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A71");\r
+\r
+ // S - W - Form\r
+\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.ShowIcon;\r
+ child1.ShowIcon = !child1.ShowIcon;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FS1"); \r
+#endif\r
+\r
+ SetUp ();\r
+ o = child1.ShowInTaskbar;\r
+ child1.ShowInTaskbar = !child1.ShowInTaskbar;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FS2");\r
+\r
+ SetUp ();\r
+ o = child1.Size;\r
+ child1.Size = child1.Size + new Size (1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "FS3");\r
+\r
+ SetUp ();\r
+ o = child1.SizeGripStyle;\r
+ child1.SizeGripStyle = SizeGripStyle.Show;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FS4");\r
+\r
+ SetUp ();\r
+ o = child1.StartPosition;\r
+ child1.StartPosition = FormStartPosition.Manual;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FS5");\r
+\r
+ SetUp ();\r
+ o = child1.Text;\r
+ child1.Text = "hooray!";\r
+ Assert.IsFalse (child1.IsHandleCreated, "FT1");\r
+\r
+ try {\r
+ SetUp ();\r
+ o = child1.TopLevel;\r
+ child1.TopLevel = !child1.TopLevel;\r
+ Assert.Fail ("FT2 - expected ArgumentException, got no exception.");\r
+ } catch (ArgumentException ex) {\r
+ TestHelper.RemoveWarning (ex);\r
+ } catch (Exception ex) {\r
+ Assert.Fail ("FT2 - expected ArgumentException, got " + ex.GetType ().Name);\r
+ } finally {\r
+ Assert.IsFalse (child1.IsHandleCreated, "FT2");\r
+ }\r
+\r
+ SetUp ();\r
+ o = child1.TopMost;\r
+ child1.TopMost = !child1.TopMost;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FT3");\r
+\r
+ SetUp ();\r
+ o = child1.TransparencyKey;\r
+ child1.TransparencyKey = Color.BurlyWood;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FT4");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ o = child1.VerticalScroll;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FV1"); \r
+#endif\r
+\r
+ SetUp ();\r
+ o = child1.WindowState;\r
+ child1.WindowState = FormWindowState.Maximized;\r
+ Assert.IsFalse (child1.IsHandleCreated, "FW1");\r
+\r
+ TestHelper.RemoveWarning (o);\r
+ }\r
+\r
+ [Test]\r
+ public void TestProtectedProperties ()\r
+ {\r
+ // Not a surprise, but none of these cause handle creation.\r
+ // Included just to absolutely certain.\r
+ object o;\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ o = child1.PublicCanRaiseEvents;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A1");\r
+#endif\r
+ SetUp ();\r
+ o = child1.PublicCreateParams;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A2");\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.PublicDefaultCursor;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A3");\r
+#endif\r
+ SetUp ();\r
+ o = child1.PublicDefaultImeMode;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A4");\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.PublicDefaultMargin;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A5");\r
+ \r
+ SetUp ();\r
+ o = child1.PublicDefaultMaximumSize;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A6");\r
+\r
+ SetUp ();\r
+ o = child1.PublicDefaultMinimumSize;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A7");\r
+\r
+ SetUp ();\r
+ o = child1.PublicDefaultPadding;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A8");\r
+\r
+ SetUp ();\r
+ o = child1.PublicDefaultSize;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A9");\r
+\r
+ SetUp ();\r
+ o = child1.PublicDoubleBuffered;\r
+ child1.PublicDoubleBuffered = !child1.PublicDoubleBuffered;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A10");\r
+#endif\r
+ SetUp ();\r
+ o = child1.PublicFontHeight;\r
+ child1.PublicFontHeight = child1.PublicFontHeight + 1;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A11");\r
+\r
+ SetUp ();\r
+ o = child1.PublicRenderRightToLeft;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A12");\r
+\r
+ SetUp ();\r
+ o = child1.PublicResizeRedraw;\r
+ child1.PublicResizeRedraw = !child1.PublicResizeRedraw;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A13");\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ o = child1.PublicScaleChildren;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A14");\r
+#endif\r
+ SetUp ();\r
+ o = child1.PublicShowFocusCues;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A15");\r
+\r
+ SetUp ();\r
+ o = child1.PublicShowKeyboardCues;\r
+ Assert.IsFalse (child1.IsHandleCreated, "A16");\r
+\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.PublicAutoScaleFactor;\r
+ Assert.IsFalse (child1.IsHandleCreated, "F1"); \r
+#endif\r
+ SetUp ();\r
+ o = child1.PublicDesignMode;\r
+ Assert.IsFalse (child1.IsHandleCreated, "F2");\r
+\r
+ SetUp ();\r
+ o = child1.PublicEvents;\r
+ Assert.IsFalse (child1.IsHandleCreated, "F3");\r
+\r
+ SetUp ();\r
+ o = child1.PublicHScroll;\r
+ child1.PublicHScroll = !child1.PublicHScroll;\r
+ Assert.IsFalse (child1.IsHandleCreated, "F4");\r
+\r
+ SetUp ();\r
+ o = child1.PublicMaximizedBounds;\r
+ child1.PublicMaximizedBounds = new Rectangle (1, 1, 1, 1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F5");\r
+\r
+#if NET_2_0\r
+ SetUp ();\r
+ o = child1.PublicShowWithoutActivation;\r
+ Assert.IsFalse (child1.IsHandleCreated, "F6"); \r
+#endif\r
+ SetUp ();\r
+ o = child1.PublicVScroll;\r
+ child1.PublicVScroll = !child1.PublicVScroll;\r
+ Assert.IsFalse (child1.IsHandleCreated, "F7");\r
+ \r
+\r
+ TestHelper.RemoveWarning (o);\r
+ }\r
+\r
+ [Test]\r
+ public void TestPublicMethods ()\r
+ {\r
+ // Public Methods that force Handle creation:\r
+ // - CreateGraphics ()\r
+ // - Focus ()\r
+ // - GetChildAtPoint ()\r
+ // - PointToClient ()\r
+ // - PointToScreen ()\r
+ // - RectangleToClient ()\r
+ // - RectangleToScreen ()\r
+ // - Select ()\r
+ \r
+ SetUp ();\r
+ child1.BringToFront ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A1");\r
+\r
+ SetUp ();\r
+ child1.Contains (new Form ());\r
+ Assert.IsFalse (child1.IsHandleCreated, "A2");\r
+\r
+ SetUp ();\r
+ child1.CreateControl ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A3");\r
+\r
+ SetUp ();\r
+ Graphics g = child1.CreateGraphics ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A4");\r
+ g.Dispose ();\r
+\r
+ SetUp ();\r
+ child1.Dispose ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A5");\r
+\r
+ // This is weird, it causes a form to appear that won't go away until you move the mouse over it, \r
+ // but it doesn't create a handle??\r
+ //DragDropEffects d = c.DoDragDrop ("yo", DragDropEffects.None);\r
+ //Assert.IsFalse (c.IsHandleCreated, "A6");\r
+ //Assert.AreEqual (DragDropEffects.None, d, "A6b");\r
+ \r
+ //Bitmap b = new Bitmap (100, 100);\r
+ //c.DrawToBitmap (b, new Rectangle (0, 0, 100, 100));\r
+ //Assert.IsFalse (c.IsHandleCreated, "A7");\r
+ //b.Dispose ();\r
+ SetUp ();\r
+ child1.FindForm ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A8");\r
+\r
+ SetUp ();\r
+ child1.Focus ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A9");\r
+\r
+ SetUp ();\r
+ child1.GetChildAtPoint (new Point (10, 10));\r
+ Assert.IsTrue (child1.IsHandleCreated, "A10");\r
+\r
+ SetUp ();\r
+ child1.GetContainerControl ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A11");\r
+ \r
+ SetUp ();\r
+ child1.GetNextControl (new Control (), true);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A12");\r
+#if NET_2_0\r
+ SetUp ();\r
+ child1.GetPreferredSize (Size.Empty);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A13");\r
+#endif\r
+ SetUp ();\r
+ child1.Hide ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A14");\r
+\r
+ SetUp ();\r
+ child1.Invalidate ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A15");\r
+\r
+ child1.Invoke (new InvokeDelegate (InvokeMethod));\r
+ Assert.IsFalse (child1.IsHandleCreated, "A16");\r
+ \r
+ SetUp ();\r
+ child1.PerformLayout ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A17");\r
+\r
+ SetUp ();\r
+ child1.PointToClient (new Point (100, 100));\r
+ Assert.IsTrue (child1.IsHandleCreated, "A18");\r
+\r
+ SetUp ();\r
+ child1.PointToScreen (new Point (100, 100));\r
+ Assert.IsTrue (child1.IsHandleCreated, "A19");\r
+ \r
+ //c.PreProcessControlMessage ???\r
+ //c.PreProcessMessage ???\r
+ SetUp ();\r
+ child1.RectangleToClient (new Rectangle (0, 0, 100, 100));\r
+ Assert.IsTrue (child1.IsHandleCreated, "A20");\r
+ \r
+ SetUp ();\r
+ child1.RectangleToScreen (new Rectangle (0, 0, 100, 100));\r
+ Assert.IsTrue (child1.IsHandleCreated, "A21");\r
+\r
+ SetUp ();\r
+ child1.Refresh ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A22");\r
+\r
+ SetUp ();\r
+ child1.ResetBackColor ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A23");\r
+\r
+ SetUp ();\r
+ child1.ResetBindings ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A24");\r
+\r
+ SetUp ();\r
+ child1.ResetCursor ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A25");\r
+\r
+ SetUp ();\r
+ child1.ResetFont ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A26");\r
+\r
+ SetUp ();\r
+ child1.ResetForeColor ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A27");\r
+\r
+ SetUp ();\r
+ child1.ResetImeMode ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A28");\r
+\r
+ SetUp ();\r
+ child1.ResetRightToLeft ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A29");\r
+\r
+ SetUp ();\r
+ child1.ResetText ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A30");\r
+\r
+ SetUp ();\r
+ child1.SuspendLayout ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A31");\r
+\r
+ SetUp ();\r
+ child1.ResumeLayout ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A32");\r
+ \r
+#if NET_2_0\r
+ SetUp ();\r
+ child1.Scale (new SizeF (1.5f, 1.5f));\r
+ Assert.IsFalse (child1.IsHandleCreated, "A33");\r
+#endif\r
+ SetUp ();\r
+ child1.Select ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A34");\r
+\r
+ SetUp ();\r
+ child1.SelectNextControl (new Control (), true, true, true, true);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A35");\r
+\r
+ SetUp ();\r
+ child1.SetBounds (0, 0, 100, 100);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A36");\r
+\r
+ SetUp ();\r
+ child1.Update ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A37");\r
+\r
+ // Form\r
+\r
+ SetUp ();\r
+ child1.Activate ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F1");\r
+\r
+ SetUp ();\r
+ child1.AddOwnedForm (new Form ());\r
+ Assert.IsFalse (child1.IsHandleCreated, "F2");\r
+\r
+ SetUp ();\r
+ child1.Close ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F3");\r
+\r
+ SetUp ();\r
+ child1.Hide ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F4");\r
+\r
+ SetUp ();\r
+ child1.LayoutMdi (MdiLayout.Cascade);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F5");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ child1.PerformAutoScale ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F6");\r
+#endif\r
+\r
+ SetUp ();\r
+ child1.PerformLayout ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F7");\r
+\r
+ SetUp ();\r
+ child1.AddOwnedForm (new Form ());\r
+ child1.RemoveOwnedForm (child1.OwnedForms [child1.OwnedForms.Length - 1]);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F8");\r
+\r
+ SetUp ();\r
+ child1.ScrollControlIntoView (null);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F9");\r
+\r
+ SetUp ();\r
+ child1.SetAutoScrollMargin (7, 13);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F10");\r
+\r
+ SetUp ();\r
+ child1.SetDesktopBounds (-1, -1, 144, 169);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F11");\r
+\r
+ SetUp ();\r
+ child1.SetDesktopLocation (7, 13);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F12");\r
+\r
+#if NET_2_0\r
+ try {\r
+ SetUp ();\r
+ child1.Show (null);\r
+ Assert.Fail ("F13 - expected InvalidOperationException, got no exception.");\r
+ } catch (InvalidOperationException ex) {\r
+ TestHelper.RemoveWarning (ex);\r
+ } catch (Exception ex) {\r
+ Assert.Fail ("F13 - expected InvalidOperationException, got " + ex.GetType ().Name);\r
+ } finally {\r
+ Assert.IsFalse (child1.IsHandleCreated, "F13");\r
+ }\r
+#endif\r
+ \r
+ //c.ShowDialog ()\r
+\r
+ SetUp ();\r
+ child1.ToString ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F14");\r
+\r
+ SetUp ();\r
+ child1.Validate ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F15");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ child1.ValidateChildren ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F16"); \r
+#endif\r
+ }\r
+\r
+ [Test]\r
+ public void Show ()\r
+ {\r
+ SetUp ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A1");\r
+ child1.HandleCreated += new EventHandler (HandleCreated_WriteStackTrace);\r
+ child1.Show ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A2");\r
+ }\r
+\r
+ void HandleCreated_WriteStackTrace (object sender, EventArgs e)\r
+ {\r
+ Console.WriteLine (Environment.StackTrace);\r
+ }\r
+\r
+ public delegate void InvokeDelegate ();\r
+ public void InvokeMethod () { invokeform.Text = "methodinvoked"; }\r
+\r
+ Form invokeform = new Form ();\r
+\r
+ [Test]\r
+ public void TestProtectedMethods ()\r
+ {\r
+ // Protected Methods that force Handle creation:\r
+ // - CreateAccessibilityInstance ()\r
+ // - CreateHandle ()\r
+ // - IsInputChar ()\r
+ // - Select ()\r
+ // - SetVisibleCore ()\r
+ \r
+ SetUp ();\r
+ child1.PublicAccessibilityNotifyClients (AccessibleEvents.Focus, 0);\r
+#if NET_2_0\r
+ Assert.IsFalse (child1.IsHandleCreated, "A1");\r
+#else\r
+ Assert.IsTrue (child1.IsHandleCreated, "A1");\r
+#endif\r
+ child1.PublicCreateAccessibilityInstance ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A2");\r
+\r
+ SetUp ();\r
+ child1.PublicCreateControlsInstance ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A3");\r
+\r
+ SetUp ();\r
+ child1.PublicCreateHandle ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A4");\r
+\r
+ SetUp ();\r
+ child1.PublicDestroyHandle ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A5");\r
+\r
+#if NET_2_0\r
+ SetUp ();\r
+ child1.PublicGetAccessibilityObjectById (0);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A6");\r
+#endif\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ child1.PublicGetAutoSizeMode ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A7");\r
+\r
+ SetUp ();\r
+ child1.PublicGetScaledBounds (new Rectangle (0, 0, 100, 100), new SizeF (1.5f, 1.5f), BoundsSpecified.All);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A8");\r
+#endif\r
+ SetUp ();\r
+ child1.PublicGetStyle (ControlStyles.FixedHeight);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A9");\r
+\r
+ SetUp ();\r
+ child1.PublicGetTopLevel ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A10");\r
+\r
+ SetUp ();\r
+ child1.PublicInitLayout ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A11");\r
+\r
+ SetUp ();\r
+ child1.PublicInvokeGotFocus (child1, EventArgs.Empty);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A12");\r
+\r
+ SetUp ();\r
+ child1.PublicInvokeLostFocus (child1, EventArgs.Empty);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A13");\r
+\r
+ SetUp ();\r
+ child1.PublicInvokeOnClick (child1, EventArgs.Empty);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A14");\r
+\r
+ SetUp ();\r
+ child1.PublicInvokePaint (child1, new PaintEventArgs (Graphics.FromImage (new Bitmap (1, 1)), Rectangle.Empty));\r
+ Assert.IsFalse (child1.IsHandleCreated, "A15");\r
+\r
+ SetUp ();\r
+ child1.PublicInvokePaintBackground (child1, new PaintEventArgs (Graphics.FromImage (new Bitmap (1, 1)), Rectangle.Empty));\r
+ Assert.IsFalse (child1.IsHandleCreated, "A16");\r
+\r
+ SetUp ();\r
+ child1.PublicIsInputChar ('c');\r
+ Assert.IsTrue (child1.IsHandleCreated, "A17");\r
+\r
+ SetUp ();\r
+ child1.PublicIsInputKey (Keys.B);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A18");\r
+\r
+ SetUp ();\r
+ child1.PublicNotifyInvalidate (Rectangle.Empty);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A19");\r
+\r
+ SetUp ();\r
+ child1.PublicOnVisibleChanged (EventArgs.Empty);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A20");\r
+\r
+ SetUp ();\r
+ child1.PublicRaiseDragEvent (null, null);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A21");\r
+\r
+ SetUp ();\r
+ child1.PublicRaiseKeyEvent (null, null);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A22");\r
+\r
+ SetUp ();\r
+ child1.PublicRaiseMouseEvent (null, null);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A23");\r
+\r
+ SetUp ();\r
+ child1.PublicRaisePaintEvent (null, null);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A24");\r
+\r
+ SetUp ();\r
+ child1.PublicRecreateHandle ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A25");\r
+\r
+ SetUp ();\r
+ child1.PublicResetMouseEventArgs ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A26");\r
+\r
+ SetUp ();\r
+ child1.PublicRtlTranslateAlignment (ContentAlignment.BottomLeft);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A27");\r
+\r
+ SetUp ();\r
+ child1.PublicRtlTranslateContent (ContentAlignment.BottomLeft);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A28");\r
+\r
+ SetUp ();\r
+ child1.PublicRtlTranslateHorizontal (HorizontalAlignment.Left);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A29");\r
+\r
+ SetUp ();\r
+ child1.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A30");\r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ child1.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A31");\r
+#endif\r
+ SetUp ();\r
+ child1.PublicScaleCore (1.5f, 1.5f);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A32");\r
+\r
+ SetUp ();\r
+ child1.PublicSelect ();\r
+ Assert.IsTrue (child1.IsHandleCreated, "A33");\r
+ \r
+#if !__MonoCS__ && NET_2_0\r
+ SetUp ();\r
+ child1.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A34");\r
+#endif\r
+ SetUp ();\r
+ child1.PublicSetBoundsCore (0, 0, 100, 100, BoundsSpecified.All);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A35");\r
+\r
+ SetUp ();\r
+ child1.PublicSetClientSizeCore (122, 122);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A36");\r
+\r
+ SetUp ();\r
+ child1.PublicSetStyle (ControlStyles.FixedHeight, true);\r
+ Assert.IsFalse (child1.IsHandleCreated, "A37");\r
+\r
+ try {\r
+ SetUp ();\r
+ child1.PublicSetTopLevel (true);\r
+ Assert.Fail ("A38, expected ArgumentException, got no exception");\r
+ } catch (ArgumentException ex) {\r
+ TestHelper.RemoveWarning (ex);\r
+ } catch (Exception ex) {\r
+ Assert.Fail ("A38, expected ArgumentException, got " + ex.GetType ().Name);\r
+ } finally {\r
+ Assert.IsFalse (child1.IsHandleCreated, "A38");\r
+ }\r
+\r
+ SetUp ();\r
+ child1.PublicSetVisibleCore (true);\r
+ Assert.IsTrue (child1.IsHandleCreated, "A39");\r
+#if NET_2_0\r
+ SetUp ();\r
+ child1.PublicSizeFromClientSize (new Size (160, 160));\r
+ Assert.IsFalse (child1.IsHandleCreated, "A40");\r
+#endif\r
+\r
+ SetUp ();\r
+ child1.PublicUpdateBounds ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A41");\r
+\r
+ SetUp ();\r
+ child1.PublicUpdateStyles ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A42");\r
+\r
+ SetUp ();\r
+ child1.PublicUpdateZOrder ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "A43");\r
+\r
+\r
+ // Form\r
+\r
+ SetUp ();\r
+ main.PublicActivateMdiChild (child1);\r
+ main.PublicActivateMdiChild (child2);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F1-a");\r
+ Assert.IsFalse (child2.IsHandleCreated, "F1-b");\r
+\r
+ SetUp ();\r
+ child1.PublicAdjustFormScrollbars (true);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F2");\r
+\r
+ SetUp ();\r
+ child1.PublicCenterToParent ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F3");\r
+\r
+ SetUp ();\r
+ child1.PublicCenterToScreen ();\r
+ Assert.IsFalse (child1.IsHandleCreated, "F4");\r
+\r
+ SetUp ();\r
+ child1.PublicGetScrollState (1);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F5");\r
+\r
+ SetUp ();\r
+ child1.PublicGetService (typeof (int));\r
+ Assert.IsFalse (child1.IsHandleCreated, "F6");\r
+\r
+ SetUp ();\r
+ Message m = new Message ();\r
+ child1.PublicProcessCmdKey (ref m, Keys.C);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F7");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessDialogChar ('p');\r
+ Assert.IsFalse (child1.IsHandleCreated, "F8");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessDialogKey (Keys.D);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F9");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessKeyEventArgs (ref m);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F10");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessKeyMessage (ref m);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F11");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessKeyPreview (ref m);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F12");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessMnemonic ('Z');\r
+ Assert.IsFalse (child1.IsHandleCreated, "F13");\r
+\r
+ SetUp ();\r
+ child1.PublicProcessTabKey (true);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F14");\r
+\r
+#if NET_2_0 && !__MonoCS__\r
+ SetUp ();\r
+ child1.Controls.Add (new Control ());\r
+ child1.PublicScrollToControl (child1.Controls [0]);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F15");\r
+#endif\r
+\r
+ SetUp ();\r
+ child1.PublicSelect (true, true);\r
+ Assert.IsTrue (child1.IsHandleCreated, "F16");\r
+\r
+ SetUp ();\r
+ child1.PublicSetDisplayRectLocation (13, 17);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F17");\r
+\r
+ SetUp ();\r
+ child1.PublicSetScrollState (5, false);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F18");\r
+\r
+ SetUp ();\r
+ child1.PublicUpdateDefaultButton (3, false);\r
+ Assert.IsFalse (child1.IsHandleCreated, "F19");\r
+ }\r
+\r
+ private class ProtectedForm : Form\r
+ {\r
+ // Properties\r
+#if NET_2_0\r
+ public SizeF PublicAutoScaleFactor { get { return base.AutoScaleFactor; } } \r
+#endif\r
+#if !__MonoCS__ && NET_2_0\r
+ public bool PublicCanRaiseEvents { get { return base.CanRaiseEvents; } }\r
+#endif\r
+ public CreateParams PublicCreateParams { get { return base.CreateParams; } }\r
+#if NET_2_0\r
+ public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }\r
+#endif\r
+ public ImeMode PublicDefaultImeMode { get { return base.DefaultImeMode; } }\r
+#if NET_2_0\r
+ public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }\r
+ public Size PublicDefaultMaximumSize { get { return base.DefaultMaximumSize; } }\r
+ public Size PublicDefaultMinimumSize { get { return base.DefaultMinimumSize; } }\r
+ public Padding PublicDefaultPadding { get { return base.DefaultPadding; } }\r
+ public Size PublicDefaultSize { get { return base.DefaultSize; } }\r
+#endif\r
+ public bool PublicDesignMode { get {return base.DesignMode; } }\r
+#if NET_2_0\r
+ public bool PublicDoubleBuffered { get { return base.DoubleBuffered; } set { base.DoubleBuffered = value; } }\r
+#endif\r
+ public EventHandlerList PublicEvents { get {return base.Events; } } \r
+ public int PublicFontHeight { get { return base.FontHeight; } set { base.FontHeight = value; } }\r
+ public bool PublicHScroll { get {return base.HScroll; } set { base.HScroll = value;} }\r
+ public Rectangle PublicMaximizedBounds { get {return base.MaximizedBounds; } set { base.MaximizedBounds = value; }}\r
+ public bool PublicRenderRightToLeft { get { return base.RenderRightToLeft; } }\r
+ public bool PublicResizeRedraw { get { return base.ResizeRedraw; } set { base.ResizeRedraw = value; } }\r
+#if !__MonoCS__ && NET_2_0\r
+ public bool PublicScaleChildren { get { return base.ScaleChildren; } }\r
+#endif\r
+ public bool PublicShowFocusCues { get { return base.ShowFocusCues; } }\r
+ public bool PublicShowKeyboardCues { get { return base.ShowKeyboardCues; } }\r
+#if NET_2_0\r
+ public bool PublicShowWithoutActivation { get { return base.ShowWithoutActivation; } } \r
+#endif\r
+ public bool PublicVScroll { get { return base.VScroll; } set { base.VScroll = value; } }\r
+ \r
+ \r
+ // Methods\r
+ public void PublicAccessibilityNotifyClients (AccessibleEvents accEvent, int childID) { base.AccessibilityNotifyClients (accEvent, childID); }\r
+ public void PublicActivateMdiChild (Form form) { base.ActivateMdiChild (form); }\r
+ public void PublicAdjustFormScrollbars (bool displayScrollbars) {base.AdjustFormScrollbars (displayScrollbars); }\r
+ public void PublicCenterToParent () { base.CenterToParent (); }\r
+ public void PublicCenterToScreen () { base.CenterToScreen (); }\r
+ public void PublicCreateAccessibilityInstance () { base.CreateAccessibilityInstance (); }\r
+ public void PublicCreateControlsInstance () { base.CreateControlsInstance (); }\r
+ public void PublicCreateHandle () { base.CreateHandle (); }\r
+ public void PublicDestroyHandle () { base.DestroyHandle (); }\r
+#if NET_2_0\r
+ public AccessibleObject PublicGetAccessibilityObjectById (int objectId) { return base.GetAccessibilityObjectById (objectId); }\r
+#endif\r
+#if !__MonoCS__ && NET_2_0\r
+ public AutoSizeMode PublicGetAutoSizeMode () { return base.GetAutoSizeMode (); }\r
+ public Rectangle PublicGetScaledBounds (Rectangle bounds, SizeF factor, BoundsSpecified specified) { return base.GetScaledBounds (bounds, factor, specified); }\r
+#endif\r
+ public bool PublicGetScrollState (int bit) { return base.GetScrollState (bit); }\r
+ public object PublicGetService (Type service) { return base.GetService (service); }\r
+ public bool PublicGetStyle (ControlStyles flag) { return base.GetStyle (flag); }\r
+ public bool PublicGetTopLevel () { return base.GetTopLevel (); }\r
+ public void PublicInitLayout () { base.InitLayout (); }\r
+ public void PublicInvokeGotFocus (Control toInvoke, EventArgs e) { base.InvokeGotFocus (toInvoke, e); }\r
+ public void PublicInvokeLostFocus (Control toInvoke, EventArgs e) { base.InvokeLostFocus (toInvoke, e); }\r
+ public void PublicInvokeOnClick (Control toInvoke, EventArgs e) { base.InvokeOnClick (toInvoke, e); }\r
+ public void PublicInvokePaint (Control c, PaintEventArgs e) { base.InvokePaint (c, e); }\r
+ public void PublicInvokePaintBackground (Control c, PaintEventArgs e) { base.InvokePaintBackground (c, e); }\r
+ public bool PublicIsInputChar (char charCode) { return base.IsInputChar (charCode); }\r
+ public bool PublicIsInputKey (Keys keyData) { return base.IsInputKey (keyData); }\r
+ public void PublicNotifyInvalidate (Rectangle invalidatedArea) { base.NotifyInvalidate (invalidatedArea); }\r
+ public void PublicOnVisibleChanged (EventArgs e) { base.OnVisibleChanged (e); }\r
+ public void PublicProcessCmdKey (ref Message msg, Keys keyData) { base.ProcessCmdKey (ref msg, keyData); }\r
+ public void PublicProcessDialogChar (char charCode) { base.ProcessDialogChar (charCode); }\r
+ public void PublicProcessDialogKey (Keys keyData) { base.ProcessDialogKey (keyData); }\r
+ public void PublicProcessKeyEventArgs (ref Message m) { base.ProcessKeyEventArgs (ref m); }\r
+ public void PublicProcessKeyMessage (ref Message m) { base.ProcessKeyMessage (ref m); }\r
+ public void PublicProcessKeyPreview (ref Message m) { base.ProcessKeyPreview (ref m); }\r
+ public void PublicProcessMnemonic (char charCode) { base.ProcessMnemonic (charCode); }\r
+ public void PublicProcessTabKey (bool forward) { base.ProcessTabKey (forward); }\r
+ public void PublicRaiseDragEvent (Object key, DragEventArgs e) { base.RaiseDragEvent (key, e); }\r
+ public void PublicRaiseKeyEvent (Object key, KeyEventArgs e) { base.RaiseKeyEvent (key, e); }\r
+ public void PublicRaiseMouseEvent (Object key, MouseEventArgs e) { base.RaiseMouseEvent (key, e); }\r
+ public void PublicRaisePaintEvent (Object key, PaintEventArgs e) { base.RaisePaintEvent (key, e); }\r
+ public void PublicRecreateHandle () { base.RecreateHandle (); }\r
+ public void PublicResetMouseEventArgs () { base.ResetMouseEventArgs (); }\r
+ public ContentAlignment PublicRtlTranslateAlignment (ContentAlignment align) { return base.RtlTranslateAlignment (align); }\r
+ public ContentAlignment PublicRtlTranslateContent (ContentAlignment align) { return base.RtlTranslateContent (align); }\r
+ public HorizontalAlignment PublicRtlTranslateHorizontal (HorizontalAlignment align) { return base.RtlTranslateHorizontal (align); }\r
+ public LeftRightAlignment PublicRtlTranslateLeftRight (LeftRightAlignment align) { return base.RtlTranslateLeftRight (align); }\r
+#if !__MonoCS__ && NET_2_0\r
+ public void PublicScaleControl (SizeF factor, BoundsSpecified specified) { base.ScaleControl (factor, specified); }\r
+#endif\r
+ public void PublicScaleCore (float dx, float dy) { base.ScaleCore (dx, dy); }\r
+#if NET_2_0 && !__MonoCS__\r
+ public void PublicScrollToControl (Control activeControl) { base.ScrollToControl (activeControl); } \r
+#endif\r
+ public void PublicSelect () { base.Select (); }\r
+ public void PublicSelect (bool directed, bool forward) { base.Select (directed, forward); }\r
+\r
+#if !__MonoCS__ && NET_2_0\r
+ public void PublicSetAutoSizeMode (AutoSizeMode mode) { base.SetAutoSizeMode (mode); }\r
+#endif\r
+ public void PublicSetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) { base.SetBoundsCore (x, y, width, height, specified); }\r
+ public void PublicSetClientSizeCore (int x, int y) { base.SetClientSizeCore (x, y); }\r
+ public void PublicSetDisplayRectLocation (int x, int y) { base.SetDisplayRectLocation (x, y); }\r
+ public void PublicSetScrollState (int bit, bool value) { base.SetScrollState (bit, value); }\r
+ public void PublicSetStyle (ControlStyles flag, bool value) { base.SetStyle (flag, value); }\r
+ public void PublicSetTopLevel (bool value) { base.SetTopLevel (value); }\r
+ public void PublicSetVisibleCore (bool value) { base.SetVisibleCore (value); }\r
+#if NET_2_0\r
+ public Size PublicSizeFromClientSize (Size clientSize) { return base.SizeFromClientSize (clientSize); }\r
+#endif\r
+ public void PublicUpdateBounds () { base.UpdateBounds (); }\r
+ public void PublicUpdateDefaultButton (int bit, bool value) { base.UpdateDefaultButton (); }\r
+ public void PublicUpdateStyles () { base.UpdateStyles (); }\r
+ public void PublicUpdateZOrder () { base.UpdateZOrder (); }\r
+ }\r
+ }\r
+}
\ No newline at end of file
}\r
\r
private void SendKeysTest1_tick(object sender, EventArgs e) {\r
+ if (f.InvokeRequired) {\r
+ f.Invoke (new EventHandler (SendKeysTest1_tick), new object [] { sender, e });\r
+ return;\r
+ }\r
t.Stop();\r
Assert.AreEqual(2, keys.Count, "#A1");\r
Keys k = (Keys)keys.Dequeue();\r
Assert.AreEqual("A", k.key, "#A6");\r
\r
t.Dispose();\r
- Application.Exit();\r
+ f.Close ();\r
}\r
\r
[SetUp]\r
\r
private void SendKeysTest2_tick(object sender, EventArgs e) {\r
t.Stop();\r
+ if (f.InvokeRequired) {\r
+ f.Invoke (new EventHandler (SendKeysTest2_tick), new object [] {sender, e});\r
+ return;\r
+ }\r
Assert.AreEqual(12, keys.Count, "#A1");\r
\r
Keys k = (Keys)keys.Dequeue();\r
Assert.AreEqual("A", c.Text, "#e1");\r
\r
t.Dispose();\r
- Application.Exit();\r
+ f.Close ();\r
}\r
\r
}\r
public class TextBoxTest
{
TextBox textBox;
+ int _invalidated;
+ int _paint;
[SetUp]
public void SetUp()
{
textBox = new TextBox();
+ textBox.Invalidated += new InvalidateEventHandler (TextBox_Invalidated);
+ textBox.Paint += new PaintEventHandler (TextBox_Paint);
+ Reset ();
}
[Test]
// SendKeys.SendWait ("^%");
Assert.AreEqual (true, textBox.AcceptsTab, "#1b");
Assert.AreEqual (true, textBox.AutoSize, "#2");
- Assert.AreEqual ("Window", textBox.BackColor.Name, "#3a");
- textBox.BackColor = Color.White;
- Assert.AreEqual ("White", textBox.BackColor.Name, "#3b");
Assert.AreEqual (null, textBox.BackgroundImage, "#4a");
string gif = "M.gif";
textBox.BackgroundImage = Image.FromFile (gif);
textBox.ClearUndo ();
Assert.AreEqual (false, textBox.CanUndo, "#6c");
- Assert.AreEqual ("WindowText", textBox.ForeColor.Name, "#7");
Assert.AreEqual (true, textBox.HideSelection, "#8");
Assert.AreEqual (1, textBox.Lines.Length, "#9");
Assert.AreEqual (32767, textBox.MaxLength, "#10");
Assert.AreEqual (string.Empty, textBox.Lines [3], "#B7");
}
+ [Test]
+ public void BackColorTest ()
+ {
+ Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#A1");
+ textBox.BackColor = Color.Red;
+ Assert.AreEqual (Color.Red, textBox.BackColor, "#A2");
+ textBox.BackColor = Color.White;
+ Assert.AreEqual (Color.White, textBox.BackColor, "#A3");
+ Assert.AreEqual (0, _invalidated, "#A4");
+ Assert.AreEqual (0, _paint, "#A5");
+
+ Form form = new Form ();
+ form.ShowInTaskbar = false;
+ form.Controls.Add (textBox);
+ form.Show ();
+
+ Assert.AreEqual (Color.White, textBox.BackColor, "#B1");
+ Assert.AreEqual (0, _invalidated, "#B2");
+ Assert.AreEqual (0, _paint, "#B3");
+ textBox.BackColor = Color.Red;
+ Assert.AreEqual (Color.Red, textBox.BackColor, "#B4");
+ Assert.AreEqual (1, _invalidated, "#B5");
+ Assert.AreEqual (0, _paint, "#B6");
+ textBox.BackColor = Color.Red;
+ Assert.AreEqual (Color.Red, textBox.BackColor, "#B7");
+ Assert.AreEqual (1, _invalidated, "#B8");
+ Assert.AreEqual (0, _paint, "#B9");
+ textBox.BackColor = Color.Blue;
+ Assert.AreEqual (Color.Blue, textBox.BackColor, "#B10");
+ Assert.AreEqual (2, _invalidated, "#B11");
+ Assert.AreEqual (0, _paint, "#B12");
+ }
+
[Test]
public void ClearTest ()
{
Assert.AreEqual ("This is a sample test.", textBox.SelectedText, "#34");
}
+ [Test]
+ [Category ("NotWorking")]
+ public void ForeColorTest ()
+ {
+ Assert.AreEqual (SystemColors.WindowText, textBox.ForeColor, "#A1");
+ textBox.ForeColor = Color.Red;
+ Assert.AreEqual (Color.Red, textBox.ForeColor, "#A2");
+ textBox.ForeColor = Color.White;
+ Assert.AreEqual (Color.White, textBox.ForeColor, "#A3");
+ Assert.AreEqual (0, _invalidated, "#A4");
+ Assert.AreEqual (0, _paint, "#A5");
+
+ Form form = new Form ();
+ form.ShowInTaskbar = false;
+ form.Controls.Add (textBox);
+ form.Show ();
+
+ Assert.AreEqual (Color.White, textBox.ForeColor, "#B1");
+ Assert.AreEqual (0, _invalidated, "#B2");
+ Assert.AreEqual (0, _paint, "#B3");
+ textBox.ForeColor = Color.Red;
+ Assert.AreEqual (Color.Red, textBox.ForeColor, "#B4");
+ Assert.AreEqual (1, _invalidated, "#B5");
+ Assert.AreEqual (0, _paint, "#B6");
+ textBox.ForeColor = Color.Red;
+ Assert.AreEqual (Color.Red, textBox.ForeColor, "#B7");
+ Assert.AreEqual (1, _invalidated, "#B8");
+ Assert.AreEqual (0, _paint, "#B9");
+ textBox.ForeColor = Color.Blue;
+ Assert.AreEqual (Color.Blue, textBox.ForeColor, "#B10");
+ Assert.AreEqual (2, _invalidated, "#B11");
+ Assert.AreEqual (0, _paint, "#B12");
+ }
+
[Test]
public void ToStringTest ()
{
textBox.Text = "TEXT";
Assert.AreEqual (false, textBox.Modified, "modified-3");
}
+
+ void TextBox_Invalidated (object sender, InvalidateEventArgs e)
+ {
+ _invalidated++;
+ }
+
+ void TextBox_Paint (object sender, PaintEventArgs e)
+ {
+ _paint++;
+ }
+
+ void Reset ()
+ {
+ _invalidated = 0;
+ _paint = 0;
+ }
}
}
--- /dev/null
+//
+// Copyright (c) 2007 Novell, Inc.
+//
+// Authors:
+// Jackson Harper (jackson@ximian.com)
+//
+
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Threading;
+using System.ComponentModel;
+using System.Runtime.Remoting;
+
+using NUnit.Framework;
+
+#if NET_2_0
+namespace MonoTests.System.Windows.Forms {
+
+ [TestFixture]
+ public class TreeViewHitTestInfoTest {
+
+ [Test]
+ public void TestCtor ()
+ {
+ TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.None);
+
+ Assert.AreEqual (t.Node, null, "null-1");
+ Assert.AreEqual (t.Location, TreeViewHitTestLocations.None, "null-2");
+
+ t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.Image);
+
+ Assert.AreEqual (t.Node, null, "loc-1");
+ Assert.AreEqual (t.Location, TreeViewHitTestLocations.Image, "loc-2");
+
+ TreeNode tn = new TreeNode ("test");
+ t = new TreeViewHitTestInfo (tn, TreeViewHitTestLocations.PlusMinus);
+
+ Assert.AreEqual (t.Node, tn, "node-1");
+ Assert.AreEqual (t.Location, TreeViewHitTestLocations.PlusMinus);
+ }
+
+ [Test]
+ public void TestBadLocation ()
+ {
+ TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, (TreeViewHitTestLocations) (-1));
+
+ Assert.AreEqual (t.Node, null, "bad-loc-1");
+ Assert.AreEqual ((int) t.Location, -1, "bad-loc-2");
+ }
+ }
+
+}
+#endif
+2007-03-06 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * Project.cs (Build): Add outputs to targetOutputs.
+
+2007-03-06 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * ExpressionCollection.cs (ConvertToArray): Simplify.
+
+2007-03-05 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * TaskEngine.cs, ChangeType.cs: Moved Collect* to ChangeType and
+ simplified. It still needs tests and refactoring.
+
2007-02-22 Marek Sieradzki <marek.sieradzki@gmail.com>
* BuildEngine.cs (BuildProjectFile): Don't crash on null
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Reflection;
using System.Text;
using Microsoft.Build.Framework;
namespace Microsoft.Build.BuildEngine {
internal class ChangeType {
-
- static string TemporaryTransform (object o, Type type)
+ //removed Type type
+ // FIXME throw exception here
+ static string ToString (object o)
{
string output = null;
+ Type type = o.GetType ();
+ // FIXME: there are more types
if (type == typeof (string))
output = (string) o;
else if (type == typeof (bool) ||
}*/
return output;
}
-
- public static string TransformToString (object o, Type type)
- {
- return TemporaryTransform (o, type);
- }
-
- public static string TransformToString (object[] o, Type type)
+
+ static string ToString (object [] o, Type type)
{
+ /*
ArrayList al = new ArrayList ();
foreach (object obj in o ) {
if (type == typeof (bool[])) {
foreach (string s in al)
output [i++] = s;
return String.Join (";", output);
+ */
+
+ List <string> list = new List <string> ();
+ foreach (object obj in o)
+ list.Add (ToString (obj));
+ return String.Join (";", list.ToArray ());
}
-
- public static BuildProperty TransformToBuildProperty (string name, string items)
- {
- return new BuildProperty (name, items);
- }
-
- public static BuildProperty TransformToBuildProperty (string name, ITaskItem[] items)
- {
- BuildProperty buildProperty;
- buildProperty = new BuildProperty (name, TransformToString (items));
- return buildProperty;
- }
-
- public static BuildProperty TransformToBuildProperty (string name, ITaskItem item)
- {
- BuildProperty buildProperty;
- buildProperty = new BuildProperty (name, TransformToString (item));
- return buildProperty;
- }
-
- public static BuildItemGroup TransformToBuildItemGroup (string name, string items)
+
+ public static BuildProperty ToBuildProperty (object o, Type t, string name)
{
- string[] splittedItems = items.Split (';');
- BuildItemGroup big = new BuildItemGroup ();
- foreach (string item in splittedItems)
- big.AddItem (name, new TaskItem (item));
- return big;
+ if (t == typeof (ITaskItem)) {
+ return new BuildProperty (name, ((ITaskItem) o).ItemSpec);
+ } else if (t == typeof (ITaskItem [])) {
+ // FIXME move Tostring here
+ return new BuildProperty (name, ToString ((ITaskItem []) o));
+ } else if (t.IsArray) {
+ return new BuildProperty (name, ToString ((object []) o, t));
+ } else {
+ return new BuildProperty (name, ToString (o));
+ }
}
-
- public static BuildItemGroup TransformToBuildItemGroup (string name, ITaskItem[] items)
+
+ public static BuildItemGroup ToBuildItemGroup (object o, Type t, string name)
{
BuildItemGroup big = new BuildItemGroup ();
- foreach (ITaskItem item in items) {
- big.AddItem (name, item);
+
+ if (t == typeof (ITaskItem)) {
+ big.AddItem (name, (ITaskItem) o);
+ } else if (t == typeof (ITaskItem [])) {
+ foreach (ITaskItem i in (ITaskItem []) o)
+ big.AddItem (name, i);
+ } else if (t.IsArray) {
+ return ToBuildItemGroup (name, ToString ((object []) o, t));
+ } else {
+ return ToBuildItemGroup (name, ToString (o));
}
+
return big;
}
- public static BuildItemGroup TransformToBuildItemGroup (string name, ITaskItem item)
+ static BuildItemGroup ToBuildItemGroup (string name, string items)
{
+ string [] splitItems = items.Split (';');
BuildItemGroup big = new BuildItemGroup ();
- big.AddItem (name, item);
+ foreach (string item in splitItems)
+ big.AddItem (name, new TaskItem (item));
return big;
}
- static string TransformToString (ITaskItem [] items)
+ static string ToString (ITaskItem [] items)
{
- string[] text = new string [items.Length];
+ string [] text = new string [items.Length];
int i = 0;
foreach (ITaskItem item in items)
text [i++] = item.ItemSpec;
return String.Join (";", text);
}
-
- static string TransformToString (ITaskItem item)
- {
- return item.ItemSpec;
- }
}
}
using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionAndExpression : ConditionExpression {
+ internal sealed class ConditionAndExpression : ConditionExpression {
readonly ConditionExpression left;
readonly ConditionExpression right;
using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionFactorExpression : ConditionExpression {
+ internal sealed class ConditionFactorExpression : ConditionExpression {
readonly Token token;
using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionFunctionExpression : ConditionExpression {
+ internal sealed class ConditionFunctionExpression : ConditionExpression {
List <ConditionFactorExpression> args;
string name;
using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionNotExpression : ConditionExpression {
+ internal sealed class ConditionNotExpression : ConditionExpression {
readonly ConditionExpression expression;
using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionOrExpression : ConditionExpression {
+ internal sealed class ConditionOrExpression : ConditionExpression {
readonly ConditionExpression left;
readonly ConditionExpression right;
using System.Xml;
namespace Microsoft.Build.BuildEngine {
- internal class ConditionRelationalExpression : ConditionExpression {
+ internal sealed class ConditionRelationalExpression : ConditionExpression {
readonly ConditionExpression left;
readonly ConditionExpression right;
object ConvertToArray (Project project, Type type)
{
- string[] rawTable = ConvertToString (project).Split (';');
- int i = 0;
-
- if (type == typeof (bool[])) {
- bool[] array = new bool [rawTable.Length];
- foreach (string raw in rawTable)
- array [i++] = (bool) ConvertToObject (raw, type.GetElementType ());
- return array;
- } else if (type == typeof (string[])) {
- string[] array = new string [rawTable.Length];
- foreach (string raw in rawTable)
- array [i++] = (string) ConvertToObject (raw, type.GetElementType ());
- return array;
- } else if (type == typeof (int[])) {
- int[] array = new int [rawTable.Length];
- foreach (string raw in rawTable)
- array [i++] = (int) ConvertToObject (raw, type.GetElementType ());
- return array;
- } else if (type == typeof (uint[])) {
- uint[] array = new uint [rawTable.Length];
- foreach (string raw in rawTable)
- array [i++] = (uint) ConvertToObject (raw, type.GetElementType ());
- return array;
- } else if (type == typeof (DateTime[])) {
- DateTime[] array = new DateTime [rawTable.Length];
- foreach (string raw in rawTable)
- array [i++] = (DateTime) ConvertToObject (raw, type.GetElementType ());
- return array;
- } else
- throw new Exception ("Invalid type");
+ string [] rawTable = ConvertToString (project).Split (';');
+
+ Array arr = Array.CreateInstance (type.GetElementType (), rawTable.Length);
+ for (int i = 0; i < arr.Length; i++)
+ arr.SetValue (ConvertToObject (rawTable [i], type.GetElementType ()), i);
+ return arr;
}
object ConvertToObject (string raw, Type type)
{
- if (type == typeof (bool)) {
+ if (type == typeof (bool))
return Boolean.Parse (raw);
- } else if (type == typeof (string)) {
+ else if (type == typeof (string))
return raw;
- } else if (type == typeof (int)) {
+ else if (type == typeof (int))
return Int32.Parse (raw);
- } else if (type == typeof (uint)) {
+ else if (type == typeof (uint))
return UInt32.Parse (raw);
- } else if (type == typeof (DateTime)) {
+ else if (type == typeof (DateTime))
return DateTime.Parse (raw);
- } else {
+ else
throw new Exception (String.Format ("Unknown type: {0}", type.ToString ()));
- }
}
string ConvertToString (Project project)
{
}
[MonoTODO ("Not tested")]
- public bool Build (string[] targetNames)
+ public bool Build (string [] targetNames)
{
return Build (targetNames, null);
}
[MonoTODO ("Not tested")]
- public bool Build (string[] targetNames,
+ public bool Build (string [] targetNames,
IDictionary targetOutputs)
{
return Build (targetNames, targetOutputs, BuildSettings.None);
}
[MonoTODO ("Not tested")]
- public bool Build (string[] targetNames,
+ public bool Build (string [] targetNames,
IDictionary targetOutputs,
BuildSettings buildFlags)
if (!targets [target].Build ())
return false;
+
+ if (targetOutputs != null)
+ targetOutputs.Add (target, targets [target].Outputs);
}
return true;
}
[MonoTODO]
- public string[] GetConditionedPropertyValues (string propertyName)
+ public string [] GetConditionedPropertyValues (string propertyName)
{
if (conditionedProperties.ContainsKey (propertyName))
return conditionedProperties [propertyName].ToArray ();
throw new Exception ("This is not output property.");
o = propertyInfo.GetValue (task, null);
+ // FIXME: maybe we should throw an exception here?
if (o == null)
continue;
propertyInfo.SetValue (task, value, null);
}
+ void PublishProperty (PropertyInfo propertyInfo,
+ object o,
+ string propertyName)
+ {
+ BuildProperty bp = ChangeType.ToBuildProperty (o, propertyInfo.PropertyType, propertyName);
+ parentProject.EvaluatedProperties.AddProperty (bp);
+ }
+
+ // FIXME: cleanup + test
void PublishItemGroup (PropertyInfo propertyInfo,
object o,
string itemName)
{
- BuildItemGroup newItems = CollectItemGroup (propertyInfo, o, itemName);
+ BuildItemGroup newItems = ChangeType.ToBuildItemGroup (o, propertyInfo.PropertyType, itemName);
if (parentProject.EvaluatedItemsByName.ContainsKey (itemName)) {
BuildItemGroup big = parentProject.EvaluatedItemsByName [itemName];
foreach (BuildItem bi in newItems)
parentProject.EvaluatedItems.AddItem (bi);
}
-
- void PublishProperty (PropertyInfo propertyInfo,
- object o,
- string propertyName)
- {
- BuildProperty bp = CollectProperty (propertyInfo, o, propertyName);
- parentProject.EvaluatedProperties.AddProperty (bp);
- }
-
- BuildProperty CollectProperty (PropertyInfo propertyInfo, object o, string name)
- {
- string output = null;
- BuildProperty bp;
-
- if (propertyInfo == null)
- throw new ArgumentNullException ("propertyInfo");
- if (o == null)
- throw new ArgumentNullException ("o");
- if (name == null)
- throw new ArgumentNullException ("name");
-
- if (propertyInfo.PropertyType == typeof (ITaskItem)) {
- ITaskItem item = (ITaskItem) o;
- bp = ChangeType.TransformToBuildProperty (name, item);
- } else if (propertyInfo.PropertyType == typeof (ITaskItem[])) {
- ITaskItem[] items = (ITaskItem[]) o;
- bp = ChangeType.TransformToBuildProperty (name, items);
- } else {
- if (propertyInfo.PropertyType.IsArray == true) {
- output = ChangeType.TransformToString ((object[])o, propertyInfo.PropertyType);
- } else {
- output = ChangeType.TransformToString (o, propertyInfo.PropertyType);
- }
- bp = ChangeType.TransformToBuildProperty (name, output);
- }
- return bp;
- }
-
- BuildItemGroup CollectItemGroup (PropertyInfo propertyInfo, object o, string name)
- {
- BuildItemGroup big;
- string temp;
-
- if (propertyInfo == null)
- throw new ArgumentNullException ("propertyInfo");
- if (o == null)
- throw new ArgumentNullException ("o");
- if (name == null)
- throw new ArgumentNullException ("name");
-
- if (propertyInfo.PropertyType == typeof (ITaskItem)) {
- ITaskItem item = (ITaskItem) o;
- big = ChangeType.TransformToBuildItemGroup (name, item);
- } else if (propertyInfo.PropertyType == typeof (ITaskItem[])) {
- ITaskItem[] items = (ITaskItem[]) o;
- big = ChangeType.TransformToBuildItemGroup (name, items);
- } else {
- if (propertyInfo.PropertyType.IsArray == true) {
- temp = ChangeType.TransformToString ((object[]) o, propertyInfo.PropertyType);
- } else {
- temp = ChangeType.TransformToString (o, propertyInfo.PropertyType);
- }
- big = ChangeType.TransformToBuildItemGroup (name, temp);
- }
- return big;
- }
object GetObjectFromString (string raw, Type type)
{
using System;
using System.Collections;
+using System.Xml;
using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
BuildProperty bp;
Engine engine;
Project project;
-
+
+ BuildProperty [] GetProperties (BuildPropertyGroup bpg)
+ {
+ BuildProperty [] arr = new BuildProperty [bpg.Count];
+ int i = 0;
+ foreach (BuildProperty bp in bpg)
+ arr [i++] = bp;
+ return arr;
+ }
+
[Test]
public void TestCtor1 ()
{
Assert.AreEqual ("a;b", bp.ToString ());
}
- public void TestValue ()
+ [Test]
+ public void TestValue1 ()
{
BuildProperty a;
+ BuildPropertyGroup [] bpgs = new BuildPropertyGroup [1];
+ BuildProperty [] props;
string documentString = @"
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
a = project.EvaluatedProperties ["Name"];
a.Value = "$(something)";
Assert.AreEqual ("$(something)", a.Value, "A1");
+
+ project.PropertyGroups.CopyTo (bpgs, 0);
+ props = GetProperties (bpgs [0]);
+ Assert.AreEqual ("Value", props [0].Value, "A2");
+ }
+
+ [Test]
+ public void TestValue2 ()
+ {
+ BuildPropertyGroup [] bpgs = new BuildPropertyGroup [1];
+ BuildProperty [] props;
+ XmlDocument xd;
+ XmlNode node;
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <Name>Value</Name>
+ </PropertyGroup>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ project.PropertyGroups.CopyTo (bpgs, 0);
+ props = GetProperties (bpgs [0]);
+ props [0].Value = "AnotherValue";
+
+ xd = new XmlDocument ();
+ xd.LoadXml (project.Xml);
+ node = xd.SelectSingleNode ("tns:Project/tns:PropertyGroup/tns:Name", TestNamespaceManager.NamespaceManager);
+ Assert.AreEqual ("AnotherValue", node.InnerText, "A1");
}
}
}
+2007-03-06 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * BuildPropertyTest.cs, ProjectTest.cs: More tests.
+
2007-02-03 Marek Sieradzki <marek.sieradzki@gmail.com>
* BuildPropertyGroupTest.cs: More tests.
}
[Test]
- [Category ("NotWorking")]
+ public void TestBuild0 ()
+ {
+ Engine engine;
+ Project project;
+ IDictionary hashtable = new Hashtable ();
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Target
+ Name='Main'
+ Inputs='a;b;c'
+ Outputs='d;e;f'
+ >
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ Assert.AreEqual (true, project.Build (new string [] { "Main" }, hashtable), "A1");
+ Assert.AreEqual (1, hashtable.Count, "A2");
+
+ IDictionaryEnumerator e = hashtable.GetEnumerator ();
+ e.MoveNext ();
+
+ string name = (string) e.Key;
+ Assert.AreEqual ("Main", name, "A3");
+ ITaskItem [] arr = (ITaskItem []) e.Value;
+
+ Assert.AreEqual (3, arr.Length, "A4");
+ Assert.AreEqual ("d", arr [0].ItemSpec, "A5");
+ Assert.AreEqual ("e", arr [1].ItemSpec, "A6");
+ Assert.AreEqual ("f", arr [2].ItemSpec, "A7");
+ }
+
+ [Test]
public void TestBuild1 ()
{
Engine engine;
Assert.AreEqual (true, project.Build (new string[] { "Main" }, hashtable), "A1");
Assert.AreEqual (1, hashtable.Count, "A2");
+
+ IDictionaryEnumerator e = hashtable.GetEnumerator ();
+ e.MoveNext ();
+
+ string name = (string) e.Key;
+ Assert.AreEqual ("Main", name, "A3");
+ Assert.IsNotNull ((ITaskItem []) e.Value, "A4");
}
[Test]
}
}
-#endif
\ No newline at end of file
+#endif
+2007-03-10 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * Vbc.cs: Implemented.
+
+2007-03-08 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * MSBuild.cs (Execute): Copy referenced project's dlls to output
+ directory.
+
2007-02-18 Marek Sieradzki <marek.sieradzki@gmail.com>
* AssemblyResolver.cs: Resolve HintPath correctly.
base.AddResponseFileCommands (commandLine);
commandLine.AppendSwitchIfNotNull ("/lib:", AdditionalLibPaths, ",");
+
if (Bag ["AllowUnsafeBlocks"] != null)
if (AllowUnsafeBlocks)
commandLine.AppendSwitch ("/unsafe+");
using System;
using System.Collections;
+using System.Collections.Generic;
+using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
[MonoTODO]
public class MSBuild : TaskExtension {
- ITaskItem[] projects;
- string[] properties;
+ ITaskItem [] projects;
+ string [] properties;
bool rebaseOutputs;
bool runEachTargetSeparately;
bool stopOnFirstFailure;
- ITaskItem[] targetOutputs;
- string[] targets;
+ ITaskItem [] targetOutputs;
+ string [] targets;
public MSBuild ()
{
string filename;
bool result = true;
stopOnFirstFailure = false;
+ List <ITaskItem > outputItems = new List <ITaskItem> ();
+ string currentDirectory = Environment.CurrentDirectory;
+ Hashtable outputs;
foreach (ITaskItem project in projects) {
filename = project.GetMetadata ("FullPath");
-
- result = BuildEngine.BuildProjectFile (filename, targets, new Hashtable (), new Hashtable ());
- if (result == false) {
+
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (filename));
+ outputs = new Hashtable ();
+
+ result = BuildEngine.BuildProjectFile (filename, targets, null, outputs);
+
+ if (result) {
+ foreach (DictionaryEntry de in outputs) {
+ ITaskItem [] array = (ITaskItem []) de.Value;
+ foreach (ITaskItem item in array) {
+ outputItems.Add (item);
+ if (rebaseOutputs)
+ File.Copy (item.ItemSpec, Path.Combine (currentDirectory, item.ItemSpec), true);
+ }
+ }
+ } else {
Log.LogError ("Error while building {0}", filename);
if (stopOnFirstFailure)
break;
}
}
+
+ if (result)
+ targetOutputs = outputItems.ToArray ();
+
+ Directory.SetCurrentDirectory (currentDirectory);
return result;
}
[Required]
- public ITaskItem[] Projects {
- get {
- return projects;
- }
- set {
- projects = value;
- }
+ public ITaskItem [] Projects {
+ get { return projects; }
+ set { projects = value; }
}
- public string[] Properties {
- get {
- return properties;
- }
- set {
- properties = value;
- }
+ [MonoTODO]
+ public string [] Properties {
+ get { return properties; }
+ set { properties = value; }
}
public bool RebaseOutputs {
- get {
- return rebaseOutputs;
- }
- set {
- rebaseOutputs = value;
- }
+ get { return rebaseOutputs; }
+ set { rebaseOutputs = value; }
}
+ [MonoTODO]
public bool RunEachTargetSeparately {
- get {
- return runEachTargetSeparately;
- }
- set {
- runEachTargetSeparately = value;
- }
+ get { return runEachTargetSeparately; }
+ set { runEachTargetSeparately = value; }
}
public bool StopOnFirstFailure {
- get {
- return stopOnFirstFailure;
- }
- set {
- stopOnFirstFailure = value;
- }
+ get { return stopOnFirstFailure; }
+ set { stopOnFirstFailure = value; }
}
[Output]
- public ITaskItem[] TargetOutputs {
- get {
- return targetOutputs;
- }
+ public ITaskItem [] TargetOutputs {
+ get { return targetOutputs; }
}
- public string[] Targets {
- get {
- return targets;
- }
- set {
- targets = value;
- }
+ public string [] Targets {
+ get { return targets; }
+ set { targets = value; }
}
}
}
-#endif
\ No newline at end of file
+#endif
//
-//// UpdateManifest.cs
-/////
-///// Author:
-///// Leszek Ciesielski <skolima@gmail.com>
-/////
-///// Copyright (C) 2006 Forcom (http://www.forcom.com.pl/)
-/////
-///// Permission is hereby granted, free of charge, to any person obtaining
-///// a copy of this software and associated documentation files (the
-///// "Software"), to deal in the Software without restriction, including
-///// without limitation the rights to use, copy, modify, merge, publish,
-///// distribute, sublicense, and/or sell copies of the Software, and to
-///// permit persons to whom the Software is furnished to do so, subject to
-///// the following conditions:
-/////
-///// The above copyright notice and this permission notice shall be
-///// included in all copies or substantial portions of the Software.
-/////
-///// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-///// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-///// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-///// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-///// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-///// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-///// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-/////
-///
+// UpdateManifest.cs
+//
+// Author:
+// Leszek Ciesielski <skolima@gmail.com>
+// Marek Sieradzki <marek.sieradzki@gmail.com>
+//
+// Copyright (C) 2006 Forcom (http://www.forcom.com.pl/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#if NET_2_0
using System;
+using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
-namespace Microsoft.Build.Tasks
-{
- public class Vbc : ManagedCompiler
- {
- [MonoTODO]
- protected override bool ValidateParameters ()
+namespace Microsoft.Build.Tasks {
+
+ public class Vbc : ManagedCompiler {
+
+ public Vbc ()
{
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public string RootNamespace {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public string SdkPath {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool TargetCompactFramework {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool UseHostCompilerIfAvailable {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
}
-
- [MonoTODO]
- public string Verbosity {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public string WarningsAsErrors {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public string WarningsNotAsErrors {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- protected override string ToolName {
- get {
- throw new NotImplementedException ();
- }
- }
-
+
[MonoTODO]
protected internal override void AddResponseFileCommands (
CommandLineBuilderExtension commandLine )
{
- throw new NotImplementedException ();
+ base.AddResponseFileCommands (commandLine);
+
+ commandLine.AppendSwitchIfNotNull ("/libpath:", AdditionalLibPaths, ",");
+
+ commandLine.AppendSwitchIfNotNull ("/baseaddress:", BaseAddress);
+
+ commandLine.AppendSwitchIfNotNull ("/define:", DefineConstants);
+
+ // DisabledWarnings
+
+ commandLine.AppendSwitchIfNotNull ("/doc", DocumentationFile);
+
+ // ErrorReport
+
+ // GenerateDocumentation
+
+ if (Imports != null)
+ foreach (ITaskItem item in Imports)
+ commandLine.AppendSwitchIfNotNull ("/imports:", item.ItemSpec);
+
+ commandLine.AppendSwitchIfNotNull ("/main:", MainEntryPoint);
+
+ // NoStandardLib
+
+ if (NoWarnings)
+ commandLine.AppendSwitch ("/nowarn");
+
+ commandLine.AppendSwitchIfNotNull ("/optioncompare:", OptionCompare);
+
+ if (Bag ["OptionExplicit"] != null)
+ if (OptionExplicit)
+ commandLine.AppendSwitch ("/optionexplicit+");
+ else
+ commandLine.AppendSwitch ("/optionexplicit-");
+
+ if (Bag ["OptionStrict"] != null)
+ if (OptionStrict)
+ commandLine.AppendSwitch ("/optionstrict+");
+ else
+ commandLine.AppendSwitch ("/optionstrict-");
+
+ // OptionStrictType
+
+ // Platform
+
+ if (References != null)
+ foreach (ITaskItem item in References)
+ commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);
+
+ if (Bag ["RemoveIntegerChecks"] != null)
+ if (RemoveIntegerChecks)
+ commandLine.AppendSwitch ("/removeintchecks+");
+ else
+ commandLine.AppendSwitch ("/removeintchecks-");
+
+ if (ResponseFiles != null)
+ foreach (ITaskItem item in ResponseFiles)
+ commandLine.AppendFileNameIfNotNull (String.Format ("@{0}", item.ItemSpec));
+
+ commandLine.AppendSwitchIfNotNull ("/rootnamespace:", RootNamespace);
+
+ commandLine.AppendSwitchIfNotNull ("/sdkpath:", SdkPath);
+
+ // TargetCompactFramework
+
+ // Verbosity
+
+ // WarningsAsErrors
+
+ // WarningsNotAsErrors
+
}
[MonoTODO]
[MonoTODO]
protected override string GenerateFullPathToTool ()
{
- throw new NotImplementedException ();
+ return Path.Combine (ToolPath, ToolName);
}
[MonoTODO]
{
throw new NotImplementedException ();
}
-
+
[MonoTODO]
- public Vbc ()
+ protected override bool ValidateParameters ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public string BaseAddress {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["BaseAddress"]; }
+ set { Bag ["BaseAddress"] = value; }
}
[MonoTODO]
public string DisabledWarnings {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["DisabledWarnings"]; }
+ set { Bag ["DisabledWarnings"] = value; }
}
[MonoTODO]
public string DocumentationFile {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["DocumentationFile"]; }
+ set { Bag ["DocumentationFile"] = value; }
}
[MonoTODO]
public string ErrorReport {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["ErrorReport"]; }
+ set { Bag ["ErrorReport"] = value; }
}
[MonoTODO]
public bool GenerateDocumentation {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return GetBoolParameterWithDefault ("GenerateDocumentation", false); }
+ set { Bag ["GenerateDocumentation"] = value; }
}
[MonoTODO]
- public ITaskItem[] Imports {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ public ITaskItem [] Imports {
+ get { return (ITaskItem []) Bag ["Imports"]; }
+ set { Bag ["Imports"] = value; }
}
[MonoTODO]
public bool NoStandardLib {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return GetBoolParameterWithDefault ("NoStandardLib", false); }
+ set { Bag ["NoStandardLib"] = value; }
}
[MonoTODO]
public bool NoWarnings {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return GetBoolParameterWithDefault ("NoWarnings", false); }
+ set { Bag ["NoWarnings"] = value; }
}
[MonoTODO]
public string OptionCompare {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["OptionCompare"]; }
+ set { Bag ["OptionCompare"] = value; }
}
[MonoTODO]
public bool OptionExplicit {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return GetBoolParameterWithDefault ("OptionExplicit", false); }
+ set { Bag ["OpExplicit"] = value; }
}
[MonoTODO]
public bool OptionStrict {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return GetBoolParameterWithDefault ("OptionStrict", false); }
+ set { Bag ["OptionStrict"] = value; }
}
[MonoTODO]
public string OptionStrictType {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["OptionStrictType"]; }
+ set { Bag ["OptionStrictType"] = value; }
}
[MonoTODO]
public string Platform {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return (string) Bag ["Platfrom"]; }
+ set { Bag ["Platform"] = value; }
}
[MonoTODO]
public bool RemoveIntegerChecks {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return GetBoolParameterWithDefault ("RemoveIntegerChecks", false); }
+ set { Bag ["RemoveIntegerChecks"] = value; }
+ }
+
+ [MonoTODO]
+ public string RootNamespace {
+ get { return (string) Bag ["RootNamespace"]; }
+ set { Bag ["RootNamespace"] = value; }
+ }
+
+ [MonoTODO]
+ public string SdkPath {
+ get { return (string) Bag ["SdkPath"]; }
+ set { Bag ["SdkPath"] = value; }
+ }
+
+ [MonoTODO]
+ public bool TargetCompactFramework {
+ get { return (bool) Bag ["TargetCompactFramework"]; }
+ set { Bag ["TargetCompactFramework"] = value; }
+ }
+
+ [MonoTODO]
+ protected override string ToolName {
+ get { return "vbnc"; }
+ }
+
+ [MonoTODO]
+ public bool UseHostCompilerIfAvailable {
+ get { return (bool) Bag ["UseHostCompilerIfAvailable"]; }
+ set { Bag ["UseHostCompilerIfAvailable"] = value; }
+ }
+
+ [MonoTODO]
+ public string Verbosity {
+ get { return (string) Bag ["Verbosity"]; }
+ set { Bag ["Verbosity"] = value; }
+ }
+
+ [MonoTODO]
+ public string WarningsAsErrors {
+ get { return (string) Bag ["WarningsAsErrors"]; }
+ set { Bag ["WarningsAsErrors"] = value; }
+ }
+
+ [MonoTODO]
+ public string WarningsNotAsErrors {
+ get { return (string) Bag ["WarningsNotAsErrors"]; }
+ set { Bag ["WarningsNotAsErrors"] = value; }
}
}
}
internal override bool Resolve (Environment env)
{
AST e;
- bool no_effect;
bool r = true;
int i, n = elems.Count;
- if (parent == null || parent is FunctionDeclaration)
- no_effect = true;
- else
- no_effect = false;
-
- n = elems.Count;
-
for (i = 0; i < n; i++) {
e = (AST) elems [i];
if (e is Exp)
- r &= ((Exp) e).Resolve (env, no_effect);
+ r &= ((Exp) e).Resolve (env, true);
else
r &= e.Resolve (env);
}
+2007-03-01 Peter Dettman <peter.dettman@iinet.net.au>
+
+ * expression.cs: Expression.Emit changed to correctly leave a value on the
+ stack or not according to the 'no_effect' field, including the case where
+ the final AST in the list is an Assign. Fixed a reentrancy bug in Args.Emit.
+
+ * Block.cs, ForIn.cs, Statement.cs: Correctly resolve child expressions with
+ "no effect" where they should behave as statements.
+
2006-10-21 Miguel de Icaza <miguel@novell.com>
* JScriptCodeCompiler.cs: Ifdefed out unused code.
if (obj != null)
r &= obj.Resolve (env);
- if (body != null)
- r &= body.Resolve (env);
+ if (body != null) {
+ if (body is Exp)
+ r &= ((Exp) body).Resolve (env, true);
+ else
+ r &= body.Resolve (env);
+ }
return r;
}
bool r = true;
if (stm != null)
- r &= stm.Resolve (env);
+ if (stm is Exp)
+ r &= ((Exp) stm).Resolve (env, true);
+ else
+ r &= stm.Resolve (env);
if (exp != null)
r &= exp.Resolve (env);
return r;
else
r &= exp.Resolve (env);
if (stm != null)
- r &= stm.Resolve (env);
+ if (stm is Exp)
+ r &= ((Exp) stm).Resolve (env, true);
+ else
+ r &= stm.Resolve (env);
return r;
}
{
bool r = true;
- foreach (AST ast in exprs)
- r &= ast.Resolve (env);
+ for (int i = 0; i < 3; ++i) {
+ AST e = exprs[i];
+ if (e is Exp)
+ r &= ((Exp) e).Resolve (env, i != 1);
+ else
+ r &= e.Resolve (env);
+ }
+
if (stms != null)
r &= stms.Resolve (env);
return true;
foreach (Clause c in case_clauses)
r &= c.Resolve (env);
if (default_clauses != null)
- foreach (AST dc in default_clauses)
- r &= dc.Resolve (env);
+ foreach (AST dc in default_clauses) {
+ if (dc is Exp)
+ r &= ((Exp) dc).Resolve (env, true);
+ else
+ r &= dc.Resolve (env);
+ }
if (sec_case_clauses != null)
foreach (Clause sc in sec_case_clauses)
r &= sc.Resolve (env);
bool r = true;
if (exp != null)
r &= exp.Resolve (env);
- foreach (AST ast in stm_list)
- r &= ast.Resolve (env);
+ foreach (AST ast in stm_list) {
+ if (ast is Exp)
+ r &= ((Exp) ast).Resolve (env, true);
+ else
+ r &= ast.Resolve (env);
+ }
return r;
}
bool strong_type = BoundToMethod is MethodInfo;
ParameterInfo [] parameters = null;
+ // We may be called more than once, so avoid modifying fields
+ int expected_args = this.expected_args;
+
if (!BoundToDeclaredFunction) {
if (has_this)
expected_args--;
internal override bool Resolve (Environment env)
{
- int i, n;
- object e;
+ int n = exprs.Count - 1;
bool r = true;
-
- n = exprs.Count - 1;
+ object e;
- for (i = 0; i < n; i++) {
+ for (int i = 0; i <= n; i++) {
e = exprs [i];
if (e is Exp)
- if (e is Assign)
- r &= ((Assign) e).Resolve (env);
- else
- r &= ((Exp) e).Resolve (env, true);
- }
- e = exprs [n];
- if (e is Exp)
- if (e is Assign)
- r &= ((Assign) e).Resolve (env);
+ r &= ((Exp) e).Resolve (env, i < n || no_effect);
else
- r &= ((Exp) e).Resolve (env, no_effect);
- else
- ((AST) e).Resolve (env);
+ r &= ((AST) e).Resolve (env);
+ }
return r;
}
internal override void Emit (EmitContext ec)
{
- int i, n = exprs.Count;
+ int i, n = exprs.Count - 1;
AST exp;
for (i = 0; i < n; i++) {
exp = (AST) exprs [i];
exp.Emit (ec);
- CodeGenerator.EmitBox (ec.ig, exp);
+ }
+ if (n >= 0)
+ {
+ exp = (AST) exprs [n];
+ if (exp is Assign) {
+ if (no_effect)
+ exp.Emit (ec);
+ else
+ CodeGenerator.EmitAssignAsExp (ec, exp);
+ }
+ else {
+ exp.Emit (ec);
+ if (!no_effect)
+ CodeGenerator.EmitBox (ec.ig, exp);
+ }
}
}
}
+2007-03-01 Peter Dettman <peter.dettman@iinet.net.au>
+
+ * mjs-most.tests: Enable ecma/Boolean/15.6.3.1-3.js.
+
+ * mjs-most.fail: Delete ecma/String/15.5.5.1.js,
+ ecma/FunctionObjects/15.3.3.1-3.js, ecma/Number/15.7.3.3-2.js,
+ and ecma/Number/15.7.3.5-2.js, as they no longer fail.
+
2006-01-13 Cesar Lopez Nataren <cnataren@novell.com>
* mjs-most.tests: Enable ecma/FunctionObjects/15.3.3.1-2.js,
js1_3/Script/script-001.js
js1_4/Functions/function-001.js
-# System.NotImplementedException: The requested feature is not implemented. (Convert:ToForInObject)
-ecma/String/15.5.5.1.js
-
# System.Exception: error JS5002 A: function expected.
ecma_2/Exceptions/exception-001.js
# Throw NotImplementedException when invoking Convert:ToForInObject
ecma/Array/15.4.3.1-2.js
-
-# Throw NotImplementedException when invoking LateBinding::Delete
-ecma/FunctionObjects/15.3.3.1-3.js
-ecma/Number/15.7.3.3-2.js
-ecma/Number/15.7.3.5-2.jsc
-ecma/Number/15.7.3.5-2.js
ecma/Boolean/15.6.2.js
ecma/Boolean/15.6.3.1-1.js
ecma/Boolean/15.6.3.1-2.js
-# invalid IL
-#ecma/Boolean/15.6.3.1-3.js
+ecma/Boolean/15.6.3.1-3.js
# Invalid IL
#ecma/Boolean/15.6.3.1-4.js
ecma/Boolean/15.6.3.1-5.js
+2007-03-05 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SymmetricTransform.cs: Fix KeepLastBlock to be true for decryption
+ with no padding or zero padding. Part of the fix for #81008.
+
2007-01-08 Sebastien Pouliot <sebastien@ximian.com>
* SymmetricTransform.cs: Fix #80439 again. This time we have tests for
private bool KeepLastBlock {
get {
- return ((!encrypt) && (algo.Mode != CipherMode.ECB) && (algo.Padding != PaddingMode.None));
+ return ((!encrypt) && (algo.Padding != PaddingMode.None) && (algo.Padding != PaddingMode.Zeros));
}
}
return (string)BaseGet (name);
}
+ public override string Get (int index)
+ {
+ return (string)BaseGet (index);
+ }
+
/*
public virtual string Get( int index )
-TESTS = t1.exe t2.exe t3.exe t4.exe t5.exe t6.exe t7.exe t8.exe t9.exe t10.exe t11.exe t12.exe t15.exe t16.exe t17.exe t18.exe t19.exe t20.exe t21.exe t22.exe t23.exe t24.exe t25.exe t26.exe t27.exe t28.exe t29.exe t30.exe t31.exe t32.exe t33.exe t34.exe t35.exe t36.exe t37.exe t38.exe t39.exe t40.exe t41.exe t42.exe
+TESTS = t1.exe t2.exe t3.exe t4.exe t5.exe t6.exe t7.exe t8.exe t9.exe t10.exe t11.exe t12.exe t15.exe t16.exe t17.exe t18.exe t19.exe t20.exe t21.exe t22.exe t23.exe t24.exe t25.exe t26.exe t27.exe t28.exe t29.exe t30.exe t31.exe t32.exe t33.exe t34.exe t35.exe t36.exe t37.exe t38.exe t39.exe t40.exe t41.exe t42.exe t43.exe
# t13.exe t14.exe
check: local compare
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Text;
+using System.Configuration;
+using System.Web;
+
+class T1
+{
+ static void Main(string[] args)
+ {
+ try
+ {
+ NameValueCollection AppSettings = ConfigurationManager.AppSettings;
+
+ for (int i = 0; i < AppSettings.Count; ++i) {
+ Console.WriteLine ("AppSettings[{0}] = {1}", i, AppSettings[i]);
+ }
+ }
+ catch (Exception e)
+ {
+ // Error.
+ Console.WriteLine(e.ToString());
+ }
+ }
+}
--- /dev/null
+<configuration>
+
+<appSettings>
+ <add key="hithere" value="Hello World!"/>
+</appSettings>
+</configuration>
\ No newline at end of file
--- /dev/null
+AppSettings[0] = Hello World!
REM ********************************************************
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\
-set JAVA_HOME=%VMW_HOME%\jre5
+set JAVA_HOME=%VMW_HOME%\jre6
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar
}
[Test]
- [Category("NotWorking")]
public void run()
{
Exception exp = null;
//BY DEFAULT LOGGING IS DONE TO THE STANDARD OUTPUT ONLY FOR FAILURES
}
-}
\ No newline at end of file
+}
}
[Test]
-#if JAVA
- [Category("NotWorking")]
-#endif
public void run()
{
Exception exp = null;
}
}
-}
\ No newline at end of file
+}
REM ********************************************************
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\
-set JAVA_HOME=%VMW_HOME%\jre5
+set JAVA_HOME=%VMW_HOME%\jre6
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar
+2007-03-09 Nagappan A <anagappan@novell.com>
+
+ * System.Data.dll.sources: Removed
+ System.Data.SqlTypes/SqlStreamChars.cs as its not part of 1.0 and
+ 2.0 profile.
+
+2007-03-03 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * app_test_2.0.config: Modified DbProviderFactories to allow testing
+ of clear and remove nodes.
+
+2007-03-03 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * app_test_2.0.config: Fixed assembly qualified names of config
+ handler. Removed usage of ConnectionStringsSectionHandler, since
+ this is now handled by 2.0 config system. Spaces to tabs.
+ * System.Data.dll.sources: Removed ConnectionStringsSectionHandler.
+
2007-02-23 Nagappan A <anagappan@novell.com>
* System.Data_test.dll.sources: Added
if (driver != null && driver.Length != 0) {
try {
+ java.lang.ClassLoader contextLoader = (java.lang.ClassLoader) AppDomain.CurrentDomain.GetData ("GH_ContextClassLoader");
+ if (contextLoader != null)
+ return (Driver) contextLoader.loadClass (driver).newInstance ();
return (Driver) java.lang.Class.forName (driver).newInstance ();
}
catch (java.lang.ClassNotFoundException e) {
+2007-03-03 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * DbProviderFactoriesConfigurationHandler.cs: Added support for
+ clear node.
+
+2007-03-03 Gert driesen <drieseng@users.sourceforge.net>
+
+ * ConnectionStringsSectionHandler.cs: Removed since the 2.0 config
+ API is in place.
+ * DbProviderFactoriesConfigurationHandler.cs: Fixed name of DataSet
+ to match MS. Removed SupportedClasses column since this is no longer
+ part of 2.0 profile (removed during beta). Throw
+ ConfigurationErrorsException for unrecognized elements. Mark methods
+ private, and refactor them. Added FIXMEs for missing checks for
+ unrecognized attributes.
+ * DbProviderFactories.cs: Marked constants internal. Replaced spaces
+ with tabs. Use ConfigurationManager.GetSection instead of deprecated
+ ConfigurationSettings.GetConfig.
+
2007-02-26 Atsushi Enomoto <atsushi@ximian.com>
* DbProviderFactoriesConfigurationHandler.cs : there was a config
+++ /dev/null
-//
-// System.Data.Common.ConnectionStringsSectionHandler.cs
-//
-// Author:
-// Sureshkumar T (tsureshkumar@novell.com)
-//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if NET_2_0
-
-using System.IO;
-using System.Xml;
-using System.Xml.Serialization;
-using System.Globalization;
-using System.Configuration;
-
-namespace System.Data.Common {
-
- /// <summary>
- /// This is a handler class for the configuration section <b>connectionStrings</b>.
- /// This handler is a temporary solution till the new 2.0 configuration API is supported
- /// in mono.
- /// </summary>
- public class ConnectionStringsSectionHandler : IConfigurationSectionHandler
- {
- #region Constructors
-
- public ConnectionStringsSectionHandler ()
- {
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public virtual object Create (object parent, object configContext, XmlNode section)
- {
- ConnectionStringsSection csSection = new ConnectionStringsSection ();
- ConnectionStringSettingsCollection csList = csSection.ConnectionStrings;
- foreach (XmlNode addNode in section.SelectNodes (".//add")) {
- if (addNode.NodeType != XmlNodeType.Element)
- continue;
- string name;
- string providerName;
- string connectionString;
-
- name = GetAttributeValue (addNode, "name");
- providerName = GetAttributeValue (addNode, "providerName");
- connectionString = GetAttributeValue (addNode, "connectionString");
-
- ConnectionStringSettings cs = new ConnectionStringSettings (name, connectionString, providerName);
- csList.Add (cs);
- }
-
- return csSection;
-
- }
-
- internal string GetAttributeValue (XmlNode node, string name)
- {
- XmlAttribute attr = node.Attributes[name];
- if (attr == null)
- throw new ConfigurationException ("Required Attribute '" + name +
- "' is missing!", node);
- string value = attr.Value;
- if (value == "")
- throw new ConfigurationException ("Attribute '" + name + "' cannot be empty!",
- node);
- return value;
- }
-
-
- #endregion // Methods
- }
-}
-
-#endif // NET_2_0
{
private static object configEntries = null; // DataSet
- private const string CONFIG_SECTION_NAME = "system.data";
- private const string CONFIG_SEC_TABLE_NAME = "DbProviderFactories";
-
+ internal const string CONFIG_SECTION_NAME = "system.data";
+ internal const string CONFIG_SEC_TABLE_NAME = "DbProviderFactories";
+
#region Methods
public static DbProviderFactory GetFactory (DataRow providerRow)
{
- string assemblyType = (string) providerRow ["AssemblyQualifiedName"];
-#if TARGET_JVM // case insensitive GetType is not supported\r
- Type type = Type.GetType (assemblyType, false);
+ string assemblyType = (string) providerRow ["AssemblyQualifiedName"];
+#if TARGET_JVM // case insensitive GetType is not supported
+ Type type = Type.GetType (assemblyType, false);
#else
- Type type = Type.GetType (assemblyType, false, true);
-#endif\r
- if (type != null && type.IsSubclassOf (typeof (DbProviderFactory))) {
- // Provider factories are singletons with Instance field having
- // the sole instance
- FieldInfo field = type.GetField ("Instance", BindingFlags.Public |
- BindingFlags.Static);
- if (field != null) {
- return field.GetValue (null) as DbProviderFactory;
- }
-
- }
-
- throw new ConfigurationException("DataProvider is missing!");
+ Type type = Type.GetType (assemblyType, false, true);
+#endif
+ if (type != null && type.IsSubclassOf (typeof (DbProviderFactory))) {
+ // Provider factories are singletons with Instance field having
+ // the sole instance
+ FieldInfo field = type.GetField ("Instance", BindingFlags.Public |
+ BindingFlags.Static);
+ if (field != null) {
+ return field.GetValue (null) as DbProviderFactory;
+ }
+ }
+
+ throw new ConfigurationException("DataProvider is missing!");
}
public static DbProviderFactory GetFactory (string providerInvariantName)
{
- DataTable table = GetFactoryClasses ();
- if (table != null) {
- DataRow row = table.Rows.Find (providerInvariantName);
- if (row != null)
- return GetFactory (row);
- }
- throw new ConfigurationException ("DataProvider is not found!");
+ DataTable table = GetFactoryClasses ();
+ if (table != null) {
+ DataRow row = table.Rows.Find (providerInvariantName);
+ if (row != null)
+ return GetFactory (row);
+ }
+ throw new ConfigurationException ("DataProvider is not found!");
}
public static DataTable GetFactoryClasses ()
{
- DataSet ds = GetConfigEntries ();
- DataTable table = ds != null ? ds.Tables [CONFIG_SEC_TABLE_NAME] : null;
- if (table != null)
- table = table.Copy (); // avoid modifications by user
- return table;
+ DataSet ds = GetConfigEntries ();
+ DataTable table = ds != null ? ds.Tables [CONFIG_SEC_TABLE_NAME] : null;
+ if (table != null)
+ table = table.Copy (); // avoid modifications by user
+ return table;
}
#endregion // Methods
#region Internal Methods
+
internal static DataSet GetConfigEntries ()
{
-
- if (configEntries != null)
- return configEntries as DataSet;
-
- DataSet ds = (DataSet) ConfigurationSettings.GetConfig (CONFIG_SECTION_NAME);
- Interlocked.CompareExchange (ref configEntries, ds, null);
- return configEntries as DataSet;
+ if (configEntries != null)
+ return configEntries as DataSet;
+
+ DataSet ds = (DataSet) ConfigurationManager.GetSection (CONFIG_SECTION_NAME);
+ Interlocked.CompareExchange (ref configEntries, ds, null);
+ return configEntries as DataSet;
}
+
#endregion Internal Methods
}
}
using System.Globalization;
using System.Configuration;
-namespace System.Data.Common {
+namespace System.Data.Common
+{
public class DbProviderFactoriesConfigurationHandler : IConfigurationSectionHandler
{
#region Constructors
public virtual object Create (object parent, object configContext, XmlNode section)
{
- DataSet ds = new DataSet ("DbProviderFactories");
- CreateDataTables (ds, section);
- return ds;
+ DataSet ds = new DataSet (DbProviderFactories.CONFIG_SECTION_NAME);
+ CreateDataTables (ds, section);
+ return ds;
}
- internal virtual void CreateDataTables (DataSet ds, XmlNode section)
- {
- DataTable dt = ds.Tables.Add ("DbProviderFactories");
- DataColumn [] columns = new DataColumn [5];
- columns [0] = new DataColumn ("Name", typeof (string));
- columns [1] = new DataColumn ("Description", typeof (string));
- columns [2] = new DataColumn ("InvariantName", typeof (string));
- columns [3] = new DataColumn ("AssemblyQualifiedName", typeof (string));
- columns [4] = new DataColumn ("SupportedClasses", typeof (int));
- dt.Columns.AddRange (columns);
- dt.PrimaryKey = new DataColumn [] {columns [2]};
-
- foreach (XmlNode node in section.SelectNodes (".//DbProviderFactories")) {
- AddRows (dt, node);
- RemoveRows (dt, node);
- }
- }
-
- internal string GetAttributeValue (XmlNode node, string name, bool required)
- {
- XmlAttribute attr = node.Attributes[name];
- if (attr == null) {
- if (!required)
- return null;
- throw new ConfigurationErrorsException ("Required Attribute '" + name +
- "' is missing!", node);
- }
- string value = attr.Value;
- if (value == "")
- throw new ConfigurationException ("Attribute '" + name + "' cannot be empty!",
- node);
- return value;
- }
-
- internal virtual void AddRows (DataTable dt, XmlNode factoriesNode)
- {
- foreach (XmlNode addNode in factoriesNode.SelectNodes (".//add")) {
- if (addNode.NodeType != XmlNodeType.Element)
- continue;
-
- string name = "";
- string description = "";
- string invariant = "";
- string type = "";
-
- name = GetAttributeValue (addNode, "name", true);
- description = GetAttributeValue (addNode, "description", true);
- invariant = GetAttributeValue (addNode, "invariant", true);
- type = GetAttributeValue (addNode, "type", true);
-
- DataRow row = dt.NewRow ();
- row [0] = name;
- row [1] = description;
- row [2] = invariant;
- row [3] = type;
- row [4] = 255;
-
- dt.Rows.Add (row);
- }
- }
-
- internal virtual void RemoveRows (DataTable dt, XmlNode removeNode)
- {
- foreach (XmlNode node in removeNode.SelectNodes (".//remove")) {
- if (node.NodeType != XmlNodeType.Element)
- continue;
-
- string invariant = GetAttributeValue (node, "invariant", true);
- DataRow row = dt.Rows.Find (invariant);
- if (row != null)
- row.Delete ();
- }
- }
-
+ internal virtual void CreateDataTables (DataSet ds, XmlNode section)
+ {
+ DataTable dt = ds.Tables.Add (DbProviderFactories.CONFIG_SEC_TABLE_NAME);
+ DataColumn [] columns = new DataColumn [4];
+ columns [0] = new DataColumn ("Name", typeof (string));
+ columns [1] = new DataColumn ("Description", typeof (string));
+ columns [2] = new DataColumn ("InvariantName", typeof (string));
+ columns [3] = new DataColumn ("AssemblyQualifiedName", typeof (string));
+ dt.Columns.AddRange (columns);
+ dt.PrimaryKey = new DataColumn [] { columns [2] };
+
+ foreach (XmlNode node in section.ChildNodes) {
+ if (node.NodeType != XmlNodeType.Element)
+ continue;
+
+ if (node.Name == DbProviderFactories.CONFIG_SEC_TABLE_NAME) {
+ foreach (XmlNode factoryNode in node.ChildNodes) {
+ if (factoryNode.NodeType != XmlNodeType.Element)
+ continue;
+
+ switch (factoryNode.Name) {
+ case "add":
+ AddRow (dt, factoryNode);
+ break;
+ case "clear":
+ dt.Rows.Clear ();
+ break;
+ case "remove":
+ RemoveRow (dt, factoryNode);
+ break;
+ default:
+ throw new ConfigurationErrorsException (
+ "Unrecognized element.", factoryNode);
+ }
+ }
+ }
+ }
+ }
+
+ string GetAttributeValue (XmlNode node, string name, bool required)
+ {
+ XmlAttribute attr = node.Attributes [name];
+ if (attr == null) {
+ if (!required)
+ return null;
+ throw new ConfigurationErrorsException ("Required Attribute '"
+ + name + "' is missing!", node);
+ }
+ string value = attr.Value;
+ if (value == "")
+ throw new ConfigurationException ("Attribute '" + name
+ + "' cannot be empty!", node);
+ return value;
+ }
+
+ void AddRow (DataTable dt, XmlNode addNode)
+ {
+ string name = GetAttributeValue (addNode, "name", true);
+ string description = GetAttributeValue (addNode, "description", true);
+ string invariant = GetAttributeValue (addNode, "invariant", true);
+ string type = GetAttributeValue (addNode, "type", true);
+
+ // FIXME: throw ConfigurationErrorsException for unrecognized
+ // attributes. Consider "supports" valid although we're not using
+ // it
+
+ DataRow row = dt.NewRow ();
+ row [0] = name;
+ row [1] = description;
+ row [2] = invariant;
+ row [3] = type;
+
+ dt.Rows.Add (row);
+ }
+
+ void RemoveRow (DataTable dt, XmlNode removeNode)
+ {
+ // FIXME: throw ConfigurationErrorsException for unrecognized
+ // attributes.
+
+ string invariant = GetAttributeValue (removeNode, "invariant", true);
+ DataRow row = dt.Rows.Find (invariant);
+ if (row != null)
+ row.Delete ();
+ }
#endregion // Methods
}
public override object ExecuteScalar ()
{
- IDataReader reader = ExecuteReader(CommandBehavior.SingleRow | CommandBehavior.SequentialAccess);
+ IDataReader reader = ExecuteReader(CommandBehavior.SequentialAccess);
try {
do {
\r
// FIXME: this causes SP in MS Sql Server to create no mor than one row.\r
if ((Behavior & CommandBehavior.SingleRow) != 0) {\r
- _statement.setFetchSize(1);\r
+ _statement.setMaxRows (1);\r
}\r
\r
if(_statement is PreparedStatement) {\r
return value;\r
}\r
// .NET throws an exception to the user.\r
- object convertedValue = Convert.ChangeType(value,SqlConvert.SqlDbTypeToValueType(SqlDbType));\r
+ object convertedValue = value is IConvertible ? Convert.ChangeType(value,SqlConvert.SqlDbTypeToValueType(SqlDbType)) : value;\r
return convertedValue;\r
}
+2007-03-14 Nagappan A <anagappan@novell.com>
+
+ * SqlCommand.cs (CommandType): Exception type thrown in 2.0
+ profile is different than 1.0, ArgumentOutOfRangeException.
+ (Connection): Exception type thrown in 2.0 profile is different
+ than 1.0, ArgumentOutOfRangeException.
+ (Execute): If Size property is 0 for String and Binary type, then
+ throw InvalidOperationException.
+ (ValidateCommand): Exception type thrown in 2.0 profile is
+ different than 1.0, NullReferenceException.
+
+2007-03-09 Nagappan A <anagappan@novell.com>
+
+ * SqlDataReader.cs: Fixed syntax erros reported in class status
+ page.
+
+2007-03-09 Andreia Gaita <avidigal@novell.com>
+
+ * SqlCommand.cs (ExecuteScalar): Fix returned value for
+ stored procedure calls to return the first column of the
+ first row produced by the proc.
+
+2007-03-08 Nagappan A <anagappan@novell.com>
+
+ * SqlCommand.cs (CloseDataReader): Checks whether the SQL
+ connection is created or not.
+
+2007-03-07 Andreia Gaita <avidigal@novell.com>
+
+ * SqlCommand.cs (ExecuteScalar): when calling stored procedures,
+ implement support for return of output values in the parameter
+ collection.
+
2007-02-16 Nidhi Rawal <rawalnidhi_rawal@yahoo.com>
* SqlParameter.cs (CompareInfo): Implemented the property
get { return commandType; }
set {
if (value == CommandType.TableDirect)
+#if NET_2_0
+ throw new ArgumentOutOfRangeException ("CommandType.TableDirect is not supported " +
+ "by the Mono SqlClient Data Provider.");
+#else
throw new ArgumentException ("CommandType.TableDirect is not supported by the Mono SqlClient Data Provider.");
+#endif
if (!Enum.IsDefined (typeof (CommandType), value))
+#if NET_2_0
+ throw new ArgumentOutOfRangeException (String.Format ("The CommandType enumeration value, {0}, is invalid",
+ value));
+#else
throw ExceptionHelper.InvalidEnumValueException ("CommandType", value);
+#endif
commandType = value;
}
}
#endif //NET_2_0
SqlConnection Connection {
get { return connection; }
- set {
+ set {
if (transaction != null && connection.Transaction != null && connection.Transaction.IsOpen)
throw new InvalidOperationException ("The Connection property was changed while a transaction was in progress.");
transaction = null;
get { return updatedRowSource; }
set {
if (!Enum.IsDefined (typeof (UpdateRowSource), value))
+#if NET_2_0
+ throw new ArgumentOutOfRangeException (String.Format ("The UpdateRowSource enumeration value, {0}, is invalid",
+ value));
+#else
throw ExceptionHelper.InvalidEnumValueException ("UpdateRowSource", value);
+#endif
updatedRowSource = value;
}
}
// Reset the behavior
behavior = CommandBehavior.Default;
- Tds.SequentialAccess = false;
+ if (Tds != null)
+ Tds.SequentialAccess = false;
}
public new SqlParameter CreateParameter ()
private void Execute (CommandBehavior behavior, bool wantResults)
{
+ int index = 0;
Connection.Tds.RecordsAffected = -1;
TdsMetaParameterCollection parms = Parameters.MetaParameters;
+ foreach (TdsMetaParameter param in parms) {
+ bool flag = false;
+ string type = "";
+ if (param.Size == 0) {
+ switch (param.TypeName) {
+ case "nvarchar":
+ type = "String";
+ flag = true;
+ break;
+ case "varbinary":
+ type = "Byte[]";
+ flag = true;
+ break;
+ }
+ }
+ if (flag == true)
+ throw new InvalidOperationException (String.Format ("{0}[{1}]: the Size property should " +
+ "not be of size 0",
+ type,
+ index));
+ index++;
+ }
if (preparedStatement == null) {
bool schemaOnly = ((behavior & CommandBehavior.SchemaOnly) > 0);
bool keyInfo = ((behavior & CommandBehavior.KeyInfo) > 0);
Connection.Tds.Execute (sql2.ToString ());
break;
case CommandType.Text:
- //string sql = String.Format ("{0}{1};{2}", sql1.ToString (), CommandText, sql2.ToString ());
string sql;
if (sql2.Length > 0) {
sql = String.Format ("{0}{1};{2}", sql1.ToString (), CommandText, sql2.ToString ());
public
#if NET_2_0
- override
+ override
#endif // NET_2_0
- object ExecuteScalar ()
+ object ExecuteScalar ()
{
- ValidateCommand ("ExecuteScalar");
- behavior = CommandBehavior.Default;
try {
- Execute (CommandBehavior.Default, true);
- }
- catch (TdsTimeoutException e) {
- throw SqlException.FromTdsInternalException ((TdsInternalException) e);
- }
+ object result = null;
+ ValidateCommand ("ExecuteScalar");
+ behavior = CommandBehavior.Default;
+ try {
+ Execute (CommandBehavior.Default, true);
+ }
+ catch (TdsTimeoutException e) {
+ throw SqlException.FromTdsInternalException ((TdsInternalException) e);
+ }
- if (!Connection.Tds.NextResult () || !Connection.Tds.NextRow ())
- return null;
+ if (Connection.Tds.NextResult () && Connection.Tds.NextRow ())
+ result = Connection.Tds.ColumnValues[0];
+
+ if (commandType == CommandType.StoredProcedure) {
+ Connection.Tds.SkipToEnd ();
+ GetOutputParameters ();
+ }
- object result = Connection.Tds.ColumnValues [0];
- CloseDataReader (true);
- return result;
+ return result;
+ }
+ finally {
+ CloseDataReader (true);
+ }
}
public XmlReader ExecuteXmlReader ()
private void ValidateCommand (string method)
{
if (Connection == null)
+#if NET_2_0
+ throw new NullReferenceException (String.Format ("{0} requires a Connection object to continue.", method));
+#else
throw new InvalidOperationException (String.Format ("{0} requires a Connection object to continue.", method));
+#endif
if (Connection.Transaction != null && transaction != Connection.Transaction)
throw new InvalidOperationException ("The Connection object does not have the same transaction as the command object.");
if (Connection.State != ConnectionState.Open)
+#if NET_2_0
+ throw new NullReferenceException (String.Format ("ExecuteNonQuery requires an open Connection object to continue. This connection is closed.", method));
+#else
throw new InvalidOperationException (String.Format ("ExecuteNonQuery requires an open Connection object to continue. This connection is closed.", method));
+#endif
if (commandText == String.Empty || commandText == null)
throw new InvalidOperationException ("The command text for this Command has not been set.");
if (Connection.DataReader != null)
namespace System.Data.SqlClient {
#if NET_2_0
- public sealed class SqlDataReader : DbDataReader, IDataReader, IDisposable, IDataRecord
+ public class SqlDataReader : DbDataReader, IDataReader, IDisposable, IDataRecord
#else
public sealed class SqlDataReader : MarshalByRefObject, IEnumerable, IDataReader, IDisposable, IDataRecord
#endif // NET_2_0
return DBNull.Value;
}
- public SqlBinary GetSqlBinary (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlBinary GetSqlBinary (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlBinary))
return (SqlBinary) value;
}
- public SqlBoolean GetSqlBoolean (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlBoolean GetSqlBoolean (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlBoolean))
return (SqlBoolean) value;
}
- public SqlByte GetSqlByte (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlByte GetSqlByte (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlByte))
return (SqlByte) value;
}
- public SqlDateTime GetSqlDateTime (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlDateTime GetSqlDateTime (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlDateTime))
return (SqlDateTime) value;
}
- public SqlDecimal GetSqlDecimal (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlDecimal GetSqlDecimal (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlDecimal))
return (SqlDecimal) value;
}
- public SqlDouble GetSqlDouble (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlDouble GetSqlDouble (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlDouble))
return (SqlDouble) value;
}
- public SqlGuid GetSqlGuid (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlGuid GetSqlGuid (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlGuid))
return (SqlGuid) value;
}
- public SqlInt16 GetSqlInt16 (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlInt16 GetSqlInt16 (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlInt16))
return (SqlInt16) value;
}
- public SqlInt32 GetSqlInt32 (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlInt32 GetSqlInt32 (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlInt32))
return (SqlInt32) value;
}
- public SqlInt64 GetSqlInt64 (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlInt64 GetSqlInt64 (int i)
{
object value = GetSqlValue (i);
// TDS 7.0 returns bigint as decimal(19,0)
return (SqlInt64) value;
}
- public SqlMoney GetSqlMoney (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlMoney GetSqlMoney (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlMoney))
return (SqlMoney) value;
}
- public SqlSingle GetSqlSingle (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlSingle GetSqlSingle (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlSingle))
return (SqlSingle) value;
}
- public SqlString GetSqlString (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ SqlString GetSqlString (int i)
{
object value = GetSqlValue (i);
if (!(value is SqlString))
return (SqlString) value;
}
- public object GetSqlValue (int i)
+ public
+#if NET_2_0
+ virtual
+#endif
+ object GetSqlValue (int i)
{
SqlDbType type = (SqlDbType) (schemaTable.Rows [i]["ProviderType"]);
object value = GetValue (i);
throw new InvalidOperationException ("The type of this column is unknown.");
}
- public int GetSqlValues (object[] values)
+ public
+#if NET_2_0
+ virtual
+#endif
+ int GetSqlValues (object[] values)
{
int count = 0;
int columnCount = schemaTable.Rows.Count;
+2007-03-09 Nagappan A <anagappan@novell.com>
+
+ * SqlBoolean.cs (GreaterThan, GreaterThanOrEqual, LessThan)
+ (LessThanOrEqual, GetXsdType, operator >, >=, <, <=): Implemented
+ missing 2.0 methods.
+
+ * SqlDouble.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlString.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlBinary.cs (Add, GetXsdType): Implemented missing 2.0 methods.
+
+ * SqlByte.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlBytes.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlChars.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlXml.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlGuid.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlInt64.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlInt32.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlInt16.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlNotFilledException.cs: Fixed syntax errors based on class
+ status page.
+
+ * SqlDecimal.cs (GetXsdType): Implemented missing method.
+
+ * SqlDateTime.cs (GetXsdType): Implemented missing method.
+
+ * SqlMoney.cs (GetXsdType): Implemented missing 2.0 method.
+
+ * SqlSingle.cs (GetXsdType): Implemented missing 2.0 method.
+
2007-02-11 Konstantin Triger <kostat@mainsoft.com>
* SqlDateTime.cs, SqlDecimal.cs, SqlByte.cs, SqlDouble.cs, SqlBoolean.cs,
namespace System.Data.SqlTypes {
- public class SqlAlreadyFilledException : SqlTypeException, ISerializable
+ public sealed class SqlAlreadyFilledException : SqlTypeException, ISerializable
{
public SqlAlreadyFilledException()
: base (Locale.GetText ("A SqlAlreadyFilled exception has occured."))
{
}
- protected SqlAlreadyFilledException (SerializationInfo si, StreamingContext sc)
- : base(si.GetString("SqlAlreadyFilledExceptionMessage"))
- {
- }
-
void ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
{
si.AddValue ("SqlAlreadyFilledExceptionMessage", Message, typeof(string));
#endregion
#region Methods
+#if NET_2_0
+ public static SqlBinary Add (SqlBinary x, SqlBinary y)
+ {
+ return (x + y);
+ }
+#endif
+
public int CompareTo (object value)
{
if (value == null)
#region Operators
- [MonoTODO]
public static SqlBinary operator + (SqlBinary x, SqlBinary y)
{
byte [] b = new byte [x.Value.Length + y.Value.Length];
return 0;
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("base64Binary", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
using System;
using System.Globalization;
+#if NET_2_0
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+using System.Runtime.Serialization;
+#endif
namespace System.Data.SqlTypes
{
/// Represents an integer value that is either 1 or 0
/// to be stored in or retrieved from a database.
/// </summary>
- public struct SqlBoolean : INullable, IComparable
+ public struct SqlBoolean : INullable, IComparable
+#if NET_2_0
+ , IXmlSerializable
+#endif
{
#region Fields
return (x == y);
}
+#if NET_2_0
+ public static SqlBoolean GreaterThan (SqlBoolean x, SqlBoolean y)
+ {
+ return (x > y);
+ }
+
+ public static SqlBoolean GreaterThanOrEqual (SqlBoolean x, SqlBoolean y)
+ {
+ return (x >= y);
+ }
+
+ public static SqlBoolean LessThan (SqlBoolean x, SqlBoolean y)
+ {
+ return (x < y);
+ }
+
+ public static SqlBoolean LessThanOrEqual (SqlBoolean x, SqlBoolean y)
+ {
+ return (x <= y);
+ }
+#endif
public override int GetHashCode()
{
int hash;
return b;
}
+#if NET_2_0
+ public static SqlBoolean operator > (SqlBoolean x, SqlBoolean y)
+ {
+ if (x.IsNull || y.IsNull)
+ return SqlBoolean.Null;
+
+ return new SqlBoolean (Compare (x, y) > 0);
+ }
+
+ public static SqlBoolean operator >= (SqlBoolean x, SqlBoolean y)
+ {
+ if (x.IsNull || y.IsNull)
+ return SqlBoolean.Null;
+
+ return new SqlBoolean (Compare (x, y) >= 0);
+ }
+
+ public static SqlBoolean operator < (SqlBoolean x, SqlBoolean y)
+ {
+ if (x.IsNull || y.IsNull)
+ return SqlBoolean.Null;
+
+ return new SqlBoolean (Compare (x, y) < 0);
+ }
+
+ public static SqlBoolean operator <= (SqlBoolean x, SqlBoolean y)
+ {
+ if (x.IsNull || y.IsNull)
+ return SqlBoolean.Null;
+
+ return new SqlBoolean (Compare (x, y) <= 0);
+ }
+#endif
// test to see if value is true
public static bool operator true (SqlBoolean x)
{
{
return new SqlBoolean (x);
}
+#if NET_2_0
+ // Helper method to Compare methods and operators.
+ // Returns 0 if x == y
+ // 1 if x > y
+ // -1 if x < y
+ private static int Compare (SqlBoolean x, SqlBoolean y)
+ {
+ if (x == y)
+ return 0;
+ if (x.IsTrue && y.IsFalse)
+ return 1;
+ if (x.IsFalse && y.IsTrue)
+ return -1;
+ return 0;
+ }
+
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("boolean", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
+ [MonoTODO]
+ XmlSchema IXmlSerializable.GetSchema ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ void IXmlSerializable.ReadXml (XmlReader reader)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ void IXmlSerializable.WriteXml (XmlWriter writer)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
}
}
using System;
using System.Globalization;
+#if NET_2_0
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+using System.Runtime.Serialization;
+#endif
namespace System.Data.SqlTypes
{
public struct SqlByte : INullable, IComparable
+#if NET_2_0
+ , IXmlSerializable
+#endif
{
#region Fields
return new SqlByte (x);
}
+#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("unsignedByte", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
+ [MonoTODO]
+ XmlSchema IXmlSerializable.GetSchema ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ void IXmlSerializable.ReadXml (XmlReader reader)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ void IXmlSerializable.WriteXml (XmlWriter writer)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
#endregion
}
}
return new SqlBinary (buffer);
}
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("base64Binary", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
throw new NotImplementedException ();
}
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("string", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlDateTime : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("dateTime", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlDecimal : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("decimal", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlDouble : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("double", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlGuid : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("string", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlInt16 : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("short", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
/// </summary>
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlInt32 : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("int", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlInt64 : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("long", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlMoney : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("decimal", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
#endregion
}
}
-
namespace System.Data.SqlTypes {
[SerializableAttribute]
- public class SqlNotFilledException : SqlTypeException, ISerializable
+ public sealed class SqlNotFilledException : SqlTypeException, ISerializable
{
public SqlNotFilledException()
: base (Locale.GetText ("A SqlNotFilled exception has occured."))
{
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlSingle : INullable, IComparable
#if NET_2_0
}
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("float", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
/// </summary>
#if NET_2_0
[SerializableAttribute]
- [XmlSchemaProvider ("GetSchema")]
+ [XmlSchemaProvider ("GetXsdType")]
#endif
public struct SqlString : INullable, IComparable
#if NET_2_0
#endregion // Public Methods
#if NET_2_0
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("string", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
namespace System.Data.SqlTypes
{
[SerializableAttribute]
- public class SqlXml : INullable, IXmlSerializable
+ public sealed class SqlXml : INullable, IXmlSerializable
{
bool notNull;
}
}
+ public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
+ {
+ XmlQualifiedName qualifiedName = new XmlQualifiedName ("anyType", "http://www.w3.org/2001/XMLSchema");
+ return qualifiedName;
+ }
+
[MonoTODO]
XmlSchema IXmlSerializable.GetSchema ()
{
System.Data/XmlDiffLoader.cs
System.Data.Common/CatalogLocation.cs
System.Data.Common/ComparerFactory.cs
-System.Data.Common/ConnectionStringsSectionHandler.cs
System.Data.Common/DataAdapter.cs
System.Data.Common/DataColumnMappingCollection.cs
System.Data.Common/DataColumnMapping.cs
System.Data.SqlTypes/SqlMoney.cs
System.Data.SqlTypes/SqlNullValueException.cs
System.Data.SqlTypes/SqlSingle.cs
-System.Data.SqlTypes/SqlStreamChars.cs
System.Data.SqlTypes/SqlString.cs
System.Data.SqlTypes/SqlTruncateException.cs
System.Data.SqlTypes/SqlTypeException.cs
<GHProjectType>1</GHProjectType>\r
<GHProjectKind>framework</GHProjectKind>\r
<Version>2.0</Version>\r
- <jarserver>iap2</jarserver>\r
<ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">\r
<Compile Include="Mono.Data.SqlExpressions\Tokenizer.cs" />\r
<Compile Include="System.Data.Common\CatalogLocation.cs" />\r
<Compile Include="System.Data.Common\ComparerFactory.cs" />\r
- <Compile Include="System.Data.Common\ConnectionStringsSectionHandler.cs" />\r
<Compile Include="System.Data.Common\DataAdapter.cs">\r
<SubType>Component</SubType>\r
</Compile>\r
</Compile>\r
<Compile Include="System.Data.SqlClient.jvm\SqlConnectionPool.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlConvert.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlDataAdapter.cs">\r
- <SubType>Component</SubType>\r
- </Compile>\r
<Compile Include="System.Data.SqlClient.jvm\SqlDataReader.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlError.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlErrorCollection.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlException.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlInfoMessageEventArgs.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlInfoMessageEventHandler.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlParameter.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlParameterCollection.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlParameterConverter.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlResultSet.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlRowUpdatedEventArgs.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlRowUpdatedEventHandler.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlRowUpdatingEventArgs.cs" />\r
- <Compile Include="System.Data.SqlClient.jvm\SqlRowUpdatingEventHandler.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlTransaction.cs" />\r
<Compile Include="System.Data.SqlClient.jvm\SqlXmlTextReader.cs" />\r
<Compile Include="System.Data.SqlTypes\INullable.cs" />\r
<Compile Include="..\..\build\common\Consts.cs.in">\r
<Link>Assembly\Consts.cs.in</Link>\r
</Compile>\r
+ <Compile Include="System.Data.SqlClient.jvm\SqlInfoMessageEventArgs.cs">\r
+ <SubType>Code</SubType>\r
+ </Compile>\r
+ <Compile Include="System.Data.SqlClient\SqlAsyncResult.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlAsyncState.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlBulkCopyColumnMapping.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlBulkCopyOptions.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlClientMetaDataCollectionNames.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlConnectionStringBuilder.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlDataAdapter.cs">\r
+ <SubType>Component</SubType>\r
+ </Compile>\r
+ <Compile Include="System.Data.SqlClient\SqlInfoMessageEventHandler.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlRowsCopiedEventArgs.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlRowsCopiedEventHandler.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlRowUpdatedEventArgs.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlRowUpdatedEventHandler.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlRowUpdatingEventArgs.cs" />\r
+ <Compile Include="System.Data.SqlClient\SqlRowUpdatingEventHandler.cs" />\r
<None Include="Mono.Data.SqlExpressions\Parser.jay" />\r
</ItemGroup>\r
<ItemGroup>\r
+2007-03-09 Andreia Gaita <avidigal@novell.com>
+
+ * ConnectionManager.cs: small fix to close the connection if we
+ mean to change the connection string and open it again
+
2005-09-16 Senganal T <tsenganal@novell.com>
* DataProvider.cs : Provides data for validation
{
if (_connection == null)
_connection = ProviderFactory.CreateConnectionFromConfig ("ConnString");
+ if (!(_connection.State == ConnectionState.Closed || _connection.State == ConnectionState.Broken))
+ _connection.Close ();
_connection.ConnectionString = _connectionString;
_connection.Open ();
}
<Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOtype.cs" />
<Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOtypeI.cs" />
<Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOtype_IS.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Begin.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Commit.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Connection.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_ctor.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_IsolationLevel.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Rollback.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbType\OleDbType.cs" />
+ <Compile Include="System.Data.OleDb.jvm\OleDbType\OleDbType_Date.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlCommandBuilder\SqlCommandBuilder_DeriveParameters_S.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlCommand\SqlCommand_ExecuteReader_.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlCommand\SqlCommand_ExecuteXmlReader_.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlCommand\SqlCommand_Parameters.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlConnection\SqlConnection_BeginTransaction_S.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlConnection\SqlConnection_InfoMessage.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlConnection\SqlConnection_StateChange.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlDataAdapter\SqlDataAdapter_RowUpdated.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlDataAdapter\SqlDataAdapter_RowUpdating.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlParameter\SqlParameter_ctor_SO.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlParameter\SqlParameter_Direction.cs" />
+ <Compile Include="System.Data.SqlClient.jvm\SqlParameter\SqlParameter_set_DbType_D.cs" />
+ <Compile Include="System.Data.SqlClient\SqlConnectionStringBuilderTest.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj">
finally {tc.EndTest(exp);}
}
+ [Test]
+ public void CommandBehaviorSingleRow ()
+ {
+ Exception exp = null;
+
+ cmd.CommandText = "Select * From Employees";
+ OleDbDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleRow);
+
+ try
+ {
+ BeginCase ("CommandBehaviorSingleRow");
+ int i = 0;
+ while (rdr.Read ())
+ i++;
+ Compare(i, 1);
+ }
+ catch(Exception ex){exp = ex;}
+ finally{EndCase(exp); exp = null;}
+ }
+
[Test]
public void run()
{
+2007-03-14 Nagappan A <anagappan@novell.com>
+
+ * SqlCommandTest.cs (ExecuteScalarTest, ExecuteReaderTest)
+ (ExecuteReaderTest, PrepareTest, TransactionTest): Modified
+ expected exception to NullReferenceException as it has to be
+ thrown in 2.0 profile.
+
+2007-03-09 Andreia Gaita <avidigal@novell.com>
+
+ * SqlCommandTest.cs: Add new test to check string parameters with
+ value = null and size 0. Fixed tests for NET 2.0 (different exceptions
+ thrown)
+
+2007-03-09 Andreia Gaita <avidigal@novell.com>
+
+ * SqlCommandTest.cs: Add parameterized stored procedure call tests
+ to ExecuteScalar and ExecuteNonQuery.
+
2007-01-08 Nagappan A <anagappan@novell.com>
* SqlCommandBuilderTest.cs (GetInsertCommandTest)
}catch (AssertionException e) {
throw e;
}catch (Exception e) {
- Assert.AreEqual (typeof(InvalidOperationException), e.GetType(),
+#if NET_2_0
+ Assert.AreEqual (typeof (NullReferenceException), e.GetType (),
+ "#2 Incorrect Exception : " + e.StackTrace);
+#else
+ Assert.AreEqual (typeof (InvalidOperationException), e.GetType (),
"#2 Incorrect Exception : " + e.StackTrace);
+#endif
}
// Check the Return value for a Correct Query
cmd.CommandText = "select id from numeric_family where id=-1";
result = cmd.ExecuteScalar ();
- Assert.IsNull (result, "#5 Null shud be returned if result set is empty");
+ Assert.IsNull (result, "#5 Null should be returned if result set is empty");
// Check SqlException is thrown for Invalid Query
cmd.CommandText = "select count* from numeric_family";
Assert.AreEqual (typeof(SqlException), e.GetType(),
"#7 Incorrect Exception : " + e.StackTrace);
}
+
+
+ // Parameterized stored procedure calls
+
+ int int_value = 20;
+ string string_value = "output value changed";
+ string return_value = "first column of first rowset";
+
+ cmd.CommandText =
+ "create procedure #tmp_executescalar_outparams "+
+ " (@p1 int, @p2 int out, @p3 varchar(200) out) "+
+ "as " +
+ "select '" + return_value + "' as 'col1', @p1 as 'col2' "+
+ "set @p2 = @p2 * 2 "+
+ "set @p3 = N'" + string_value + "' "+
+ "select 'second rowset' as 'col1', 2 as 'col2' "+
+ "return 1";
+
+ cmd.CommandType = CommandType.Text;
+ cmd.ExecuteNonQuery ();
+
+ cmd.CommandText = "#tmp_executescalar_outparams";
+ cmd.CommandType = CommandType.StoredProcedure;
+
+ SqlParameter p1 = new SqlParameter ();
+ p1.ParameterName = "@p1";
+ p1.Direction = ParameterDirection.Input;
+ p1.DbType = DbType.Int32;
+ p1.Value = int_value;
+ cmd.Parameters.Add (p1);
+
+ SqlParameter p2 = new SqlParameter ();
+ p2.ParameterName = "@p2";
+ p2.Direction = ParameterDirection.InputOutput;
+ p2.DbType = DbType.Int32;
+ p2.Value = int_value;
+ cmd.Parameters.Add (p2);
+
+ SqlParameter p3 = new SqlParameter ();
+ p3.ParameterName = "@p3";
+ p3.Direction = ParameterDirection.Output;
+ p3.DbType = DbType.String;
+ p3.Size = 200;
+ cmd.Parameters.Add (p3);
+
+ result = cmd.ExecuteScalar ();
+ Assert.AreEqual (return_value, result, "#8 ExecuteScalar Should return 'first column of first rowset'");
+ Assert.AreEqual (int_value * 2, p2.Value, "#9 ExecuteScalar should fill the parameter collection with the outputted values");
+ Assert.AreEqual (string_value, p3.Value, "#10 ExecuteScalar should fill the parameter collection with the outputted values");
+
+ p3.Size = 0;
+ p3.Value = null;
+ try {
+ cmd.ExecuteScalar ();
+ Assert.Fail ("#11 Query should throw System.InvalidOperationException due to size = 0 and value = null");
+ }
+ catch (AssertionException e) {
+ throw e;
+ }
+ catch (Exception e) {
+ Assert.AreEqual (typeof (InvalidOperationException), e.GetType (),
+ "#12 Incorrect Exception : " + e.StackTrace);
+ }
+
+ conn.Close ();
+
}
[Test]
}catch (AssertionException e) {
throw e;
}catch (Exception e) {
+#if NET_2_0
+ Assert.AreEqual (typeof(NullReferenceException), e.GetType(),
+ "#2 Incorrect Exception : " + e);
+#else
Assert.AreEqual (typeof(InvalidOperationException), e.GetType(),
"#2 Incorrect Exception : " + e);
+#endif
}
// Test Exception is thrown if Query is incorrect
}finally {
trans.Rollback ();
}
+
+
+ // Parameterized stored procedure calls
+
+ int int_value = 20;
+ string string_value = "output value changed";
+
+ cmd.CommandText =
+ "create procedure #tmp_executescalar_outparams " +
+ " (@p1 int, @p2 int out, @p3 varchar(200) out) " +
+ "as " +
+ "select 'test' as 'col1', @p1 as 'col2' " +
+ "set @p2 = @p2 * 2 " +
+ "set @p3 = N'" + string_value + "' " +
+ "select 'second rowset' as 'col1', 2 as 'col2' " +
+ "return 1";
+
+ cmd.CommandType = CommandType.Text;
+ cmd.ExecuteNonQuery ();
+
+ cmd.CommandText = "#tmp_executescalar_outparams";
+ cmd.CommandType = CommandType.StoredProcedure;
+
+ SqlParameter p1 = new SqlParameter ();
+ p1.ParameterName = "@p1";
+ p1.Direction = ParameterDirection.Input;
+ p1.DbType = DbType.Int32;
+ p1.Value = int_value;
+ cmd.Parameters.Add (p1);
+
+ SqlParameter p2 = new SqlParameter ();
+ p2.ParameterName = "@p2";
+ p2.Direction = ParameterDirection.InputOutput;
+ p2.DbType = DbType.Int32;
+ p2.Value = int_value;
+ cmd.Parameters.Add (p2);
+
+ SqlParameter p3 = new SqlParameter ();
+ p3.ParameterName = "@p3";
+ p3.Direction = ParameterDirection.Output;
+ p3.DbType = DbType.String;
+ p3.Size = 200;
+ cmd.Parameters.Add (p3);
+
+ cmd.ExecuteNonQuery ();
+ Assert.AreEqual (int_value * 2, p2.Value, "#6 ExecuteNonQuery should fill the parameter collection with the outputted values");
+ Assert.AreEqual (string_value, p3.Value, "#7 ExecuteNonQuery should fill the parameter collection with the outputted values");
}
[Test]
}catch (AssertionException e) {
throw e;
}catch (Exception e) {
+#if NET_2_0
+ Assert.AreEqual (typeof(NullReferenceException), e.GetType(),
+ "#1 Incorrect Exception");
+#else
Assert.AreEqual (typeof(InvalidOperationException), e.GetType(),
"#1 Incorrect Exception");
+#endif
}
conn.Open ();
cmd.Connection = null;
try {
cmd.Prepare ();
- Assert.Fail ("#8 InvalidOperation Exception shud be thrown");
- }catch (AssertionException e) {
+#if NET_2_0
+ Assert.Fail ("#8 NullReferenceException should be thrown");
+#else
+ Assert.Fail ("#8 InvalidOperation Exception should be thrown");
+#endif
+ }
+ catch (AssertionException e) {
throw e;
}catch (Exception e) {
- Assert.AreEqual (typeof(InvalidOperationException), e.GetType(),
+#if NET_2_0
+ Assert.AreEqual (typeof (NullReferenceException), e.GetType (),
+ "#9 Incorrect Exception : " + e.StackTrace);
+#else
+ Assert.AreEqual (typeof (InvalidOperationException), e.GetType (),
"#9 Incorrect Exception : " + e.StackTrace);
+#endif
}
//Test InvalidOperation Exception is thrown if connection is closed
}catch (AssertionException e) {
throw e;
}catch (Exception e) {
+#if NET_2_0
+ Assert.AreEqual (typeof(NullReferenceException), e.GetType(),
+ "Incorrect Exception : " + e.StackTrace);
+#else
Assert.AreEqual (typeof(InvalidOperationException), e.GetType(),
"Incorrect Exception : " + e.StackTrace);
+#endif
}
}
}
[Test]
+#if NET_2_0
+ [ExpectedException (typeof(ArgumentOutOfRangeException))]
+#else
[ExpectedException (typeof(ArgumentException))]
+#endif
public void CommandTypeTest ()
{
cmd = new SqlCommand ();
cmd.ExecuteNonQuery ();
Assert.Fail ("#2 Connection cannot be different");
}catch (Exception e) {
+#if NET_2_0
+ Assert.AreEqual (typeof(NullReferenceException), e.GetType(),
+ "#3 Incorrect Exception : " + e);
+#else
Assert.AreEqual (typeof(InvalidOperationException), e.GetType(),
"#3 Incorrect Exception : " + e);
+#endif
}finally {
conn1.Close ();
conn.Close ();
// Need to add more tests
[Test]
+#if NET_2_0
+ [ExpectedException (typeof(ArgumentOutOfRangeException))]
+#else
[ExpectedException (typeof(ArgumentException))]
+#endif
public void UpdatedRowSourceTest ()
{
cmd = new SqlCommand ();
+2007-03-03 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * DbProviderFactoriesConfigurationHandlerTest.cs: Changed test to also
+ verify behavior for clear and remove nodes.
+
+2007-03-03 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * DbProviderFactoriesConfigurationHandlerTest.cs: Fixed tests to
+ pass on MS. Added NotWorking test to check whether DbProviderFactories
+ that are defined on machine config are available.
+
2007-02-19 Atsushi Enomoto <atsushi@ximian.com>
* DbProviderFactoriesConfigurationHandlerTest.cs : test for #80894.
using NUnit.Framework;
-namespace MonoTests.System.Data.Common {
- [TestFixture]
+namespace MonoTests.System.Data.Common
+{
+ [TestFixture]
public class DbProviderFactoriesConfigurationHandlerTest
{
- const string configSection = "system.data_test";
+ const string configSection = "system.data_test";
- [Test]
- public void GetConfigTest ()
- {
- object o = ConfigurationSettings.GetConfig (configSection);
- Assert.IsTrue (o is DataSet, "GetConfig should return DataSet");
- DataSet ds = o as DataSet;
- DataTable dt = ds.Tables [0];
- Assert.IsNotNull (dt.Columns ["Name"], "Name column missing");
- Assert.IsNotNull (dt.Columns ["Description"], "Description column missing");
- Assert.IsNotNull (dt.Columns ["InvariantName"], "InvariantName column missing");
- Assert.IsNotNull (dt.Columns ["AssemblyQualifiedName"], "AssemblyQualifiedName column missing");
- Assert.IsNotNull (dt.Columns ["SupportedClasses"], "SupportedClasses column missing");
+ [Test]
+ public void GetConfigTest ()
+ {
+ object o = ConfigurationSettings.GetConfig (configSection);
+ DataSet ds = o as DataSet;
+ Assert.IsNotNull (ds, "#A1");
+ Assert.AreEqual ("system.data", ds.DataSetName, "#A2");
+ Assert.AreEqual (1, ds.Tables.Count, "#A3");
- DataColumn [] pk = dt.PrimaryKey;
- Assert.AreEqual (1, pk.Length, "primary key column not set");
- Assert.AreEqual ("InvariantName", pk [0].ColumnName, "InvariantName should be the primary key");
+ DataTable dt = ds.Tables [0];
+ Assert.AreEqual ("DbProviderFactories", dt.TableName, "#B1");
+ Assert.AreEqual (4, dt.Columns.Count, "#B2");
+ Assert.IsNotNull (dt.Columns ["Name"], "#B3");
+ Assert.IsNotNull (dt.Columns ["Description"], "#B4");
+ Assert.IsNotNull (dt.Columns ["InvariantName"], "#B5");
+ Assert.IsNotNull (dt.Columns ["AssemblyQualifiedName"], "#B6");
- }
+ DataColumn [] pk = dt.PrimaryKey;
+ Assert.AreEqual (1, pk.Length, "#C1");
+ Assert.AreEqual ("InvariantName", pk [0].ColumnName, "#C2");
+ }
- [Test]
- public void PopulateTest ()
- {
- object o = ConfigurationSettings.GetConfig (configSection);
- DataSet ds = o as DataSet;
- DataTable dt = ds.Tables [0];
- DataRow r = dt.Rows.Find ("ProviderTest.InvariantName");
- Assert.AreEqual ("ProviderTest.Name", r ["Name"].ToString (), "Name column missing");
- Assert.AreEqual ("ProviderTest.Description", r ["Description"].ToString (), "Description column missing");
- Assert.AreEqual ("ProviderTest.InvariantName", r ["InvariantName"].ToString (), "InvariantName column missing");
- Assert.AreEqual ("ProviderTest.AssemblyQualifiedName", r ["AssemblyQualifiedName"].ToString (), "AssemblyQualifiedName column missing");
- Assert.AreEqual (255, (int) r ["SupportedClasses"], "SupportedClasses column missing");
+ [Test]
+ public void PopulateTest ()
+ {
+ object o = ConfigurationSettings.GetConfig (configSection);
+ DataSet ds = o as DataSet;
+ DataTable dt = ds.Tables [0];
+ Assert.AreEqual (2, dt.Rows.Count, "#A1");
- }
+ DataRow r = dt.Rows.Find ("ProviderTest.InvariantName");
+ Assert.AreEqual ("ProviderTest.Name", r ["Name"].ToString (), "#B2");
+ Assert.AreEqual ("ProviderTest.Description", r ["Description"].ToString (), "#B3");
+ Assert.AreEqual ("ProviderTest.InvariantName", r ["InvariantName"].ToString (), "#B4");
+ Assert.AreEqual ("ProviderTest.AssemblyQualifiedName", r ["AssemblyQualifiedName"].ToString (), "#B5");
- [Test]
- public void PopulateFactoriesTest () // bug #80894
- {
- DataTable dt = DbProviderFactories.GetFactoryClasses ();
- }
- }
+ r = dt.Rows.Find ("ProviderTest4.InvariantName");
+ Assert.AreEqual ("ProviderTest4.Name", r ["Name"].ToString (), "#A2");
+ Assert.AreEqual ("ProviderTest4.Description", r ["Description"].ToString (), "#A3");
+ Assert.AreEqual ("ProviderTest4.InvariantName", r ["InvariantName"].ToString (), "#A4");
+ Assert.AreEqual ("ProviderTest4.AssemblyQualifiedName", r ["AssemblyQualifiedName"].ToString (), "#A5");
+ }
+
+ [Test]
+ [Category ("NotWorking")]
+ public void PopulateTest_Machine ()
+ {
+ object o = ConfigurationSettings.GetConfig ("system.data");
+ DataSet ds = o as DataSet;
+ DataTable dt = ds.Tables ["DbProviderFactories"];
+ Assert.IsNotNull (dt, "#B1");
+ Assert.IsTrue (dt.Rows.Count > 1, "#B2");
+ DataRow r = dt.Rows.Find ("ProviderTest2.InvariantName");
+ Assert.AreEqual ("ProviderTest2.Name", r ["Name"].ToString (), "#B3");
+ Assert.AreEqual ("ProviderTest2.Description", r ["Description"].ToString (), "#B4");
+ Assert.AreEqual ("ProviderTest2.InvariantName", r ["InvariantName"].ToString (), "#B5");
+ Assert.AreEqual ("ProviderTest2.AssemblyQualifiedName", r ["AssemblyQualifiedName"].ToString (), "#B6");
+ }
+
+ [Test]
+ public void PopulateFactoriesTest () // bug #80894
+ {
+ DataTable dt = DbProviderFactories.GetFactoryClasses ();
+ }
+ }
}
#endif // NET_2_0
+2007-03-09 Nagappan A <anagappan@novell.com>
+
+ * SqlBooleanTest.cs (GetXsdTypeTest, GreaterThanTest)
+ (GreaterThanOrEqualTest, LessThanEqualTest, LessThanOrEqualTest):
+ Added new tests.
+
+ * SqlBinaryTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlByteTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlBytesTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlDateTimeTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlDecimalTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlGuidTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlInt16Test.cs (GetXsdTypeTest): Added new test.
+
+ * SqlInt32Test.cs (GetXsdTypeTest): Added new test.
+
+ * SqlInt64Test.cs (GetXsdTypeTest): Added new test.
+
+ * SqlMoneyTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlSingleTest.cs (GetXsdTypeTest): Added new test.
+
+ * SqlStringTest.cs (GetXsdTypeTest): Added new test.
+
2007-02-09 Nagappan A <anagappan@novell.com>
* SqlBytesTest.cs: Added new tests
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
namespace MonoTests.System.Data.SqlTypes
SqlBinary TestBinary = (SqlBinary)TestByteArray;
AssertEquals ("#O1", (byte)15, TestBinary [0]);
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlBinary.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("base64Binary", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
Assert.AreEqual ((byte)0, SqlBoolean.Zero.ByteValue, "Zero field does not work correctly");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlBoolean.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("boolean", qualifiedName.Name, "#A01");
+ }
+
+ [Test]
+ public void GreaterThanTest ()
+ {
+ SqlBoolean x = new SqlBoolean (-1);
+ SqlBoolean y = new SqlBoolean (true);
+ SqlBoolean z = new SqlBoolean ();
+ SqlBoolean z1 = new SqlBoolean (0);
+
+ NUnit.Framework.Assert.IsFalse ((x > y).Value, "#A01");
+ NUnit.Framework.Assert.AreEqual (x > z, SqlBoolean.Null, "#A02");
+ NUnit.Framework.Assert.IsTrue ((x > z1).Value, "#A03");
+ NUnit.Framework.Assert.AreEqual (y > z, SqlBoolean.Null, "#A04");
+ NUnit.Framework.Assert.IsFalse ((y > x).Value, "#A05");
+ NUnit.Framework.Assert.IsTrue ((y > z1).Value, "#A06");
+ NUnit.Framework.Assert.AreEqual (z > z1, SqlBoolean.Null, "#A07");
+ NUnit.Framework.Assert.AreEqual (z > x, SqlBoolean.Null, "#A08");
+ NUnit.Framework.Assert.AreEqual (z > y, SqlBoolean.Null, "#A09");
+ NUnit.Framework.Assert.AreEqual (z1 > z, SqlBoolean.Null, "#A10");
+ NUnit.Framework.Assert.IsFalse ((z1 > x).Value, "#A11");
+ NUnit.Framework.Assert.IsFalse ((z1 > y).Value, "#A12");
+ }
+
+ [Test]
+ public void GreaterThanOrEqualTest ()
+ {
+ SqlBoolean x = new SqlBoolean (-1);
+ SqlBoolean y = new SqlBoolean (true);
+ SqlBoolean z = new SqlBoolean ();
+ SqlBoolean z1 = new SqlBoolean (0);
+
+ NUnit.Framework.Assert.IsTrue ((x >= y).Value, "#A01");
+ NUnit.Framework.Assert.AreEqual (x >= z, SqlBoolean.Null, "#A02");
+ NUnit.Framework.Assert.IsTrue ((x >= z1).Value, "#A03");
+ NUnit.Framework.Assert.AreEqual (y >= z, SqlBoolean.Null, "#A04");
+ NUnit.Framework.Assert.IsTrue ((y >= x).Value, "#A05");
+ NUnit.Framework.Assert.IsTrue ((y >= z1).Value, "#A06");
+ NUnit.Framework.Assert.AreEqual (z >= z1, SqlBoolean.Null, "#A07");
+ NUnit.Framework.Assert.AreEqual (z >= x, SqlBoolean.Null, "#A08");
+ NUnit.Framework.Assert.AreEqual (z >= y, SqlBoolean.Null, "#A09");
+ NUnit.Framework.Assert.AreEqual (z1 >= z, SqlBoolean.Null, "#A10");
+ NUnit.Framework.Assert.IsFalse ((z1 >= x).Value, "#A11");
+ NUnit.Framework.Assert.IsFalse ((z1 >= y).Value, "#A12");
+ }
+
+ [Test]
+ public void LessThanTest ()
+ {
+ SqlBoolean x = new SqlBoolean (-1);
+ SqlBoolean y = new SqlBoolean (true);
+ SqlBoolean z = new SqlBoolean ();
+ SqlBoolean z1 = new SqlBoolean (0);
+
+ NUnit.Framework.Assert.IsFalse ((x < y).Value, "#A01");
+ NUnit.Framework.Assert.AreEqual (x < z, SqlBoolean.Null, "#A02");
+ NUnit.Framework.Assert.IsFalse ((x < z1).Value, "#A03");
+ NUnit.Framework.Assert.AreEqual (y < z, SqlBoolean.Null, "#A04");
+ NUnit.Framework.Assert.IsFalse ((y < x).Value, "#A05");
+ NUnit.Framework.Assert.IsFalse ((y < z1).Value, "#A06");
+ NUnit.Framework.Assert.AreEqual (z < z1, SqlBoolean.Null, "#A07");
+ NUnit.Framework.Assert.AreEqual (z < x, SqlBoolean.Null, "#A08");
+ NUnit.Framework.Assert.AreEqual (z < y, SqlBoolean.Null, "#A09");
+ NUnit.Framework.Assert.AreEqual (z1 < z, SqlBoolean.Null, "#A10");
+ NUnit.Framework.Assert.IsTrue ((z1 < x).Value, "#A11");
+ NUnit.Framework.Assert.IsTrue ((z1 < y).Value, "#A12");
+ }
+
+ [Test]
+ public void LessThanOrEqualTest ()
+ {
+ SqlBoolean x = new SqlBoolean (-1);
+ SqlBoolean y = new SqlBoolean (true);
+ SqlBoolean z = new SqlBoolean ();
+ SqlBoolean z1 = new SqlBoolean (0);
+
+ NUnit.Framework.Assert.IsTrue ((x <= y).Value, "#A01");
+ NUnit.Framework.Assert.AreEqual (x <= z, SqlBoolean.Null, "#A02");
+ NUnit.Framework.Assert.IsFalse ((x <= z1).Value, "#A03");
+ NUnit.Framework.Assert.AreEqual (y <= z, SqlBoolean.Null, "#A04");
+ NUnit.Framework.Assert.IsTrue ((y <= x).Value, "#A05");
+ NUnit.Framework.Assert.IsFalse ((y <= z1).Value, "#A06");
+ NUnit.Framework.Assert.AreEqual (z <= z1, SqlBoolean.Null, "#A07");
+ NUnit.Framework.Assert.AreEqual (z <= x, SqlBoolean.Null, "#A08");
+ NUnit.Framework.Assert.AreEqual (z <= y, SqlBoolean.Null, "#A09");
+ NUnit.Framework.Assert.AreEqual (z1 <= z, SqlBoolean.Null, "#A10");
+ NUnit.Framework.Assert.IsTrue ((z1 <= x).Value, "#A11");
+ NUnit.Framework.Assert.IsTrue ((z1 <= y).Value, "#A12");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
byte TestByte = 14;
Assert.AreEqual ((byte)14, ((SqlByte)TestByte).Value, "ByteToSqlByte" + Error);
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlByte.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("unsignedByte", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
using System.IO;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
Assert.AreEqual (b2 [0], 10, "#3 Should be same");
}
[Test]
-#if TARGET_JVM
- [Ignore ("Array.Resize(null) is not supported")]
-#endif
public void SqlBytesSetLength ()
{
byte [] b1 = new byte [10];
}
Assert.AreEqual (true, bytes.IsNull, "#2 Should be same");
}
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlBytes.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("base64Binary", qualifiedName.Name, "#A01");
+ }
}
}
#endif
using NUnit.Framework;
using System;
using System.IO;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
Assert.AreEqual (b2 [0], '1', "#3 Should be same");
}
[Test]
-#if TARGET_JVM
- [Ignore ("Array.Resize(null) is not supported")]
-#endif
public void SqlCharsSetLength ()
{
char [] b1 = new char [10];
}
Assert.AreEqual (true, chars.IsNull, "#2 Should be same");
}
+
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlChars.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("string", qualifiedName.Name, "#A01");
+ }
}
}
\r
using NUnit.Framework;\r
using System;\r
+using System.Xml;\r
using System.Data.SqlTypes;\r
using System.Threading;\r
using System.Globalization;\r
AssertEquals ("#Q05", 53, Result.Value.Minute);\r
AssertEquals ("#Q06", 4, Result.Value.Second);\r
}\r
+#if NET_2_0\r
+ [Test]\r
+ public void GetXsdTypeTest ()\r
+ {\r
+ XmlQualifiedName qualifiedName = SqlDateTime.GetXsdType (null);\r
+ NUnit.Framework.Assert.AreEqual ("dateTime", qualifiedName.Name, "#A01");\r
+ }\r
+#endif\r
}\r
}\r
\r
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
{
decimal d = decimal.Parse ("9999999999999999999999999999");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlDecimal.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("decimal", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
SqlSingle TestSingle64 = new SqlSingle (64);
Assert.AreEqual ((double)64, ((SqlDouble)TestSingle64).Value, "#Y01");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlDouble.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("double", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
\r
using NUnit.Framework;\r
using System;\r
+using System.Xml;
using System.Data.SqlTypes;\r
\r
namespace MonoTests.System.Data.SqlTypes\r
AssertEquals ("#Q01", new SqlGuid("0000c864-0000-0000-0000-000007650000"), \r
(SqlGuid)TestGuid);\r
}\r
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlGuid.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("string", qualifiedName.Name, "#A01");
+ }
+#endif
}\r
}\r
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
#if TARGET_JVM
using DivideByZeroException = System.ArithmeticException;
short TestShort = 14;
Assert.AreEqual ((short)14, ((SqlInt16)TestShort).Value, "Test#1");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlInt16.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("short", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data;
using System.Data.SqlTypes;
Assert.AreEqual (z.Value, a ^ b, "Xor function does not work correctly");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlInt32.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("int", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
#if TARGET_JVM
using DivideByZeroException = System.ArithmeticException;
short TestShort = 14;
Assert.AreEqual ((long)14, ((SqlInt64)TestShort).Value, "#G01");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlInt64.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("long", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
Assert.AreEqual ( typeof (OverflowException), e.GetType (), "#Y05");
}
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlMoney.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("decimal", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
Single TestSingle64 = 64;
Assert.AreEqual ((float)64, ((SqlSingle)TestSingle64).Value, "#Y01");
}
+#if NET_2_0
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlSingle.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("float", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
using NUnit.Framework;
using System;
+using System.Xml;
using System.Data.SqlTypes;
using System.Globalization;
using System.Threading;
Assert.AreEqual ("First TestStringPlainString", (String)(SqlString.Add (Test1, "PlainString")), "#AE02");
Assert.IsTrue (SqlString.Add (Test1, null).IsNull, "#AE03");
}
-#endif
-
-
+ [Test]
+ public void GetXsdTypeTest ()
+ {
+ XmlQualifiedName qualifiedName = SqlString.GetXsdType (null);
+ NUnit.Framework.Assert.AreEqual ("string", qualifiedName.Name, "#A01");
+ }
+#endif
}
}
<?xml version="1.0" encoding="utf-8"?>
<configuration>
- <configSections>
- <section name="system.data_test"
- type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0, Culture=neutral"/>
-
- <section name="connectionStrings_test"
- type="System.Data.Common.ConnectionStringsSectionHandler, System.Data, Version=2.0, Culture=neutral"/>
-
- </configSections>
- <system.data_test>
- <DbProviderFactories>
- <add name="ProviderTest.Name"
- invariant="ProviderTest.InvariantName"
- support="FF"
- description="ProviderTest.Description"
- type="ProviderTest.AssemblyQualifiedName"/>
- </DbProviderFactories>
- </system.data_test>
- <connectionStrings_test>
- <add name="Publications" providerName="System.Data.SqlClient"
- connectionString="Data Source=MyServer;Initial Catalog=pubs;integrated security=SSPI" />
- </connectionStrings_test>
+ <configSections>
+ <section name="system.data_test"
+ type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
+ <section name="connectionStrings_test"
+ type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+ </configSections>
+ <system.data>
+ <DbProviderFactories>
+ <add name="ProviderTest2.Name"
+ invariant="ProviderTest2.InvariantName"
+ support="FF"
+ description="ProviderTest2.Description"
+ type="ProviderTest2.AssemblyQualifiedName"/>
+ </DbProviderFactories>
+ </system.data>
+ <system.data_test>
+ <DbProviderFactories>
+ <add name="ProviderTest3.Name"
+ invariant="ProviderTest3.InvariantName"
+ support="FF"
+ description="ProviderTest3.Description"
+ type="ProviderTest3.AssemblyQualifiedName"/>
+ <clear />
+ <add name="ProviderTest4.Name"
+ invariant="ProviderTest4.InvariantName"
+ support="FF"
+ description="ProviderTest4.Description"
+ type="ProviderTest4.AssemblyQualifiedName"/>
+ <add name="ProviderTest5.Name"
+ invariant="ProviderTest5.InvariantName"
+ support="FF"
+ description="ProviderTest5.Description"
+ type="ProviderTest5.AssemblyQualifiedName"/>
+ <remove invariant="ProviderTest5.InvariantName" />
+ <add name="ProviderTest.Name"
+ invariant="ProviderTest.InvariantName"
+ support="FF"
+ description="ProviderTest.Description"
+ type="ProviderTest.AssemblyQualifiedName"/>
+ </DbProviderFactories>
+ </system.data_test>
+ <connectionStrings_test>
+ <add name="Publications" providerName="System.Data.SqlClient"
+ connectionString="Data Source=MyServer;Initial Catalog=pubs;integrated security=SSPI" />
+ </connectionStrings_test>
</configuration>
REM ********************************************************\r
\r
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\\r
-set JAVA_HOME=%VMW_HOME%\jre5\r
+set JAVA_HOME=%VMW_HOME%\jre6\r
\r
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar\r
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar\r
REM ********************************************************\r
\r
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\\r
-set JAVA_HOME=%VMW_HOME%\jre5\r
+set JAVA_HOME=%VMW_HOME%\jre6\r
\r
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar\r
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar\r
REM ********************************************************\r
\r
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\\r
-set JAVA_HOME=%VMW_HOME%\jre5\r
+set JAVA_HOME=%VMW_HOME%\jre6\r
\r
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar\r
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar\r
+2007-03-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Makefile: Add metafiles (WMF and EMF) test files to the dist.
+ * System.Drawing_test.dll.sources: Add Metafile unit tests to the
+ build.
+
+2007-02-28 Sebastien Pouliot <sebastien@ximian.com>
+
+ * System.Drawing_test.dll.sources: Add (existing!) SystemFontsTest to
+ the build.
+
2007-02-08 Sebastien Pouliot <sebastien@ximian.com>
* Makefile: Add non-inverted bitmap to dist.
Test/System.Drawing/bitmaps/32bpp.ico \
Test/System.Drawing/bitmaps/80509.ico \
Test/System.Drawing/bitmaps/non-inverted.bmp \
+ Test/System.Drawing/bitmaps/milkmateya01.emf \
+ Test/System.Drawing/bitmaps/telescope_01.wmf \
Assembly/Application.ico \
Assembly/Asterisk.ico \
Assembly/Error.ico \
+2007-03-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * MetafileHeader.cs: WmfHeader throws if the metafile isn't a WMF (e.g.
+ EMF, EMF+ or EMF dual).
+
+2007-03-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * MetafileHeader.cs: Fix offset to match correct C definition.
+
2007-02-21 Sebastien Pouliot <sebastien@ximian.com>
* Metafile.cs: Implement a few cases required to playback metafiles.
public WmfMetaHeader wmf_header;
[FieldOffset (40)]
public EnhMetafileHeader emf_header;
- [FieldOffset (124)]
- public int emfplus_header_size;
[FieldOffset (128)]
- public int logical_dpi_x;
+ public int emfplus_header_size;
[FieldOffset (132)]
+ public int logical_dpi_x;
+ [FieldOffset (136)]
public int logical_dpi_y;
}
// note: this always returns a new instance (where we can change
// properties even if they don't seems to affect anything)
public MetaHeader WmfHeader {
- get { return new MetaHeader (header.wmf_header); }
+ get {
+ if (IsWmfPlaceable ())
+ return new MetaHeader (header.wmf_header);
+ throw new ArgumentException ("WmfHeader only available on WMF files.");
+ }
}
}
}
+2007-03-13 Andreia Gaita <avidigal@novell.com>
+
+ * PrintingServices.cs: Add missing static method SysPrn.GetPrintDialogInfo
+ for SWF to call up printing dialogues.
+
2007-02-21 Andreia Gaita <avidigal@novell.com>
* PrintingServicesUnix.cs: Report an error in the console if there is
}
}
+ internal static void GetPrintDialogInfo (string printer, ref string port, ref string type, ref string status, ref string comment)
+ {
+ CreatePrintingService().GetPrintDialogInfo (printer, ref port, ref type, ref status, ref comment);
+ }
+
internal class Printer {
public readonly string Name;
public readonly string Comment;
+2007-02-28 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Font.cs: Remove internal SysFontName setter property and add a new
+ ctor to replace it.
+ * SystemFonts.cs: We can't cache font instance (because anyone can
+ dispose them) so we must return new instances each time.
+
2007-02-27 Sebastien Pouliot <sebastien@ximian.com>
* Bitmap.cs: Removed unrequired ctors.
{
CreateFont(familyName, emSize, style, unit, charSet, isVertical);
}
-
+#if NET_2_0
+ internal Font (string familyName, float emSize, string systemName)
+ : this (familyName, emSize, FontStyle.Regular, GraphicsUnit.Point, DefaultCharSet, false)
+ {
+ systemFontName = systemName;
+ }
+#endif
public object Clone ()
{
return new Font (this, Style);
}
}
-#if NET_2_0
- internal string SysFontName {
- set {
- systemFontName = value;
- }
- }
-#endif
-
private bool _bold;
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
private readonly byte _charset;
#if NET_2_0
- private string systemFontName;
+ private readonly string _systemFontName;
#endif
#endregion
: this (GetFontFamily (familyName), emSize, style, unit, charSet, isVertical) {
}
+#if NET_2_0
+ internal Font (string familyName, float emSize, string systemName)
+ : this (familyName, emSize) {
+ _systemFontName = systemName;
+ }
+#endif
+
static FontFamily GetFontFamily (string familyName) {
#if ONLY_1_1
if (familyName == null)
[Browsable (false)]
public bool IsSystemFont {
get {
- if (systemFontName == null)
- return false;
-
- return StringComparer.InvariantCulture.Compare (systemFontName, string.Empty) != 0;
+ return !string.IsNullOrEmpty (_systemFontName);
}
}
[Browsable (false)]
public string SystemFontName {
get {
- return systemFontName;
- }
- }
-
- internal string SysFontName {
- set {
- systemFontName = value;
+ return _systemFontName;
}
}
#endif
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// Authors:
-//
-// Jordi Mas i Hernandez <jordimash@gmail.com>
-//
+// Jordi Mas i Hernandez <jordimash@gmail.com>
+// Sebastien Pouliot <sebastien@ximian.com>
//
#if NET_2_0
-using System;
-using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace System.Drawing
-{
- public sealed class SystemFonts
- {
- private static Font caption = null;
- private static Font defaultfnt = null;
- private static Font dialog = null;
- private static Font icon = null;
- private static Font menu = null;
- private static Font message = null;
- private static Font smallcaption = null;
- private static Font status = null;
+namespace System.Drawing {
+
+ public sealed class SystemFonts {
static SystemFonts ()
{
-
}
private SystemFonts()
{
-
}
public static Font GetFontByName (string name)
}
public static Font CaptionFont {
- get {
- if (caption == null) {
- caption = new Font ("Microsoft Sans Serif", 11);
- caption.SysFontName = "CaptionFont";
- }
- return caption;
- }
+ get { return new Font ("Microsoft Sans Serif", 11, "CaptionFont"); }
}
public static Font DefaultFont {
- get {
- if (defaultfnt == null) {
- defaultfnt = new Font ("Microsoft Sans Serif", 8.25f);
- defaultfnt.SysFontName = "DefaultFont";
- }
- return defaultfnt;
- }
+ get { return new Font ("Microsoft Sans Serif", 8.25f, "DefaultFont"); }
}
public static Font DialogFont {
- get {
- if (dialog == null) {
- dialog = new Font ("Tahoma", 8);
- dialog.SysFontName = "DialogFont";
- }
- return dialog;
- }
+ get { return new Font ("Tahoma", 8, "DialogFont"); }
}
public static Font IconTitleFont {
- get {
- if (icon == null) {
- icon = new Font ("Microsoft Sans Serif", 11);
- icon.SysFontName = "IconTitleFont";
- }
- return icon;
- }
+ get { return new Font ("Microsoft Sans Serif", 11, "IconTitleFont"); }
}
public static Font MenuFont {
- get {
- if (menu == null) {
- menu = new Font ("Microsoft Sans Serif", 11);
- menu.SysFontName = "MenuFont";
- }
- return menu;
- }
+ get { return new Font ("Microsoft Sans Serif", 11, "MenuFont"); }
}
public static Font MessageBoxFont {
- get {
- if (message == null) {
- message = new Font ("Microsoft Sans Serif", 11);
- message.SysFontName = "MessageBoxFont";
- }
- return message;
- }
+ get { return new Font ("Microsoft Sans Serif", 11, "MessageBoxFont"); }
}
public static Font SmallCaptionFont {
- get {
- if (smallcaption == null) {
- smallcaption = new Font ("Microsoft Sans Serif", 11);
- smallcaption.SysFontName = "SmallCaptionFont";
- }
- return smallcaption;
- }
+ get { return new Font ("Microsoft Sans Serif", 11, "SmallCaptionFont"); }
}
public static Font StatusFont {
- get {
- if (status == null) {
- status = new Font ("Microsoft Sans Serif", 11);
- status.SysFontName = "StatusFont";
- }
- return status;
- }
+ get { return new Font ("Microsoft Sans Serif", 11, "StatusFont"); }
}
}
}
-#endif
\ No newline at end of file
+#endif
System.Drawing/RegionDataTest.cs
System.Drawing/RegionNonRectTest.cs
System.Drawing/SolidBrushTest.cs
+System.Drawing/SystemFontsTest.cs
System.Drawing/SystemIconsTest.cs
System.Drawing/TestBitmap.cs
System.Drawing/TestBrushes.cs
System.Drawing.Drawing2D/TestMatrix.cs
System.Drawing.Imaging/GifCodecTest.cs
System.Drawing.Imaging/IconCodecTest.cs
+System.Drawing.Imaging/MetafileTest.cs
System.Drawing.Imaging/MetaHeaderTest.cs
System.Drawing.Imaging/PngCodecTest.cs
System.Drawing.Imaging/TestImageCodecInfo.cs
+2007-03-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * MetafileTest.cs: New. Metafile unit tests.
+
2007-02-16 Sebastien Pouliot <sebastien@ximian.com>
* TestImageCodecInfo.cs: Add missing test case for TIFF codec;
--- /dev/null
+//
+// Metafile class unit tests
+//
+// Authors:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+using NUnit.Framework;
+
+namespace MonoTests.System.Drawing.Imaging {
+
+ [TestFixture]
+ [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
+ public class MetafileTest {
+
+ public const string Bitmap = "bitmaps/non-inverted.bmp";
+ public const string WmfPlaceable = "bitmaps/telescope_01.wmf";
+ public const string Emf = "bitmaps/milkmateya01.emf";
+
+ // Get the input directory depending on the runtime
+ static public string getInFile (string file)
+ {
+ string sRslt = Path.GetFullPath ("../System.Drawing/" + file);
+
+ if (!File.Exists (sRslt))
+ sRslt = "Test/System.Drawing/" + file;
+
+ return sRslt;
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Metafile_Stream_Null ()
+ {
+ new Metafile ((Stream)null);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void Metafile_String_Null ()
+ {
+ new Metafile ((string) null);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Metafile_String_Empty ()
+ {
+ new Metafile (String.Empty);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ExternalException))]
+ public void Metafile_String_FileDoesNotExists ()
+ {
+ string filename = getInFile ("telescope_02.wmf");
+ new Metafile (filename);
+ }
+
+ [Test]
+ public void Metafile_String ()
+ {
+ string filename = getInFile (WmfPlaceable);
+ Metafile mf = new Metafile (filename);
+ Metafile clone = (Metafile) mf.Clone ();
+ }
+
+ [Test]
+ [ExpectedException (typeof (ExternalException))]
+ public void GetMetafileHeader_Bitmap ()
+ {
+ new Metafile (getInFile (Bitmap));
+ }
+
+ static public void Check_MetaHeader_WmfPlaceable (MetaHeader mh)
+ {
+ Assert.AreEqual (9, mh.HeaderSize, "HeaderSize");
+ Assert.AreEqual (98, mh.MaxRecord, "MaxRecord");
+ Assert.AreEqual (3, mh.NoObjects, "NoObjects");
+ Assert.AreEqual (0, mh.NoParameters, "NoParameters");
+ Assert.AreEqual (1737, mh.Size, "Size");
+ Assert.AreEqual (1, mh.Type, "Type");
+ Assert.AreEqual (0x300, mh.Version, "Version");
+ }
+
+ public static void Check_MetafileHeader_WmfPlaceable (MetafileHeader header)
+ {
+ Assert.AreEqual (MetafileType.WmfPlaceable, header.Type, "Type");
+ Assert.AreEqual (0x300, header.Version, "Version");
+ // filesize - 22, which happens to be the size (22) of a PLACEABLEMETAHEADER struct
+ Assert.AreEqual (3474, header.MetafileSize, "MetafileSize");
+
+ Assert.AreEqual (-30, header.Bounds.X, "Bounds.X");
+ Assert.AreEqual (-40, header.Bounds.Y, "Bounds.Y");
+ Assert.AreEqual (3096, header.Bounds.Width, "Bounds.Width");
+ Assert.AreEqual (4127, header.Bounds.Height, "Bounds.Height");
+ Assert.AreEqual (606, header.DpiX, "DpiX");
+ Assert.AreEqual (606, header.DpiY, "DpiY");
+ Assert.AreEqual (0, header.EmfPlusHeaderSize, "EmfPlusHeaderSize");
+ Assert.AreEqual (0, header.LogicalDpiX, "LogicalDpiX");
+ Assert.AreEqual (0, header.LogicalDpiY, "LogicalDpiY");
+
+ Assert.IsNotNull (header.WmfHeader, "WmfHeader");
+ Check_MetaHeader_WmfPlaceable (header.WmfHeader);
+
+ Assert.IsFalse (header.IsDisplay (), "IsDisplay");
+ Assert.IsFalse (header.IsEmf (), "IsEmf");
+ Assert.IsFalse (header.IsEmfOrEmfPlus (), "IsEmfOrEmfPlus");
+ Assert.IsFalse (header.IsEmfPlus (), "IsEmfPlus");
+ Assert.IsFalse (header.IsEmfPlusDual (), "IsEmfPlusDual");
+ Assert.IsFalse (header.IsEmfPlusOnly (), "IsEmfPlusOnly");
+ Assert.IsTrue (header.IsWmf (), "IsWmf");
+ Assert.IsTrue (header.IsWmfPlaceable (), "IsWmfPlaceable");
+ }
+
+ [Test]
+ public void GetMetafileHeader_WmfPlaceable ()
+ {
+ using (Metafile mf = new Metafile (getInFile (WmfPlaceable))) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_WmfPlaceable (header1);
+
+ MetafileHeader header2 = mf.GetMetafileHeader ();
+ Assert.IsFalse (Object.ReferenceEquals (header1, header2), "Same object");
+ }
+ }
+
+ [Test]
+ public void GetMetafileHeader_FromFile_WmfPlaceable ()
+ {
+ using (Metafile mf = new Metafile (getInFile (WmfPlaceable))) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_WmfPlaceable (header1);
+
+ MetaHeader mh1 = header1.WmfHeader;
+ Check_MetaHeader_WmfPlaceable (mh1);
+
+ MetaHeader mh2 = mf.GetMetafileHeader ().WmfHeader;
+ Assert.IsFalse (Object.ReferenceEquals (mh1, mh2), "Same object");
+ }
+ }
+
+ [Test]
+ public void GetMetafileHeader_FromFileStream_WmfPlaceable ()
+ {
+ using (FileStream fs = File.OpenRead (getInFile (WmfPlaceable))) {
+ using (Metafile mf = new Metafile (fs)) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_WmfPlaceable (header1);
+
+ MetaHeader mh1 = header1.WmfHeader;
+ Check_MetaHeader_WmfPlaceable (mh1);
+
+ MetaHeader mh2 = mf.GetMetafileHeader ().WmfHeader;
+ Assert.IsFalse (Object.ReferenceEquals (mh1, mh2), "Same object");
+ }
+ }
+ }
+
+ [Test]
+ public void GetMetafileHeader_FromMemoryStream_WmfPlaceable ()
+ {
+ MemoryStream ms;
+ string filename = getInFile (WmfPlaceable);
+ using (FileStream fs = File.OpenRead (filename)) {
+ byte[] data = new byte[fs.Length];
+ fs.Read (data, 0, data.Length);
+ ms = new MemoryStream (data);
+ }
+ using (Metafile mf = new Metafile (ms)) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_WmfPlaceable (header1);
+
+ MetaHeader mh1 = header1.WmfHeader;
+ Check_MetaHeader_WmfPlaceable (mh1);
+
+ MetaHeader mh2 = mf.GetMetafileHeader ().WmfHeader;
+ Assert.IsFalse (Object.ReferenceEquals (mh1, mh2), "Same object");
+ }
+ ms.Close ();
+ }
+
+ public static void Check_MetafileHeader_Emf (MetafileHeader header)
+ {
+ Assert.AreEqual (MetafileType.Emf, header.Type, "Type");
+ Assert.AreEqual (65536, header.Version, "Version");
+ // extactly the filesize
+ Assert.AreEqual (20456, header.MetafileSize, "MetafileSize");
+
+ Assert.AreEqual (0, header.Bounds.X, "Bounds.X");
+ Assert.AreEqual (0, header.Bounds.Y, "Bounds.Y");
+#if false
+ Assert.AreEqual (759, header.Bounds.Width, "Bounds.Width");
+ Assert.AreEqual (1073, header.Bounds.Height, "Bounds.Height");
+ Assert.AreEqual (96f, header.DpiX, 0.5f, "DpiX");
+ Assert.AreEqual (96f, header.DpiY, 0.5f, "DpiY");
+ Assert.AreEqual (6619188, header.EmfPlusHeaderSize, "EmfPlusHeaderSize");
+ Assert.AreEqual (3670064, header.LogicalDpiX, "LogicalDpiX");
+ Assert.AreEqual (3670064, header.LogicalDpiY, "LogicalDpiY");
+#endif
+ try {
+ Assert.IsNotNull (header.WmfHeader, "WmfHeader");
+ Assert.Fail ("WmfHeader didn't throw an ArgumentException");
+ }
+ catch (ArgumentException) {
+ }
+ catch (Exception e) {
+ Assert.Fail ("WmfHeader didn't throw an ArgumentException but: {0}.", e.ToString ());
+ }
+
+ Assert.IsFalse (header.IsDisplay (), "IsDisplay");
+ Assert.IsTrue (header.IsEmf (), "IsEmf");
+ Assert.IsTrue (header.IsEmfOrEmfPlus (), "IsEmfOrEmfPlus");
+ Assert.IsFalse (header.IsEmfPlus (), "IsEmfPlus");
+ Assert.IsFalse (header.IsEmfPlusDual (), "IsEmfPlusDual");
+ Assert.IsFalse (header.IsEmfPlusOnly (), "IsEmfPlusOnly");
+ Assert.IsFalse (header.IsWmf (), "IsWmf");
+ Assert.IsFalse (header.IsWmfPlaceable (), "IsWmfPlaceable");
+ }
+
+ [Test]
+ public void GetMetafileHeader_FromFile_Emf ()
+ {
+ using (Metafile mf = new Metafile (getInFile (Emf))) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_Emf (header1);
+ }
+ }
+
+ [Test]
+ public void GetMetafileHeader_FromFileStream_Emf ()
+ {
+ using (FileStream fs = File.OpenRead (getInFile (Emf))) {
+ using (Metafile mf = new Metafile (fs)) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_Emf (header1);
+ }
+ }
+ }
+
+ [Test]
+ public void GetMetafileHeader_FromMemoryStream_Emf ()
+ {
+ MemoryStream ms;
+ string filename = getInFile (Emf);
+ using (FileStream fs = File.OpenRead (filename)) {
+ byte[] data = new byte[fs.Length];
+ fs.Read (data, 0, data.Length);
+ ms = new MemoryStream (data);
+ }
+ using (Metafile mf = new Metafile (ms)) {
+ MetafileHeader header1 = mf.GetMetafileHeader ();
+ Check_MetafileHeader_Emf (header1);
+ }
+ ms.Close ();
+ }
+
+ [Test]
+ [ExpectedException (typeof (NullReferenceException))]
+ public void Static_GetMetafileHeader_Stream_Null ()
+ {
+ MetafileHeader header = Metafile.GetMetafileHeader ((Stream)null);
+ }
+
+ [Test]
+ public void Static_GetMetafileHeader_Stream ()
+ {
+ string filename = getInFile (WmfPlaceable);
+ using (FileStream fs = File.OpenRead (filename)) {
+ MetafileHeader header = Metafile.GetMetafileHeader (fs);
+ Check_MetafileHeader_WmfPlaceable (header);
+ }
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void Static_GetMetafileHeader_Filename_Null ()
+ {
+ MetafileHeader header = Metafile.GetMetafileHeader ((string) null);
+ }
+
+ [Test]
+ public void Static_GetMetafileHeader_Filename ()
+ {
+ string filename = getInFile (WmfPlaceable);
+ MetafileHeader header = Metafile.GetMetafileHeader (filename);
+ Check_MetafileHeader_WmfPlaceable (header);
+ }
+ }
+
+ [TestFixture]
+ public class MetafileFulltrustTest {
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Static_GetMetafileHeader_IntPtr_Zero ()
+ {
+ Metafile.GetMetafileHeader (IntPtr.Zero);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Static_GetMetafileHeader_IntPtr ()
+ {
+ string filename = MetafileTest.getInFile (MetafileTest.WmfPlaceable);
+ using (Metafile mf = new Metafile (filename)) {
+
+ IntPtr hemf = mf.GetHenhmetafile ();
+ Assert.IsTrue (hemf != IntPtr.Zero, "GetHenhmetafile");
+
+ Metafile.GetMetafileHeader (hemf);
+ }
+ }
+ }
+}
+2007-03-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * GDIPlusTest.cs: Add test cases for GDI+ metafile API.
+ * TestImage.cs: Add test cases for loading metafile as Image.
+
+2007-03-08 Sebastien Pouliot <sebastien@ximian.com>
+
+ * TestBitmap.cs: Re-add the 2 NotWorking cases that were removed by
+ mistake.
+
+2007-03-07 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * TestBitmap.cs, TestFont.cs, TestIcon.cs, TestRegion.cs: removed tests
+ for TARGET_JVM with not supported method calls
+
+2007-02-28 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SystemFontsTest.cs: Add more tests cases including disposing the
+ font instance returned by the SystemFonts class.
+
2007-02-26 Sebastien Pouliot <sebastien@ximian.com>
* TestRegion.cs: Add test cases for ReleaseHrgn and fix GetHrgn tests
Assert.AreEqual (Status.Ok, GDIPlus.GdipDeleteBrush (brush), "GdipDeleteBrush");
Assert.AreEqual (Status.Ok, GDIPlus.GdipDisposeImage (image), "GdipDisposeImage");
}
+
+ // Get the input directory depending on the runtime
+ internal string getInFile (string file)
+ {
+ string sRslt = Path.GetFullPath ("../System.Drawing/" + file);
+
+ if (!File.Exists (sRslt))
+ sRslt = "Test/System.Drawing/" + file;
+
+ return sRslt;
+ }
+
+ private void CheckMetafileHeader (MetafileHeader header)
+ {
+ MetafileHeader mh1 = new Metafile (getInFile ("bitmaps/telescope_01.wmf")).GetMetafileHeader ();
+ // compare MetafileHeader
+ Assert.AreEqual (mh1.Bounds.X, header.Bounds.X, "Bounds.X");
+ Assert.AreEqual (mh1.Bounds.Y, header.Bounds.Y, "Bounds.Y");
+ Assert.AreEqual (mh1.Bounds.Width, header.Bounds.Width, "Bounds.Width");
+ Assert.AreEqual (mh1.Bounds.Height, header.Bounds.Height, "Bounds.Height");
+ Assert.AreEqual (mh1.DpiX, header.DpiX, "DpiX");
+ Assert.AreEqual (mh1.DpiY, header.DpiY, "DpiY");
+ Assert.AreEqual (mh1.EmfPlusHeaderSize, header.EmfPlusHeaderSize, "EmfPlusHeaderSize");
+ Assert.AreEqual (mh1.LogicalDpiX, header.LogicalDpiX, "LogicalDpiX");
+ Assert.AreEqual (mh1.LogicalDpiY, header.LogicalDpiY, "LogicalDpiY");
+ Assert.AreEqual (mh1.MetafileSize, header.MetafileSize, "MetafileSize");
+ Assert.AreEqual (mh1.Type, header.Type, "Type");
+ Assert.AreEqual (mh1.Version, header.Version, "Version");
+ // compare MetaHeader
+ MetaHeader mh1h = mh1.WmfHeader;
+ MetaHeader mh2h = header.WmfHeader;
+ Assert.AreEqual (mh1h.HeaderSize, mh2h.HeaderSize, "HeaderSize");
+ Assert.AreEqual (mh1h.MaxRecord, mh2h.MaxRecord, "MaxRecord");
+ Assert.AreEqual (mh1h.NoObjects, mh2h.NoObjects, "NoObjects");
+ Assert.AreEqual (mh1h.NoParameters, mh2h.NoParameters, "NoParameters");
+ Assert.AreEqual (mh1h.Size, mh2h.Size, "Size");
+ Assert.AreEqual (mh1h.Type, mh2h.Type, "Type");
+ Assert.AreEqual (mh1h.Version, mh2h.Version, "Version");
+ }
+
+ [Test]
+ public void Metafile ()
+ {
+ string filename = getInFile ("bitmaps/telescope_01.wmf");
+ IntPtr metafile = IntPtr.Zero;
+
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipCreateMetafileFromFile (null, out metafile), "GdipCreateMetafileFromFile(null)");
+ Assert.AreEqual (Status.GenericError, GDIPlus.GdipCreateMetafileFromFile ("doesnotexists", out metafile), "GdipCreateMetafileFromFile(doesnotexists)");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipCreateMetafileFromFile (filename, out metafile), "GdipCreateMetafileFromFile");
+
+ // looks like it applies to EmfOnly and EmfDual (not EmfPlus or Wmf*)
+ uint limit = UInt32.MaxValue;
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileDownLevelRasterizationLimit (IntPtr.Zero, ref limit), "GdipGetMetafileDownLevelRasterizationLimit/null");
+ Assert.AreEqual (Status.WrongState, GDIPlus.GdipGetMetafileDownLevelRasterizationLimit (metafile, ref limit), "GdipGetMetafileDownLevelRasterizationLimit");
+ Assert.AreEqual (UInt32.MaxValue, limit, "DownLevelRasterizationLimit");
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipSetMetafileDownLevelRasterizationLimit (IntPtr.Zero, limit), "GdipSetMetafileDownLevelRasterizationLimit/null");
+ Assert.AreEqual (Status.WrongState, GDIPlus.GdipSetMetafileDownLevelRasterizationLimit (metafile, limit), "GdipSetMetafileDownLevelRasterizationLimit");
+
+ int size = Marshal.SizeOf (typeof (MetafileHeader));
+ IntPtr header = Marshal.AllocHGlobal (size);
+ try {
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromMetafile (IntPtr.Zero, header), "GdipGetMetafileHeaderFromMetafile(null,header)");
+// We get access violation here!
+// Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromMetafile (metafile, IntPtr.Zero), "GdipGetMetafileHeaderFromMetafile(metafile,null)");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetMetafileHeaderFromMetafile (metafile, header), "GdipGetMetafileHeaderFromMetafile(metafile,header)");
+
+ MetafileHeader mh2 = new Metafile (getInFile ("bitmaps/telescope_01.wmf")).GetMetafileHeader ();
+ Marshal.PtrToStructure (header, mh2);
+ CheckMetafileHeader (mh2);
+ }
+ finally {
+ Marshal.FreeHGlobal (header);
+ }
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipDisposeImage (metafile), "GdipDisposeImage");
+ }
+
+ [Test]
+ public void Metafile_GetMetafileHeaderFromFile ()
+ {
+ string filename = getInFile ("bitmaps/telescope_01.wmf");
+
+ int size = Marshal.SizeOf (typeof (MetafileHeader));
+ IntPtr ptr = Marshal.AllocHGlobal (size);
+ try {
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromFile ("does-not-exists", ptr), "GdipGetMetafileHeaderFromFile(doesnotexists,ptr)");
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromFile (null, ptr), "GdipGetMetafileHeaderFromFile(null,ptr)");
+// We get access violation here!
+// Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromFile (filename, IntPtr.Zero), "GdipGetMetafileHeaderFromFile(file,null)");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetMetafileHeaderFromFile (filename, ptr), "GdipGetMetafileHeaderFromFile(file,ptr)");
+
+ MetafileHeader header = new Metafile (getInFile ("bitmaps/telescope_01.wmf")).GetMetafileHeader ();
+ Marshal.PtrToStructure (ptr, header);
+ CheckMetafileHeader (header);
+ }
+ finally {
+ Marshal.FreeHGlobal (ptr);
+ }
+ }
+
+ [Test]
+ public void Metafile_Hemf ()
+ {
+ string filename = getInFile ("bitmaps/telescope_01.wmf");
+ IntPtr metafile = IntPtr.Zero;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipCreateMetafileFromFile (filename, out metafile), "GdipCreateMetafileFromFile");
+
+ IntPtr emf = IntPtr.Zero;
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetHemfFromMetafile (IntPtr.Zero, out emf), "GdipGetHemfFromMetafile(null,emf)");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetHemfFromMetafile (metafile, out emf), "GdipGetHemfFromMetafile(metafile,emf)");
+
+ int size = Marshal.SizeOf (typeof (MetafileHeader));
+ IntPtr header = Marshal.AllocHGlobal (size);
+ try {
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromEmf (IntPtr.Zero, header), "GdipGetMetafileHeaderFromEmf(null,header)");
+// We get access violation here!
+// Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromEmf (emf, IntPtr.Zero), "GdipGetMetafileHeaderFromEmf(emf,null)");
+ // the HEMF handle cannot be used here
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipGetMetafileHeaderFromEmf (emf, header), "GdipGetMetafileHeaderFromEmf(emf,header)");
+ }
+ finally {
+ Marshal.FreeHGlobal (header);
+ }
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipDisposeImage (metafile), "GdipDisposeImage");
+ }
+
+ private void InImageAPI (IntPtr image)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ Assert.AreEqual (Status.OutOfMemory, GDIPlus.GdipGetImageGraphicsContext (image, out ptr), "GdipGetImageGraphicsContext");
+
+ RectangleF bounds;
+ GraphicsUnit unit = GraphicsUnit.Display;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageBounds (image, out bounds, ref unit), "GdipGetImageBounds");
+ Assert.AreEqual (-30, bounds.X, "bounds.X");
+ Assert.AreEqual (-40, bounds.Y, "bounds.Y");
+ Assert.AreEqual (3096, bounds.Width, "bounds.Width");
+ Assert.AreEqual (4127, bounds.Height, "bounds.Height");
+ Assert.AreEqual (GraphicsUnit.Pixel, unit, "uint");
+
+ float width, height;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageDimension (image, out width, out height), "GdipGetImageDimension");
+ Assert.AreEqual (12976.63, width, "GdipGetImageDimension/Width");
+ Assert.AreEqual (17297.99, height, "GdipGetImageDimension/Height");
+
+ ImageType type;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageType (image, out type), "GdipGetImageType");
+ Assert.AreEqual (ImageType.Metafile, type, "Metafile");
+
+ uint w;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageWidth (image, out w), "GdipGetImageWidth");
+ Assert.AreEqual (3096, w, "GdipGetImageWidth/Width");
+
+ uint h;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageHeight (image, out h), "GdipGetImageHeight");
+ Assert.AreEqual (4127, h, "GdipGetImageHeight/Height");
+
+ float horz;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageHorizontalResolution (image, out horz), "GdipGetImageHorizontalResolution");
+ Assert.AreEqual (606, horz, "HorizontalResolution");
+
+ float vert;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageVerticalResolution (image, out vert), "GdipGetImageVerticalResolution");
+ Assert.AreEqual (606, vert, "VerticalResolution");
+
+ int flags;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageFlags (image, out flags), "GdipGetImageFlags");
+ Assert.AreEqual (327683, flags, "Flags");
+
+ Guid format;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImageRawFormat (image, out format), "GdipGetImageRawFormat");
+ Assert.AreEqual ("b96b3cad-0728-11d3-9d7b-0000f81ef32e", format.ToString (), "Format");
+
+ PixelFormat pformat;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetImagePixelFormat (image, out pformat), "GdipGetImagePixelFormat");
+ Assert.AreEqual (PixelFormat.Format32bppRgb, pformat, "PixelFormat");
+
+ uint count;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageGetFrameDimensionsCount (image, out count), "GdipImageGetFrameDimensionsCount");
+ Assert.AreEqual (1, count, "FrameDimensionsCount");
+
+ Guid[] dimid = new Guid[1];
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageGetFrameDimensionsList (image, dimid, count), "GdipImageGetFrameDimensionsList");
+ Assert.AreEqual ("7462dc86-6180-4c7e-8e3f-ee7333a7a483", dimid[0].ToString (), "Id[0]");
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipImageGetFrameDimensionsList (image, dimid, 0), "GdipImageGetFrameDimensionsList/0");
+ Assert.AreEqual (Status.InvalidParameter, GDIPlus.GdipImageGetFrameDimensionsList (image, dimid, 2), "GdipImageGetFrameDimensionsList/2");
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageGetFrameCount (image, ref dimid[0], out count), "GdipImageGetFrameCount");
+ Assert.AreEqual (1, count, "FrameCount");
+ Guid g = Guid.Empty;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageGetFrameCount (image, ref g, out count), "GdipImageGetFrameCount/Empty");
+ Assert.AreEqual (1, count, "FrameCount/Empty");
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageSelectActiveFrame (image, ref dimid[0], 0), "GdipImageSelectActiveFrame");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageSelectActiveFrame (image, ref g, 0), "GdipImageSelectActiveFrame/Empty");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageSelectActiveFrame (image, ref dimid[0], Int32.MinValue), "GdipImageSelectActiveFrame/MinValue");
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipImageSelectActiveFrame (image, ref dimid[0], Int32.MaxValue), "GdipImageSelectActiveFrame/MaxValue");
+
+ // woohoo :)
+ foreach (RotateFlipType rft in Enum.GetValues (typeof (RotateFlipType))) {
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipImageRotateFlip (image, rft), rft.ToString ());
+ }
+
+ int size;
+ Assert.AreEqual (Status.GenericError, GDIPlus.GdipGetImagePaletteSize (image, out size), "GdipGetImagePaletteSize");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipGetImagePalette (image, image, 1024), "GdipGetImagePalette");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipSetImagePalette (image, image), "GdipSetImagePalette");
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipGetPropertyCount (image, out count), "GdipGetPropertyCount");
+ Assert.AreEqual (0, count, "PropertyCount");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipGetPropertyIdList (image, 0, new int[1]), "GdipGetPropertyIdList");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipGetPropertyItemSize (image, 0, out size), "GdipGetPropertyItemSize");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipGetPropertyItem (image, 0, size, image), "GdipGetPropertyItem");
+ int numbers;
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipGetPropertySize (image, out size, out numbers), "GdipGetPropertySize");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipRemovePropertyItem (image, 0), "GdipRemovePropertyItem");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipSetPropertyItem (image, image), "GdipSetPropertyItem");
+ Assert.AreEqual (Status.NotImplemented, GDIPlus.GdipGetAllPropertyItems (image, 1000, 1, image), "GdipGetAllPropertyItems");
+
+ Guid wmf = ImageFormat.Wmf.Guid;
+ Assert.AreEqual (Status.FileNotFound, GDIPlus.GdipGetEncoderParameterListSize (image, ref wmf, out count), "GdipGetEncoderParameterListSize/wmf");
+ Assert.AreEqual (Status.FileNotFound, GDIPlus.GdipGetEncoderParameterListSize (image, ref g, out count), "GdipGetEncoderParameterListSize/unknown");
+
+ Assert.AreEqual (Status.FileNotFound, GDIPlus.GdipGetEncoderParameterList (image, ref wmf, count, image), "GdipGetEncoderParameterList/wmf");
+ Assert.AreEqual (Status.FileNotFound, GDIPlus.GdipGetEncoderParameterList (image, ref g, count, image), "GdipGetEncoderParameterList/unknown");
+
+ IntPtr clone;
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipCloneImage (image, out clone), "GdipCloneImage");
+ try {
+ Assert.IsFalse (image == clone, "Handle");
+ }
+ finally {
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipDisposeImage (clone), "GdipDisposeImage");
+ }
+ }
+
+ [Test]
+ public void MetafileAsImage_InImageAPI ()
+ {
+ string filename = getInFile ("bitmaps/telescope_01.wmf");
+ IntPtr image = IntPtr.Zero;
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipLoadImageFromFile (filename, out image), "GdipLoadImageFromFile");
+ try {
+ InImageAPI (image);
+ }
+ finally {
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipDisposeImage (image), "GdipDisposeImage");
+ }
+ }
+
+ [Test]
+ public void Metafile_InImageAPI ()
+ {
+ string filename = getInFile ("bitmaps/telescope_01.wmf");
+ IntPtr metafile = IntPtr.Zero;
+
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipCreateMetafileFromFile (filename, out metafile), "GdipCreateMetafileFromFile");
+ try {
+ InImageAPI (metafile);
+ }
+ finally {
+ Assert.AreEqual (Status.Ok, GDIPlus.GdipDisposeImage (metafile), "GdipDisposeImage");
+ }
+ }
}
}
//
-// Tests for System.Drawing.SystemFontsTest.cs
+// Tests for System.Drawing.SystemFontsTest
//
// Authors:
// Gert Driesen <drieseng@users.sourceforge.net>
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
//
#if NET_2_0
+
using System;
using System.Drawing;
using NUnit.Framework;
-namespace MonoTests.System.Drawing
-{
+namespace MonoTests.System.Drawing {
+
[TestFixture]
- public class SystemFontsTest
- {
+ public class SystemFontsTest {
+
[Test]
public void DefaultFont ()
{
Assert.AreEqual ("Microsoft Sans Serif", f.FontFamily.Name, "#1");
Assert.AreEqual ("Microsoft Sans Serif", f.Name, "#2");
}
+
+ [Test]
+ public void SystemFontName ()
+ {
+ Assert.AreEqual ("CaptionFont", SystemFonts.CaptionFont.SystemFontName, "CaptionFont");
+ Assert.AreEqual ("DefaultFont", SystemFonts.DefaultFont.SystemFontName, "DefaultFont");
+ Assert.AreEqual ("DialogFont", SystemFonts.DialogFont.SystemFontName, "DialogFont");
+ Assert.AreEqual ("IconTitleFont", SystemFonts.IconTitleFont.SystemFontName, "IconTitleFont");
+ Assert.AreEqual ("MenuFont", SystemFonts.MenuFont.SystemFontName, "MenuFont");
+ Assert.AreEqual ("MessageBoxFont", SystemFonts.MessageBoxFont.SystemFontName, "MessageBoxFont");
+ Assert.AreEqual ("SmallCaptionFont", SystemFonts.SmallCaptionFont.SystemFontName, "SmallCaptionFont");
+ Assert.AreEqual ("StatusFont", SystemFonts.StatusFont.SystemFontName, "StatusFont");
+ }
+
+ [Test]
+ public void GetFontByName ()
+ {
+ Assert.AreEqual ("CaptionFont", SystemFonts.GetFontByName ("CaptionFont").SystemFontName, "CaptionFont");
+ Assert.AreEqual ("DefaultFont", SystemFonts.GetFontByName ("DefaultFont").SystemFontName, "DefaultFont");
+ Assert.AreEqual ("DialogFont", SystemFonts.GetFontByName ("DialogFont").SystemFontName, "DialogFont");
+ Assert.AreEqual ("IconTitleFont", SystemFonts.GetFontByName ("IconTitleFont").SystemFontName, "IconTitleFont");
+ Assert.AreEqual ("MenuFont", SystemFonts.GetFontByName ("MenuFont").SystemFontName, "MenuFont");
+ Assert.AreEqual ("MessageBoxFont", SystemFonts.GetFontByName ("MessageBoxFont").SystemFontName, "MessageBoxFont");
+ Assert.AreEqual ("SmallCaptionFont", SystemFonts.GetFontByName ("SmallCaptionFont").SystemFontName, "SmallCaptionFont");
+ Assert.AreEqual ("StatusFont", SystemFonts.GetFontByName ("StatusFont").SystemFontName, "StatusFont");
+ }
+
+ [Test]
+ public void GetFontByName_Invalid ()
+ {
+ Assert.IsNull (SystemFonts.GetFontByName (null), "null");
+ Assert.IsNull (SystemFonts.GetFontByName (String.Empty), "Empty");
+ Assert.IsNull (SystemFonts.GetFontByName ("defaultfont"), "lowercase");
+ Assert.IsNull (SystemFonts.GetFontByName ("DEFAULTFONT"), "UPPERCASE");
+ }
+
+ [Test]
+ public void Same ()
+ {
+ Font f1 = SystemFonts.CaptionFont;
+ Font f2 = SystemFonts.CaptionFont;
+ Assert.IsFalse (Object.ReferenceEquals (f1, f2), "property-property");
+ f2 = SystemFonts.GetFontByName ("CaptionFont");
+ Assert.IsFalse (Object.ReferenceEquals (f1, f2), "property-GetFontByName");
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Dispose_Instance ()
+ {
+ Font f1 = SystemFonts.CaptionFont;
+ float height = f1.GetHeight (72f);
+ f1.Dispose ();
+ f1.GetHeight (72f);
+ }
+
+ [Test]
+ public void Dispose_Property ()
+ {
+ float height = SystemFonts.CaptionFont.GetHeight (72f);
+ SystemFonts.CaptionFont.Dispose ();
+ Assert.AreEqual (height, SystemFonts.CaptionFont.GetHeight (72f), "height");
+ }
}
}
+
#endif
#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentException))]
+#if TARGET_JVM
+ [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
public void LockBits_BitmapData_Null ()
{
+#if !TARGET_JVM
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
bmp.LockBits (rect, ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb, null);
}
+#endif
}
[Test]
+#if TARGET_JVM
+ [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
public void LockBits_32_32_BitmapData ()
{
+#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
+#endif
}
[Test]
+#if TARGET_JVM
+ [Ignore ("Bitmap.LockBits is not implemented")]
+#else
[Category ("NotWorking")]
+#endif
public void LockBits_32_24_BitmapData ()
{
+#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
+#endif
}
[Test]
+#if TARGET_JVM
+ [Ignore ("Bitmap.LockBits is not implemented")]
+#else
[Category ("NotWorking")]
+#endif
public void LockBits_24_24_BitmapData ()
{
+#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format24bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
+#endif
}
[Test]
+#if TARGET_JVM
+ [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
public void LockBits_24_32_BitmapData ()
{
+#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format24bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
+#endif
}
#endif
[Ignore ("Unsafe code is not supported")]
#endif
public class BitmapFullTrustTest {
-
+#if !TARGET_JVM
// BitmapFromHicon## is *almost* the same as IconTest.Icon##ToBitmap except
// for the Flags property
Assert.IsTrue (image2.RawFormat.Equals (ImageFormat.MemoryBmp), "2.RawFormat");
}
}
+#endif
}
}
#endif
public void Dispose_ToLogFont ()
{
+#if !TARGET_JVM
Font f = new Font (name, 12.5f);
f.Dispose ();
LOGFONT lf = new LOGFONT();
f.ToLogFont (lf);
+#endif
}
[Test]
#endif
public void Dispose_ToLogFont_LoopCharSet ()
{
+#if !TARGET_JVM
Font f = new Font (name, 12.5f);
f.Dispose ();
LOGFONT lf = new LOGFONT ();
Assert.Fail ("Unexcepted exception {0} at iteration {1}", e, i);
}
}
+#endif
}
[Test]
#endif
public void Dispose_ToHFont ()
{
+#if !TARGET_JVM
Font f = new Font (name, 12.5f);
f.Dispose ();
f.ToHfont ();
+#endif
}
}
}
#endif
public void Constructor_StreamNull_Size ()
{
+#if !TARGET_JVM
new Icon ((Stream) null, new Size (32, 32));
+#endif
}
[Test]
#endif
public void Constructor_StringNull_Size ()
{
+#if !TARGET_JVM
new Icon ((string) null, new Size (32, 32));
+#endif
}
[Test]
#endif
public void Constructor_StringNull_Int_Int ()
{
+#if !TARGET_JVM
new Icon ((string) null, 32, 32);
+#endif
}
#endif
#endif
public void ExtractAssociatedIcon_Null ()
{
+#if !TARGET_JVM
Icon.ExtractAssociatedIcon (null);
+#endif
}
[Test]
#endif
public void ExtractAssociatedIcon_Empty ()
{
+#if !TARGET_JVM
Icon.ExtractAssociatedIcon (String.Empty);
+#endif
}
[Test]
#endif
public void ExtractAssociatedIcon_DoesNotExists ()
{
+#if !TARGET_JVM
Icon.ExtractAssociatedIcon ("does-not-exists.png");
+#endif
}
#endif
}
[Ignore ("Unsafe code is not supported")]
#endif
public class IconFullTrustTest {
+#if !TARGET_JVM
#if NET_2_0
[Test]
public void ExtractAssociatedIcon ()
IconTest.SaveAndCompare ("HICON", icon3, false);
}
}
+#endif
}
}
{
new XmlSerializer (typeof (Image));
}
+
+ private void Wmf (Image img)
+ {
+ Assert.IsFalse (img is Bitmap, "Bitmap");
+ Assert.IsTrue (img is Metafile, "Metafile");
+ // as Image
+ Assert.AreEqual (327683, img.Flags, "Flags");
+ Assert.IsTrue (img.RawFormat.Equals (ImageFormat.Wmf), "Wmf");
+#if NET_2_0
+ Assert.IsNull (img.Tag, "Tag");
+#endif
+ }
+
+ [Test]
+ public void FromFile_Metafile_Wmf ()
+ {
+ string filename = TestBitmap.getInFile ("bitmaps/telescope_01.wmf");
+ using (Image img = Image.FromFile (filename)) {
+ Wmf (img);
+ }
+ }
+
+ [Test]
+ public void FromStream_Metafile_Wmf ()
+ {
+ string filename = TestBitmap.getInFile ("bitmaps/telescope_01.wmf");
+ using (FileStream fs = File.OpenRead (filename)) {
+ using (Image img = Image.FromStream (fs)) {
+ Wmf (img);
+ }
+ }
+ }
+
+ private void Emf (Image img)
+ {
+ Assert.IsFalse (img is Bitmap, "Bitmap");
+ Assert.IsTrue (img is Metafile, "Metafile");
+ // as Image
+ Assert.AreEqual (327683, img.Flags, "Flags");
+ Assert.IsTrue (img.RawFormat.Equals (ImageFormat.Emf), "Emf");
+#if NET_2_0
+ Assert.IsNull (img.Tag, "Tag");
+#endif
+ }
+
+ [Test]
+ public void FromFile_Metafile_Emf ()
+ {
+ string filename = TestBitmap.getInFile ("bitmaps/milkmateya01.emf");
+ using (Image img = Image.FromFile (filename)) {
+ Emf (img);
+ }
+ }
+
+ [Test]
+ public void FromStream_Metafile_Emf ()
+ {
+ string filename = TestBitmap.getInFile ("bitmaps/milkmateya01.emf");
+ using (FileStream fs = File.OpenRead (filename)) {
+ using (Image img = Image.FromStream (fs)) {
+ Emf (img);
+ }
+ }
+ }
}
}
[TestFixture]
#if TARGET_JVM
- [Category ("NotWorking")]
+ [Ignore ("Unsafe code is not supported")]
#endif
// the test cases in this fixture aren't restricted wrt running unmanaged code
public class RegionTestUnmanaged {
-
+#if !TARGET_JVM
private Bitmap bitmap;
private Graphics graphic;
Assert.IsFalse (IntPtr.Zero == ptr, "ptr");
r.ReleaseHrgn (ptr);
}
+#endif
#endif
}
}
REM ********************************************************\r
\r
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\\r
-set JAVA_HOME=%VMW_HOME%\jre5\r
+set JAVA_HOME=%VMW_HOME%\jre6\r
\r
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar\r
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar\r
+2007-28-02 Lluis Sanchez Gual <lluis@novell.com>
+
+ * ChannelCore.cs: Added missing null check. LoadWithPartialName can
+ return null.
+
2006-12-18 Lluis Sanchez Gual <lluis@novell.com>
* SoapMessageFormatter.cs: FieldSetter and FieldGetter methods need
// Try using the simple name
asm = Assembly.LoadWithPartialName (assemblyName);
+ if (asm == null)
+ return null;
return asm.GetType (typeName, true);
}
}
#if NET_1_1
HttpSoap12 = 1 << 4,
HttpPostLocalhost = 1 << 5,
+ AnyHttpSoap = HttpSoap | HttpSoap12,
#endif
All = 0xFF
}
public override void Check (ConformanceCheckContext ctx, Message value)
{
}
-
+
+ public override void Check (ConformanceCheckContext ctx, BindingCollection value) {
+ foreach (Binding b in value)
+ foreach (ServiceDescriptionFormatExtension ext in b.Extensions)
+ if (ext.GetType () == typeof (SoapBinding))
+ return;
+
+ ctx.ReportRuleViolation (value, BasicProfileRules.R2401);
+ }
+
public override void Check (ConformanceCheckContext ctx, Binding value)
{
SoapBinding sb = (SoapBinding) value.Extensions.Find (typeof(SoapBinding));
- if (sb == null) {
- ctx.ReportRuleViolation (value, BasicProfileRules.R2401);
+ if (sb == null)
return;
- }
+
if (sb.Transport == null || sb.Transport == "") {
ctx.ReportRuleViolation (value, BasicProfileRules.R2701);
return;
+2007-03-11 Konstantin Triger <kostat@mainsoft.com>
+
+ * ConformanceChecker.cs, WebServicesInteroperability.cs, ProtocolReflector.cs,
+ BasicProfileChecker.cs: fix validation of the R2401 rule.
+
+2007-03-11 Konstantin Triger <kostat@mainsoft.com>
+
+ * ServiceDescriptionFormatExtensionCollection.cs: make FindAll(Type)
+ consistent with Find(Type).
+
2007-02-28 Atsushi Enomoto <atsushi@ximian.com>
* ServiceDescriptionSerializeBase2.cs : regenerated with the latest
public abstract WsiProfiles Claims { get; }
public virtual void Check (ConformanceCheckContext ctx, Binding value) { }
+ public virtual void Check (ConformanceCheckContext ctx, BindingCollection value) { }
public virtual void Check (ConformanceCheckContext ctx, MessageBinding value) { }
public virtual void Check (ConformanceCheckContext ctx, Import value) { }
public virtual void Check (ConformanceCheckContext ctx, Message value) { }
if (binfo.WebServiceBindingAttribute != null && binfo.WebServiceBindingAttribute.ConformsTo != WsiProfiles.None && String.IsNullOrEmpty (binfo.WebServiceBindingAttribute.Name)) {
BasicProfileViolationCollection violations = new BasicProfileViolationCollection ();
desc.Types.Schemas.Add (Schemas);
- if (!WebServicesInteroperability.CheckConformance (binfo.WebServiceBindingAttribute.ConformsTo, desc, violations))
- throw new InvalidOperationException (violations [0].ToString ());
+ ServiceDescriptionCollection col = new ServiceDescriptionCollection ();
+ col.Add (desc);
+ ConformanceCheckContext ctx = new ConformanceCheckContext (col, violations);
+ ConformanceChecker[] checkers = WebServicesInteroperability.GetCheckers (binfo.WebServiceBindingAttribute.ConformsTo);
+ foreach (ConformanceChecker checker in checkers) {
+ WebServicesInteroperability.Check (ctx, checker, binding);
+ if (violations.Count > 0)
+ throw new InvalidOperationException (violations [0].ToString ());
+ }
}
#endif
}
{
ArrayList searchResults = new ArrayList ();
foreach (object value in List)
- if (value.GetType () == type)
+ if (type.IsInstanceOfType(value))
searchResults.Add (value);
object[] returnValue = new object [searchResults.Count];
return ctx.Violations.Count == 0;
}
- static ConformanceChecker[] GetCheckers (WsiProfiles claims)
+ internal static ConformanceChecker[] GetCheckers (WsiProfiles claims)
{
if ((claims & WsiProfiles.BasicProfile1_1) != 0)
return new ConformanceChecker[] { BasicProfileChecker.Instance };
return null;
}
+
+ internal static void Check (ConformanceCheckContext ctx, ConformanceChecker checker, Binding b)
+ {
+ checker.Check (ctx, b);
+ CheckExtensions (ctx, checker, b.Extensions);
+
+ foreach (OperationBinding oper in b.Operations) {
+ CheckExtensions (ctx, checker, oper.Extensions);
+
+ foreach (MessageBinding mb in oper.Faults) {
+ checker.Check (ctx, mb);
+ CheckExtensions (ctx, checker, mb.Extensions);
+ }
+
+ checker.Check (ctx, oper.Input);
+ CheckExtensions (ctx, checker, oper.Input.Extensions);
+
+ checker.Check (ctx, oper.Output);
+ CheckExtensions (ctx, checker, oper.Output.Extensions);
+ }
+ }
static void Check (ConformanceCheckContext ctx, ConformanceChecker checker, ServiceDescription sd)
{
CheckExtensions (ctx, checker, p.Extensions);
}
}
-
+
+ checker.Check (ctx, sd.Bindings);
foreach (Binding b in sd.Bindings)
- {
- checker.Check (ctx, b);
- CheckExtensions (ctx, checker, b.Extensions);
-
- foreach (OperationBinding oper in b.Operations) {
- CheckExtensions (ctx, checker, oper.Extensions);
-
- foreach (MessageBinding mb in oper.Faults) {
- checker.Check (ctx, mb);
- CheckExtensions (ctx, checker, mb.Extensions);
- }
-
- checker.Check (ctx, oper.Input);
- CheckExtensions (ctx, checker, oper.Input.Extensions);
-
- checker.Check (ctx, oper.Output);
- CheckExtensions (ctx, checker, oper.Output.Extensions);
- }
- }
+ Check (ctx, checker, b);
foreach (PortType pt in sd.PortTypes)
{
+2007-03-11 Konstantin Triger <kostat@mainsoft.com>
+
+ * WebServiceHandlerFactory.cs: throw on protocol version mismatch
+ for 2.0 profile only.
+
+2007-03-11 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * TypeStubManager.cs: fixed BindingInfo.ctor, it does not takes Name
+ property from WebServiceBindingAttribute in .net 2.0
+
+2007-03-04 Konstantin Triger <kostat@mainsoft.com>
+
+ * WebServiceHandlerFactory.cs: throw on protocol version mismatch.
+
2007-02-01 Konstantin Triger <kostat@mainsoft.com>
* TypeStubManager.cs, Methods.cs: refactor BindingInfo contruction to contain
public BindingInfo (WebServiceBindingAttribute at, string name, string ns)
{
if (at != null) {
+#if ONLY_1_1
Name = at.Name;
+#endif
Namespace = at.Namespace;
Location = at.Location;
WebServiceBindingAttribute = at;
supported = WSConfig.IsSupported (protocol);
if (!supported) {
switch (protocol) {
- case WSProtocol.HttpSoap12:
- case WSProtocol.HttpSoap:
- supported = WSConfig.IsSupported (WSProtocol.HttpSoap12);
+#if NET_2_0
+ default:
+ if (((protocol & WSProtocol.AnyHttpSoap) != WSProtocol.Unknown) &&
+ (WSConfig.Current.EnabledProtocols & WSProtocol.AnyHttpSoap) != WSProtocol.Unknown)
+ throw new InvalidOperationException ("Possible SOAP version mismatch.");
break;
+#endif
case WSProtocol.HttpPost:
if (WSConfig.IsSupported (WSProtocol.HttpPostLocalhost)) {
string localAddr = context.Request.ServerVariables ["LOCAL_ADDR"];
parameters.ReferencedAssemblies.Add (a.Location);
CompilerResults results = abuilder.BuildAssembly (parameters);
if (results.Errors.Count == 0) {
- BuildManager.CodeAssemblies.Add (results.PathToAssembly);
+ BuildManager.CodeAssemblies.Add (results.CompiledAssembly);
BuildManager.TopLevelAssemblies.Add (results.CompiledAssembly);
+ HttpRuntime.WritePreservationFile (results.CompiledAssembly, name);
} else {
if (HttpContext.Current.IsCustomErrorEnabled)
throw new HttpException ("An error occurred while initializing application.");
);
}
+
+ void AddProfileClassGetProfileMethod (CodeTypeDeclaration profileClass)
+ {
+ CodeMethodReferenceExpression mref = new CodeMethodReferenceExpression (
+ new CodeTypeReferenceExpression (typeof (System.Web.Profile.ProfileBase)),
+ "Create");
+ CodeMethodInvokeExpression minvoke = new CodeMethodInvokeExpression (
+ mref,
+ new CodeExpression[] { new CodeVariableReferenceExpression ("username") }
+ );
+ CodeCastExpression cast = new CodeCastExpression ();
+ cast.TargetType = new CodeTypeReference ("ProfileCommon");
+ cast.Expression = minvoke;
+
+ CodeMethodReturnStatement ret = new CodeMethodReturnStatement ();
+ ret.Expression = cast;
+
+ CodeMemberMethod method = new CodeMemberMethod ();
+ method.Name = "GetProfile";
+ method.ReturnType = new CodeTypeReference ("ProfileCommon");
+ method.Parameters.Add (new CodeParameterDeclarationExpression("System.String", "username"));
+ method.Statements.Add (ret);
+ method.Attributes = MemberAttributes.Public;
+
+ profileClass.Members.Add (method);
+ }
void AddProfileClassProperty (ProfileSection ps, CodeTypeDeclaration profileClass, ProfilePropertySettings pset)
{
}
void BuildProfileClass (ProfileSection ps, string className, ProfilePropertySettingsCollection psc,
- CodeNamespace ns, string baseClass, SortedList <string, string> groupProperties)
+ CodeNamespace ns, string baseClass, bool baseIsGlobal,
+ SortedList <string, string> groupProperties)
{
CodeTypeDeclaration profileClass = new CodeTypeDeclaration (className);
- profileClass.BaseTypes.Add (new CodeTypeReference (baseClass));
+ CodeTypeReference cref = new CodeTypeReference (baseClass);
+ if (baseIsGlobal)
+ cref.Options |= CodeTypeReferenceOptions.GlobalReference;
+ profileClass.BaseTypes.Add (cref);
profileClass.TypeAttributes = TypeAttributes.Public;
ns.Types.Add (profileClass);
if (groupProperties != null && groupProperties.Count > 0)
foreach (KeyValuePair <string, string> group in groupProperties)
AddProfileClassGroupProperty (group.Key, group.Value, profileClass);
+ AddProfileClassGetProfileMethod (profileClass);
}
string MakeGroupName (string name)
groupName = MakeGroupName (pgs.Name);
groupProperties.Add (groupName, pgs.Name);
BuildProfileClass (ps, groupName, pgs.PropertySettings, ns,
- "System.Web.Profile.ProfileGroupBase", null);
+ "System.Web.Profile.ProfileGroupBase", true, null);
}
string baseType = ps.Inherits;
- if (String.IsNullOrEmpty (baseType))
+ bool baseIsGlobal = false;
+ if (String.IsNullOrEmpty (baseType)) {
baseType = "System.Web.Profile.ProfileBase";
- BuildProfileClass (ps, "ProfileCommon", props, ns, baseType, groupProperties);
+ baseIsGlobal = true;
+ }
+
+ BuildProfileClass (ps, "ProfileCommon", props, ns, baseType, baseIsGlobal, groupProperties);
return true;
}
curaca = a;
break;
}
- CollectFiles (d, curaca);
+ if (CollectFiles (d, curaca))
+ haveFiles = true;
curaca = aca;
}
return haveFiles;
get { return files; }
}
- public AppResourceFilesCollection (HttpContext context, bool isGlobal)
+ public AppResourceFilesCollection (HttpContext context)
{
if (context == null)
throw new ArgumentNullException ("context");
- //this.context = context;
- this.isGlobal = isGlobal;
+ this.isGlobal = true;
this.files = new List <AppResourceFileInfo> ();
string resourcePath;
- if (isGlobal)
- resourcePath = Path.Combine (HttpRuntime.AppDomainAppPath, "App_GlobalResources");
- else {
- HttpRequest request = context.Request;
- resourcePath = Path.Combine (
- Path.GetDirectoryName (request.MapPath (request.CurrentExecutionFilePath)),
- "App_LocalResources");
- }
+ resourcePath = Path.Combine (HttpRuntime.AppDomainAppPath, "App_GlobalResources");
if (Directory.Exists (resourcePath))
sourceDir = resourcePath;
}
+ public AppResourceFilesCollection (string parserDir)
+ {
+ if (String.IsNullOrEmpty (parserDir))
+ throw new ArgumentException ("parserDir cannot be empty");
+ this.isGlobal = true;
+ this.files = new List <AppResourceFileInfo> ();
+
+ string resourcePath;
+ resourcePath = Path.Combine (parserDir, "App_LocalResources");
+ if (Directory.Exists (resourcePath))
+ sourceDir = resourcePath;
+ }
+
public void Collect ()
{
if (String.IsNullOrEmpty (sourceDir))
HttpContext context;
AppResourceFilesCollection files;
string tempDirectory;
+ string virtualPath;
string TempDirectory {
get {
}
}
- public AppResourcesCompiler (HttpContext context, bool isGlobal)
+ public AppResourcesCompiler (HttpContext context)
{
this.context = context;
- this.isGlobal = isGlobal;
- this.files = new AppResourceFilesCollection (context, isGlobal);
+ this.isGlobal = true;
+ this.files = new AppResourceFilesCollection (context);
}
+ public AppResourcesCompiler (string virtualPath)
+ {
+
+ this.virtualPath = virtualPath;
+ this.isGlobal = false;
+ this.files = new AppResourceFilesCollection (HttpContext.Current.Request.MapPath (virtualPath));
+ }
- public void Compile ()
+ public Assembly Compile ()
{
files.Collect ();
if (!files.HasFiles)
- return;
+ return null;
if (isGlobal)
- CompileGlobal ();
+ return CompileGlobal ();
else
- CompileLocal ();
+ return CompileLocal ();
}
- void CompileGlobal ()
+ Assembly CompileGlobal ()
{
string assemblyPath = FileUtils.CreateTemporaryFile (TempDirectory,
"App_GlobalResources",
List <string>[] fileGroups = GroupGlobalFiles (cp);
if (fileGroups == null || fileGroups.Length == 0)
- return;
+ return null;
CodeCompileUnit unit = new CodeCompileUnit ();
CodeNamespace ns = new CodeNamespace (null);
abuilder.AddCodeCompileUnit (unit);
CompilerResults results = abuilder.BuildAssembly (cp);
+ Assembly ret = null;
+
if (results.Errors.Count == 0) {
- BuildManager.TopLevelAssemblies.Add (results.CompiledAssembly);
- HttpContext.AppGlobalResourcesAssembly = results.CompiledAssembly;
+ ret = results.CompiledAssembly;
+ BuildManager.TopLevelAssemblies.Add (ret);
+ HttpContext.AppGlobalResourcesAssembly = ret;
} else {
if (context.IsCustomErrorEnabled)
throw new ApplicationException ("An error occurred while compiling global resources.");
throw new CompilationException (null, results.Errors, null);
}
- HttpRuntime.WritePreservationFile (results.CompiledAssembly, "App_GlobalResources");
+ HttpRuntime.WritePreservationFile (ret, "App_GlobalResources");
HttpRuntime.EnableAssemblyMapping (true);
+
+ return ret;
}
- void CompileLocal ()
+ Assembly CompileLocal ()
{
- string path = Path.GetDirectoryName (VirtualPathUtility.ToAbsolute (context.Request.CurrentExecutionFilePath));
+ if (String.IsNullOrEmpty (virtualPath))
+ return null;
- if (String.IsNullOrEmpty (path))
- throw new ApplicationException ("Unable to determine the request virtual path.");
-
- Assembly cached = GetCachedLocalResourcesAssembly (path);
+ Assembly cached = GetCachedLocalResourcesAssembly (virtualPath);
if (cached != null)
- return;
+ return cached;
string prefix;
- if (path == "/")
+ if (virtualPath == "/")
prefix = "App_LocalResources.root";
else
- prefix = "App_LocalResources" + path.Replace ('/', '.');
+ prefix = "App_LocalResources" + virtualPath.Replace ('/', '.');
string assemblyPath = FileUtils.CreateTemporaryFile (TempDirectory,
prefix,
AssemblyBuilder abuilder = new AssemblyBuilder (provider);
CompilerResults results = abuilder.BuildAssembly (cp);
+ Assembly ret = null;
+
if (results.Errors.Count == 0) {
- AddAssemblyToCache (path, results.CompiledAssembly);
+ ret = results.CompiledAssembly;
+ AddAssemblyToCache (virtualPath, ret);
} else {
if (context.IsCustomErrorEnabled)
throw new ApplicationException ("An error occurred while compiling global resources.");
throw new CompilationException (null, results.Errors, null);
}
- }
+ return ret;
+ }
+
internal static Assembly GetCachedLocalResourcesAssembly (string path)
{
Dictionary <string, Assembly> cache;
return null;
return cache [path];
}
-
+
void AddAssemblyToCache (string path, Assembly asm)
{
Cache runtimeCache = HttpRuntime.Cache;
void DomFromResource (string resfile, CodeCompileUnit unit, Dictionary <string,bool> assemblies,
CodeDomProvider provider)
{
+ if (String.IsNullOrEmpty (resfile))
+ return;
+
string fname, nsname, classname;
fname = Path.GetFileNameWithoutExtension (resfile);
if (!provider.IsValidIdentifier (nsname) || !provider.IsValidIdentifier (classname))
throw new ApplicationException ("Invalid resource file name.");
+
+ ResourceReader res;
+ try {
+ res = new ResourceReader (resfile);
+ } catch (ArgumentException) {
+ // invalid stream, probably empty - ignore silently and abort
+ return;
+ }
CodeNamespace ns = new CodeNamespace (nsname);
CodeTypeDeclaration cls = new CodeTypeDeclaration (classname);
// Add the resource properties
Dictionary<string,bool> imports = new Dictionary<string,bool> ();
try {
- ResourceReader res = new ResourceReader (resfile);
foreach (DictionaryEntry de in res) {
Type type = de.Value.GetType ();
cls.Members.Add (cmp);
}
} catch (Exception ex) {
- throw new ApplicationException ("Failed to comipile global resources.", ex);
+ throw new ApplicationException ("Failed to compile global resources.", ex);
}
foreach (KeyValuePair<string,bool> de in imports)
ns.Imports.Add (new CodeNamespaceImport(de.Key));
{
internal class AppResourcesCompiler
{
+ public AppResourcesCompiler (string path) { }
+ public Assembly Compile () { return null; }
internal static Assembly GetCachedLocalResourcesAssembly (string path)
{
string localResourcesPath = UrlUtils.Combine (path, "App_LocalResources");
}
public void RegisterFoundry (string foundryName,
- Assembly assembly,
- string nameSpace)
+ Assembly assembly,
+ string nameSpace)
{
AssemblyFoundry foundry = new AssemblyFoundry (assembly, nameSpace);
InternalRegister (foundryName, foundry);
return;
Dictionary <string, Assembly> assemblyCache = new Dictionary <string, Assembly> ();
+ IList appCode = BuildManager.CodeAssemblies;
+ bool haveCodeAssemblies = appCode != null && appCode.Count > 0;
+ Assembly asm;
foreach (TagPrefixInfo tpi in controls) {
if (!String.IsNullOrEmpty (tpi.TagName))
RegisterFoundry (tpi.TagPrefix, tpi.TagName, tpi.Source);
- else if (!String.IsNullOrEmpty (tpi.Namespace))
+ else if (String.IsNullOrEmpty (tpi.Assembly)) {
+ if (haveCodeAssemblies) {
+ foreach (object o in appCode) {
+ asm = o as Assembly;
+ if (asm == null)
+ continue;
+ RegisterFoundry (tpi.TagPrefix, asm, tpi.Namespace);
+ }
+ }
+ } else if (!String.IsNullOrEmpty (tpi.Namespace))
RegisterFoundry (tpi.TagPrefix, GetAssemblyByName (assemblyCache, tpi.Assembly), tpi.Namespace);
}
}
public override Type GetType (string componentName)
{
- return assembly.GetType (nameSpace + "." + componentName, true, true);
+ if (assembly != null)
+ return assembly.GetType (nameSpace + "." + componentName, true, true);
+ return null;
}
}
int index = 1;
for (; index < str.Length; index++) {
if (Char.IsWhiteSpace (str [index]))
- index++;
+ continue;
else if (str [index] == '"')
break;
}
#if NET_2_0
bool isRebuilding = false;
protected Hashtable partialNameOverride = new Hashtable();
+ protected CodeTypeDeclaration partialClass;
+ protected CodeTypeReferenceExpression partialClassExpr;
#endif
protected CodeTypeDeclaration mainClass;
protected CodeTypeReferenceExpression mainClassExpr;
classtype = classtype.Substring (dot + 1);
}
- mainNS = new CodeNamespace (ns);
- mainClass = new CodeTypeDeclaration (classtype);
- mainClass.IsPartial = true;
- mainClassExpr = new CodeTypeReferenceExpression (parser.PartialClassName);
- } else {
+ CodeNamespace partialNS = new CodeNamespace (ns);
+ partialClass = new CodeTypeDeclaration (classtype);
+ partialClass.IsPartial = true;
+ partialClassExpr = new CodeTypeReferenceExpression (parser.PartialClassName);
+
+ unit.Namespaces.Add (partialNS);
+ partialClass.TypeAttributes = TypeAttributes.Public;
+ partialNS.Types.Add (partialClass);
+ }
#endif
mainNS = new CodeNamespace ("ASP");
mainClass = new CodeTypeDeclaration (parser.ClassName);
- CodeTypeReference baseTypeRef = new CodeTypeReference (parser.BaseType.FullName);
+ CodeTypeReference baseTypeRef;
#if NET_2_0
- if (parser.BaseTypeIsGlobal)
+ if (partialClass != null) {
+ baseTypeRef = new CodeTypeReference (parser.PartialClassName);
baseTypeRef.Options |= CodeTypeReferenceOptions.GlobalReference;
+ } else {
+ baseTypeRef = new CodeTypeReference (parser.BaseType.FullName);
+ if (parser.BaseTypeIsGlobal)
+ baseTypeRef.Options |= CodeTypeReferenceOptions.GlobalReference;
+ }
+#else
+ baseTypeRef = new CodeTypeReference (parser.BaseType.FullName);
#endif
mainClass.BaseTypes.Add (baseTypeRef);
+
mainClassExpr = new CodeTypeReferenceExpression ("ASP." + parser.ClassName);
-#if NET_2_0
- }
-#endif
+
unit.Namespaces.Add (mainNS);
mainClass.TypeAttributes = TypeAttributes.Public;
mainNS.Types.Add (mainClass);
IList list = BuildManager.CodeAssemblies;
if (list != null && list.Count > 0) {
+ Assembly asm;
foreach (object o in list) {
- asmName = o as string;
+ asm = o as Assembly;
+ if (o == null)
+ continue;
+ asmName = asm.Location;
if (asmName != null && !refAsm.Contains (asmName))
refAsm.Add (asmName);
}
mainClass.Members.Add (fld);
}
+#if NET_2_0
+ void AssignAppRelativeVirtualPath (CodeConstructor ctor)
+ {
+ Type baseType = parser.BaseType;
+ if (baseType == null)
+ return;
+ if (!baseType.IsSubclassOf (typeof (System.Web.UI.TemplateControl)))
+ return;
+
+ string arvp = Path.Combine (parser.BaseVirtualDir, Path.GetFileName (parser.InputFile));
+ if (VirtualPathUtility.IsAbsolute (arvp))
+ arvp = "~" + arvp;
+
+ CodeExpression cast = new CodeCastExpression (baseType, new CodeThisReferenceExpression ());
+ CodePropertyReferenceExpression arvpProp = new CodePropertyReferenceExpression (cast, "AppRelativeVirtualPath");
+ CodeAssignStatement arvpAssign = new CodeAssignStatement ();
+ arvpAssign.Left = arvpProp;
+ arvpAssign.Right = new CodePrimitiveExpression (arvp);
+ ctor.Statements.Add (arvpAssign);
+ }
+#endif
+
protected virtual void CreateConstructor (CodeStatementCollection localVars,
CodeStatementCollection trueStmt)
{
ctor.Attributes = MemberAttributes.Public;
mainClass.Members.Add (ctor);
+#if NET_2_0
+ AssignAppRelativeVirtualPath (ctor);
+#endif
if (localVars != null)
ctor.Statements.AddRange (localVars);
{
}
+#if NET_2_0
+ void InternalCreatePageProperty (string retType, string name, string contextProperty)
+ {
+ CodeMemberProperty property = new CodeMemberProperty ();
+ property.Name = name;
+ property.Type = new CodeTypeReference (retType);
+ property.Attributes = MemberAttributes.Family | MemberAttributes.Final;
+
+ CodeMethodReturnStatement ret = new CodeMethodReturnStatement ();
+ CodeCastExpression cast = new CodeCastExpression ();
+ ret.Expression = cast;
+
+ CodePropertyReferenceExpression refexp = new CodePropertyReferenceExpression ();
+ refexp.TargetObject = new CodePropertyReferenceExpression (new CodeThisReferenceExpression (), "Context");
+ refexp.PropertyName = contextProperty;
+
+ cast.TargetType = new CodeTypeReference (retType);
+ cast.Expression = refexp;
+
+ property.GetStatements.Add (ret);
+ if (partialClass == null)
+ mainClass.Members.Add (property);
+ else
+ partialClass.Members.Add (property);
+ }
+
+ protected void CreateProfileProperty ()
+ {
+ string retType;
+ ProfileSection ps = WebConfigurationManager.GetSection ("system.web/profile") as ProfileSection;
+ if (ps != null && ps.PropertySettings.Count > 0)
+ retType = "ProfileCommon";
+ else
+ retType = "System.Web.Profile.DefaultProfile";
+ InternalCreatePageProperty (retType, "Profile", "Profile");
+ }
+#endif
+
protected virtual void AddInterfaces ()
{
if (parser.Interfaces == null)
namespace System.Web.Compilation {
public sealed class BuildManager {
- private static List<string> AppCode_Assemblies = new List<string>();
+ private static List<Assembly> AppCode_Assemblies = new List<Assembly>();
private static List<Assembly> TopLevel_Assemblies = new List<Assembly>();
private static bool haveResources;
--- /dev/null
+//
+// System.Web.Compilation.BuildManager
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+using System.CodeDom;
+using System.CodeDom.Compiler;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Web;
+using System.Web.Configuration;
+using System.Web.Hosting;
+
+namespace System.Web.Compilation {
+ public sealed class BuildManager {
+ // Assemblies built from the App_Code directory
+ public static IList CodeAssemblies {
+ get { return null; }
+ }
+
+ internal static IList TopLevelAssemblies {
+ get { return null; }
+ }
+ }
+}
+
+#endif
+
}
}
+ Assembly asm;
IList list = BuildManager.CodeAssemblies;
if (list != null && list.Count > 0) {
foreach (object o in list) {
- asmName = o as string;
+ asm = o as Assembly;
+ if (asm == null)
+ continue;
+ asmName = asm.Location;
if (asmName != null && !refAsm.Contains (asmName))
refAsm.Add (asmName);
}
list = BuildManager.TopLevelAssemblies;
if (list != null && list.Count > 0) {
- foreach (Assembly a in list) {
- asmName = a.Location;
+ foreach (object o in list) {
+ asm = o as Assembly;
+ if (o == null)
+ continue;
+ asmName = asm.Location;
if (!refAsm.Contains (asmName))
refAsm.Add (asmName);
}
+2007-03-14 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompiler.cs: hadle situations when there exist a
+ control in the page with id matching the name of a field/property
+ in the parent class. In this case we use 'protected new' to
+ override the parent.
+
+2007-03-13 Marek Habersack <mhabersack@novell.com>
+
+ * AspParser.cs: fix an off-by-one parsing bug with server-side
+ includes.
+
+ * PageThemeCompiler.cs: let property builders through, stop the
+ builders that have no control type. Fixes bug #81092
+
+ * PageCompiler.cs: interfaces are to be implemented by the parent
+ partial class, not the generated one.
+
+ * AppResourceFilesCollection.cs: added separate constructor for
+ local resources handling.
+
+ * TemplateControlCompiler.cs: request the local resource object
+ with proper virtual path.
+ Put field declarations for controls in the partial class.
+ Make sure builders are in valid state before trying to use them.
+
+ * BaseCompiler.cs: added code to assing AppRelativeVirtualPath
+ property in the page/control constructor.
+ Change the generated code model for pages/controls to comply with
+ the way MS.NET does (partial class contains only two properties
+ plus declarations of all the controls, the actual control/page
+ class inherits from the partial class). Fixes bug #81001.
+
+ * AppResourcesCompiler.cs: does not require specifying manually
+ whether it's a global or local resource compiler anymore. New
+ constructors take care of that.
+ Changed to compile local resources on demand, when a control/page
+ is parsed.
+
+2007-03-12 Marek Habersack <mhabersack@novell.com>
+
+ * AspParser.cs: revert r73587 as it breaks more than it fixes.
+
+ * AspComponentFoundry.cs: try to register foundries from App_Code
+ assemblies if tag prefix and its namespace are defined. Fixes bug
+ #78797.
+
+ * BuildManager.cs, BaseCompiler.cs: CodeAssemblies is a collection
+ of Assembly instances, not strings.
+
+ * CachingCompiler.cs: make sure items in the CodeAssemblies and
+ TopLevelAssemblies are really instances of the Assembly class
+ before trying to use them.
+ CodeAssemblies is a collection of Assembly instances, not
+ strings.
+
+ * AppCodeCompiler.cs: on MS.NET CodeAssemblies is a collection of
+ assemblies, not paths to assemblies.
+
+2007-03-10 Marek Habersack <mhabersack@novell.com>
+
+ * PageCompiler.cs, BaseCompiler.cs: refactoring: moved the
+ CreateProfileProperty and InternalCreatePageProperty to
+ BaseCompiler from PageCompiler.
+
+ * GlobalAsaxCompiler.cs: generate the Profile property for the
+ Global_asax class.
+
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * AppCodeCompiler.cs: Add the GetProfile method to the
+ ProfileCommon auto-generated class.
+
+ * AppResourcesCompiler.cs: attempt to load the resource file
+ earlier in the process, to gracefully handle empty files.
+
+ * ThemeDirectoryCompiler.cs: make compiled themes depend on the
+ .skin and .css files composing the theme.
+
+2007-03-05 Marek Habersack <mhabersack@novell.com>
+
+ * PageThemeCompiler.cs: Use correct theme path for
+ AppRelativeTemplateSourceDirectory.
+ Do not process builders of type CodeRenderBuilder.
+ Make sure builder.ControlType is not null before depending on it.
+
+ * ThemeDirectoryCompiler.cs: theme parser should be passed the
+ virtual directory of the theme.
+
+2007-03-03 Marek Habersack <mhabersack@novell.com>
+
+ * PageCompiler.cs: Added support for setting the
+ MaintainScrollPositionOnPostBack property if the corresponding
+ page directive attribute is found.
+
+ * Directive.cs: added the MaintainScrollPositionOnPostBack and
+ LinePragmas directives.
+
+2007-03-02 Marek Habersack <grendello@gmail.com>
+
+ * AppCodeCompiler.cs: Correctly process App_Code directories which
+ have no compilable files in the top-level directory. Fixes bug
+ #80998.
+ Write preservation files for the App_Code assemblies.
+
+2007-03-01 Marek Habersack <grendello@gmail.com>
+
+ * AspParser.cs: fix GetVerbatim for cases when the end is
+ e.g. --> or --%> and the string matched is ---> or ---%>
+ respectively. The new code always backs out to make sure the end is
+ matched correctly.
+
2007-02-27 Marek Habersack <grendello@gmail.com>
* TemplateControlCompiler.cs: ParseExpression returns an object,
"CompilerOptions", "ContentType", "Culture", "Debug",
"Description",
#if NET_2_0
- "EnableEventValidation",
+ "EnableEventValidation", "MaintainScrollPositionOnPostBack",
#endif
"EnableSessionState", "EnableViewState",
"EnableViewStateMac", "ErrorPage", "Explicit",
static string [] control_atts = { "AutoEventWireup", "ClassName", "CompilerOptions",
"Debug", "Description", "EnableViewState",
"Explicit", "Inherits", "Language", "Strict", "Src",
- "WarningLevel", "CodeBehind", "TargetSchema" };
+ "WarningLevel", "CodeBehind", "TargetSchema", "LinePragmas" };
static string [] import_atts = { "namespace" };
static string [] implements_atts = { "interface" };
protected internal override void CreateMethods ()
{
base.CreateMethods ();
-
+#if NET_2_0
+ CreateProfileProperty ();
+#endif
+
ProcessObjects (parser.RootBuilder);
}
protected override void AddInterfaces ()
{
base.AddInterfaces ();
- if (pageParser.EnableSessionState)
- mainClass.BaseTypes.Add (new CodeTypeReference (typeof(IRequiresSessionState)));
-
- if (pageParser.ReadOnlySessionState)
- mainClass.BaseTypes.Add (new CodeTypeReference (typeof (IReadOnlySessionState)));
+ CodeTypeReference cref;
+
+ if (pageParser.EnableSessionState) {
+ cref = new CodeTypeReference (typeof(IRequiresSessionState));
+#if NET_2_0
+ cref.Options |= CodeTypeReferenceOptions.GlobalReference;
+ if (partialClass != null)
+ partialClass.BaseTypes.Add (cref);
+ else
+#endif
+ mainClass.BaseTypes.Add (cref);
+ }
+
+ if (pageParser.ReadOnlySessionState) {
+ cref = new CodeTypeReference (typeof (IReadOnlySessionState));
+#if NET_2_0
+ cref.Options |= CodeTypeReferenceOptions.GlobalReference;
+ if (partialClass != null)
+ partialClass.BaseTypes.Add (cref);
+ else
+#endif
+ mainClass.BaseTypes.Add (cref);
+ }
}
void CreateGetTypeHashCode ()
mainClass.Members.Add (method);
}
-#if NET_2_0
- void InternalCreatePageProperty (string retType, string name, string contextProperty)
- {
- CodeMemberProperty property = new CodeMemberProperty ();
- property.Name = name;
- property.Type = new CodeTypeReference (retType);
- property.Attributes = MemberAttributes.Family | MemberAttributes.Final;
-
- CodeMethodReturnStatement ret = new CodeMethodReturnStatement ();
- CodeCastExpression cast = new CodeCastExpression ();
- ret.Expression = cast;
-
- CodePropertyReferenceExpression refexp = new CodePropertyReferenceExpression ();
- refexp.TargetObject = new CodePropertyReferenceExpression (new CodeThisReferenceExpression (), "Context");
- refexp.PropertyName = contextProperty;
-
- cast.TargetType = new CodeTypeReference (retType);
- cast.Expression = refexp;
-
- property.GetStatements.Add (ret);
- mainClass.Members.Add (property);
- }
-
- void CreateProfileProperty ()
- {
- string retType;
- ProfileSection ps = WebConfigurationManager.GetSection ("system.web/profile") as ProfileSection;
- if (ps != null && ps.PropertySettings.Count > 0)
- retType = "ProfileCommon";
- else
- retType = "System.Web.Profile.DefaultProfile";
- InternalCreatePageProperty (retType, "Profile", "Profile");
- }
-#endif
-
static CodeAssignStatement CreatePropertyAssign (CodeExpression expr, string name, object value)
{
CodePropertyReferenceExpression prop;
stmt.Right = new CodePrimitiveExpression (pageParser.EnableEventValidation);
method.Statements.Add (stmt);
}
+
+ if (pageParser.MaintainScrollPositionOnPostBack) {
+ CodeAssignStatement stmt = new CodeAssignStatement ();
+ CodePropertyReferenceExpression prop;
+ prop = new CodePropertyReferenceExpression (thisRef, "MaintainScrollPositionOnPostBack");
+ stmt.Left = prop;
+ stmt.Right = new CodePrimitiveExpression (pageParser.MaintainScrollPositionOnPostBack);
+ method.Statements.Add (stmt);
+ }
#endif
base.AppendStatementsToFrameworkInitialize (method);
prop.Name = "AppRelativeTemplateSourceDirectory";
prop.Attributes = MemberAttributes.Family | MemberAttributes.Override;
prop.Type = new CodeTypeReference (typeof (string));
- prop.GetStatements.Add (new CodeMethodReturnStatement (new CodePrimitiveExpression (parser.BaseVirtualDir)));
+ prop.GetStatements.Add (new CodeMethodReturnStatement (
+ new CodePrimitiveExpression (
+ VirtualPathUtility.ToAbsolute (parser.BaseVirtualDir))));
mainClass.Members.Add (prop);
ControlBuilder builder = parser.RootBuilder;
foreach (object o in builder.Children) {
if (! (o is ControlBuilder))
continue;
-
+ if (o is CodeRenderBuilder)
+ continue;
+
ControlBuilder b = (ControlBuilder) o;
CreateControlSkinMethod (b);
}
initializers[i] = new CodePrimitiveExpression (lss[i]);
return new CodeArrayCreateExpression (typeof (string), initializers);
- }\r
-\r
- protected override string HandleUrlProperty (string str, MemberInfo member)\r
- {\r
- if (str.StartsWith ("~", StringComparison.Ordinal))\r
- return str;\r
-\r
- return "~/App_Themes/" + UrlUtils.Combine (\r
- System.IO.Path.GetFileName (parser.InputFile), str);\r
+ }
+
+ protected override string HandleUrlProperty (string str, MemberInfo member)
+ {
+ if (str.StartsWith ("~", StringComparison.Ordinal))
+ return str;
+
+ return "~/App_Themes/" + UrlUtils.Combine (
+ System.IO.Path.GetFileName (parser.InputFile), str);
}
void CreateControlSkinMethod (ControlBuilder builder)
{
+ if (builder.ControlType == null)
+ return;
+
EnsureID (builder);
CodeMemberMethod method = new CodeMemberMethod ();
continue;
ControlBuilder b = (ControlBuilder) o;
+ if (b.ControlType == null)
+ continue;
+
if (b is CollectionBuilder) {
PropertyInfo itemsProp = null;
foreach (object o in builder.Children) {
if (o is string) /* literal stuff gets ignored */
continue;
-
+ if (o is CodeRenderBuilder)
+ continue;
ControlBuilder b = (ControlBuilder) o;
EnsureID (b);
-
- string id = b.ID;
- string skinId = b.attribs["skinid"] as string;
Type controlType = b.ControlType;
-
- if (skinId == null) skinId = "";
+ if (controlType == null)
+ continue;
+
+ string id = b.ID;
+ string skinId = b.attribs != null ? b.attribs["skinid"] as string : null;
+ if (skinId == null)
+ skinId = "";
// private static object __BuildControl__$id_skinKey = System.Web.UI.PageTheme.CreateSkinKey(typeof($controlType), "$skinID")
//
CodeMemberField fld = new CodeMemberField (typeof (object), "__BuildControl_" + id + "_skinKey");
fld.Attributes = MemberAttributes.Private | MemberAttributes.Static;
- fld.InitExpression = new CodeMethodInvokeExpression (new CodeTypeReferenceExpression (typeof (PageTheme)),
- "CreateSkinKey",
- new CodeTypeOfExpression (controlType),
- new CodePrimitiveExpression (skinId));
+ fld.InitExpression = new CodeMethodInvokeExpression (
+ new CodeTypeReferenceExpression (typeof (PageTheme)),
+ "CreateSkinKey",
+ new CodeTypeOfExpression (controlType),
+ new CodePrimitiveExpression (skinId));
mainClass.Members.Add (fld);
}
}
protected override void CreateConstructor (CodeStatementCollection localVars,
- CodeStatementCollection trueStmt)
+ CodeStatementCollection trueStmt)
{
ControlBuilder builder = parser.RootBuilder;
foreach (object o in builder.Children) {
if (o is string) /* literal stuff gets ignored */
continue;
-
+ if (o is CodeRenderBuilder)
+ continue;
+
ControlBuilder b = (ControlBuilder) o;
-
- string id = b.ID;
Type controlType = b.ControlType;
+ if (controlType == null)
+ continue;
+ string id = b.ID;
+
if (localVars == null)
localVars = new CodeStatementCollection ();
void CreateField (ControlBuilder builder, bool check)
{
+ if (builder == null || builder.ID == null || builder.ControlType == null)
+ return;
#if NET_2_0
if (partialNameOverride [builder.ID] != null)
return;
#endif
+ MemberAttributes ma = MemberAttributes.Family;
currentLocation = builder.location;
- if (check && CheckBaseFieldOrProperty (builder.ID, builder.ControlType))
+ if (check && CheckBaseFieldOrProperty (builder.ID, builder.ControlType, ref ma))
return; // The field or property already exists in a base class and is accesible.
CodeMemberField field;
field = new CodeMemberField (builder.ControlType.FullName, builder.ID);
- field.Attributes = MemberAttributes.Family;
- mainClass.Members.Add (field);
+ field.Attributes = ma;
+#if NET_2_0
+ if (partialClass != null)
+ partialClass.Members.Add (field);
+ else
+#endif
+ mainClass.Members.Add (field);
}
- bool CheckBaseFieldOrProperty (string id, Type type)
+ bool CheckBaseFieldOrProperty (string id, Type type, ref MemberAttributes ma)
{
FieldInfo fld = parser.BaseType.GetField (id, noCaseFlags);
return false;
if (!other.IsAssignableFrom (type)) {
+#if NET_2_0
+ ma |= MemberAttributes.New;
+ return false;
+#else
string msg = String.Format ("The base class includes the field '{0}', but its " +
"type '{1}' is not compatible with {2}",
id, other, type);
throw new ParseException (currentLocation, msg);
+#endif
}
return true;
if (childrenAsProperties || builder.ControlType == null) {
string typeString;
- if (builder is RootBuilder) {
-#if NET_2_0
- if (parser.IsPartial)
- typeString = parser.PartialClassName;
- else
-#endif
- typeString = parser.ClassName;
- }
+ if (builder is RootBuilder)
+ typeString = parser.ClassName;
else {
if (builder.ControlType != null && builder.isProperty &&
!typeof (ITemplate).IsAssignableFrom (builder.ControlType))
} else // should never happen
return;
- // __ctrl.Text = System.Convert.ToString(this.GetLocalResourceObject("ButtonResource1.Text"));
- object obj = HttpContext.GetLocalResourceObject (HttpContext.Current.Request.FilePath,
- resname);
+ // __ctrl.Text = System.Convert.ToString(HttpContext.GetLocalResourceObject("ButtonResource1.Text"));
+ string inputFile = parser.InputFile;
+ string physPath = HttpContext.Current.Request.PhysicalApplicationPath;
+
+ if (StrUtils.StartsWith (inputFile, physPath))
+ inputFile = parser.InputFile.Substring (physPath.Length - 1);
+ else
+ return;
+
+ object obj = HttpContext.GetLocalResourceObject (inputFile, resname);
if (obj == null)
return;
protected void AddChildCall (ControlBuilder parent, ControlBuilder child)
{
+ if (parent == null || child == null)
+ return;
CodeMethodReferenceExpression m = new CodeMethodReferenceExpression (thisRef, child.method.Name);
CodeMethodInvokeExpression expr = new CodeMethodInvokeExpression (m);
- object [] atts = child.ControlType.GetCustomAttributes (typeof (PartialCachingAttribute), true);
+ object [] atts = null;
+
+ if (child.ControlType != null)
+ child.ControlType.GetCustomAttributes (typeof (PartialCachingAttribute), true);
if (atts != null && atts.Length > 0) {
PartialCachingAttribute pca = (PartialCachingAttribute) atts [0];
CodeTypeReferenceExpression cc = new CodeTypeReferenceExpression("System.Web.UI.StaticPartialCachingControl");
if (!childrenAsProperties && typeof (Control).IsAssignableFrom (builder.ControlType))
builder.method.Statements.Add (new CodeMethodReturnStatement (ctrlVar));
}
-
+
protected internal override void CreateMethods ()
{
base.CreateMethods ();
CodeCastExpression cast = new CodeCastExpression (appType.FullName, propRef);
prop.GetStatements.Add (new CodeMethodReturnStatement (cast));
+#if NET_2_0
+ if (partialClass != null)
+ partialClass.Members.Add (prop);
+ else
+#endif
mainClass.Members.Add (prop);
}
throw new HttpException (String.Format ("Theme '{0}' cannot be found in the application or global theme directories.", theme));
string [] skin_files = Directory.GetFiles (physicalPath, "*.skin");
- PageThemeParser ptp = new PageThemeParser (physicalPath, context);
+ PageThemeParser ptp = new PageThemeParser (virtualPath, context);
string[] css_files = Directory.GetFiles (physicalPath, "*.css");
string[] css_urls = new string[css_files.Length];
- for (int i = 0; i < css_files.Length; i++)
+ for (int i = 0; i < css_files.Length; i++) {
+ ptp.AddDependency (css_files [i]);
css_urls [i] = virtualPath + Path.GetFileName (css_files [i]);
+ }
ptp.LinkedStyleSheets = css_urls;
ptp.RootBuilder = new RootBuilder ();
skin_files[i],
context);
+ ptp.AddDependency (skin_files [i]);
AspGenerator gen = new AspGenerator (ptfp);
gen.Parse ();
static public PagesConfiguration GetInstance (HttpContext context)
{
- PagesConfiguration config;
if (context == null)
context = HttpContext.Current;
return context.GetConfig ("system.web/pages") as PagesConfiguration;
+2007-03-12 Marek Habersack <mhabersack@novell.com>
+
+ * ProvidersHelper.cs: support loading custom providers from
+ App_Code assemblies. Fixes bug #81071.
+ Also set eol-style to native.
+
+2007-03-08 Gert Driesen <drieseng@users.souceforge.net>
+
+ * PagesSection.cs: Revert part of Adar's patch that regresses
+ bug #80913.
+
+2007-03-06 Adar Wesley <adarw@mainsoft.com>
+
+ * PagesSection.cs: improve Enum parsing and strongly typed default values.
+
+2007-02-20 Marek Habersack <grendello@gmail.com>
+
+ * Patch from Gert Driesen <drieseng@users.sourceforge.net>
+ * PagesSection.cs: Process value of EnableSessionState attribute
+ case-sensitive, and perform check in getter. Fix for bug #80913.
+ * PageParser.cs: Added note on difference in behaviour between page
+ level attribute and configuration attribute for enableSessionState.
+ * PagesConfiguration.cs: Fixed compiler warning.
+
2007-02-22 Marek Habersack <grendello@gmail.com>
* CompilerCollection.cs: Optimize language lookup a bit.
controlsProp = new ConfigurationProperty ("controls", typeof(TagPrefixCollection), null,
null, null, ConfigurationPropertyOptions.None);
enableEventValidationProp = new ConfigurationProperty ("enableEventValidation", typeof (bool), true);
- enableSessionStateProp = new ConfigurationProperty ("enableSessionState", typeof (PagesEnableSessionState), PagesEnableSessionState.True);
+ enableSessionStateProp = new ConfigurationProperty ("enableSessionState", typeof (string), "true");
enableViewStateProp = new ConfigurationProperty ("enableViewState", typeof (bool), true);
enableViewStateMacProp = new ConfigurationProperty ("enableViewStateMac", typeof (bool), true);
maintainScrollPositionOnPostBackProp = new ConfigurationProperty ("maintainScrollPositionOnPostBack", typeof (bool), false);
set { base [asyncTimeoutProp] = value; }
}
- [ConfigurationProperty ("autoEventWireup", DefaultValue = "True")]
+ [ConfigurationProperty ("autoEventWireup", DefaultValue = true)]
public bool AutoEventWireup {
get { return (bool) base [autoEventWireupProp]; }
set { base [autoEventWireupProp] = value; }
}
- [ConfigurationProperty ("buffer", DefaultValue = "True")]
+ [ConfigurationProperty ("buffer", DefaultValue = true)]
public bool Buffer {
get { return (bool) base [bufferProp]; }
set { base [bufferProp] = value; }
}
- [ConfigurationProperty ("compilationMode", DefaultValue = "Always")]
+ [ConfigurationProperty ("compilationMode", DefaultValue = CompilationMode.Always)]
public CompilationMode CompilationMode {
get { return (CompilationMode) base [modeProp]; }
set { base [modeProp] = value; }
get { return (TagPrefixCollection) base[controlsProp]; }
}
- [ConfigurationProperty ("enableEventValidation", DefaultValue = "True")]
+ [ConfigurationProperty ("enableEventValidation", DefaultValue = true)]
public bool EnableEventValidation {
get { return (bool) base[enableEventValidationProp]; }
set { base[enableEventValidationProp] = value; }
[ConfigurationProperty ("enableSessionState", DefaultValue = "true")]
public PagesEnableSessionState EnableSessionState {
- get { return (PagesEnableSessionState) base[enableSessionStateProp]; }
- set { base[enableSessionStateProp] = value; }
+ get {
+ string enableSessionState = (string) base [enableSessionStateProp];
+ switch (enableSessionState) {
+ case "true":
+ return PagesEnableSessionState.True;
+ case "false":
+ return PagesEnableSessionState.False;
+ case "ReadOnly":
+ return PagesEnableSessionState.ReadOnly;
+ }
+ throw new ConfigurationErrorsException ("The 'enableSessionState'"
+ + " attribute must be one of the following values: true,"
+ + "false, ReadOnly.");
+ }
+ set {
+ switch (value) {
+ case PagesEnableSessionState.False:
+ base [enableSessionStateProp] = "false";
+ break;
+ case PagesEnableSessionState.ReadOnly:
+ base [enableSessionStateProp] = "ReadOnly";
+ break;
+ default:
+ base [enableSessionStateProp] = "true";
+ break;
+ }
+ }
}
- [ConfigurationProperty ("enableViewState", DefaultValue = "True")]
+ [ConfigurationProperty ("enableViewState", DefaultValue = true)]
public bool EnableViewState {
get { return (bool) base[enableViewStateProp]; }
set { base[enableViewStateProp] = value; }
}
- [ConfigurationProperty ("enableViewStateMac", DefaultValue = "True")]
+ [ConfigurationProperty ("enableViewStateMac", DefaultValue = true)]
public bool EnableViewStateMac {
get { return (bool) base[enableViewStateMacProp]; }
set { base[enableViewStateMacProp] = value; }
}
- [ConfigurationProperty ("maintainScrollPositionOnPostBack", DefaultValue = "False")]
+ [ConfigurationProperty ("maintainScrollPositionOnPostBack", DefaultValue = false)]
public bool MaintainScrollPositionOnPostBack {
get { return (bool) base[maintainScrollPositionOnPostBackProp]; }
set { base [maintainScrollPositionOnPostBackProp] = value; }
set { base[masterPageFileProp] = value; }
}
- [ConfigurationProperty ("maxPageStateFieldLength", DefaultValue = "-1")]
+ [ConfigurationProperty ("maxPageStateFieldLength", DefaultValue = -1)]
public int MaxPageStateFieldLength {
get { return (int) base[maxPageStateFieldLengthProp]; }
set { base[maxPageStateFieldLengthProp] = value; }
set { base [pageParserFilterTypeProp] = value; }
}
- [ConfigurationProperty ("smartNavigation", DefaultValue = "False")]
+ [ConfigurationProperty ("smartNavigation", DefaultValue = false)]
public bool SmartNavigation {
get { return (bool) base[smartNavigationProp]; }
set { base[smartNavigationProp] = value; }
set { base[userControlBaseTypeProp] = value; }
}
- [ConfigurationProperty ("validateRequest", DefaultValue = "True")]
+ [ConfigurationProperty ("validateRequest", DefaultValue = true)]
public bool ValidateRequest {
get { return (bool) base[validateRequestProp]; }
set { base[validateRequestProp] = value; }
}
- [ConfigurationProperty ("viewStateEncryptionMode", DefaultValue = "Auto")]
+ [ConfigurationProperty ("viewStateEncryptionMode", DefaultValue = ViewStateEncryptionMode.Auto)]
public ViewStateEncryptionMode ViewStateEncryptionMode {
get { return (ViewStateEncryptionMode) base [viewStateEncryptionModeProp]; }
set { base [viewStateEncryptionModeProp] = value; }
-//\r
-// System.Web.Configuration.ProvidersHelper\r
-//\r
-// Authors:\r
-// Chris Toshok (toshok@ximian.com)\r
-//\r
-// (C) 2005 Novell, Inc (http://www.novell.com)\r
-//\r
-\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the\r
-// "Software"), to deal in the Software without restriction, including\r
-// without limitation the rights to use, copy, modify, merge, publish,\r
-// distribute, sublicense, and/or sell copies of the Software, and to\r
-// permit persons to whom the Software is furnished to do so, subject to\r
-// the following conditions:\r
-// \r
-// The above copyright notice and this permission notice shall be\r
-// included in all copies or substantial portions of the Software.\r
-// \r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-\r
-#if NET_2_0\r
-\r
-using System;\r
-using System.Configuration;\r
-using System.Configuration.Provider;\r
-using System.Data.Common;\r
-using System.Data.SqlClient;\r
-using System.IO;\r
-using System.Reflection;\r
-\r
-namespace System.Web.Configuration {\r
-\r
- public static class ProvidersHelper\r
- {\r
- private static string privateBinPath = null;\r
- \r
- public static ProviderBase InstantiateProvider (ProviderSettings providerSettings, Type providerType)\r
- {\r
- Type settingsType = Type.GetType (providerSettings.Type);\r
- if (settingsType == null && Directory.Exists (PrivateBinPath)) {\r
- string [] binDlls = Directory.GetFiles (PrivateBinPath, "*.dll");\r
- foreach (string s in binDlls) {\r
- Assembly binA = Assembly.LoadFrom (s);\r
- settingsType = binA.GetType (providerSettings.Type);\r
- if (settingsType != null)\r
- break;\r
- }\r
- }\r
-\r
- if (settingsType == null)\r
- throw new ConfigurationErrorsException (String.Format ("Could not find type: {0}", providerSettings.Type));\r
- if (!providerType.IsAssignableFrom (settingsType))\r
- throw new ConfigurationErrorsException (String.Format ("Provider '{0}' must subclass from '{1}'", providerSettings.Name, providerType));\r
-\r
- ProviderBase provider = Activator.CreateInstance (settingsType) as ProviderBase;\r
-\r
- provider.Initialize (providerSettings.Name, providerSettings.Parameters);\r
-\r
- return provider;\r
- }\r
-\r
- private static string PrivateBinPath {\r
- get {\r
- if (privateBinPath != null)\r
- return privateBinPath;\r
-\r
- AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;\r
- privateBinPath = Path.Combine (setup.ApplicationBase, setup.PrivateBinPath);\r
-\r
- return privateBinPath;\r
- }\r
- }\r
-\r
- public static void InstantiateProviders (ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType)\r
- {\r
- if (!typeof (ProviderBase).IsAssignableFrom (providerType))\r
- throw new ConfigurationErrorsException (String.Format ("type '{0}' must subclass from ProviderBase", providerType));\r
-\r
- foreach (ProviderSettings settings in configProviders)\r
- providers.Add (InstantiateProvider (settings, providerType));\r
- }\r
-\r
- internal static DbProviderFactory GetDbProviderFactory (string providerName)\r
- {\r
- DbProviderFactory f = null;\r
-\r
- if (providerName != null && providerName != "") {\r
- try {\r
- f = DbProviderFactories.GetFactory(providerName);\r
- }\r
- catch (Exception e) { Console.WriteLine (e); /* nada */ }\r
- if (f != null)\r
- return f;\r
- }\r
-\r
- return SqlClientFactory.Instance;\r
- }\r
- }\r
-\r
-}\r
-\r
-#endif\r
-\r
+//
+// System.Web.Configuration.ProvidersHelper
+//
+// Authors:
+// Chris Toshok (toshok@ximian.com)
+//
+// (C) 2005 Novell, Inc (http://www.novell.com)
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+using System.Collections;
+using System.Configuration;
+using System.Configuration.Provider;
+using System.Data.Common;
+using System.Data.SqlClient;
+using System.IO;
+using System.Reflection;
+using System.Web.Compilation;
+
+namespace System.Web.Configuration {
+
+ public static class ProvidersHelper
+ {
+ private static string privateBinPath = null;
+
+ public static ProviderBase InstantiateProvider (ProviderSettings providerSettings, Type providerType)
+ {
+ Type settingsType = Type.GetType (providerSettings.Type);
+ if (settingsType == null && Directory.Exists (PrivateBinPath)) {
+ string [] binDlls = Directory.GetFiles (PrivateBinPath, "*.dll");
+ foreach (string s in binDlls) {
+ Assembly binA = Assembly.LoadFrom (s);
+ settingsType = binA.GetType (providerSettings.Type);
+ if (settingsType != null)
+ break;
+ }
+ }
+
+ // check App_Code dlls
+ if (settingsType == null) {
+ IList appCode = BuildManager.CodeAssemblies;
+
+ if (appCode != null && appCode.Count > 0) {
+ Assembly asm;
+ foreach (object o in appCode) {
+ asm = o as Assembly;
+ if (asm == null)
+ continue;
+ settingsType = asm.GetType (providerSettings.Type);
+ if (settingsType != null)
+ break;
+ }
+ }
+ }
+
+ if (settingsType == null)
+ throw new ConfigurationErrorsException (String.Format ("Could not find type: {0}",
+ providerSettings.Type));
+ if (!providerType.IsAssignableFrom (settingsType))
+ throw new ConfigurationErrorsException (String.Format ("Provider '{0}' must subclass from '{1}'",
+ providerSettings.Name, providerType));
+
+ ProviderBase provider = Activator.CreateInstance (settingsType) as ProviderBase;
+
+ provider.Initialize (providerSettings.Name, providerSettings.Parameters);
+
+ return provider;
+ }
+
+ private static string PrivateBinPath {
+ get {
+ if (privateBinPath != null)
+ return privateBinPath;
+
+ AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
+ privateBinPath = Path.Combine (setup.ApplicationBase, setup.PrivateBinPath);
+
+ return privateBinPath;
+ }
+ }
+
+ public static void InstantiateProviders (ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType)
+ {
+ if (!typeof (ProviderBase).IsAssignableFrom (providerType))
+ throw new ConfigurationErrorsException (String.Format ("type '{0}' must subclass from ProviderBase", providerType));
+
+ foreach (ProviderSettings settings in configProviders)
+ providers.Add (InstantiateProvider (settings, providerType));
+ }
+
+ internal static DbProviderFactory GetDbProviderFactory (string providerName)
+ {
+ DbProviderFactory f = null;
+
+ if (providerName != null && providerName != "") {
+ try {
+ f = DbProviderFactories.GetFactory(providerName);
+ }
+ catch (Exception e) { Console.WriteLine (e); /* nada */ }
+ if (f != null)
+ return f;
+ }
+
+ return SqlClientFactory.Instance;
+ }
+ }
+
+}
+
+#endif
+
private static readonly object LOCK_GETASSEMBLIESCACHEDDOCUMENT = new object();
private static readonly object LOCK_GETFROMMAPPATHCACHE = new object();
+ static PageMapper ()
+ {
+ AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler (CurrentDomain_AssemblyResolve);
+ try
+ {
+ //Try to load the global resources
+ HttpContext.AppGlobalResourcesAssembly = GetCachedAssembly ("app_globalresources");
+ }
+ catch
+ {
+ }
+ }
+
+
+ static Assembly CurrentDomain_AssemblyResolve (object sender, ResolveEventArgs args)
+ {
+ Assembly resolvedAssembly = null;
+ try
+ {
+ resolvedAssembly = GetCachedAssembly (args.Name);
+ }
+ catch
+ {
+ resolvedAssembly = null;
+ }
+
+ return resolvedAssembly;
+ }
public static string GetFromMapPathCache(string key)
{
Hashtable answer = null;
//spivak.December 07 2006
public MetaProvider GetMetaByURL(string url)
{
+
#if !NO_GLOBAL_LOCK_ON_COMPILE
string lwUrl = url.ToLower();
lock (_table)
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * WebEventCodes.cs: Implemented.
+
2006-02-28 Chris Toshok <toshok@ximian.com>
* SqlFeatures.cs: corcompare work
* RuleFiringRecord.cs:
* WebApplicationInformation.cs:
* WebBaseEvent.cs:
- * WebEventFormatter.cs: Stubbed out classes.
\ No newline at end of file
+ * WebEventFormatter.cs: Stubbed out classes.
--- /dev/null
+//
+// System.Web.Management.WebEventFormatter.cs
+//
+// Authors:
+// Marek Habersack <mhabersack@novell.com>
+//
+// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//
+
+#if NET_2_0
+namespace System.Web.Management
+{
+ public sealed class WebEventCodes
+ {
+ public const int InvalidEventCode = -1;
+
+ public const int UndefinedEventCode = 0;
+ public const int UndefinedEventDetailCode = 0;
+
+ public const int ApplicationCodeBase = 0x003E8;
+ public const int ApplicationStart = ApplicationCodeBase + 0x01;
+ public const int ApplicationShutdown = ApplicationCodeBase + 0x02;
+ public const int ApplicationCompilationStart = ApplicationCodeBase + 0x03;
+ public const int ApplicationCompilationEnd = ApplicationCodeBase + 0x04;
+ public const int ApplicationHeartbeat = ApplicationCodeBase + 0x05;
+
+ public const int RequestCodeBase = 0x007D0;
+ public const int RequestTransactionComplete = RequestCodeBase + 0x01;
+ public const int RequestTransactionAbort = RequestCodeBase + 0x02;
+
+ public const int ErrorCodeBase = 0x00BB8;
+ public const int RuntimeErrorRequestAbort = ErrorCodeBase + 0x01;
+ public const int RuntimeErrorViewStateFailure = ErrorCodeBase + 0x02;
+ public const int RuntimeErrorValidationFailure = ErrorCodeBase + 0x03;
+ public const int RuntimeErrorPostTooLarge = ErrorCodeBase + 0x04;
+ public const int RuntimeErrorUnhandledException = ErrorCodeBase + 0x05;
+ public const int WebErrorParserError = ErrorCodeBase + 0x06;
+ public const int WebErrorCompilationError = ErrorCodeBase + 0x07;
+ public const int WebErrorConfigurationError = ErrorCodeBase + 0x08;
+ public const int WebErrorOtherError = ErrorCodeBase + 0x09;
+ public const int WebErrorPropertyDeserializationError = ErrorCodeBase + 0x0A;
+ public const int WebErrorObjectStateFormatterDeserializationError = ErrorCodeBase + 0x0B;
+
+ public const int AuditCodeBase = 0x00FA0;
+ public const int AuditFormsAuthenticationSuccess = AuditCodeBase + 0x01;
+ public const int AuditMembershipAuthenticationSuccess = AuditCodeBase + 0x02;
+ public const int AuditUrlAuthorizationSuccess = AuditCodeBase + 0x03;
+ public const int AuditFileAuthorizationSuccess = AuditCodeBase + 0x04;
+ public const int AuditFormsAuthenticationFailure = AuditCodeBase + 0x05;
+ public const int AuditMembershipAuthenticationFailure = AuditCodeBase + 0x06;
+ public const int AuditUrlAuthorizationFailure = AuditCodeBase + 0x07;
+ public const int AuditFileAuthorizationFailure = AuditCodeBase + 0x08;
+ public const int AuditInvalidViewStateFailure = AuditCodeBase + 0x09;
+ public const int AuditUnhandledSecurityException = AuditCodeBase + 0x0A;
+ public const int AuditUnhandledAccessException = AuditCodeBase + 0x0B;
+
+ public const int MiscCodeBase = 0x01770;
+ public const int WebEventProviderInformation = MiscCodeBase + 0x01;
+
+ public const int ApplicationDetailCodeBase = 0x0C350;
+ public const int ApplicationShutdownUnknown = ApplicationDetailCodeBase + 0x01;
+ public const int ApplicationShutdownHostingEnvironment = ApplicationDetailCodeBase + 0x02;
+ public const int ApplicationShutdownChangeInGlobalAsax = ApplicationDetailCodeBase + 0x03;
+ public const int ApplicationShutdownConfigurationChange = ApplicationDetailCodeBase + 0x04;
+ public const int ApplicationShutdownUnloadAppDomainCalled = ApplicationDetailCodeBase + 0x05;
+ public const int ApplicationShutdownChangeInSecurityPolicyFile = ApplicationDetailCodeBase + 0x06;
+ public const int ApplicationShutdownBinDirChangeOrDirectoryRename = ApplicationDetailCodeBase + 0x07;
+ public const int ApplicationShutdownBrowsersDirChangeOrDirectoryRename = ApplicationDetailCodeBase + 0x08;
+ public const int ApplicationShutdownCodeDirChangeOrDirectoryRename = ApplicationDetailCodeBase + 0x09;
+ public const int ApplicationShutdownResourcesDirChangeOrDirectoryRename = ApplicationDetailCodeBase + 0x0A;
+ public const int ApplicationShutdownIdleTimeout = ApplicationDetailCodeBase + 0x0B;
+ public const int ApplicationShutdownPhysicalApplicationPathChanged = ApplicationDetailCodeBase + 0x0C;
+ public const int ApplicationShutdownHttpRuntimeClose = ApplicationDetailCodeBase + 0x0D;
+ public const int ApplicationShutdownInitializationError = ApplicationDetailCodeBase + 0x0E;
+ public const int ApplicationShutdownMaxRecompilationsReached = ApplicationDetailCodeBase + 0x0F;
+ public const int StateServerConnectionError = ApplicationDetailCodeBase + 0x10;
+
+ public const int AuditDetailCodeBase = 0x0C418;
+ public const int InvalidTicketFailure = AuditDetailCodeBase + 0x01;
+ public const int ExpiredTicketFailure = AuditDetailCodeBase + 0x02;
+ public const int InvalidViewStateMac = AuditDetailCodeBase + 0x03;
+ public const int InvalidViewState = AuditDetailCodeBase + 0x04;
+
+ public const int WebEventDetailCodeBase = 0x0C47C;
+ public const int SqlProviderEventsDropped = WebEventDetailCodeBase + 0x01;
+
+ public const int WebExtendedBase = 0x186A0;
+ }
+}
+#endif
\ No newline at end of file
+2007-03-12 Marek Habersack <mhabersack@novell.com>
+
+ * RolePrincipal.cs: decrypt the roles ticket properly. Makes role
+ caching in cookies work. Fixes bug #81117. Patch from Mike Morano
+ <mmorano@mikeandwan.us>
+
+2007-03-02 Marek Habersack <mhabersack@novell.com>
+
+ * SqlMembershipProvider.cs: cast PasswordFormat to int, so that
+ the parameter code can infer the sql type. Makes user creation,
+ password reset etc. work.
+
2007-02-28 Andreia Gaita <avidigal@novell.com>
* SqlRoleProvider.cs: Fix parameter binding to stored procedures.
// expire date
_exprireDate = new DateTime (reader.ReadInt64 ());
+ // cookie path
+ _cookiePath = reader.ReadString ();
+
// roles
string roles = reader.ReadString ();
if (!Expired)
InitializeRoles (roles);
-
- // cookie path
- _cookiePath = reader.ReadString ();
}
private void InitializeRoles (string decryptedRoles)
AddParameter (command, "@ApplicationName", ApplicationName);
AddParameter (command, "@UserName", username);
AddParameter (command, "@NewPassword", db_password);
- AddParameter (command, "@PasswordFormat", pi.PasswordFormat);
+ AddParameter (command, "@PasswordFormat", (int) pi.PasswordFormat);
AddParameter (command, "@PasswordSalt", pi.PasswordSalt);
AddParameter (command, "@CurrentTimeUtc", DateTime.UtcNow);
DbParameter returnValue = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
AddParameter (command, "@CurrentTimeUtc", Now);
AddParameter (command, "@CreateDate", Now);
AddParameter (command, "@UniqueEmail", RequiresUniqueEmail);
- AddParameter (command, "@PasswordFormat", PasswordFormat);
+ AddParameter (command, "@PasswordFormat", (int) PasswordFormat);
AddParameter (command, "@UserId", ParameterDirection.InputOutput, providerUserKey);
DbParameter returnValue = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
AddParameter (command, "@PasswordAttemptWindow", PasswordAttemptWindow);
AddParameter (command, "@PasswordSalt", pi.PasswordSalt);
AddParameter (command, "@CurrentTimeUtc", DateTime.UtcNow);
- AddParameter (command, "@PasswordFormat", pi.PasswordFormat);
+ AddParameter (command, "@PasswordFormat", (int) pi.PasswordFormat);
AddParameter (command, "@PasswordAnswer", db_answer);
DbParameter retValue = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
+2007-03-12 Konstantin Triger <kostat@mainsoft.com>
+
+ * SessionStateModule.cs: TARGET_J2EE: support only J2EE sessions.
+
+2007-03-06 Marek Habersack <mhabersack@novell.com>
+
+ * SessionInProcHandler.cs: gracefully handle different value types
+ in the session removal handler.
+
+ * SessionStateModule.cs: create an empty container if session data
+ is null. Fixes bug 80682
+
2007-02-19 Konstantin Triger <kostat@mainsoft.com>
* SessionStateModule.cs: call Session_End callback only if the handler
void OnSessionRemoved (string key, object value, CacheItemRemovedReason reason)
{
- if (expireCallback != null)
- expireCallback (key, value as SessionStateStoreData);
+ if (expireCallback != null) {
+ if (value is SessionStateStoreData)
+ expireCallback (key, (SessionStateStoreData)value);
+ else if (value is InProcSessionItem) {
+ InProcSessionItem item = (InProcSessionItem)value;
+ expireCallback (key,
+ new SessionStateStoreData (
+ item.items,
+ SessionStateUtility.GetSessionStaticObjects (HttpContext.Current),
+ item.timeout));
+ } else
+ expireCallback (key, null);
+ }
}
}
}
if (settings == null)
throw new HttpException (String.Format ("Cannot find '{0}' provider.", config.CustomProvider));
break;
+ case SessionStateMode.Off:
+ return;
+#if TARGET_J2EE
+ default:
+ throw new NotSupportedException (String.Format ("The mode '{0}' is not supported. Only Custom mode is supported and maps to J2EE session.", config.Mode));
+#else
case SessionStateMode.InProc:
settings = new ProviderSettings (null, typeof (SessionInProcHandler).AssemblyQualifiedName);
break;
- case SessionStateMode.Off:
- return;
case SessionStateMode.SQLServer:
//settings = new ProviderSettings (null, typeof (SessionInProcHandler).AssemblyQualifiedName);
//break;
case SessionStateMode.StateServer:
settings = new ProviderSettings (null, typeof (SessionStateServerHandler).AssemblyQualifiedName);
break;
+#endif
}
handler = (SessionStateStoreProviderBase) ProvidersHelper.InstantiateProvider (settings, typeof (SessionStateStoreProviderBase));
}
HttpSessionStateContainer CreateContainer (string sessionId, SessionStateStoreData data, bool isNew, bool isReadOnly) {
+ if (data == null)
+ return new HttpSessionStateContainer (
+ sessionId, null, null, 0, isNew,
+ config.Cookieless, config.Mode, isReadOnly);
+
return new HttpSessionStateContainer (
sessionId,
data.Items,
EnsureDataBound ();
base.OnPreRender (e);
}
+
+ internal Control FindDataSource ()
+ {
+ Control ctrl = null;
+ Control namingContainer = NamingContainer;
+
+ while (namingContainer != null) {
+ ctrl = namingContainer.FindControl (DataSourceID);
+ if (ctrl != null)
+ break;
+ namingContainer = namingContainer.NamingContainer;
+ }
+
+ return ctrl;
+ }
protected abstract void PerformSelect ();
return null;
object o = prop.GetValue (control);
- return o != null ? o.ToString () : String.Empty;
+
+ if (o == null)
+ return String.Empty;
+
+ if (o is ListItem)
+ return ((ListItem) o).Value;
+
+ return o.ToString ();
}
public static PropertyDescriptor GetValidationProperty (object o)
#if NET_2_0
if (havePage)
Page.ClientScript.RegisterForEventValidation (this.UniqueID, i.Value.ToString ());
+
+ if (i.HasAttributes)
+ i.Attributes.AddAttributes (writer);
#endif
writer.RenderBeginTag (HtmlTextWriterTag.Li);
this.RenderBulletText (i, idx ++, writer);
+2007-03-12 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * Style.cs: optimization: used CssStyleCollection .ctor w/o parameters.
+
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * Login.cs: Make command name comparison case-insensitive in
+ OnBubbleEvent. Patch from Mike Morano <mmorano@mikeandwan.us>
+
+2007-03-06 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * DataGrid.cs: fixed:
+ Auto-generated columns are restored properly on postback from view state.
+
+2007-03-06 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * Style.cs: fixed:
+ when AddAttributesToRender(System.Web.UI.HtmlTextWriter, WebControl)
+ is called, WebControl parameter is passed as argument to
+ FillStyleAttributes (CssStyleCollection, IUrlResolutionService) method.
+
+2007-03-06 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * DataList.cs:
+ * DataListItem.cs:
+ fixed applying styles if ExtractTemplateRows=true.
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * DropDownList.cs: in 2.0 first item is rendered with selected attribute
+ is Enabled=false and no selected items.
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * CheckBoxList.cs: in 2.0 access key attribute is rendered in 'input' tags.
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * CheckBoxList.cs:
+ * BulletedList.cs:
+ * ListControl.cs:
+ * ListItem.cs:
+ * RadioButtonList.cs:
+ fixed: list controls consider ListItem.Attributes property on render.
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * CheckBox.cs: fixed: 'span' tag is not rendered if all attributes
+ are rendered in 'input' tag.
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * DropDownList.cs:
+ * ListBox.cs:
+ used "ONLY_1_1" instead "!NET_2_0"
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * BaseDataBoundControl.cs:
+ * DataBoundControl.cs:
+ * HierarchicalDataBoundControl.cs:
+ refactoring: DataBoundControl and HierarchicalDataBoundControl use internal
+ method in BaseDataBoundControl to find a data source control.
+
+2007-03-05 Marek Habersack <mhabersack@novell.com>
+
+ * Unit.cs: Support parsing of units in the form ".9em" etc.
+
+2007-03-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * TemplateColumn.cs: fixed: if ItemTemplate is null, " " is rendered.
+
+2007-03-05 Marek Habersack <mhabersack@novell.com>
+
+ * BaseValidator.cs: make validators work correctly with
+ ListItems. Patch from Daniel Nauck <dna@informatik.uni-kiel.de>
+
+2007-03-04 Marek Habersack <mhabersack@novell.com>
+
+ * HierarchicalDataBoundControl.cs: Use the method described below
+ to get the data source named in DataSourceID.
+
+ * BaseDataBoundControl.cs: add an internal method to find a data
+ source control within all the naming containers above a given
+ control. The method makes it possible to find controls that reside
+ in master pages.
+
+2007-03-01 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * Repeater.cs: fixed: data-binding flow for 2.0 features.
+
+2007-03-01 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * Parameter.cs:
+ * ParameterCollection.cs:
+ fixed GetValue/s and UpdateValue/s.
+
+2007-02-28 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * TreeNodeCollection.cs:
+ fixed Save/Load viewstate.
+
+2007-02-28 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * MenuItemCollection.cs:
+ fixed Save/Load viewstate.
+
2007-02-28 Igor Zelmanovich <igorz@mainsoft.com>
* CreateUserWizard.cs:
* CreateUserWizardStep.cs: fixed validators message display
-2006-08-25 Kornél Pál <kornelpal@gmail.com>
+2006-08-25 Korn__l P__l <kornelpal@gmail.com>
* FileUpload.cs: Use assembly name constants.
2006-07-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* DataList.cs: correctly initialize editable items when there's an
- EditItemTemplate. Patch by JarosÃ…\82aw Pawlak.
+ EditItemTemplate. Patch by Jaros_\82aw Pawlak.
2006-07-13 Juraj Skripsky <js@hotfeet.ch>
2004-10-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* ListItemCollection.cs: fixed bug when indexing changed elements in
- LoadViewState. Patch from Alois Bělaška.
+ LoadViewState. Patch from Alois B_\9bla__ka.
2004-10-20 Sanjay Gupta <gsanjay@novell.com>
}
}
- void AddAttributesForSpan (HtmlTextWriter writer)
+ bool AddAttributesForSpan (HtmlTextWriter writer)
{
ICollection k = Attributes.Keys;
string [] keys = new string [k.Count];
common_attrs [key] = Attributes [key];
Attributes.Remove (key);
}
- Attributes.AddAttributes (writer);
+ if (Attributes.Count > 0) {
+ Attributes.AddAttributes (writer);
+ return true;
+ }
+ return false;
}
#if NET_2_0
protected internal
need_span = true;
}
- if (Attributes.Count > 0){
- AddAttributesForSpan (w);
+ if (Attributes.Count > 0 && AddAttributesForSpan (w))
need_span = true;
- }
if (need_span)
w.RenderBeginTag (HtmlTextWriterTag.Span);
ti = TabIndex;
TabIndex = 0;
}
+#if NET_2_0
+ string ak = AccessKey;
+ check_box.AccessKey = ak;
+ this.AccessKey = null;
+#endif
ri.RenderRepeater (writer, this, TableStyle, this);
if (ti != 0)
TabIndex = ti;
+#if NET_2_0
+ this.AccessKey = ak;
+#endif
}
#if NET_2_0
#if NET_2_0
check_box.ValidationGroup = ValidationGroup;
check_box.CausesValidation = CausesValidation;
+ if (check_box.HasAttributes)
+ check_box.Attributes.Clear ();
+ if (item.HasAttributes)
+ check_box.Attributes.CopyFrom (item.Attributes);
#endif
check_box.RenderControl (writer);
}
protected virtual IDataSource GetDataSource ()
{
if (IsBoundUsingDataSourceID) {
- Control namingContainer;
- Control ctrl = null;
- namingContainer = NamingContainer;
-
- while (namingContainer != null) {
- ctrl = namingContainer.FindControl (DataSourceID);
- if (ctrl != null)
- break;
- namingContainer = namingContainer.NamingContainer;
- }
+ Control ctrl = FindDataSource ();
if (ctrl == null)
throw new HttpException (string.Format ("A control with ID '{0}' could not be found.", DataSourceID));
}
}
- private void CreateRenderColumns (PagedDataSource paged, bool useDataSource)
- {
- if (useDataSource) {
- ArrayList columns_list = CreateColumnSet (paged, useDataSource);
- render_columns = new DataGridColumn [columns_list.Count];
-
- for (int c = 0; c < render_columns.Length; c++) {
- DataGridColumn col = (DataGridColumn) columns_list [c];
- col.Set_Owner (this);
- col.Initialize ();
- render_columns [c] = col;
- }
- } else {
- render_columns = new DataGridColumn [Columns.Count];
- Columns.CopyTo (render_columns, 0);
- }
- }
-
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[WebSysDescription ("")]
if ((pds.IsPagingEnabled) && (pds.PageCount < pds.CurrentPageIndex))
throw new HttpException ("Invalid DataGrid PageIndex");
- CreateRenderColumns (paged_data_source, useDataSource);
+ ArrayList cList = CreateColumnSet (paged_data_source, useDataSource);
+ if (cList.Count == 0)
+ return;
+
+ render_columns = new DataGridColumn [cList.Count];
+ for (int c = 0; c < cList.Count; c++) {
+ DataGridColumn col = (DataGridColumn) cList [c];
+ col.Set_Owner (this);
+ col.Initialize ();
+ render_columns [c] = col;
+ }
+
if (useDataSource) {
if (DataSource != null)
Controls.Add (RenderTable);
updateCommand (this, e);
}
- void ApplyControlStyle (Control ctrl, Style style, bool apply_to_rows)
- {
- if (style == null || false == ctrl.HasControls ())
- return;
-
- foreach (Control c in ctrl.Controls) {
- if (c is Table) {
- Table tbl = (Table) c;
- if (apply_to_rows) {
- foreach (TableRow row in tbl.Rows)
- row.MergeStyle (style);
- } else {
- tbl.MergeStyle (style);
- }
- }
- }
- }
-
protected override void PrepareControlHierarchy ()
{
if (!HasControls () || Controls.Count == 0)
return; // No one called CreateControlHierarchy() with DataSource != null
Style alt = null;
- bool apply_to_rows = ExtractTemplateRows;
foreach (DataListItem item in Controls) {
switch (item.ItemType) {
case ListItemType.Item:
item.MergeStyle (itemStyle);
- ApplyControlStyle (item, itemStyle, apply_to_rows);
break;
case ListItemType.AlternatingItem:
if (alt == null) {
}
item.MergeStyle (alt);
- ApplyControlStyle (item, alt, apply_to_rows);
break;
case ListItemType.EditItem:
if (editItemStyle != null) {
item.MergeStyle (editItemStyle);
- ApplyControlStyle (item, editItemStyle, apply_to_rows);
} else {
item.MergeStyle (itemStyle);
- ApplyControlStyle (item, itemStyle, apply_to_rows);
}
break;
case ListItemType.Footer:
}
if (footerStyle != null) {
item.MergeStyle (footerStyle);
- ApplyControlStyle (item, footerStyle, apply_to_rows);
}
break;
case ListItemType.Header:
}
if (headerStyle != null) {
item.MergeStyle (headerStyle);
- ApplyControlStyle (item, headerStyle, apply_to_rows);
}
break;
case ListItemType.SelectedItem:
if (selectedItemStyle != null) {
item.MergeStyle (selectedItemStyle);
- ApplyControlStyle (item, selectedItemStyle, apply_to_rows);
} else {
item.MergeStyle (itemStyle);
- ApplyControlStyle (item, itemStyle, apply_to_rows);
}
break;
case ListItemType.Separator:
if (separatorStyle != null) {
item.MergeStyle(separatorStyle);
- ApplyControlStyle (item, separatorStyle, apply_to_rows);
}
else {
item.MergeStyle (itemStyle);
- ApplyControlStyle (item, itemStyle, apply_to_rows);
}
break;
}
if (t != null) {
table = true;
foreach (TableRow tr in t.Rows) {
- if (ControlStyleCreated) {
- ControlStyle.AddAttributesToRender (writer);
+ if (ControlStyleCreated && !ControlStyle.IsEmpty) {
+ tr.ControlStyle.MergeWith (ControlStyle);
}
tr.RenderControl (writer);
}
return;
if (!String.IsNullOrEmpty (UniqueID))
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID, true);
+
+ if (!Enabled && SelectedIndex == -1)
+ SelectedIndex = 1;
#else
writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID, true);
#endif
return base.CreateControlCollection();
}
-#if !NET_2_0
+#if ONLY_1_1
protected override void RenderContents(HtmlTextWriter writer) {
int count;
ListItem item;
protected virtual IHierarchicalDataSource GetDataSource ()
{
- if (DataSourceID != "")
- return NamingContainer.FindControl (DataSourceID) as IHierarchicalDataSource;
+ if (IsBoundUsingDataSourceID) {
+
+ Control ctrl = FindDataSource ();
+
+ if (ctrl == null)
+ throw new HttpException (string.Format ("A control with ID '{0}' could not be found.", DataSourceID));
+ if (!(ctrl is IHierarchicalDataSource))
+ throw new HttpException (string.Format ("The control with ID '{0}' is not a control of type IHierarchicalDataSource.", DataSourceID));
+ return (IHierarchicalDataSource) ctrl;
+ }
return DataSource as IHierarchicalDataSource;
}
}
#endif
-#if !NET_2_0
+#if ONLY_1_1
protected override void RenderContents (HtmlTextWriter writer)
{
foreach (ListItem item in Items) {
}
writer.WriteAttribute ("value", item.Value, true);
+ if (item.HasAttributes)
+ item.Attributes.Render (writer);
+
writer.Write (">");
string encoded = HttpUtility.HtmlEncode (item.Text);
writer.Write (encoded);
+
get { return enabled; }
set { enabled = value; }
}
+
+ internal bool HasAttributes {
+ get { return attrs != null && attrs.Count > 0; }
+ }
#endif
string text;
{
// check for submit button
CommandEventArgs cea = (e as CommandEventArgs);
- if ((cea != null) && (cea.CommandName == LoginButtonCommandName)) {
+ if ((cea != null) &&
+ String.Equals (cea.CommandName, LoginButtonCommandName, StringComparison.InvariantCultureIgnoreCase)) {
if (!AuthenticateUser ()) {
ITextControl failureText = LoginTemplateContainer.FailureTextLiteral;
if (failureText != null)
child.SetParent (parent);
if (marked) {
((IStateManager)child).TrackViewState ();
- child.SetDirty ();
- dirty = true;
+ SetDirty ();
}
}
((MenuItem)items[n]).Index = n;
if (marked) {
((IStateManager)child).TrackViewState ();
- child.SetDirty ();
- dirty = true;
+ SetDirty ();
}
}
}
}
items.Clear ();
- dirty = true;
+ if (marked) {
+ SetDirty ();
+ }
}
public bool Contains (MenuItem child)
items.RemoveAt (i);
if (menu != null)
item.Menu = null;
- dirty = true;
+ if (marked) {
+ SetDirty ();
+ }
}
public void RemoveAt (int index)
items.RemoveAt (index);
if (menu != null)
item.Menu = null;
- dirty = true;
+ if (marked) {
+ SetDirty ();
+ }
}
public int Count {
((IStateManager) item).LoadViewState (ns);
}
}
+ else {
+ for (int n = 1; n < its.Length; n++) {
+ Pair pair = (Pair) its [n];
+ int oi = (int) pair.First;
+ MenuItem node = (MenuItem) items [oi];
+ ((IStateManager) node).LoadViewState (pair.Second);
+ }
+ }
}
object IStateManager.SaveViewState ()
bool hasData = false;
if (dirty) {
- state = new object [items.Count + 1];
- state [0] = true;
- for (int n=0; n<items.Count; n++) {
- MenuItem item = items[n] as MenuItem;
- object ns = ((IStateManager)item).SaveViewState ();
- if (ns != null) {
- hasData = true;
+ if (items.Count > 0) {
+ hasData = true;
+ state = new object [items.Count + 1];
+ state [0] = true;
+ for (int n = 0; n < items.Count; n++) {
+ MenuItem item = items [n] as MenuItem;
+ object ns = ((IStateManager) item).SaveViewState ();
state [n + 1] = ns;
}
}
if (type != null)
return type;
-#if !TARGET_JVM
IList tla;
if ((tla = BuildManager.TopLevelAssemblies) != null) {
foreach (Assembly asm in tla) {
return type;
}
}
-#endif
+
if (!Directory.Exists (PrivateBinPath))
return null;
{
return null;
}
-
- internal object GetValue (HttpContext context, Control control)
+
+ internal void UpdateValue (HttpContext context, Control control)
{
object oldValue = ViewState ["ParameterValue"];
-
- object newValue = ConvertValue (Evaluate (context, control));
- if (newValue == null)
- newValue = ConvertValue (DefaultValue);
+
+ object newValue = Evaluate (context, control);
if (!object.Equals (oldValue, newValue)) {
ViewState ["ParameterValue"] = newValue;
OnParameterChanged ();
}
- return newValue;
+ }
+
+ internal object GetValue (HttpContext context, Control control)
+ {
+ UpdateValue (context, control);
+
+ object value = ConvertValue (ViewState ["ParameterValue"]);
+ if (value == null)
+ value = ConvertValue (DefaultValue);
+
+ return value;
}
internal object ConvertValue (object val)
public void UpdateValues (HttpContext context, Control control)
{
- foreach (Parameter param in this)
- param.GetValue (context, control);
+ foreach (Parameter param in this)\r
+ param.UpdateValue (context, control);
}
public void Insert (int idx, Parameter param)
#endif
void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
{
+ ListItem item = Items [repeatIndex];
+
RadioButton radio = new RadioButton ();
- radio.Text = Items [repeatIndex].Text;
+ radio.Text = item.Text;
radio.ID = ClientID + "_" + repeatIndex;
radio.TextAlign = TextAlign;
radio.GroupName = UniqueID;
radio.Page = Page;
- radio.Checked = Items [repeatIndex].Selected;
- radio.ValueAttribute = Items [repeatIndex].Value;
+ radio.Checked = item.Selected;
+ radio.ValueAttribute = item.Value;
radio.AutoPostBack = AutoPostBack;
radio.Enabled = Enabled;
radio.TabIndex = tabIndex;
#if NET_2_0
radio.ValidationGroup = ValidationGroup;
radio.CausesValidation = CausesValidation;
+ if (radio.HasAttributes)
+ radio.Attributes.Clear ();
+ if (item.HasAttributes)
+ radio.Attributes.CopyFrom (item.Attributes);
#endif
radio.RenderControl (writer);
}
+
protected internal override void OnInit (EventArgs e)
{
base.OnInit (e);
- Page.PreLoad += new EventHandler (OnPagePreLoad);
+ if (Page != null) {
+ Page.PreLoad += new EventHandler (OnPagePreLoad);
- if (!IsViewStateEnabled && Page != null && Page.IsPostBack)
- RequiresDataBinding = true;
+ if (!IsViewStateEnabled && Page.IsPostBack)
+ RequiresDataBinding = true;
+ }
}
protected virtual void OnPagePreLoad (object sender, EventArgs e)
{
- ConfirmInitState ();
- }
-
- void ConfirmInitState ()
- {
- initialized = true;
+ Initialize ();
}
protected internal override void OnLoad (EventArgs e)
{
- Initialize ();
-
- ConfirmInitState ();
+ if (!Initialized)
+ Initialize ();
base.OnLoad (e);
-
- if (IsBoundUsingDataSourceID)
- ConnectToDataSource ();
}
private void Initialize ()
{
- if ((Page != null) && !Page.IsPostBack)
- RequiresDataBinding = true;
+ if (Page != null) {
+ if (!Page.IsPostBack || (IsViewStateEnabled && (ViewState ["Items"] == null)))
+ RequiresDataBinding = true;
+ }
+
+ if (IsBoundUsingDataSourceID)
+ ConnectToDataSource ();
+
+ initialized = true;
}
protected internal override void OnPreRender (EventArgs e)
{
if (CssClass.Length > 0)
writer.AddAttribute (HtmlTextWriterAttribute.Class, CssClass);
+#if NET_2_0
+ CssStyleCollection col = new CssStyleCollection ();
+ FillStyleAttributes (col, owner);
+ foreach (string key in col.Keys) {
+ writer.AddStyleAttribute (key, col [key]);
+ }
+#else
WriteStyleAttributes (writer);
+#endif
}
}
+#if ONLY_1_1
void WriteStyleAttributes (HtmlTextWriter writer)
{
-#if NET_2_0
- CssStyleCollection col = new CssStyleCollection (new StateBag ());
- FillStyleAttributes (col, null);
- foreach (string key in col.Keys) {
- writer.AddStyleAttribute (key, col [key]);
- }
-#else
string s;
Color color;
BorderStyle bs;
if (s != "")
writer.AddStyleAttribute (HtmlTextWriterStyle.TextDecoration, s);
}
-#endif
}
+#endif
#if NET_2_0
- void FillStyleAttributes (CssStyleCollection attributes)
+ protected virtual void FillStyleAttributes (CssStyleCollection attributes, IUrlResolutionService urlResolver)
{
Color color;
BorderStyle bs;
#endregion // IStateManager Properties & Methods
#if NET_2_0
- protected virtual void FillStyleAttributes (CssStyleCollection attributes, IUrlResolutionService urlResolver)
- {
- FillStyleAttributes (attributes);
- }
-
internal void SetRegisteredCssClass (string name)
{
registered_class = name;
public CssStyleCollection GetStyleAttributes (IUrlResolutionService resolver)
{
- CssStyleCollection col = new CssStyleCollection (new StateBag ());
+ CssStyleCollection col = new CssStyleCollection ();
FillStyleAttributes (col, resolver);
return col;
}
case ListItemType.AlternatingItem:
case ListItemType.SelectedItem:
t = ItemTemplate;
+ if (t == null)
+ cell.Text = " ";
break;
case ListItemType.EditItem:
t = EditItemTemplate;
if (t == null)
t = ItemTemplate;
+ if (t == null)
+ cell.Text = " ";
break;
}
child.Tree = tree;
if (marked) {
((IStateManager)child).TrackViewState ();
- child.SetDirty ();
- dirty = true;
+ SetDirty ();
}
}
((TreeNode)items[n]).Index = n;
if (marked) {
((IStateManager)child).TrackViewState ();
- child.SetDirty ();
- dirty = true;
+ SetDirty ();
}
}
if (tree != null)
node.Tree = null;
if (marked) {
- dirty = true;
+ SetDirty ();
}
}
if (tree != null)
node.Tree = null;
if (marked) {
- dirty = true;
+ SetDirty ();
}
}
dirty = (bool)its [0];
- if (dirty)
+ if (dirty) {
items.Clear ();
- for (int n=1; n<its.Length; n++) {
- Pair pair = (Pair) its [n];
- int oi = (int) pair.First;
- TreeNode node;
- if (oi != -1)
- node = (TreeNode) items [oi];
- else
- node = new TreeNode ();
- if (dirty) Add (node);
- ((IStateManager)node).LoadViewState (pair.Second);
+ for (int n = 1; n < its.Length; n++) {
+ TreeNode item = new TreeNode ();
+ Add (item);
+ object ns = its [n];
+ if (ns != null)
+ ((IStateManager) item).LoadViewState (ns);
+ }
}
+ else {
+ for (int n = 1; n < its.Length; n++) {
+ Pair pair = (Pair) its [n];
+ int oi = (int) pair.First;
+ TreeNode node = (TreeNode) items [oi];
+ ((IStateManager) node).LoadViewState (pair.Second);
+ }
+ }
+
}
object IStateManager.SaveViewState ()
bool hasData = false;
if (dirty) {
- state = new object [items.Count + 1];
- state [0] = true;
- for (int n=0; n<items.Count; n++) {
- TreeNode node = items[n] as TreeNode;
- object ns = ((IStateManager)node).SaveViewState ();
- if (ns != null) hasData = true;
- state [n + 1] = new Pair (-1, ns);
+ if (items.Count > 0) {
+ hasData = true;
+ state = new object [items.Count + 1];
+ state [0] = true;
+ for (int n = 0; n < items.Count; n++) {
+ TreeNode node = items [n] as TreeNode;
+ object ns = ((IStateManager) node).SaveViewState ();
+ state [n + 1] = ns;
+ }
}
} else {
ArrayList list = new ArrayList ();
return;
}
+ // KLUDGE: the parser below should be rewritten
+ if (value [0] == sep)
+ value = "0" + value;
+
int count = value.Length;
int i = 0;
int sign = 1;
{
private StateBag bag;
private CssStyleCollection styleCollection;
+ internal const string StyleAttribute = "style";
public AttributeCollection (StateBag bag)
{
public void Add (string key, string value)
{
- if (0 == String.Compare (key, "style", true, CultureInfo.InvariantCulture)) {
+ if (0 == String.Compare (key, StyleAttribute, true, CultureInfo.InvariantCulture)) {
CssStyle.Value = value;
return;
}
public void Remove (string key)
{
- if (0 == String.Compare (key, "style", true, CultureInfo.InvariantCulture)) {
+ if (0 == String.Compare (key, StyleAttribute, true, CultureInfo.InvariantCulture)) {
CssStyle.Clear ();
return;
}
writer.WriteAttribute (key, value, true);
}
}
+
+#if NET_2_0
+ internal void CopyFrom (AttributeCollection attributeCollection)
+ {
+ if (attributeCollection == null || attributeCollection.Count == 0)
+ return;
+
+ foreach (string key in attributeCollection.bag.Keys)
+ this.Add (key, attributeCollection [key]);
+ }
+#endif
}
}
+2007-03-13 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateParser.cs: name generated classes the same way MS.NET
+ does - include the app-relative path to the control/page in the
+ class name.
+
+2007-03-13 Adar Wesley <adarw@mainsoft.com>
+
+ * Page.cs: improved Async Page implementation.
+
+2007-03-13 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControl.cs: implement AppRelativeVirtualPath. Closes bug
+ #80634.
+
+2007-03-12 Marek Habersack <mhabersack@novell.com>
+
+ * RootBuilder.cs: change the error text to be less misleading.
+
+2007-03-12 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * AttributeCollection.cs:
+ * CssStyleCollection.cs: fixed: works w/o state bag.
+
+2007-03-12 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * HtmlTextWriter.cs: fixed:
+ - Fixed writing background-image style attribute (different behavior in
+ 1.1 and 2.0).
+ - Does not encode 'name' attribute.
+ - Always encode style attributes (for 2.0 only).
+
+2007-03-06 Adar Wesley <adarw@mainsoft.com>
+
+ * Page.cs: initial implementation of support for Async=true. Added
+ initial support for ViewStateEncryption. Implemented
+ CreateHtmlTextWriterFromType.
+
+ * PageAsyncTask.cs: Created class to support Async pages.
+
+ * ObjectStateFormatter.cs: Added support for ViewState encryption.
+
+ * HtmlTextWriter.cs: Fixed constructor to accept null TextWriter
+ to conform to MS behavior.
+
+2007-03-05 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * Control.jvm.cs: fixed TemplateSourceDirectory property
+
+2007-03-03 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateParser.cs: support but ignore the Async and AsyncTimeOut
+ page directive attributes.
+ Support the LinePragmas page directive attribute.
+
+ * PageParser.cs: added support for the
+ MaintainScrollPositionOnPostBack page directive attribute.
+
2007-02-26 Igor Zelmanovich <igorz@mainsoft.com>
* TemplateControl.cs:
{\r
int location = 0;\r
if (_templateSourceDir == null) {\r
- string tempSrcDir = _appRelativeTemplateSourceDirectory;\r
+ string tempSrcDir = AppRelativeTemplateSourceDirectory;\r
if (tempSrcDir == null && Parent != null)\r
tempSrcDir = Parent.TemplateSourceDirectory;\r
if (tempSrcDir != null && tempSrcDir.Length > 1) {\r
{
StateBag bag;
HybridDictionary style;
+ string _value;
+
+ string ValueInternal {
+ get { return _value; }
+ set {
+ _value = value;
+ if (bag != null) {
+ if (_value == null) {
+ bag.Remove (AttributeCollection.StyleAttribute);
+ }
+ else {
+ bag [AttributeCollection.StyleAttribute] = _value;
+ }
+ }
+ }
+ }
+
+ internal CssStyleCollection ()
+ {
+#if NET_2_0
+ style = new HybridDictionary (true);
+#else
+ style = new HybridDictionary (false);
+#endif
+ }
internal CssStyleCollection (StateBag bag)
+ : this ()
{
this.bag = bag;
if (bag != null)
- InitFromStyle ();
+ _value = (string) bag [AttributeCollection.StyleAttribute];
+ InitFromStyle ();
}
void InitFromStyle ()
{
-#if NET_2_0
- style = new HybridDictionary (true);
-#else
- style = new HybridDictionary (false);
-#endif
- string att = (string) bag ["style"];
- if (att != null) {
- FillStyle (att);
+ style.Clear ();
+ if (_value != null) {
+ FillStyle (_value);
}
}
public void Add (string key, string value)
{
style [key] = value;
- bag ["style"] = BagToString ();
+ ValueInternal = BagToString ();
}
#if NET_2_0
public void Clear ()
{
style.Clear ();
- bag.Remove ("style");
+ ValueInternal = null;
}
public void Remove (string key)
if (style [key] == null)
return;
style.Remove (key);
- bag ["style"] = BagToString ();
+ if (style.Count == 0)
+ ValueInternal = null;
+ else
+ ValueInternal = BagToString ();
}
#if NET_2_0
public string this [HtmlTextWriterStyle key] {
internal
#endif
string Value {
- get { return BagToString (); }
+ get { return ValueInternal; }
set {
- bag ["style"] = value;
+ ValueInternal = value;
InitFromStyle ();
}
}
public HtmlTextWriter (TextWriter writer, string tabString)
{
- if (writer == null)
- throw new ArgumentNullException ();
-
b = writer;
tab_string = tabString;
}
public virtual void AddAttribute (HtmlTextWriterAttribute key, string value)
{
- AddAttribute (key, value, true);
+ bool fEncode = key != HtmlTextWriterAttribute.Name;
+ AddAttribute (key, value, fEncode);
}
public virtual void AddAttribute (string name, string value)
{
- AddAttribute (name, value, true);
+ bool fEncode = String.Compare ("name", name, true, CultureInfo.InvariantCulture) != 0;
+ AddAttribute (name, value, fEncode);
}
protected virtual void AddAttribute (string name, string value, HtmlTextWriterAttribute key)
{
NextStyleStack ();
styles [styles_pos].name = name;
+#if NET_2_0
+ value = HttpUtility.HtmlAttributeEncode (value);
+#endif
styles [styles_pos].value = value;
styles [styles_pos].key = key;
}
for (int i = 0; i <= styles_pos; i ++) {
AddedStyle a = styles [i];
- if (OnStyleAttributeRender (a.name, a.value, a.key))
+ if (OnStyleAttributeRender (a.name, a.value, a.key)) {
+#if NET_2_0
+ if (a.key == HtmlTextWriterStyle.BackgroundImage) {
+ a.value = String.Concat ("url(", HttpUtility.UrlPathEncode (a.value), ")");
+ }
+#endif
WriteStyleAttribute (a.name, a.value, false);
+ }
}
Write (style_attr.value);
public virtual void WriteStyleAttribute (string name, string value)
{
- WriteStyleAttribute (name, value, true);
+ WriteStyleAttribute (name, value, false);
}
public virtual void WriteStyleAttribute (string name, string value, bool fEncode)
{
-#if NET_2_0
- if (name == "background-image") {
- value = String.Concat ("url(", value, ")");
- }
-#endif
Write (name);
Write (StyleEqualsChar);
Write (EncodeAttributeValue (value, fEncode));
public virtual void WriteAttribute (string name, string value)
{
- WriteAttribute (name, value, true);
+ WriteAttribute (name, value, false);
}
public override void WriteLine (char value)
throw new ArgumentNullException ("inputString");
if (page != null && EnableMac)
length = ValidateInput (GetAlgo (), buffer, 0, length);
- return Deserialize (new MemoryStream (buffer, 0, length, false, false));
+#if NET_2_0
+ bool isEncrypted = ((int)buffer [--length] == 1)? true : false;
+#endif
+ Stream ms = new MemoryStream (buffer, 0, length, false, false);
+#if NET_2_0
+ if (isEncrypted) {
+ ms = new CryptoStream (ms, page.GetCryptoTransform (CryptoStreamMode.Read), CryptoStreamMode.Read);
+ }
+#endif
+ return Deserialize (ms);
}
public string Serialize (object stateGraph)
return "";
MemoryStream ms = new MemoryStream ();
- Serialize (ms, stateGraph);
+ Stream output = ms;
+#if NET_2_0
+ bool needEncryption = page.NeedViewStateEncryption;
+ if (needEncryption){
+ output = new CryptoStream (output, page.GetCryptoTransform (CryptoStreamMode.Write), CryptoStreamMode.Write);
+ }
+#endif
+ Serialize (output, stateGraph);
+#if NET_2_0
+ ms.WriteByte((byte)(needEncryption? 1 : 0));
+#endif
#if TRACE
ms.WriteTo (File.OpenWrite (Path.GetTempFileName ()));
using System.Web.UI.WebControls;
#if NET_2_0
using System.Web.UI.Adapters;
+using System.Collections.Generic;
+using System.Reflection;
#endif
namespace System.Web.UI
#endif
public partial class Page : TemplateControl, IHttpHandler
{
+ static string machineKeyConfigPath = "system.web/machineKey";
#if NET_2_0
private PageLifeCycle _lifeCycle = PageLifeCycle.Unknown;
private bool _eventValidation = true;
internal const string CallbackArgumentID = "__CALLBACKARGUMENT";
internal const string CallbackSourceID = "__CALLBACKTARGET";
internal const string PreviousPageID = "__PREVIOUSPAGE";
-
+
HtmlHead htmlHeader;
MasterPage masterPage;
Hashtable items;
bool _maintainScrollPositionOnPostBack;
+
+ private bool asyncMode = false;
+ private TimeSpan asyncTimeout;
+ private const double DefaultAsyncTimeout = 45.0;
+ private List<PageAsyncTask> parallelTasks;
+ private List<PageAsyncTask> serialTasks;
+
+ private ViewStateEncryptionMode viewStateEncryptionMode;
+ private bool controlRegisteredForViewStateEncryption = false;
#endif
#region Constructor
scriptManager = new ClientScriptManager (this);
Page = this;
ID = "__Page";
+#if NET_2_0
+ asyncTimeout = TimeSpan.FromSeconds (DefaultAsyncTimeout);
+ viewStateEncryptionMode = ViewStateEncryptionMode.Auto;
+#endif
}
#endregion
}
#if NET_2_0
+ delegate void ProcessRequestDelegate (HttpContext context);
+
+ private sealed class DummyAsyncResult : IAsyncResult
+ {
+ readonly object state;
+ readonly WaitHandle asyncWaitHandle;
+ readonly bool completedSynchronously;
+ readonly bool isCompleted;
+
+ public DummyAsyncResult (bool isCompleted, bool completedSynchronously, object state)
+ {
+ this.isCompleted = isCompleted;
+ this.completedSynchronously = completedSynchronously;
+ this.state = state;
+ if (isCompleted) {
+ asyncWaitHandle = new ManualResetEvent (true);
+ }
+ else {
+ asyncWaitHandle = new ManualResetEvent (false);
+ }
+ }
+
+ #region IAsyncResult Members
+
+ public object AsyncState {
+ get { return state; }
+ }
+
+ public WaitHandle AsyncWaitHandle {
+ get { return asyncWaitHandle; }
+ }
+
+ public bool CompletedSynchronously {
+ get { return completedSynchronously; }
+ }
+
+ public bool IsCompleted {
+ get { return isCompleted; }
+ }
+
+ #endregion
+ }
+
+ protected IAsyncResult AsyncPageBeginProcessRequest (HttpContext context, AsyncCallback callback, object extraData)
+ {
+ ProcessRequest (context);
+ DummyAsyncResult asyncResult = new DummyAsyncResult (true, true, extraData);
+
+ if (callback != null) {
+ callback (asyncResult);
+ }
+
+ return asyncResult;
+ }
+
+ protected void AsyncPageEndProcessRequest (IAsyncResult result)
+ {
+ }
+
internal void ProcessCrossPagePostBack (HttpContext context)
{
isCrossPagePostBack = true;
Trace.Write ("aspx.page", "End PreRender");
#if NET_2_0
+ ExecuteRegisteredAsyncTasks ();
+
_lifeCycle = PageLifeCycle.PreRenderComplete;
OnPreRenderComplete (EventArgs.Empty);
#endif
}
}
- [MonoTODO("Not Implemented")]
protected bool AsyncMode {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return asyncMode; }
+ set { asyncMode = value; }
}
- [MonoTODO ("Not Implemented")]
public TimeSpan AsyncTimeout {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
+ get { return asyncTimeout; }
+ set { asyncTimeout = value; }
}
- [MonoTODO ("Not Implemented")]
public bool IsAsync {
- get {
- throw new NotImplementedException ();
- }
+ get { return AsyncMode; }
}
[MonoTODO ("Not Implemented")]
}
}
- [MonoTODO ("Not Implemented")]
- public ViewStateEncryptionMode ViewStateEncryptionMode {
- get {
- throw new NotImplementedException ();
+ public void AddOnPreRenderCompleteAsync (BeginEventHandler beginHandler, EndEventHandler endHandler)
+ {
+ AddOnPreRenderCompleteAsync (beginHandler, endHandler, null);
+ }
+
+ public void AddOnPreRenderCompleteAsync (BeginEventHandler beginHandler, EndEventHandler endHandler, Object state)
+ {
+ if (!IsAsync) {
+ throw new InvalidOperationException ("AddOnPreRenderCompleteAsync called and Page.IsAsync == false");
}
- set {
- throw new NotImplementedException ();
+
+ if (_lifeCycle >= PageLifeCycle.PreRender) {
+ throw new InvalidOperationException ("AddOnPreRenderCompleteAsync can only be called before PreRender.");
}
+
+ if (beginHandler == null) {
+ throw new ArgumentNullException ("beginHandler");
+ }
+
+ if (endHandler == null) {
+ throw new ArgumentNullException ("endHandler");
+ }
+
+ RegisterAsyncTask (new PageAsyncTask (beginHandler, endHandler, null, state, false));
}
- [MonoTODO ("Not Implemented")]
- public void AddOnPreRenderCompleteAsync (BeginEventHandler beginHandler, EndEventHandler endHandler)
- {
- throw new NotImplementedException ();
+ private List<PageAsyncTask> ParallelTasks {
+ get
+ {
+ if (parallelTasks == null) {
+ parallelTasks = new List<PageAsyncTask>();
+ }
+ return parallelTasks;
+ }
}
- [MonoTODO ("Not Implemented")]
- public void AddOnPreRenderCompleteAsync (BeginEventHandler beginHandler, EndEventHandler endHandler, Object state)
+ private List<PageAsyncTask> SerialTasks {
+ get {
+ if (serialTasks == null) {
+ serialTasks = new List<PageAsyncTask> ();
+ }
+ return serialTasks;
+ }
+ }
+
+ public void RegisterAsyncTask (PageAsyncTask task)
{
- throw new NotImplementedException ();
+ if (task == null) {
+ throw new ArgumentNullException ("task");
+ }
+
+ if (task.ExecuteInParallel) {
+ ParallelTasks.Add (task);
+ }
+ else {
+ SerialTasks.Add (task);
+ }
}
- [MonoTODO ("Not Implemented")]
public void ExecuteRegisteredAsyncTasks ()
{
- throw new NotImplementedException ();
+ if ((parallelTasks == null || parallelTasks.Count == 0) &&
+ (serialTasks == null || serialTasks.Count == 0)){
+ return;
+ }
+
+ if (parallelTasks != null) {
+ DateTime startExecution = DateTime.Now;
+ List<PageAsyncTask> localParallelTasks = parallelTasks;
+ parallelTasks = null; // Shouldn't execute tasks twice
+ List<IAsyncResult> asyncResults = new List<IAsyncResult>();
+ foreach (PageAsyncTask parallelTask in localParallelTasks) {
+ IAsyncResult result = parallelTask.BeginHandler (this, EventArgs.Empty, new AsyncCallback (EndAsyncTaskCallback), parallelTask.State);
+ if (result.CompletedSynchronously) {
+ parallelTask.EndHandler (result);
+ }
+ else {
+ asyncResults.Add (result);
+ }
+ }
+
+ if (asyncResults.Count > 0) {
+ WaitHandle [] waitArray = new WaitHandle [asyncResults.Count];
+ int i = 0;
+ for (i = 0; i < asyncResults.Count; i++) {
+ waitArray [i] = asyncResults [i].AsyncWaitHandle;
+ }
+ bool allSignalled = WaitHandle.WaitAll (waitArray, AsyncTimeout, false);
+ if (!allSignalled) {
+ for (i = 0; i < asyncResults.Count; i++) {
+ if (!asyncResults [i].IsCompleted) {
+ localParallelTasks [i].TimeoutHandler (asyncResults [i]);
+ }
+ }
+ }
+ }
+ DateTime endWait = DateTime.Now;
+ TimeSpan elapsed = endWait - startExecution;
+ if (elapsed <= AsyncTimeout) {
+ AsyncTimeout -= elapsed;
+ }
+ else {
+ AsyncTimeout = TimeSpan.FromTicks(0);
+ }
+ }
+
+ if (serialTasks != null) {
+ List<PageAsyncTask> localSerialTasks = serialTasks;
+ serialTasks = null; // Shouldn't execute tasks twice
+ foreach (PageAsyncTask serialTask in localSerialTasks) {
+ DateTime startExecution = DateTime.Now;
+
+ IAsyncResult result = serialTask.BeginHandler (this, EventArgs.Empty, new AsyncCallback (EndAsyncTaskCallback), serialTask);
+ if (result.CompletedSynchronously) {
+ serialTask.EndHandler (result);
+ }
+ else {
+ bool done = result.AsyncWaitHandle.WaitOne (AsyncTimeout, false);
+ if (!done && !result.IsCompleted) {
+ serialTask.TimeoutHandler (result);
+ }
+ }
+ DateTime endWait = DateTime.Now;
+ TimeSpan elapsed = endWait - startExecution;
+ if (elapsed <= AsyncTimeout) {
+ AsyncTimeout -= elapsed;
+ }
+ else {
+ AsyncTimeout = TimeSpan.FromTicks (0);
+ }
+ }
+ }
+ AsyncTimeout = TimeSpan.FromSeconds (DefaultAsyncTimeout);
+ }
+
+ void EndAsyncTaskCallback (IAsyncResult result)
+ {
+ PageAsyncTask task = (PageAsyncTask)result.AsyncState;
+ task.EndHandler (result);
}
- [MonoTODO ("Not Implemented")]
public static HtmlTextWriter CreateHtmlTextWriterFromType (TextWriter tw, Type writerType)
{
- throw new NotImplementedException ();
+ Type htmlTextWriterType = typeof (HtmlTextWriter);
+
+ if (!htmlTextWriterType.IsAssignableFrom (writerType)) {
+ throw new HttpException (String.Format ("Type '{0}' cannot be assigned to HtmlTextWriter", writerType.FullName));
+ }
+
+ ConstructorInfo constructor = writerType.GetConstructor (new Type [] { typeof (TextWriter) });
+ if (constructor == null) {
+ throw new HttpException (String.Format ("Type '{0}' does not have a consturctor that takes a TextWriter as parameter", writerType.FullName));
+ }
+
+ return (HtmlTextWriter) Activator.CreateInstance(writerType, tw);
+ }
+
+ public ViewStateEncryptionMode ViewStateEncryptionMode {
+ get { return viewStateEncryptionMode; }
+ set { viewStateEncryptionMode = value; }
}
- [MonoTODO ("Not Implemented")]
public void RegisterRequiresViewStateEncryption ()
{
- throw new NotImplementedException ();
+ controlRegisteredForViewStateEncryption = true;
+ }
+
+ private static byte [] AES_IV = null;
+ private static byte [] TripleDES_IV = null;
+ private static object locker = new object ();
+ private static bool isEncryptionInitialized = false;
+
+ private static void InitializeEncryption ()
+ {
+ if (isEncryptionInitialized) {
+ return;
+ }
+
+ lock (locker) {
+ if (isEncryptionInitialized) {
+ return;
+ }
+
+ string iv_string = "0BA48A9E-736D-40f8-954B-B2F62241F282";
+ AES_IV = new byte [16];
+ TripleDES_IV = new byte [8];
+
+ int i;
+ for (i = 0; i < AES_IV.Length; i++) {
+ AES_IV [i] = (byte) iv_string [i];
+ }
+
+ for (i = 0; i < TripleDES_IV.Length; i++) {
+ TripleDES_IV [i] = (byte) iv_string [i];
+ }
+
+ isEncryptionInitialized = true;
+ }
+ }
+
+ internal ICryptoTransform GetCryptoTransform (CryptoStreamMode cryptoStreamMode)
+ {
+ ICryptoTransform transform = null;
+ MachineKeySection config = (MachineKeySection) WebConfigurationManager.GetSection (machineKeyConfigPath);
+ byte [] vk = config.ValidationKeyBytes;
+
+ switch (config.Validation) {
+ case MachineKeyValidation.SHA1:
+ transform = SHA1.Create ();
+ break;
+
+ case MachineKeyValidation.MD5:
+ transform = MD5.Create ();
+ break;
+
+ case MachineKeyValidation.AES:
+ if (cryptoStreamMode == CryptoStreamMode.Read){
+ transform = Rijndael.Create().CreateDecryptor(vk, AES_IV);
+ } else {
+ transform = Rijndael.Create().CreateEncryptor(vk, AES_IV);
+ }
+ break;
+
+ case MachineKeyValidation.TripleDES:
+ if (cryptoStreamMode == CryptoStreamMode.Read){
+ transform = TripleDES.Create().CreateDecryptor(vk, TripleDES_IV);
+ } else {
+ transform = TripleDES.Create().CreateEncryptor(vk, TripleDES_IV);
+ }
+ break;
+ }
+
+ return transform;
+ }
+
+ internal bool NeedViewStateEncryption {
+ get {
+ return (ViewStateEncryptionMode == ViewStateEncryptionMode.Always ||
+ (ViewStateEncryptionMode == ViewStateEncryptionMode.Auto &&
+ controlRegisteredForViewStateEncryption));
+
+ }
}
void ApplyMasterPage ()
[MonoTODO ("Not implemented. Only used by .net aspx parser")]
protected object GetWrappedFileDependencies (string [] list)
{
- return null;
+ return list;
}
[MonoTODO ("Does nothing. Used by .net aspx parser")]
--- /dev/null
+//
+// System.Web.UI.PageAsyncTask.cs
+//
+// Authors:
+// Adar Wesley (adarw@mainsoft.com)
+//
+// (C) 2007 Mainsoft, Inc (http://www.mainsoft.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+
+namespace System.Web.UI
+{
+ public sealed class PageAsyncTask
+ {
+ public PageAsyncTask (BeginEventHandler beginHandler, EndEventHandler endHandler,
+ EndEventHandler timeoutHandler, Object state)
+ : this(beginHandler, endHandler, timeoutHandler, state, false)
+ {
+ }
+
+ public PageAsyncTask (BeginEventHandler beginHandler, EndEventHandler endHandler,
+ EndEventHandler timeoutHandler, Object state, bool executeInParallel)
+ {
+ this.beginHandler = beginHandler;
+ this.endHandler = endHandler;
+ this.timeoutHandler = timeoutHandler;
+ this.state = state;
+ this.executeInParallel = executeInParallel;
+ }
+
+ BeginEventHandler beginHandler;
+ public BeginEventHandler BeginHandler {
+ get { return beginHandler; }
+ }
+
+ EndEventHandler endHandler;
+ public EndEventHandler EndHandler {
+ get { return endHandler; }
+ }
+
+ EndEventHandler timeoutHandler;
+ public EndEventHandler TimeoutHandler {
+ get { return timeoutHandler; }
+ }
+
+ bool executeInParallel;
+ public bool ExecuteInParallel {
+ get { return executeInParallel; }
+ }
+
+ object state;
+ public object State {
+ get { return state; }
+ }
+ }
+}
+
+#endif
+
-//
+//
// System.Web.UI.PageParser
//
// Authors:
string theme;
string styleSheetTheme;
bool enable_event_validation;
+ bool maintainScrollPositionOnPostBack;
#endif
public PageParser ()
internal override void ProcessMainAttributes (Hashtable atts)
{
+ // note: the 'enableSessionState' configuration property is
+ // processed in a case-sensitive manner while the page-level
+ // attribute is processed case-insensitive
string enabless = GetString (atts, "EnableSessionState",
#if NET_2_0
PagesConfig.EnableSessionState.ToString()
} else if (String.Compare (enabless, "false", true) == 0) {
enableSessionState = false;
} else {
- ThrowParseException ("Invalid value for EnableSessionState: " + enabless);
+ ThrowParseException ("Invalid value for enableSessionState: " + enabless);
}
}
theme = GetString (atts, "Theme", null);
styleSheetTheme = GetString (atts, "StyleSheetTheme", null);
enable_event_validation = GetBool (atts, "EnableEventValidation", true);
+ maintainScrollPositionOnPostBack = GetBool (atts, "MaintainScrollPositionOnPostBack", true);
#endif
// Ignored by now
GetString (atts, "EnableViewStateMac", null);
internal bool EnableEventValidation {
get { return enable_event_validation; }
}
+
+ internal bool MaintainScrollPositionOnPostBack {
+ get { return maintainScrollPositionOnPostBack; }
+ }
#endif
}
}
if (t != null)
return t;
else if (prefix != "")
- throw new Exception ("TagPrefix " + prefix + " not registered");
+ throw new Exception ("Unknown server tag '" + tagName + "'");
return LookupHtmlControls (tagName, attribs);
}
BindingFlags.NonPublic |
BindingFlags.Instance;
+#if NET_2_0
+ string _appRelativeVirtualPath;
+#endif
+
#region Constructor
protected TemplateControl ()
{
}
#if NET_2_0
-
- [MonoTODO ("NotImplementedException")]
public string AppRelativeVirtualPath {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException (); }
+ get { return _appRelativeVirtualPath; }
+ set { _appRelativeVirtualPath = value; }
}
#endif
foreach (string methodName in methodNames) {
MethodInfo method = null;
Type type;
- for (type = GetType (); type.Assembly != _System_Web_Assembly; type = type.BaseType) {
+ for (type = GetType (); type != null && type.Assembly != _System_Web_Assembly; type = type.BaseType) {
method = type.GetMethod (methodName, bflags);
if (method != null)
break;
string language;
bool strictOn = false;
bool explicitOn = false;
+ bool linePragmasOn = false;
bool output_cache;
int oc_duration;
string oc_header, oc_custom, oc_param, oc_controls;
atts.Remove ("CodeBehind"); // ignored
#endif
atts.Remove ("AspCompat"); // ignored
-
+#if NET_2_0
+ // these two are ignored for the moment
+ atts.Remove ("Async");
+ atts.Remove ("AsyncTimeOut");
+#endif
+
debug = GetBool (atts, "Debug", true);
compilerOptions = GetString (atts, "CompilerOptions", "");
language = GetString (atts, "Language", CompilationConfig.DefaultLanguage);
strictOn = GetBool (atts, "Strict", CompilationConfig.Strict);
explicitOn = GetBool (atts, "Explicit", CompilationConfig.Explicit);
-
+ linePragmasOn = GetBool (atts, "LinePragmas", false);
+
string inherits = GetString (atts, "Inherits", null);
#if NET_2_0
// In ASP 2, the source file is actually integrated with
if (inherits != null)
SetBaseType (inherits);
-
+#endif
className = GetString (atts, "ClassName", null);
if (className != null && !CodeGenerator.IsValidLanguageIndependentIdentifier (className))
ThrowParseException (String.Format ("'{0}' is not valid for 'className'", className));
-#endif
+
if (atts.Count > 0)
ThrowParseException ("Unknown attribute: " + GetOneKey (atts));
if (className != null)
return className;
+#if NET_2_0
+ string physPath = HttpContext.Current.Request.PhysicalApplicationPath;
+
+ if (StrUtils.StartsWith (inputFile, physPath)) {
+ className = inputFile.Substring (physPath.Length).ToLower (CultureInfo.InvariantCulture);
+ className = className.Replace ('.', '_');
+ className = className.Replace ('/', '_').Replace ('\\', '_');
+ } else
+#endif
className = Path.GetFileName (inputFile).Replace ('.', '_');
className = className.Replace ('-', '_');
className = className.Replace (' ', '_');
+2007-03-05 Marek Habersack <mhabersack@novell.com>
+
+ * UrlUtils.cs: Make sure GetDirectory returns a directory with the
+ trailing slash.
+
2007-01-30 Adar Wesley <adarw@mainsoft.com>
* UrlUtils.cs: fixed GetFile to throw right exception
int last = url.LastIndexOf ('/');
if (last > 0) {
+ if (last + 1 == url.Length)
+ last++;
#if NET_2_0
return RemoveDoubleSlashes (url.Substring (0, last));
#else
System.Web.Management/SqlFeatures.cs
System.Web.Management/WebApplicationInformation.cs
System.Web.Management/WebBaseEvent.cs
+System.Web.Management/WebEventCodes.cs
System.Web.Management/WebEventFormatter.cs
System.Web/MimeTypes.cs
System.Web/NoParamsInvoker.cs
System.Web.UI/OutputCacheLocation.cs
System.Web.UI/OutputCacheParameters.cs
System.Web.UI/Page.cs
+System.Web.UI/PageAsyncTask.cs
System.Web.UI/PageHandlerFactory.cs
System.Web.UI/PageLifeCycle.cs
System.Web.UI/PageParser.cs
class CapabilitiesLoader : MarshalByRefObject
{
- static volatile bool loaded;
- static ICollection alldata;
+ const int userAgentsCacheSize = 3000;
static Hashtable defaultCaps;
static readonly object lockobj = new object ();
+
+#if TARGET_JVM
+ static bool loaded {
+ get {
+ return alldata != null;
+ }
+ set {
+ if (alldata == null)
+ alldata = new ArrayList ();
+ }
+ }
+
+ const string alldataKey = "System.Web.CapabilitiesLoader.alldata";
+ static ICollection alldata {
+ get {
+ return (ICollection) AppDomain.CurrentDomain.GetData (alldataKey);
+ }
+ set {
+ AppDomain.CurrentDomain.SetData (alldataKey, value);
+ }
+ }
+
+ const string userAgentsCacheKey = "System.Web.CapabilitiesLoader.userAgentsCache";
+ static Hashtable userAgentsCache {
+ get {
+ lock (typeof (CapabilitiesLoader)) {
+ Hashtable agentsCache = (Hashtable) AppDomain.CurrentDomain.GetData (userAgentsCacheKey);
+ if (agentsCache == null) {
+ agentsCache = Hashtable.Synchronized (new Hashtable (userAgentsCacheSize + 10));
+ AppDomain.CurrentDomain.SetData (userAgentsCacheKey, agentsCache);
+ }
+
+ return agentsCache;
+ }
+ }
+ }
+#else
+ static volatile bool loaded;
+ static ICollection alldata;
+ static Hashtable userAgentsCache = Hashtable.Synchronized(new Hashtable(userAgentsCacheSize+10));
+#endif
+
private CapabilitiesLoader () {}
static CapabilitiesLoader ()
if (alldata == null || userAgent == null || userAgent == "")
return defaultCaps;
- foreach (BrowserData bd in alldata) {
- if (bd.IsMatch (userAgent)) {
- Hashtable tbl;
+ Hashtable userBrowserCaps = (Hashtable) userAgentsCache [userAgent];
+ if (userBrowserCaps == null) {
+ foreach (BrowserData bd in alldata) {
+ if (bd.IsMatch (userAgent)) {
+ Hashtable tbl;
#if NET_2_0
- tbl = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
+ tbl = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
#else
- tbl = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
- CaseInsensitiveComparer.DefaultInvariant);
+ tbl = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
+ CaseInsensitiveComparer.DefaultInvariant);
#endif
+ userBrowserCaps = bd.GetProperties (tbl);
+ break;
+ }
+ }
- return bd.GetProperties (tbl);
+ if (userBrowserCaps == null)
+ userBrowserCaps = defaultCaps;
+
+ lock (typeof (CapabilitiesLoader)) {
+ if (userAgentsCache.Count >= userAgentsCacheSize) {
+ userAgentsCache.Clear ();
+ }
}
+ userAgentsCache [userAgent] = userBrowserCaps;
}
-
- return defaultCaps;
+ return userBrowserCaps;
}
static void Init ()
+2007-03-13 Marek Habersack <mhabersack@novell.com>
+
+ * HttpApplicationFactory.cs: resources compiler no longer accepts
+ a boolean parameter.
+
+ * HttpRuntime.cs: Do not compile local resources here anymore.
+
+ * HttpContext.cs: if App_LocalResources assembly corresponding to
+ the virtual path is not found, compile it here.
+ Look up resources in the "Resources." class path.
+
+2007-03-13 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * HttpUtility.cs: fixed HttpUtillity.HtmlAttributeEncode
+ '<' char must be encoded.
+
+2007-03-12 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * CapabilitiesLoader.cs: added TARGET_JVM part of static members,
+ added caching to GetCapabilities method for performance improvement
+
+2007-03-12 Marek Habersack <mhabersack@novell.com>
+
+ * XmlSiteMapProvider.cs: support custom site map providers. Fixes
+ bug #81115
+
+2007-03-06 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * StaticFileHandler.cs: fixed ProcessRequest TARGET_JVM path,
+ if_modified_since fixed in WAR mode
+
2007-02-25 Vladimir Krasnov <vladimirk@mainsoft.com>
* HttpRequest.jvm.cs: fixed LoadWwwForm, should distinguish between
* HttpUtility.cs: fix InvalidCastException.
-2005-06-05 Kornél Pál <kornelpal@hotmail.com>
+2005-06-05 Korn__l P__l <kornelpal@hotmail.com>
* HttpWriter.cs: Fixed: _OutputFilter.Close () was called twice.
using System.Web.SessionState;
using System.Web.Configuration;
-#if !TARGET_J2EE
using System.Web.Compilation;
-#else
+#if TARGET_J2EE
using vmw.common;
#endif
#endif
#if NET_2_0 && !TARGET_J2EE
- AppResourcesCompiler ac = new AppResourcesCompiler (context, true);
+ AppResourcesCompiler ac = new AppResourcesCompiler (context);
ac.Compile ();
// Todo: Process App_WebResources here
needs_init = false;
#if NET_2_0
} catch (Exception) {
-#if !TARGET_J2EE
if (BuildManager.CodeAssemblies != null)
BuildManager.CodeAssemblies.Clear ();
if (BuildManager.TopLevelAssemblies != null)
BuildManager.TopLevelAssemblies.Clear ();
-#endif
if (WebConfigurationManager.ExtraAssemblies != null)
WebConfigurationManager.ExtraAssemblies.Clear ();
throw;
string path = Path.GetDirectoryName (virtualPath);
Assembly asm = AppResourcesCompiler.GetCachedLocalResourcesAssembly (path);
- if (asm == null)
- throw new MissingManifestResourceException ("A resource object was not found at the specified virtualPath.");
+ if (asm == null) {
+ AppResourcesCompiler ac = new AppResourcesCompiler (path);
+ asm = ac.Compile ();
+ if (asm == null)
+ throw new MissingManifestResourceException ("A resource object was not found at the specified virtualPath.");
+ }
+
path = Path.GetFileName (virtualPath);
- return GetResourceObject (path, resourceKey, culture, asm);
+ return GetResourceObject ("Resources." + path, resourceKey, culture, asm);
}
public object GetSection (string name)
HttpContext.Current = null;
} else {
context.ApplicationInstance = app;
-
-#if NET_2_0 && !TARGET_JVM
- //
- // Compile the local resources, if any
- //
- AppResourcesCompiler ac = new AppResourcesCompiler (context, false);
- ac.Compile ();
-#endif
//
// Ask application to service the request
if (null == s)
return null;
- if (s.IndexOf ('&') == -1 && s.IndexOf ('"') == -1)
+ if (s.IndexOf ('&') == -1 && s.IndexOf ('"') == -1 && s.IndexOf ('<') == -1)
return s;
StringBuilder output = new StringBuilder ();
case '"' :
output.Append (""");
break;
+ case '<':
+ output.Append ("<");
+ break;
default:
output.Append (c);
break;
}
catch (NotSupportedException)
{
- // The file is in a WAR, it was not modified.
- response.StatusCode = 304;
- return;
+ // The file is in a WAR, it might be modified with last redeploy.
+ try {
+ ftime = (DateTime) AppDomain.CurrentDomain.GetData (".appStartTime");
+ }
+ catch {
+ ftime = DateTime.MaxValue;
+ }
}
#else
ftime = fi.LastWriteTime.ToUniversalTime ();
string siteMapFile = GetNonEmptyOptionalAttribute (xmlNode, "siteMapFile");
if (provider != null) {
- throw new NotImplementedException ();
+ foreach (SiteMapProvider smp in SiteMap.Providers) {
+ if (string.Equals(smp.Name,provider, StringComparison.InvariantCulture)) {
+ smp.ParentProvider = this;
+ return smp.GetRootNodeCore();
+ }
+ }
+ throw new ConfigurationException("Provider with name [" + provider + "] was not found.");
} else if (siteMapFile != null) {
throw new NotImplementedException ();
} else {
<Link>Consts.cs.in</Link>\r
</Compile>\r
<Compile Include="Assembly\AssemblyInfo.cs" />\r
+ <Compile Include="System.Web.Compilation\BuildManager.jvm.cs" />\r
<Compile Include="System.Web.Compilation\ConnectionStringsExpressionBuilder.cs" />\r
<Compile Include="System.Web.Compilation\AppResourcesCompiler.jvm.cs" />\r
<Compile Include="System.Web.Compilation\ExpressionBuilder.cs" />\r
<Compile Include="System.Web.UI\Page.jvm.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
+ <Compile Include="System.Web.UI\PageAsyncTask.cs" />\r
<Compile Include="System.Web.UI\PageParser.jvm.cs" />\r
<Compile Include="System.Web.UI\TemplateControl.jvm.cs" />\r
<Compile Include="System.Web.UI\UserControlControlBuilder.cs">\r
<UserProperties REFS-JarPath-j2se-helpers="..\lib\J2SE.Helpers.jar" REFS-JarPath-j2ee-helpers="..\lib\J2EE.Helpers.jar" REFS-JarPath-j2ee="..\lib\j2ee.jar" REFS-JarPath-rt="..\lib\rt.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.jar" REFS-JarPath-system-xml="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Xml.jar" REFS-JarPath-system-drawing="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Drawing.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_imageio.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_core.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_codec.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\clibwrapper_jiio.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\mlibwrapper_jai.jar" REFS-JarPath-system-data="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Data.jar" REFS-JarPath-system-configuration="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Configuration.jar" />\r
</VisualStudio>\r
</ProjectExtensions>\r
-</Project>
\ No newline at end of file
+</Project>\r
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * LoginTest.cs: Added a test for case-insensitive command name in
+ OnBubbleEvent.
+
+2007-02-28 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * TreeNodeColectionTest.cs: new tests
+
+2007-02-28 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * MenuTest.cs: new tests
+
2007-02-20 Gert Driesen <drieseng@users.souceforge.net>
* CalendarTest.cs: Enabled tests for bug #80881. Fixed NotWorking
string html = t.Run ();
}
- public static void _OnBubbleEvent(Page p)
+ public static void DoOnBubbleEvent(Page p, string cmdname)
{
TestLogin l = new TestLogin ();
l.Page = p;
l.MembershipProvider = "FakeProvider";
Button b = (Button)l.FindControl ("LoginButton");
Assert.IsNotNull (b, "LoginButton");
- CommandEventArgs cea = new CommandEventArgs ("Login", null);
+ CommandEventArgs cea = new CommandEventArgs (cmdname, null);
l.DoBubbleEvent (b, cea);
Assert.IsTrue (l.OnLoggingInCalled, "OnLoggingIn");
Assert.IsFalse (l.Cancel, "Cancel");
Assert.IsTrue (l.OnLoginErrorCalled, "OnLoginError");
Assert.IsFalse (l.OnLoggedInCalled, "OnLoggedIn");
}
+
+ public static void _OnBubbleEvent(Page p)
+ {
+ DoOnBubbleEvent(p, "Login");
+ }
+ [Test]
+ [Category ("NunitWeb")]
+ public void OnBubbleEventCaseSensitivity ()
+ {
+ WebTest t = new WebTest (PageInvoker.CreateOnPreInit (_OnBubbleEventCaseSensitivity));
+ string html = t.Run ();
+ }
+
+ public static void _OnBubbleEventCaseSensitivity(Page p)
+ {
+ DoOnBubbleEvent(p, "login");
+ }
+
[Test]
public void OnBubbleEvent_Cancel_OnLoggingIn ()
{
{\r
WebTest.CurrentTest.UserData = "MenuItemDataBound"; \r
}\r
+\r
+ [Test]\r
+ public void MenuItemCollection1 ()\r
+ {\r
+ Menu m = new Menu ();\r
+ fillMenu (m);\r
+\r
+ ((IStateManager) m.Items).TrackViewState ();\r
+ m.Items [0].Text = "root";\r
+ m.Items [0].ChildItems [0].Text = "node";\r
+ m.Items [0].ChildItems [0].ChildItems [0].Text = "subnode";\r
+ object state = ((IStateManager) m.Items).SaveViewState ();\r
+\r
+ Menu copy = new Menu ();\r
+ fillMenu (copy);\r
+ ((IStateManager) copy.Items).TrackViewState ();\r
+ ((IStateManager) copy.Items).LoadViewState (state);\r
+\r
+ Assert.AreEqual (1, copy.Items.Count);\r
+ Assert.AreEqual (2, copy.Items [0].ChildItems.Count);\r
+ Assert.AreEqual (1, copy.Items [0].ChildItems [0].ChildItems.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Items [0].Text);\r
+ Assert.AreEqual ("node", copy.Items [0].ChildItems [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Items [0].ChildItems [0].ChildItems [0].Text);\r
+ }\r
+ \r
+ [Test]\r
+ public void MenuItemCollection2 ()\r
+ {\r
+ Menu m = new Menu ();\r
+ fillMenu (m);\r
+\r
+ ((IStateManager) m.Items).TrackViewState ();\r
+ m.Items [0].Text = "root";\r
+ m.Items [0].ChildItems [0].Text = "node";\r
+ m.Items [0].ChildItems [0].ChildItems [0].Text = "subnode";\r
+ m.Items.Add (new MenuItem ("root 2"));\r
+ object state = ((IStateManager) m.Items).SaveViewState ();\r
+\r
+ Menu copy = new Menu ();\r
+ fillMenu (copy);\r
+ ((IStateManager) copy.Items).TrackViewState ();\r
+ ((IStateManager) copy.Items).LoadViewState (state);\r
+\r
+ Assert.AreEqual (2, copy.Items.Count);\r
+ Assert.AreEqual (2, copy.Items [0].ChildItems.Count);\r
+ Assert.AreEqual (1, copy.Items [0].ChildItems [0].ChildItems.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Items [0].Text);\r
+ Assert.AreEqual ("node", copy.Items [0].ChildItems [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Items [0].ChildItems [0].ChildItems [0].Text);\r
+ Assert.AreEqual ("root 2", copy.Items [1].Text);\r
+ }\r
+\r
+ [Test]\r
+ public void MenuItemCollection3 ()\r
+ {\r
+ Menu m = new Menu ();\r
+ fillMenu (m);\r
+ m.Items.Add (new MenuItem ("root 2"));\r
+\r
+ ((IStateManager) m.Items).TrackViewState ();\r
+ m.Items [0].Text = "root";\r
+ m.Items [0].ChildItems [0].Text = "node";\r
+ m.Items [0].ChildItems [0].ChildItems [0].Text = "subnode";\r
+ m.Items.RemoveAt (1);\r
+ object state = ((IStateManager) m.Items).SaveViewState ();\r
+\r
+ Menu copy = new Menu ();\r
+ fillMenu (copy);\r
+ copy.Items.Add (new MenuItem ("root 2"));\r
+ ((IStateManager) copy.Items).TrackViewState ();\r
+ ((IStateManager) copy.Items).LoadViewState (state);\r
+\r
+ Assert.AreEqual (1, copy.Items.Count);\r
+ Assert.AreEqual (2, copy.Items [0].ChildItems.Count);\r
+ Assert.AreEqual (1, copy.Items [0].ChildItems [0].ChildItems.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Items [0].Text);\r
+ Assert.AreEqual ("node", copy.Items [0].ChildItems [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Items [0].ChildItems [0].ChildItems [0].Text);\r
+ }\r
+ \r
+ [Test]\r
+ public void MenuItemCollection4 ()\r
+ {\r
+ Menu m = new Menu ();\r
+ fillMenu (m);\r
+ m.Items.Add (new MenuItem ("root 2"));\r
+ m.Items [0].ChildItems.RemoveAt (1);\r
+\r
+ ((IStateManager) m.Items).TrackViewState ();\r
+ m.Items [0].Text = "root";\r
+ m.Items [0].ChildItems [0].Text = "node";\r
+ m.Items [0].ChildItems [0].ChildItems [0].Text = "subnode";\r
+ object state = ((IStateManager) m.Items).SaveViewState ();\r
+\r
+ Menu copy = new Menu ();\r
+ fillMenu (copy);\r
+ copy.Items.Add (new MenuItem ("root 2"));\r
+ copy.Items [0].ChildItems.RemoveAt (1);\r
+ ((IStateManager) copy.Items).TrackViewState ();\r
+ ((IStateManager) copy.Items).LoadViewState (state);\r
+\r
+ Assert.AreEqual (2, copy.Items.Count);\r
+ Assert.AreEqual (1, copy.Items [0].ChildItems.Count);\r
+ Assert.AreEqual (1, copy.Items [0].ChildItems [0].ChildItems.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Items [0].Text);\r
+ Assert.AreEqual ("node", copy.Items [0].ChildItems [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Items [0].ChildItems [0].ChildItems [0].Text);\r
+ }\r
+\r
+ [Test]\r
+ public void MenuItemCollection5 ()\r
+ {\r
+ Menu m = new Menu ();\r
+ ((IStateManager) m.Items).TrackViewState ();\r
+ fillMenu (m);\r
+\r
+ object state = ((IStateManager) m.Items).SaveViewState ();\r
+\r
+ Menu copy = new Menu ();\r
+ ((IStateManager) copy.Items).TrackViewState ();\r
+ ((IStateManager) copy.Items).LoadViewState (state);\r
+\r
+ Assert.AreEqual (1, copy.Items.Count);\r
+ Assert.AreEqual (2, copy.Items [0].ChildItems.Count);\r
+ Assert.AreEqual (1, copy.Items [0].ChildItems [0].ChildItems.Count);\r
+ }\r
+\r
+ private static void fillMenu (Menu m) {\r
+ m.Items.Clear ();\r
+ m.Items.Add (new MenuItem ());\r
+ m.Items [0].ChildItems.Add (new MenuItem ());\r
+ m.Items [0].ChildItems.Add (new MenuItem ());\r
+ m.Items [0].ChildItems [0].ChildItems.Add (new MenuItem ());\r
+ }\r
}\r
}\r
#endif\r
s.AddAttributesToRender(writer);
// Figure out an order-independent way to verify rendered results
}
+#if NET_2_0
+ class PokerStyle : Style
+ {
+ public IUrlResolutionService UrlResolver;
+
+ protected override void FillStyleAttributes (CssStyleCollection attributes, IUrlResolutionService urlResolver)
+ {
+ UrlResolver = urlResolver;
+ base.FillStyleAttributes (attributes, urlResolver);
+ }
+ }
+
+ class PokerWebControl : WebControl
+ {
+ protected override Style CreateControlStyle ()
+ {
+ return new PokerStyle ();
+ }
+ }
+
+ [Test]
+ public void FillStyleAttributes_UrlResolver ()
+ {
+ PokerWebControl c = new PokerWebControl ();
+ c.BackColor = Color.AliceBlue;
+ c.RenderControl (new HtmlTextWriter (new StringWriter ()));
+
+ Assert.AreEqual (c, ((PokerStyle) c.ControlStyle).UrlResolver);
+ }
+
+#endif
}
}
R.ChildNodes.Add (N2);\r
tv.Nodes.Add (R);\r
}\r
+ [Test]\r
+ public void ViewState1 ()\r
+ {\r
+ TreeView m = new TreeView ();\r
+ fillTree (m);\r
+\r
+ ((IStateManager) m.Nodes).TrackViewState ();\r
+ m.Nodes [0].Text = "root";\r
+ m.Nodes [0].ChildNodes [0].Text = "node";\r
+ m.Nodes [0].ChildNodes [0].ChildNodes [0].Text = "subnode";\r
+ object state = ((IStateManager) m.Nodes).SaveViewState ();\r
+\r
+ TreeView copy = new TreeView ();\r
+ fillTree (copy);\r
+ ((IStateManager) copy.Nodes).TrackViewState ();\r
+ ((IStateManager) copy.Nodes).LoadViewState (state);\r
+\r
+ Assert.AreEqual (1, copy.Nodes.Count);\r
+ Assert.AreEqual (2, copy.Nodes [0].ChildNodes.Count);\r
+ Assert.AreEqual (1, copy.Nodes [0].ChildNodes [0].ChildNodes.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Nodes [0].Text);\r
+ Assert.AreEqual ("node", copy.Nodes [0].ChildNodes [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Nodes [0].ChildNodes [0].ChildNodes [0].Text);\r
+ }\r
+\r
+ [Test]\r
+ public void ViewState2 ()\r
+ {\r
+ TreeView m = new TreeView ();\r
+ fillTree (m);\r
+\r
+ ((IStateManager) m.Nodes).TrackViewState ();\r
+ m.Nodes [0].Text = "root";\r
+ m.Nodes [0].ChildNodes [0].Text = "node";\r
+ m.Nodes [0].ChildNodes [0].ChildNodes [0].Text = "subnode";\r
+ m.Nodes.Add (new TreeNode ("root 2"));\r
+ object state = ((IStateManager) m.Nodes).SaveViewState ();\r
+\r
+ TreeView copy = new TreeView ();\r
+ fillTree (copy);\r
+ ((IStateManager) copy.Nodes).TrackViewState ();\r
+ ((IStateManager) copy.Nodes).LoadViewState (state);\r
+\r
+ Assert.AreEqual (2, copy.Nodes.Count);\r
+ Assert.AreEqual (2, copy.Nodes [0].ChildNodes.Count);\r
+ Assert.AreEqual (1, copy.Nodes [0].ChildNodes [0].ChildNodes.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Nodes [0].Text);\r
+ Assert.AreEqual ("node", copy.Nodes [0].ChildNodes [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Nodes [0].ChildNodes [0].ChildNodes [0].Text);\r
+ Assert.AreEqual ("root 2", copy.Nodes [1].Text);\r
+ }\r
+\r
+ [Test]\r
+ public void ViewState3 ()\r
+ {\r
+ TreeView m = new TreeView ();\r
+ fillTree (m);\r
+ m.Nodes.Add (new TreeNode ("root 2"));\r
+\r
+ ((IStateManager) m.Nodes).TrackViewState ();\r
+ m.Nodes [0].Text = "root";\r
+ m.Nodes [0].ChildNodes [0].Text = "node";\r
+ m.Nodes [0].ChildNodes [0].ChildNodes [0].Text = "subnode";\r
+ m.Nodes.RemoveAt (1);\r
+ object state = ((IStateManager) m.Nodes).SaveViewState ();\r
+\r
+ TreeView copy = new TreeView ();\r
+ fillTree (copy);\r
+ copy.Nodes.Add (new TreeNode ("root 2"));\r
+ ((IStateManager) copy.Nodes).TrackViewState ();\r
+ ((IStateManager) copy.Nodes).LoadViewState (state);\r
+\r
+ Assert.AreEqual (1, copy.Nodes.Count);\r
+ Assert.AreEqual (2, copy.Nodes [0].ChildNodes.Count);\r
+ Assert.AreEqual (1, copy.Nodes [0].ChildNodes [0].ChildNodes.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Nodes [0].Text);\r
+ Assert.AreEqual ("node", copy.Nodes [0].ChildNodes [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Nodes [0].ChildNodes [0].ChildNodes [0].Text);\r
+ }\r
+\r
+ [Test]\r
+ public void ViewState4 ()\r
+ {\r
+ TreeView m = new TreeView ();\r
+ fillTree (m);\r
+ m.Nodes.Add (new TreeNode ("root 2"));\r
+ m.Nodes [0].ChildNodes.RemoveAt (1);\r
+\r
+ ((IStateManager) m.Nodes).TrackViewState ();\r
+ m.Nodes [0].Text = "root";\r
+ m.Nodes [0].ChildNodes [0].Text = "node";\r
+ m.Nodes [0].ChildNodes [0].ChildNodes [0].Text = "subnode";\r
+ object state = ((IStateManager) m.Nodes).SaveViewState ();\r
+\r
+ TreeView copy = new TreeView ();\r
+ fillTree (copy);\r
+ copy.Nodes.Add (new TreeNode ("root 2"));\r
+ copy.Nodes [0].ChildNodes.RemoveAt (1);\r
+ ((IStateManager) copy.Nodes).TrackViewState ();\r
+ ((IStateManager) copy.Nodes).LoadViewState (state);\r
+\r
+ Assert.AreEqual (2, copy.Nodes.Count);\r
+ Assert.AreEqual (1, copy.Nodes [0].ChildNodes.Count);\r
+ Assert.AreEqual (1, copy.Nodes [0].ChildNodes [0].ChildNodes.Count);\r
+\r
+ Assert.AreEqual ("root", copy.Nodes [0].Text);\r
+ Assert.AreEqual ("node", copy.Nodes [0].ChildNodes [0].Text);\r
+ Assert.AreEqual ("subnode", copy.Nodes [0].ChildNodes [0].ChildNodes [0].Text);\r
+ }\r
+\r
+ [Test]\r
+ public void ViewState5 ()\r
+ {\r
+ TreeView m = new TreeView ();\r
+ ((IStateManager) m.Nodes).TrackViewState ();\r
+ fillTree (m);\r
+\r
+ object state = ((IStateManager) m.Nodes).SaveViewState ();\r
+\r
+ TreeView copy = new TreeView ();\r
+ ((IStateManager) copy.Nodes).TrackViewState ();\r
+ ((IStateManager) copy.Nodes).LoadViewState (state);\r
+\r
+ Assert.AreEqual (1, copy.Nodes.Count);\r
+ Assert.AreEqual (2, copy.Nodes [0].ChildNodes.Count);\r
+ Assert.AreEqual (1, copy.Nodes [0].ChildNodes [0].ChildNodes.Count);\r
+ }\r
+\r
+ private static void fillTree (TreeView tv)\r
+ {\r
+ tv.Nodes.Clear ();\r
+ tv.Nodes.Add (new TreeNode ());\r
+ tv.Nodes [0].ChildNodes.Add (new TreeNode ());\r
+ tv.Nodes [0].ChildNodes.Add (new TreeNode ());\r
+ tv.Nodes [0].ChildNodes [0].ChildNodes.Add (new TreeNode ());\r
+ }\r
+\r
}\r
}\r
\r
}
[Test]
- [Category("NotWorking")]
public void InitialNoBag10()
{
AC ac = new AC(null);
}
[Test]
- [Category("NotWorking")]
public void InitialNoBag11()
{
AC ac = new AC(null);
}
[Test]
- [Category("NotWorking")]
public void InitialNoBag12()
{
AC ac = new AC(null);
Assert.AreEqual ("", str, "value2");
Assert.AreEqual (1, bag.Count, "count2");
}
+
+ [Test]
+ public void Count1 ()
+ {
+ StateBag bag = new StateBag (true);
+ AC ac = new AC (bag);
+ ac.Add ("style", "padding: 0px; margin: 0px");
+ Assert.AreEqual (1, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (2, ac.CssStyle.Count, "AttributeCollection.Count");
+
+ ac.Remove ("style");
+ Assert.AreEqual (0, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (0, ac.CssStyle.Count, "AttributeCollection.Count");
+ }
+
+ [Test]
+ public void Count2 ()
+ {
+ StateBag bag = new StateBag (true);
+ AC ac = new AC (bag);
+ ac ["style"] = "padding: 0px; margin: 0px";
+ Assert.AreEqual (1, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (2, ac.CssStyle.Count, "AttributeCollection.Count");
+
+ ac ["style"] = null;
+ Assert.AreEqual (0, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (0, ac.CssStyle.Count, "AttributeCollection.Count");
+ }
+
+ [Test]
+ public void Count3 ()
+ {
+ StateBag bag = new StateBag (true);
+ AC ac = new AC (bag);
+ ac.CssStyle.Add("padding", "0px");
+ ac.CssStyle.Add("margin", "0px");
+ Assert.AreEqual (1, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (2, ac.CssStyle.Count, "AttributeCollection.Count");
+
+ ac.CssStyle.Remove ("padding");
+ ac.CssStyle.Remove ("margin");
+ Assert.AreEqual (0, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (0, ac.CssStyle.Count, "AttributeCollection.Count");
+ }
+
+#if NET_2_0
+ [Test]
+ public void Count4 ()
+ {
+ StateBag bag = new StateBag (true);
+ AC ac = new AC (bag);
+ ac.CssStyle ["padding"] = "0px";
+ ac.CssStyle ["margin"] = "0px";
+ Assert.AreEqual (1, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (2, ac.CssStyle.Count, "AttributeCollection.Count");
+
+ ac.CssStyle.Value = null;
+ Assert.AreEqual (0, ac.Count, "AttributeCollection.Count");
+ Assert.AreEqual (0, ac.CssStyle.Count, "AttributeCollection.Count");
+ }
+#endif
}
}
// add more
}
+ [Test]
+ public void NullWriter ()
+ {
+ HtmlTextWriter htw = new HtmlTextWriter (null);
+ Assert.IsNotNull (htw, "NullWriter");
+ Assert.IsNull (htw.InnerWriter, "InnerWriter");
+ }
+
[Test]
public void WriteAttributes_NullValue ()
{
}
// Which attrs fall here
- [Category ("NotWorking")]
[Test]
public void NoEscapeAttrName ()
{
w.RenderBeginTag (HtwTag.Div);
w.RenderEndTag ();
Assert.AreEqual ("<div name=\"cookies&cream\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void NoEscapeAttrName2 () {
+ w.AddAttribute ("name", "cookies&cream");
+ w.RenderBeginTag (HtwTag.Div);
+ w.RenderEndTag ();
+ Assert.AreEqual ("<div name=\"cookies&cream\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void NoEscapeAttrName3 () {
+ w.AddAttribute (HtwAttribute.Name, "cookies&cream", true);
+ w.RenderBeginTag (HtwTag.Div);
+ w.RenderEndTag ();
+ Assert.AreEqual ("<div name=\"cookies&cream\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void NoEscapeAttrName4 () {
+ w.AddAttribute ("NaMe", "cookies&cream");
+ w.RenderBeginTag (HtwTag.Div);
+ w.RenderEndTag ();
+ Assert.AreEqual ("<div NaMe=\"cookies&cream\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void EscapeAttribute1 () {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddAttribute ("attr", "cookies&cream");
+ w1.RenderBeginTag (HtwTag.Div);
+ w1.RenderEndTag ();
+
+ Assert.AreEqual ("cookies&cream", w1.AttrValue_At_AddAttribute, "AttrValue_At_AddAttribute");
+ Assert.AreEqual ("cookies&cream", w1.AttrValue_At_OnAttributeRender, "AttrValue_At_OnAttributeRender");
+ Assert.AreEqual ("<div attr=\"cookies&cream\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void EscapeAttribute2 () {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddAttribute ("attr", "cookies&cream", false);
+ w1.RenderBeginTag (HtwTag.Div);
+ w1.RenderEndTag ();
+
+ Assert.AreEqual ("cookies&cream", w1.AttrValue_At_AddAttribute, "AttrValue_At_AddAttribute");
+ Assert.AreEqual ("cookies&cream", w1.AttrValue_At_OnAttributeRender, "AttrValue_At_OnAttributeRender");
+ Assert.AreEqual ("<div attr=\"cookies&cream\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void EscapeAttribute3 () {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddAttribute ("attr", "cookies&cream", true);
+ w1.RenderBeginTag (HtwTag.Div);
+ w1.RenderEndTag ();
+
+ Assert.AreEqual ("cookies&cream", w1.AttrValue_At_AddAttribute, "AttrValue_At_AddAttribute");
+ Assert.AreEqual ("cookies&cream", w1.AttrValue_At_OnAttributeRender, "AttrValue_At_OnAttributeRender");
+ Assert.AreEqual ("<div attr=\"cookies&cream\">\n\n</div>", sw.ToString ());
}
[Test]
}
[Test]
- [Category ("NotWorking")]
public void TagByNameGetsCaseChanged ()
{
w.RenderBeginTag ("InPuT");
}
[Test]
- public void AddStyleAttribute ()
+ public void AddStyleAttribute1 ()
{
w.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, "http://www.go-mono.com/");
w.RenderBeginTag ("div");
#endif
}
+ [Test]
+ public void AddStyleAttribute3 ()
+ {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddStyleAttribute ("mystyle", "my value&space");
+ w1.RenderBeginTag ("div");
+ w1.RenderEndTag ();
+#if NET_2_0
+ Assert.AreEqual ("my value&space", w1.StyleValue_At_AddStyleAttribute, "StyleValue_At_AddStyleAttribute");
+ Assert.AreEqual ("my value&space", w1.StyleValue_At_OnStyleAttributeRender, "StyleValue_At_OnStyleAttributeRender");
+ Assert.AreEqual ("<div style=\"mystyle:my value&space;\">\n\n</div>", sw.ToString ());
+#else
+ Assert.AreEqual ("<div style=\"mystyle:my value&space;\">\n\n</div>", sw.ToString ());
+#endif
+ }
+
+ [Test]
+ public void WriteAttribute1 ()
+ {
+ w.WriteAttribute ("attr", "my value&space");
+ Assert.AreEqual (" attr=\"my value&space\"", sw.ToString ());
+ }
+
+ [Test]
+ public void WriteAttribute2 ()
+ {
+ w.WriteAttribute ("attr", "my value&space", false);
+ Assert.AreEqual (" attr=\"my value&space\"", sw.ToString ());
+ }
+
+ [Test]
+ public void WriteAttribute3 ()
+ {
+ w.WriteAttribute ("attr", "my value&space", true);
+ Assert.AreEqual (" attr=\"my value&space\"", sw.ToString ());
+ }
+
+ [Test]
+ public void WriteStyleAttribute1 ()
+ {
+ w.WriteStyleAttribute ("mystyle", "my value&space");
+ Assert.AreEqual ("mystyle:my value&space;", sw.ToString ());
+ }
+
+ [Test]
+ public void WriteStyleAttribute2 ()
+ {
+ w.WriteStyleAttribute ("mystyle", "my value&space", false);
+ Assert.AreEqual ("mystyle:my value&space;", sw.ToString ());
+ }
+
+ [Test]
+ public void WriteStyleAttribute3 ()
+ {
+ w.WriteStyleAttribute ("mystyle", "my value&space", true);
+ Assert.AreEqual ("mystyle:my value&space;", sw.ToString ());
+ }
+
+#if NET_2_0
+ [Test]
+ public void WriteStyleAttribute_BackgroundImage1 ()
+ {
+ w.WriteStyleAttribute ("background-image", "http://www.mainsoft.com/space here?a=b&c=d");
+ Assert.AreEqual ("background-image:http://www.mainsoft.com/space here?a=b&c=d;", sw.ToString ());
+ }
+
+ [Test]
+ public void WriteStyleAttribute_BackgroundImage2 ()
+ {
+ w.WriteStyleAttribute ("BackGround-Image", "http://www.mainsoft.com/space here?a=b&c=d");
+ Assert.AreEqual ("BackGround-Image:http://www.mainsoft.com/space here?a=b&c=d;", sw.ToString ());
+ }
+
+ [Test]
+ public void AddStyleAttribute_BackgroundImage1 ()
+ {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, "http://www.mainsoft.com/space here?a=b&c=d");
+ w1.RenderBeginTag ("div");
+ w1.RenderEndTag ();
+
+ Assert.AreEqual ("http://www.mainsoft.com/space here?a=b&c=d", w1.StyleValue_At_AddStyleAttribute, "StyleValue_At_AddStyleAttribute");
+ Assert.AreEqual ("http://www.mainsoft.com/space here?a=b&c=d", w1.StyleValue_At_OnStyleAttributeRender, "StyleValue_At_OnStyleAttributeRender");
+ Assert.AreEqual ("<div style=\"background-image:url(http://www.mainsoft.com/space%20here?a=b&c=d);\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void AddStyleAttribute_BackgroundImage2 ()
+ {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddStyleAttribute ("background-image", "http://www.mainsoft.com/space here?a=b&c=d");
+ w1.RenderBeginTag ("div");
+ w1.RenderEndTag ();
+
+ Assert.AreEqual ("http://www.mainsoft.com/space here?a=b&c=d", w1.StyleValue_At_AddStyleAttribute, "StyleValue_At_AddStyleAttribute");
+ Assert.AreEqual ("http://www.mainsoft.com/space here?a=b&c=d", w1.StyleValue_At_OnStyleAttributeRender, "StyleValue_At_OnStyleAttributeRender");
+ Assert.AreEqual ("<div style=\"background-image:url(http://www.mainsoft.com/space%20here?a=b&c=d);\">\n\n</div>", sw.ToString ());
+ }
+
+ [Test]
+ public void AddStyleAttribute_BackgroundImage3 ()
+ {
+ sw = new StringWriter ();
+ sw.NewLine = "\n"; // Keep sanity.
+ Poker w1 = new Poker (sw);
+
+ w1.AddStyleAttribute ("BackGround-Image", "http://www.mainsoft.com/space here?a=b&c=d");
+ w1.RenderBeginTag ("div");
+ w1.RenderEndTag ();
+
+ Assert.AreEqual ("http://www.mainsoft.com/space here?a=b&c=d", w1.StyleValue_At_AddStyleAttribute, "StyleValue_At_AddStyleAttribute");
+ Assert.AreEqual ("http://www.mainsoft.com/space here?a=b&c=d", w1.StyleValue_At_OnStyleAttributeRender, "StyleValue_At_OnStyleAttributeRender");
+ Assert.AreEqual ("<div style=\"BackGround-Image:url(http://www.mainsoft.com/space%20here?a=b&c=d);\">\n\n</div>", sw.ToString ());
+ }
+
+#endif
+
[Test]
public void AddStyleAttribute2 ()
{
}
}
+
+ class Poker : HtmlTextWriter
+ {
+ public string StyleValue_At_OnStyleAttributeRender;
+ public string StyleValue_At_AddStyleAttribute;
+ public string AttrValue_At_OnAttributeRender;
+ public string AttrValue_At_AddAttribute;
+
+ public Poker (TextWriter tw)
+ : base (tw)
+ {
+ }
+
+ protected override bool OnAttributeRender (string name, string value, HtmlTextWriterAttribute key)
+ {
+ AttrValue_At_OnAttributeRender = value;
+ return base.OnAttributeRender (name, value, key);
+ }
+
+ protected override bool OnStyleAttributeRender (string name, string value, HtmlTextWriterStyle key)
+ {
+ StyleValue_At_OnStyleAttributeRender = value;
+ return base.OnStyleAttributeRender (name, value, key);
+ }
+
+ protected override void AddStyleAttribute (string name, string value, HtmlTextWriterStyle key)
+ {
+ StyleValue_At_AddStyleAttribute = value;
+ base.AddStyleAttribute (name, value, key);
+ }
+
+ protected override void AddAttribute (string name, string value, HtmlTextWriterAttribute key)
+ {
+ AttrValue_At_AddAttribute = value;
+ base.AddAttribute (name, value, key);
+ }
+
+ }
[Test]
public void TestOnAttributeRender() {
[Test]
[Category ("NunitWeb")]
- [Category ("NotWorking")]
+#if !TARGET_JVM
+ [Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
+#endif
public void AddOnPreRenderCompleteAsync ()
{
WebTest t = new WebTest ("AsyncPage.aspx");
Assert.AreEqual ("EndGetAsyncData", eventlist[1], "EndGetAsyncData Failed");
}
-
-
[Test]
- [Category ("NotWorking")]
+#if !TARGET_JVM
+ [Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
+#endif
[Category ("NunitWeb")]
public void ExecuteRegisteredAsyncTasks ()
{
Assert.AreEqual ("EndGetAsyncData", eventlist[1], "EndGetAsyncData Failed");
}
+ [Test]
+ [Category ("NunitWeb")]
+#if !TARGET_JVM
+ [Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
+#endif
+ [ExpectedException (typeof (Exception))]
+ public void AddOnPreRenderCompleteAsyncBeginThrows ()
+ {
+ WebTest t = new WebTest ("AsyncPage.aspx");
+ t.Invoker = PageInvoker.CreateOnLoad (AddOnPreRenderCompleteAsyncBeginThrows_Load);
+ string str = t.Run ();
+ }
+
+ [Test]
+ [Category ("NunitWeb")]
+#if !TARGET_JVM
+ [Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
+#endif
+ [ExpectedException (typeof (Exception))]
+ public void AddOnPreRenderCompleteAsyncEndThrows ()
+ {
+ WebTest t = new WebTest ("AsyncPage.aspx");
+ t.Invoker = PageInvoker.CreateOnLoad (AddOnPreRenderCompleteAsyncEndThrows_Load);
+ string str = t.Run ();
+ }
+
public static void ExecuteRegisteredAsyncTasks_Load (Page p)
{
BeginEventHandler bh = new BeginEventHandler (BeginGetAsyncData);
myRequest = WebRequest.Create(address);
}
- static IAsyncResult BeginGetAsyncData(Object src, EventArgs args, AsyncCallback cb, Object state)
+ public static void AddOnPreRenderCompleteAsyncBeginThrows_Load (Page p)
+ {
+ BeginEventHandler bh = new BeginEventHandler (BeginGetAsyncDataThrows);
+ EndEventHandler eh = new EndEventHandler (EndGetAsyncData);
+ p.AddOnPreRenderCompleteAsync (bh, eh);
+
+ // Initialize the WebRequest.
+ string address = "http://MyPage.aspx";
+ myRequest = WebRequest.Create (address);
+ }
+
+ public static void AddOnPreRenderCompleteAsyncEndThrows_Load (Page p)
+ {
+ BeginEventHandler bh = new BeginEventHandler (BeginGetAsyncData);
+ EndEventHandler eh = new EndEventHandler (EndGetAsyncDataThrows);
+ p.AddOnPreRenderCompleteAsync (bh, eh);
+
+ // Initialize the WebRequest.
+ string address = "http://MyPage.aspx";
+ myRequest = WebRequest.Create (address);
+ }
+
+ static IAsyncResult BeginGetAsyncData (Object src, EventArgs args, AsyncCallback cb, Object state)
{
if (WebTest.CurrentTest.UserData == null) {
ArrayList list = new ArrayList ();
return new Customresult(); // myRequest.BeginGetResponse (cb, state);
}
- static void EndGetAsyncData(IAsyncResult ar)
+ static IAsyncResult BeginGetAsyncDataThrows (Object src, EventArgs args, AsyncCallback cb, Object state)
+ {
+ ArrayList list = null;
+ if (WebTest.CurrentTest.UserData == null) {
+ list = new ArrayList ();
+ }
+ else {
+ list = WebTest.CurrentTest.UserData as ArrayList;
+ if (list == null)
+ throw new NullReferenceException ();
+ }
+ list.Add ("BeginGetAsyncData");
+ WebTest.CurrentTest.UserData = list;
+
+ throw new Exception ("BeginGetAsyncDataThrows");
+ }
+
+ static void EndGetAsyncData (IAsyncResult ar)
{
if (WebTest.CurrentTest.UserData == null) {
ArrayList list = new ArrayList ();
}
}
+ static void EndGetAsyncDataThrows (IAsyncResult ar)
+ {
+ ArrayList list = null;
+ if (WebTest.CurrentTest.UserData == null) {
+ list = new ArrayList ();
+ }
+ else {
+ list = WebTest.CurrentTest.UserData as ArrayList;
+ if (list == null)
+ throw new NullReferenceException ();
+ }
+ list.Add ("EndGetAsyncData");
+ WebTest.CurrentTest.UserData = list;
+
+ throw new Exception ("EndGetAsyncDataThrows");
+ }
+
[Test]
- [Category ("NotWorking")]
public void AsyncMode ()
{
TestPage p = new TestPage ();
}
[Test]
- [Category ("NotWorking")]
public void AsyncTimeout ()
{
Page p = new Page ();
}
[Test]
- [Category ("NotWorking")]
public void CreateHtmlTextWriterFromType ()
{
HtmlTextWriter writer = Page.CreateHtmlTextWriterFromType (null, typeof (HtmlTextWriter));
}
[Test]
- [Category ("NotWorking")]
public void GetWrappedFileDependencies ()
{
TestPage p = new TestPage ();
}
[Test]
- [Category ("NotWorking")]
public void IsAsync ()
{
Page p = new Page ();
}
[Test]
- [Category ("NotWorking")]
public void RegisterRequiresViewStateEncryption ()
{
Page p = new Page ();
}
[Test]
- [Category ("NotWorking")]
public void ViewStateEncryptionModeTest ()
{
Page p = new Page ();
+2007-03-06 Igor Zelmanovich <igorz@mainsoft.com>
+
+ * StaticSiteMapProviderTest.cs: removed NotWorking attributes..
+
2007-01-15 Ilya Kharmatsky <ilya -at- decode-systems.com>
* VirtualPathUtilityTest.cs: fixed introduced by previous patch
[TestFixture]
public class HttpUtilityTest {
+ [Test]
+ public void HtmlAttributeEncode ()
+ {
+ Assert.AreEqual ("<script>", HttpUtility.HtmlAttributeEncode ("<script>"));
+ Assert.AreEqual (""a&b"", HttpUtility.HtmlAttributeEncode ("\"a&b\""));
+ Assert.AreEqual ("'string'", HttpUtility.HtmlAttributeEncode ("'string'"));
+ }
+
[Test]
public void HtmlEncode_LtGt ()
{
[Test]
[Category ("NunitWeb")]
- [Category("NotWorking")]
public void IsAccessibleFrom1 ()
{
new WebTest (PageInvoker.CreateOnLoad (IsAccessibleFrom1_delegate)).Run ();
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * NunitWeb/NunitWeb/WebTest.cs: make sure that files timestamp is
+ updated when the target and the source are equal on resource
+ copying. This unbreaks the Themes tests which failed to recompile
+ themes whenever next test from the fixture was ran, since the
+ cache in the test application failed to notice the change.
+
2006-11-27 Yoni Klain <yonik@mainsoft.com>
* add new resources : NoEventValidation.aspx for ImageButtonTest.cs
+2007-03-06 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * System_Web/PageDirectories: net test case added
+
+2007-03-05 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * System_Web/PageDirectories/*: Added new tests for ResolveUrl,
+ TemplateSourceDirectory, etc
+
+2007-03-01 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * System_Web_SessionState/HttpSessionState/
+ HttpSessionState_CodePage.aspx.cs
+ * System_Web_UI_HtmlControls/HtmlInputImage/
+ HtmlInputImage_Src.aspx.cs
+ * utils/GHTListControlBase.cs:
+ Added NET_2_0 for ASP 2.0 support
+
2007-02-27 Vladimir Krasnov <vladimirk@mainsoft.com>
* MainsoftWebApp20.Tomcat.vmwcsproj: converted to csproj
<Version>2.0</Version>\r
<RootNamespace>MainsoftWebApp</RootNamespace>\r
<ApplicationServerType>tomcat</ApplicationServerType>\r
+ <jarserver>ipa</jarserver>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<DependentUpon>HttpValidationStatus_Enum.aspx</DependentUpon>\r
<SubType>ASPXCodeBehind</SubType>\r
</Compile>\r
+ <Compile Include="System_Web\PageDirectories\Controls1\UserControl1.ascx.cs">\r
+ <DependentUpon>UserControl1.ascx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Controls1\UserControl1.ascx.designer.cs">\r
+ <DependentUpon>UserControl1.ascx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Controls2\UserControl2.ascx.cs">\r
+ <DependentUpon>UserControl2.ascx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Controls2\UserControl2.ascx.designer.cs">\r
+ <DependentUpon>UserControl2.ascx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageHyperLink.aspx.cs">\r
+ <DependentUpon>PageHyperLink.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageHyperLink.aspx.designer.cs">\r
+ <DependentUpon>PageHyperLink.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl4.aspx.cs">\r
+ <DependentUpon>PageWControl4.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl4.aspx.designer.cs">\r
+ <DependentUpon>PageWControl4.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\UserMaster.Master.cs">\r
+ <DependentUpon>UserMaster.Master</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\UserMaster.Master.designer.cs">\r
+ <DependentUpon>UserMaster.Master</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\MasterPages\SubMaster.Master.cs">\r
+ <DependentUpon>SubMaster.Master</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\MasterPages\SubMaster.Master.designer.cs">\r
+ <DependentUpon>SubMaster.Master</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl1.aspx.cs">\r
+ <DependentUpon>PageWControl1.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl1.aspx.designer.cs">\r
+ <DependentUpon>PageWControl1.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl2.aspx.cs">\r
+ <DependentUpon>PageWControl2.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl2.aspx.designer.cs">\r
+ <DependentUpon>PageWControl2.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl3.aspx.cs">\r
+ <DependentUpon>PageWControl3.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWControl3.aspx.designer.cs">\r
+ <DependentUpon>PageWControl3.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWMaster.aspx.cs">\r
+ <DependentUpon>PageWMaster.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWMaster.aspx.designer.cs">\r
+ <DependentUpon>PageWMaster.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWOMaster.aspx.cs">\r
+ <DependentUpon>PageWOMaster.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\Pages\PageWOMaster.aspx.designer.cs">\r
+ <DependentUpon>PageWOMaster.aspx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\UserControl.ascx.cs">\r
+ <DependentUpon>UserControl.ascx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\UserControl.ascx.designer.cs">\r
+ <DependentUpon>UserControl.ascx</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\UserPage.aspx.cs">\r
+ <DependentUpon>UserPage.aspx</DependentUpon>\r
+ <SubType>ASPXCodeBehind</SubType>\r
+ </Compile>\r
+ <Compile Include="System_Web\PageDirectories\UserPage.aspx.designer.cs">\r
+ <DependentUpon>UserPage.aspx</DependentUpon>\r
+ </Compile>\r
<Compile Include="System_Web\ProcessShutdownReason\ProcessShutdownReason_Enum.aspx.cs">\r
<DependentUpon>ProcessShutdownReason_Enum.aspx</DependentUpon>\r
<SubType>ASPXCodeBehind</SubType>\r
<Compile Include="utils\GHTWebControlBase.cs">\r
<SubType>ASPXCodeBehind</SubType>\r
</Compile>\r
+ <Compile Include="utils\UrlTestUtils.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<Reference Include="j2ee, Version=0.0.0.0, Culture=neutral">\r
<Reference Include="System.Xml" />\r
</ItemGroup>\r
<ItemGroup>\r
+ <Content Include="System_Web\PageDirectories\Controls1\UserControl1.ascx" />\r
+ <Content Include="System_Web\PageDirectories\Controls2\UserControl2.ascx" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageHyperLink.aspx" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageWControl4.aspx" />\r
+ <Content Include="System_Web\PageDirectories\UserMaster.Master" />\r
+ <Content Include="System_Web\PageDirectories\MasterPages\SubMaster.Master" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageWControl1.aspx" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageWControl2.aspx" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageWControl3.aspx" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageWMaster.aspx" />\r
+ <Content Include="System_Web\PageDirectories\Pages\PageWOMaster.aspx" />\r
+ <Content Include="System_Web\PageDirectories\UserControl.ascx" />\r
+ <Content Include="System_Web\PageDirectories\UserPage.aspx" />\r
<None Include="System_Web_UI_WebControls\HyperLinkColumn\ChangeLog" />\r
</ItemGroup>\r
<ItemGroup>\r
<NTLMAuthentication>False</NTLMAuthentication>\r
</WebProjectProperties>\r
</FlavorProperties>\r
- <UserProperties REFS-JarPath-system="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.jar" REFS-JarPath-system-configuration="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Configuration.jar" REFS-JarPath-system-data="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Data.jar" REFS-JarPath-system-drawing="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Drawing.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_imageio.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_core.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_codec.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\clibwrapper_jiio.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\mlibwrapper_jai.jar" REFS-JarPath-system-web="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Web.jar" REFS-JarPath-system-web-services="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Web.Services.jar" REFS-JarPath-system-xml="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Xml.jar" REFS-JarPath-j2ee="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jakarta-tomcat\server\lib\catalina.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jakarta-tomcat\common\lib\servlet-api.jar" REFS-JarPath-rt="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-mscorlib="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\mscorlib.jar" />\r
+ <UserProperties REFS-JarPath-mscorlib="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\mscorlib.jar" REFS-JarPath-rt="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-j2ee="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jakarta-tomcat\server\lib\catalina.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jakarta-tomcat\common\lib\servlet-api.jar" REFS-JarPath-system-xml="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Xml.jar" REFS-JarPath-system-web-services="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Web.Services.jar" REFS-JarPath-system-web="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Web.jar" REFS-JarPath-system-drawing="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Drawing.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_imageio.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_core.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\jai_codec.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\clibwrapper_jiio.jar;..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\mlibwrapper_jai.jar" REFS-JarPath-system-data="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Data.jar" REFS-JarPath-system-configuration="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.Configuration.jar" REFS-JarPath-system="..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jgac\vmw4j2ee_110\System.jar" />\r
</VisualStudio>\r
</ProjectExtensions>\r
</Project>
\ No newline at end of file
--- /dev/null
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserControl1.ascx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Controls1.UserControl1" %>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Controls1\r
+{\r
+ public partial class UserControl1 : System.Web.UI.UserControl\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("UserPage.aspx"))));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("/UserPage.aspx"))));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("../UserPage.aspx"))));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("~/UserPage.aspx"))));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (TemplateSourceDirectory)));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeTemplateSourceDirectory)));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+\r
+ Controls.Add(new LiteralControl (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeVirtualPath)));\r
+ Controls.Add (new LiteralControl ("<br>"));\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Controls1\r
+{\r
+\r
+ public partial class UserControl1\r
+ {\r
+ }\r
+}\r
--- /dev/null
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserControl2.ascx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Controls1.UserControl2" %>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Controls1\r
+{\r
+ public partial class UserControl2 : System.Web.UI.UserControl\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ Controls.Add (LoadControl ("../Controls1/UserControl1.ascx"));\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Controls1\r
+{\r
+\r
+ public partial class UserControl2\r
+ {\r
+ }\r
+}\r
--- /dev/null
+<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SubMaster.master.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.MasterPages.SubMaster" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Untitled Page</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ <div>\r
+ <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">\r
+ </asp:ContentPlaceHolder>\r
+ </div>\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.MasterPages\r
+{\r
+ public partial class SubMaster : System.Web.UI.MasterPage\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.MasterPages {\r
+ \r
+ public partial class SubMaster {\r
+ protected System.Web.UI.HtmlControls.HtmlForm form1;\r
+ protected System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1;\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageHyperLink.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageHyperLink" MasterPageFile="~/System_Web/PageDirectories/UserMaster.Master"%>\r
+<%@ Register TagPrefix="cc1" Namespace="GHTWebControls" Assembly="MainsoftWebApp" %>\r
+\r
+<asp:Content ID="testcontent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">\r
+ <cc1:GHTSubTest id="GHTSubTest1" runat="server">
+ <asp:HyperLink ID="link2" runat="server" NavigateUrl="page.aspx" Text="link2" />
+ </cc1:GHTSubTest>\r
+</asp:Content>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageHyperLink : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ //Control content = this.Controls [0];\r
+ //if (content is MasterPage)\r
+ // GHTTestBegin (content);\r
+ //else {\r
+ // HtmlForm form1 = (HtmlForm) (HtmlForm) FindControl ("Form1");\r
+ // GHTTestBegin (form1);\r
+ //}\r
+\r
+ //GHTSubTestBegin ("GHTSubTest1");\r
+ //HyperLink hl = new HyperLink ();\r
+ //hl.Text = "hyperlink";\r
+ //hl.NavigateUrl = "page.aspx";\r
+ //GHTActiveSubTest.Controls.Add (hl);\r
+ //GHTSubTestEnd ();\r
+\r
+ //GHTTestEnd ();\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages {\r
+ \r
+ public partial class PageHyperLink {\r
+ protected GHTWebControls.GHTSubTest GHTSubTest1;\r
+ protected System.Web.UI.WebControls.HyperLink link2;\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageWControl1.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageWControl1" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Untitled Page</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+ using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageWControl1 : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ HtmlForm form1 = (HtmlForm) FindControl ("form1");\r
+ GHTTestBegin (form1);\r
+\r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTActiveSubTest.Controls.Add (LoadControl ("../Controls1/UserControl1.ascx"));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages {\r
+ \r
+ public partial class PageWControl1 {\r
+ protected System.Web.UI.HtmlControls.HtmlForm form1;\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageWControl2.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageWControl2" MasterPageFile="~/System_Web/PageDirectories/UserMaster.Master"%>\r
+\r
+<asp:Content ID="testcontent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">\r
+</asp:Content>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageWControl2 : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ Control content = this.Controls [0];\r
+ if (content is MasterPage)\r
+ GHTTestBegin (content);\r
+ else {\r
+ HtmlForm form1 = (HtmlForm) (HtmlForm) FindControl ("Form1");\r
+ GHTTestBegin (form1);\r
+ }\r
+\r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTActiveSubTest.Controls.Add (LoadControl ("../Controls1/UserControl1.ascx"));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages {\r
+ \r
+ public partial class PageWControl2 {\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageWControl3.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageWControl3" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Untitled Page</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageWControl3 : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ HtmlForm form1 = (HtmlForm) FindControl ("Form1");\r
+ GHTTestBegin (form1);\r
+\r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTActiveSubTest.Controls.Add (LoadControl ("../Controls2/UserControl2.ascx"));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+\r
+ public partial class PageWControl3\r
+ {\r
+ protected System.Web.UI.HtmlControls.HtmlForm form1;\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageWControl4.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageWControl4" MasterPageFile="~/System_Web/PageDirectories/UserMaster.Master"%>\r
+\r
+<asp:Content ID="testcontent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">\r
+</asp:Content>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageWControl4 : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ Control content = this.Controls [0];\r
+ if (content is MasterPage)\r
+ GHTTestBegin (content);\r
+ else {\r
+ HtmlForm form1 = (HtmlForm) (HtmlForm) FindControl ("Form1");\r
+ GHTTestBegin (form1);\r
+ }\r
+\r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTActiveSubTest.Controls.Add (LoadControl ("../Controls2/UserControl2.ascx"));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages {\r
+ \r
+ public partial class PageWControl4 {\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageWMaster.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageWMaster" MasterPageFile="~/System_Web/PageDirectories/UserMaster.Master"%>\r
+\r
+<asp:Content ID="testcontent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">\r
+</asp:Content>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageWMaster : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ Control content = this.Controls[0];\r
+ if (content is MasterPage)\r
+ GHTTestBegin (content);\r
+ else {\r
+ HtmlForm form1 = (HtmlForm) (HtmlForm) FindControl ("Form1");\r
+ GHTTestBegin (form1);\r
+ }\r
+\r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest2");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("/UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest3");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("../UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest4");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("~/UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest5");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (TemplateSourceDirectory));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest6");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeTemplateSourceDirectory));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest7");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeVirtualPath));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages {\r
+ \r
+ public partial class PageWMaster {\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageWOMaster.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.Pages.PageWOMaster" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Untitled Page</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+ public partial class PageWOMaster : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ HtmlForm form1 = (HtmlForm) (HtmlForm) FindControl ("Form1");\r
+ GHTTestBegin (form1);\r
+\r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest2");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("/UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest3");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("../UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest4");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("~/UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest5");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (TemplateSourceDirectory));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest6");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeTemplateSourceDirectory));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest7");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeVirtualPath));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories.Pages\r
+{\r
+\r
+ public partial class PageWOMaster\r
+ {\r
+ protected System.Web.UI.HtmlControls.HtmlForm form1;\r
+ }\r
+}\r
--- /dev/null
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserControl.ascx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.UserControl" %>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories\r
+{\r
+ public partial class UserControl : System.Web.UI.UserControl\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories\r
+{\r
+\r
+ public partial class UserControl\r
+ {\r
+ }\r
+}\r
--- /dev/null
+<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="UserMaster.Master.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.UserMaster" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Untitled Page</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">\r
+ </asp:ContentPlaceHolder>\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories\r
+{\r
+ public partial class UserMaster : System.Web.UI.MasterPage\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories {\r
+ \r
+ public partial class UserMaster {\r
+ protected System.Web.UI.HtmlControls.HtmlForm form1;\r
+ protected System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1;\r
+ }\r
+}\r
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserPage.aspx.cs" Inherits="GHTTests.System_Web_dll.PageDirectories.UserPage" %>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" >\r
+<head runat="server">\r
+ <title>Untitled Page</title>\r
+</head>\r
+<body>\r
+ <form id="form1" runat="server">\r
+ </form>\r
+</body>\r
+</html>\r
--- /dev/null
+using System;\r
+using System.Data;\r
+using System.Configuration;\r
+using System.Collections;\r
+using System.Web;\r
+using System.Web.Security;\r
+using System.Web.UI;\r
+using System.Web.UI.WebControls;\r
+using System.Web.UI.WebControls.WebParts;\r
+using System.Web.UI.HtmlControls;\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories\r
+{\r
+ public partial class UserPage : GHTBaseWeb\r
+ {\r
+ protected void Page_Load (object sender, EventArgs e)\r
+ {\r
+ HtmlForm form1 = (HtmlForm) (HtmlForm) FindControl ("Form1");\r
+ GHTTestBegin (form1);\r
+ \r
+ GHTSubTestBegin ("GHTSubTest1");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest2");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("/UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest3");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("../UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest4");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (ResolveUrl ("~/UserPage.aspx")));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest5");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (TemplateSourceDirectory));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest6");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeTemplateSourceDirectory));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTSubTestBegin ("GHTSubTest7");\r
+ GHTSubTestAddResult (UrlTestUtils.FixUrlForDirectoriesTest (AppRelativeVirtualPath));\r
+ GHTSubTestEnd ();\r
+\r
+ GHTTestEnd ();
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// This code was generated by a tool.\r
+// Runtime Version:2.0.50727.42\r
+//\r
+// Changes to this file may cause incorrect behavior and will be lost if\r
+// the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace GHTTests.System_Web_dll.PageDirectories\r
+{\r
+\r
+ public partial class UserPage\r
+ {\r
+ protected System.Web.UI.HtmlControls.HtmlForm form1;\r
+ }\r
+}\r
this.GHTSubTestExpectedExceptionCaught(exception2);
// ProjectData.ClearProjectError();
}
-#else
+#endif
catch (ArgumentException exception7)
{
// ProjectData.SetProjectError(exception7);
this.GHTSubTestExpectedExceptionCaught(exception2);
// ProjectData.ClearProjectError();
}
-#endif
+
catch (Exception exception8)
{
// ProjectData.SetProjectError(exception8);
GHTActiveSubTest = GHTSubTest4;
try
{
- Image4.Src = "123";
+ Image4.Src = "/123";
GHTSubTestAddResult(Image4.Src);
}
catch (Exception ex)
/// </summary>
public class GHTBaseWeb : System.Web.UI.Page
{
- public HtmlForm GHTActiveForm;
+ public Control GHTActiveForm;
public Control GHTActiveSubTest;
public int GHTActiveSubTestId = 0;
/// <summary>
/// Save a reference to the Form.
/// </summary>
- public virtual void GHTTestBegin(HtmlForm theForm)
+ public virtual void GHTTestBegin(Control theForm)
{
GHTActiveForm = theForm;
- }
-
+ }\r
+\r
/// <summary>
/// not implemented yet. use it as a stub
/// </summary>
public void GHTSubTestBegin(string Description)
{
GHTSubTestCreateNew(Description);
- }
-
+ }\r
+\r
/// <summary>
/// not implemented yet. use it as a stub
/// </summary>
{
return GHTSubTestCreateNew(GHTActiveForm, Description);
}
- protected GHTWebControls.GHTSubTest GHTSubTestCreateNew(HtmlForm theForm, string Description)
+ protected GHTWebControls.GHTSubTest GHTSubTestCreateNew(Control theForm, string Description)
{
if (GHTActiveSubTestId == 0)
{
GHTWebControls.GHTSubTest subtest = new GHTWebControls.GHTSubTest();
subtest.ID = "GHTSubTest" + GHTActiveSubTestId;
subtest.Description = Description;
- subtest.Attributes.Add("TestName",Description);
+ subtest.Attributes.Add("TestName",Description);\r
theForm.Controls.Add(subtest);
GHTActiveSubTest = subtest;
return subtest;
m_lcToTest.DataBind();
GHTSubTestExpectedExceptionNotCaught("ArgumentException");
}
+#if NET_2_0
+ catch (InvalidOperationException ex)
+ {
+ GHTSubTestExpectedExceptionCaught(ex);
+ }
+#endif
catch (ArgumentException ex)
{
GHTSubTestExpectedExceptionCaught(ex);
--- /dev/null
+using System;\r
+using System.Web;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+\r
+namespace GHTTests\r
+{\r
+ public class UrlTestUtils\r
+ {\r
+ public static string FixUrlForDirectoriesTest (string url)\r
+ {\r
+ if (url == null)\r
+ return null;\r
+\r
+ return url.Replace (HttpContext.Current.Request.ApplicationPath, "root");\r
+ }\r
+ }\r
+}\r
+2007-03-06 Vladimir Krasniv <vladimirk@mainsoft.com>
+
+ * reference20: added reference test for PageDirectories tests
+
+2007-03-05 Vladimir Krasniv <vladimirk@mainsoft.com>
+
+ * reference20: added reference tests for PageDirectories tests
+
2007-02-27 Vladimir Krasniv <vladimirk@mainsoft.com>
* almost_config.xml, test_catalog.xml, WebTest.cs: fixed not working
<Compile Include="HtmlAgilityPack\HtmlEntity.cs" />\r
<Compile Include="HtmlAgilityPack\HtmlNode.cs" />\r
<Compile Include="HtmlAgilityPack\HtmlNodeNavigator.cs" />\r
- <Compile Include="HtmlAgilityPack\HtmlWeb.cs" />\r
<Compile Include="HtmlAgilityPack\MixedCodeDocument.cs" />\r
<Compile Include="HtmlAgilityPack\ParseReader.cs" />\r
<Compile Include="HtmlAgilityPack\tools.cs" />\r
<p visible=""/>
<form visible=""/>
<label for=""/>
+ <td colspan=""/>
<select language="" onchange=""/>
<input language="" onchange=""/>
<table bordercolor=""/>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:296px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Enctype.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZKONX9bdpbeyInxPqHILgxcoQBmd" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:296px;width:553px">
- <form method="post" enctype="sfgs.dg.sd.f.sdf.sd.f!@#$%^*()" action="HtmlForm_Enctype1.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZMG1npVFvoV0t7jd9cF4u35jnxjf" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:296px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Enctype2.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZEPTSik0ONWM7VkPkY9UcK6Rto4L" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:96px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Method.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZOsIiAmyAcDv9DKiIVt4wpVfutcW" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:96px;width:553px">
- <form method="asdljhfkj.sd.sd..df." enctype="application/x-www-form-urlencoded" action="HtmlForm_Method1.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZCx9Bl+sb7oJRWBMXqOnh5nRgYsv" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:96px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Method2.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZNh4/fV8+i6bFUmg+Iios7CGdG+V" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:80px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Name.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZDnux4ou0eThOa9rQBFE1kKU8aND" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:80px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Name1.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZFFrKXGVvoUSHLw9Cu/rj56K6rKQ" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:80px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Name2.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZKGWdHWAZXsw9ws9BDj+NVrjmhpG" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:104px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" target="update.aspx" action="HtmlForm_Target.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZHjHExefrYrvoucB91SJ5BvmhWiS" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:296px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" target="_self" action="HtmlForm_Target1.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZKI1A/HGa+U2v+APBA9FL/MXGeBy" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<testresults name="">
- <div id="GHTSubTest1" style="height:152px;width:553px">
- <form method="post" enctype="application/x-www-form-urlencoded" action="HtmlForm_Target2.aspx" id="myForm1" name="myForm1" />
- <div>
- <input id="__VIEWSTATE" value="/wEPDwULLTE1NjIyMzU2NDVkZES2e83XHf16lQVPXqK3OZMQPnt3" type="hidden" name="__VIEWSTATE" />
- </div>
- </div>
-</testresults>
\ No newline at end of file
<TestCase url="/System_Web/HttpRuntime/HttpRuntime_AppDomainAppPath.aspx" name="" Exclude="Y" />
<TestCase url="/System_Web/HttpRuntime/HttpRuntime_AppDomainAppPath_MapPath.aspx" name="" Exclude="Y" />
<TestCase url="/System_Web/HttpValidationStatus/HttpValidationStatus_Enum.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/UserPage.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageHyperLink.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageWControl1.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageWControl2.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageWControl3.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageWControl4.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageWMaster.aspx" name="" Exclude="N" />
+ <TestCase url="/System_Web/PageDirectories/Pages/PageWOMaster.aspx" name="" Exclude="N" />
<TestCase url="/System_Web/ProcessShutdownReason/ProcessShutdownReason_Enum.aspx" name="" Exclude="N" />
<TestCase url="/System_Web/ProcessStatus/ProcessStatus_Enum.aspx" name="" Exclude="N" />
<TestCase url="/System_Web/TraceMode/TraceMode_Enum.aspx" name="" Exclude="N" />
->2007-02-17 Gert Driesen <drieseng@users.sourceforge.net>
+2007-02-20 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * Web.mono.config: Fixed value of enableSessionState attribute since
+ it is now processed case-sensitively.
+
+2007-02-17 Gert Driesen <drieseng@users.sourceforge.net>
* Web.config: enableSessionState only accepts "true", false" and
"ReadOnly" on MS (case-sensitive).
<configuration>\r
<system.web>\r
<siteMap enabled="true"/>\r
- <compilation debug="true">\r
+ <compilation debug="true">\r
</compilation>\r
-\r
-\r
-\r
<httpHandlers>\r
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />\r
</httpHandlers>\r
- <pages enableSessionState="False" />\r
+ <pages enableSessionState="false" />\r
<membership defaultProvider="FakeProvider">\r
<providers>\r
<add name="FakeProvider" type="MonoTests.SystemWeb.Framework.FakeMembershipProvider"\r
EnsureWorkingDirectories ();\r
EnsureDirectoryExists (Path.Combine (baseDir,
Path.GetDirectoryName (targetUrl)));
+ string targetFile = Path.Combine (baseDir, targetUrl);
using (Stream source = type.Assembly.GetManifestResourceStream (resourceName)) {
if (source == null)
throw new ArgumentException ("resource not found: " + resourceName, "resourceName");
byte[] array = new byte[source.Length];
source.Read (array, 0, array.Length);
- if (File.Exists(Path.Combine (baseDir, targetUrl))) {
- using (FileStream existing = File.OpenRead(Path.Combine (baseDir, targetUrl))) {
+ if (File.Exists(targetFile)) {
+ using (FileStream existing = File.OpenRead(targetFile)) {
bool equal = false;
if (array.Length == existing.Length) {
byte[] existingArray = new byte[array.Length];
}
}
- if (equal)
+ if (equal) {
+ existing.Close ();
+ global::System.IO.File.SetLastWriteTime (targetFile, DateTime.Now);
return;
+ }
}
CheckDomainIsDown ();
}
- using (FileStream target = new FileStream (Path.Combine (baseDir, targetUrl), FileMode.Create)) {
+ using (FileStream target = new FileStream (targetFile, FileMode.Create)) {
target.Write (array, 0, array.Length);
}
}
rem =================================================\r
if "%GH_HOME%" == "" (set GH_HOME=c:\Program Files\Mainsoft\Visual MainWin for J2EE V2)\r
if "%VMW_HOME%" == "" (set VMW_HOME=%GH_HOME%) \r
-if "%JAVA_HOME%" == "" (set JAVA_HOME=%GH_HOME%\jre5) \r
+if "%JAVA_HOME%" == "" (set JAVA_HOME=%GH_HOME%\jre6) \r
set JGAC_PATH=%GH_HOME%\jgac\vmw4j2ee_110\r
\r
+rem =================================================\r
+set startDate=%date%\r
+set startTime=%time%\r
+set sdy=%startDate:~10%\r
+set /a sdm=1%startDate:~4,2% - 100\r
+set /a sdd=1%startDate:~7,2% - 100\r
+set /a sth=%startTime:~0,2%\r
+set /a stm=1%startTime:~3,2% - 100\r
+set /a sts=1%startTime:~6,2% - 100\r
+set TIMESTAMP=%sdy%_%sdm%_%sdd%_%sth%_%stm%\r
+\r
+set OUTPUT_FILE_PREFIX=System_Web_Services\r
+set RUNNING_FIXTURE=System.Web.Services\r
+\r
+set COMMON_PREFIX=%cd%\%TIMESTAMP%_%OUTPUT_FILE_PREFIX%.GH_%GH_VERSION%.1.%USERNAME%\r
+set GH_OUTPUT_XML=%COMMON_PREFIX%.xml\r
+set BUILD_LOG=%COMMON_PREFIX%.build.log\r
+set RUN_LOG=%COMMON_PREFIX%.run.log\r
+\r
rem =================================================\r
pushd MainsoftWebApp\r
echo Building Tomcat web project...\r
-msbuild MainsoftWebApp20.Tomcat.csproj /t:rebuild /p:Configuration=Debug_Java\r
+msbuild MainsoftWebApp20.Tomcat.csproj /t:deploy /p:Configuration=Debug_Java >>%BUILD_LOG% 2<&1\r
popd\r
\r
IF NOT ERRORLEVEL==0 GOTO FAILURE\r
if "%NUNIT_BUILD%" == "DONE" goto NUNITSKIP\r
echo Build NUnit...\r
pushd ..\..\..\..\nunit20\\r
-msbuild nunit20.java.sln /t:build /p:Configuration=Debug_Java20\r
+msbuild nunit20.java.sln /t:build /p:Configuration=Debug_Java20 >>%BUILD_LOG% 2<&1\r
popd\r
\r
goto NUNITREADY\r
rem =================================================\r
echo Build System.Web test client side...\r
pushd MainsoftWebTest\r
-msbuild SystemWebTest20.J2EE.csproj /t:build /p:Configuration=Debug_Java_Nunit\r
+msbuild SystemWebTest20.J2EE.csproj /t:build /p:Configuration=Debug_Java_Nunit >>%BUILD_LOG% 2<&1\r
popd\r
\r
\r
rem =================================================\r
echo Buildinig xmltool...\r
pushd ..\..\..\..\tools\mono-xmltool\r
-msbuild XmlTool20.csproj /p:Configuration=Debug_Java20\r
+msbuild XmlTool20.csproj /p:Configuration=Debug_Java20 >>%BUILD_LOG% 2<&1\r
popd\r
copy ..\..\..\..\tools\mono-xmltool\bin\Debug_Java\xmltool.exe MainsoftWebTest\bin\xmltool.exe \r
copy ..\..\..\..\tools\mono-xmltool\nunit_transform.xslt MainsoftWebTest\bin\nunit_transform.xslt \r
set GH_CP=%GH_CP%;nunit.util.jar\r
set GH_CP=%GH_CP%;nunit-console.jar\r
\r
-set ghlogfile=logfile.xml\r
-set monologfile=mono.xml\r
-\r
pushd MainsoftWebTest\bin\r
\r
echo Running Mainsoft tests...\r
-"%JAVA_HOME%\bin\java.exe" -cp .;"%GH_CP%" NUnit.Console.ConsoleUi SystemWebTest.jar /xml=%ghlogfile% /fixture:MonoTests.stand_alone.WebHarness.Harness\r
+"%JAVA_HOME%\bin\java.exe" -cp .;"%GH_CP%" NUnit.Console.ConsoleUi SystemWebTest.jar /xml=%GH_OUTPUT_XML% /fixture:MonoTests.stand_alone.WebHarness.Harness >>%RUN_LOG% 2<&1\r
\r
echo Finished...\r
-xmltool.exe --transform nunit_transform.xslt %ghlogfile%\r
+xmltool.exe --transform nunit_transform.xslt %GH_OUTPUT_XML%\r
\r
popd\r
\r
\r
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\\r
set TOMCAT_PATH=%VMW_HOME%\jakarta-tomcat\common\lib\\r
-set JAVA_HOME=%VMW_HOME%\jre5\r
+set JAVA_HOME=%VMW_HOME%\jre6\r
\r
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar\r
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar\r
\r
msbuild %TEST_SOLUTION% /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%BUILD_LOG% 2<&1\r
IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION\r
+\r
+REM ********************************************************\r
+@echo Deploying GH solution to tomcat...\r
+REM ********************************************************\r
+IF NOT DEFINED VMW_BUILDER GOTO MSBUILD_DEPLOY\r
+set CATALINA_HOME=%VMW_HOME%\jakarta-tomcat\r
+call "%VMW_HOME%\jakarta-tomcat\bin\shutdown.bat"\r
+echo Waiting 5 sec for tomcat to stop....\r
+@ping 127.0.0.1 -n 5 -w 1000 > nul\r
+xcopy /Y Test\mainsoft\MainsoftWebApp20\bin\%PROJECT_CONFIGURATION%\MainsoftWebApp20.war "%VMW_HOME%\jakarta-tomcat\webapps"\r
+call "%VMW_HOME%\jakarta-tomcat\bin\startup.bat"\r
+echo Waiting 5 sec for tomcat to start....\r
+@ping 127.0.0.1 -n 5 -w 1000 > nul\r
+GOTO AFTER_DEPLOY\r
+:MSBUILD_DEPLOY\r
echo msbuild %DEPLOY_PROJECT% /t:Deploy /p:Configuration=%PROJECT_CONFIGURATION% /p:Platform=AnyCPU >>%BUILD_LOG% \r
msbuild %DEPLOY_PROJECT% /t:Deploy /p:Configuration=%PROJECT_CONFIGURATION% /p:Platform=AnyCPU >>%BUILD_LOG% 2<&1\r
+:AFTER_DEPLOY\r
\r
IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION\r
\r
+2007-03-05 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReader.cs : when Create() returns customized XmlTextReader, set
+ EntityHandling.ExpandEntities. Fixed bug #81000.
+
2007-02-20 Atsushi Enomoto <atsushi@ximian.com>
* XmlTextReader.cs, XmlTextReader2.cs : Reset() should work now.
if (Double.IsNegativeInfinity(value)) return "-INF";
if (Double.IsPositiveInfinity(value)) return "INF";
if (Double.IsNaN(value)) return "NaN";
-#if TARGET_JVM
- return value.ToString("R", NumberFormatInfo.InvariantInfo);
-#else
return value.ToString(CultureInfo.InvariantCulture);
-#endif
}
public static string ToString(float value)
if (Single.IsNegativeInfinity(value)) return "-INF";
if (Single.IsPositiveInfinity(value)) return "INF";
if (Single.IsNaN(value)) return "NaN";
-#if TARGET_JVM
- return value.ToString("R", NumberFormatInfo.InvariantInfo);
-#else
return value.ToString(CultureInfo.InvariantCulture);
-#endif
}
[CLSCompliant (false)]
reader.XmlResolver = settings.XmlResolver;
// Normalization is set true by default.
reader.Normalization = true;
+ reader.EntityHandling = EntityHandling.ExpandEntities;
if (settings.ProhibitDtd)
reader.ProhibitDtd = true;
<JDKName>1.5.0_05</JDKName>\r
<TargetPlatform>0</TargetPlatform>\r
</PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20_Prepare|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <OutputPath>bin\Debug_Java20_Prepare\</OutputPath>\r
+ <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM;NET_2_0</DefineConstants>\r
+ <BaseAddress>285212672</BaseAddress>\r
+ <DebugType>full</DebugType>\r
+ <PlatformTarget>AnyCPU</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <SkipValidation>True</SkipValidation>\r
+ <KeepIntermediate>False</KeepIntermediate>\r
+ <GHProjectType>1</GHProjectType>\r
+ <PreCompile>false</PreCompile>\r
+ <NoWarn>67,169,612,618,649,3021</NoWarn>\r
+ <AdditionalClassPath>\r
+ </AdditionalClassPath>\r
+ <ApplicationServerType>\r
+ </ApplicationServerType>\r
+ <Version>2.0</Version>\r
+ <JDKName>1.5.0_05</JDKName>\r
+ <TargetPlatform>0</TargetPlatform>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20_Prepare|AnyCPU' ">\r
+ <OutputPath>bin\Release_Java20_Prepare\</OutputPath>\r
+ <DefineConstants>TRACE;NET_1_1;TARGET_JVM;NET_2_0</DefineConstants>\r
+ <BaseAddress>285212672</BaseAddress>\r
+ <Optimize>true</Optimize>\r
+ <DebugType>pdbonly</DebugType>\r
+ <PlatformTarget>AnyCPU</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <SkipValidation>false</SkipValidation>\r
+ <KeepIntermediate>false</KeepIntermediate>\r
+ <GHProjectType>1</GHProjectType>\r
+ <PreCompile>false</PreCompile>\r
+ <NoWarn>67,169,612,618,649,3021</NoWarn>\r
+ <AdditionalClassPath>\r
+ </AdditionalClassPath>\r
+ <ApplicationServerType>\r
+ </ApplicationServerType>\r
+ <Version>2.0</Version>\r
+ <JDKName>1.5.0_05</JDKName>\r
+ <TargetPlatform>0</TargetPlatform>\r
+ </PropertyGroup>\r
<ItemGroup>\r
<Reference Include="rt">\r
<HintPath>..\lib\rt.dll</HintPath>\r
{
[Test]
[NUnit.Framework.Category("NotDotNet")] // FDBK50639
+#if TARGET_JVM
+ [Ignore ("JVM returns fields in different order")]
+#endif
public void WriteLiteral ()
{
Test data = BuildTestObject ();
[Test]
[NUnit.Framework.Category("NotDotNet")]
+#if TARGET_JVM
+ [Ignore ("TD #7463")]
+#endif
public void ReadLiteral ()
{
XmlSerializer ss = new XmlSerializer (GetLiteralTypeMapping ());
[Test]
[Category ("NotDotNet")] // MS.NET does not allow SoapAttribute backed by enum ??
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
+#endif
public void TestDeserialize_Field_Encoded ()
{
Field_Encoded f = null;
[Test]
#if ONLY_1_1
[Category ("NotDotNet")] // wrong error message is reported in .NET 1.1
+#endif
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
#endif
public void TypeMapping_Attribute_ComplexType ()
{
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
+#endif
public void TypeMapping_Field_Encoded ()
{
XmlTypeMapping tm = Map (typeof (Field_Encoded));
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
+#endif
public void TypeMapping_Field_Encoded_DefaultNamespace ()
{
XmlTypeMapping tm = Map (typeof (Field_Encoded), AnotherNamespace);
[Test]
[ExpectedException (typeof (InvalidOperationException))]
+#if TARGET_JVM
+ [Ignore ("TD #7461")]
+#endif
public void TypeMapping_IEnumerable_Object_NoMatchingAddMethod ()
{
Map (typeof (ObjectEnumerableNoMatchingAddMethod));
[Test]
[ExpectedException (typeof (InvalidOperationException))]
+#if TARGET_JVM
+ [Ignore ("TD #7461")]
+#endif
public void TypeMapping_IEnumerable_Object_NoMatchingAddMethod_Array ()
{
Map (typeof (ObjectEnumerableNoMatchingAddMethod[]));
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
+#endif
public void TypeMapping_InvalidDefault ()
{
SoapAttributes attrs = new SoapAttributes (typeof (Field_Encoded).GetMember ("Modifiers")[0]);
[Test]
[ExpectedException (typeof (InvalidOperationException))]
+#if TARGET_JVM
+ [Ignore ("TD #7461")]
+#endif
public void TypeMapping_IEnumerable_Object_NoMatchingAddMethod ()
{
Map (typeof (ObjectEnumerableNoMatchingAddMethod));
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD #7461")]
+#endif
[ExpectedException (typeof (InvalidOperationException))]
public void TypeMapping_IEnumerable_Object_NoMatchingAddMethod_Array ()
{
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD #7464")]
+#endif
public void TestSerializeChar ()
{
Serialize ('A');
[Test]
[Category ("NotDotNet")] // MS bug
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
+#endif
public void TestSerializeField_Encoded ()
{
Field_Encoded f = new Field_Encoded ();
}
[Test]
+#if TARGET_JVM
+ [Ignore ("JVM returns fields in different order")]
+#endif
public void TestSerializeGroup ()
{
Group myGroup = new Group ();
// test DefaultValue /////////////////////////////////////////////////////
[Test]
+#if TARGET_JVM
+ [Ignore ("TD #7458")]
+#endif
public void TestSerializeDefaultValueAttribute ()
{
XmlAttributeOverrides overrides = new XmlAttributeOverrides ();
}
#if NET_2_0
+#if !TARGET_JVM
[Test]
public void GenerateSerializerGenerics ()
{
new Type [] {type},
new XmlTypeMapping [] {imp.ImportTypeMapping (type)});
}
+#endif
[Test]
public void Nullable ()
{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU\r
{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU\r
{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU\r
+ {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU\r
{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU\r
{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU\r
{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU\r
Assert.IsNull (xsltException.SourceUri, "#4");
Assert.IsNull (xsltException.InnerException, "#5");
Assert.IsNull (xsltException.Source, "#6");
+#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#7");
Assert.IsNull (xsltException.TargetSite, "#8");
+#endif
}
[Test]
Assert.IsNull (xsltException.SourceUri, "#4");
Assert.IsNull (xsltException.InnerException, "#5");
Assert.IsNull (xsltException.Source, "#6");
+#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#7");
Assert.IsNull (xsltException.TargetSite, "#8");
+#endif
}
#endif
Assert.IsNull (xsltException.SourceUri, "#A4");
Assert.AreSame (cause, xsltException.InnerException, "#A5");
Assert.IsNull (xsltException.Source, "#A6");
+#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#A7");
Assert.IsNull (xsltException.TargetSite, "#A8");
-
+#endif
xsltException = new XsltException ((string) null, cause);
Assert.AreEqual (0, xsltException.LineNumber, "#B1");
Assert.AreEqual (0, xsltException.LinePosition, "#B2");
Assert.IsNull (xsltException.SourceUri, "#B5");
Assert.AreSame (cause, xsltException.InnerException, "#B6");
Assert.IsNull (xsltException.Source, "#B7");
+#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#B8");
Assert.IsNull (xsltException.TargetSite, "#B9");
-
+#endif
xsltException = new XsltException (msg, (Exception) null);
Assert.AreEqual (0, xsltException.LineNumber, "#C1");
Assert.AreEqual (0, xsltException.LinePosition, "#C2");
Assert.IsNull (xsltException.SourceUri, "#C4");
Assert.IsNull (xsltException.InnerException, "#C5");
Assert.IsNull (xsltException.Source, "#C6");
+#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#C7");
Assert.IsNull (xsltException.TargetSite, "#C8");
-
+#endif
xsltException = new XsltException ((string) null, (Exception) null);
Assert.AreEqual (0, xsltException.LineNumber, "#D1");
Assert.AreEqual (0, xsltException.LinePosition, "#D2");
Assert.IsNull (xsltException.SourceUri, "#D4");
Assert.IsNull (xsltException.InnerException, "#D5");
Assert.IsNull (xsltException.Source, "#D6");
+#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#D7");
Assert.IsNull (xsltException.TargetSite, "#D8");
+#endif
}
}
}
+2007-03-05 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReaderSettingsTests.cs : added test for bug #81000.
+
2007-02-07 Atsushi Enomoto <atsushi@ximian.com>
* XmlReaderCommonTests.cs : added test for bug #80848.
r.Read ();
}
}
+
+ [Test]
+ public void ResolveEntities () // bug #81000
+ {
+ XmlReaderSettings s = new XmlReaderSettings ();
+ s.ProhibitDtd = false;
+ s.XmlResolver = new XmlResolver81000 ();
+
+ string xml = "<!DOCTYPE root SYSTEM \"foo.dtd\"><root>α</root>";
+ XmlReader r = XmlReader.Create (new StringReader (xml), s);
+ r.Read ();
+ r.Read ();
+ r.Read ();
+ // not EntityReference but Text
+ AssertEquals ("#1", XmlNodeType.Text, r.NodeType);
+ r.Read ();
+ AssertEquals ("#2", XmlNodeType.EndElement, r.NodeType);
+ }
+
+ public class XmlResolver81000 : XmlResolver
+ {
+ public override ICredentials Credentials { set {} }
+
+ public override object GetEntity (Uri uri, string role, Type type)
+ {
+ return new MemoryStream (Encoding.UTF8.GetBytes ("<!ENTITY alpha \"bravo\">"));
+ }
+ }
}
}
#endif
\r
call run-W3C-tests.bat rebuild\r
call run-XSLT-tests.bat rebuild\r
+call run-tests.api.bat rebuild
\ No newline at end of file
+2007-03-09 Chris Toshok <toshok@ximian.com>
+
+ * System.ComponentModel.Design/DesignerTransactionCloseEventArgs.cs:
+ update this to 2.0. massage a patch from Ivan Zlatev.
+
2007-02-27 Rolf Bjarne Kvinge <RKvinge@novell.com>
* System_test.dll.sources: Added MaskedTextProviderTest.cs
+2007-03-09 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * VBCodeCompiler.cs: Reference Microsoft.VisualBasic.dll and not Microsoft.VisualBasic (patch by Frederik Carlier).
+ Don't set /wlevel, vbnc doesn't support it.
+
2007-02-21 Gert Driesen <drieseng@users.sourceforge.net>
* VBCodeCompiler.cs: Also generate temp filename if OutputAssembly is
if (options.TreatWarningsAsErrors)
args.Append ("/warnaserror ");
+ /* Disabled. vbnc does not support warninglevels.
if (options.WarningLevel != -1)
args.AppendFormat ("/wlevel:{0} ", options.WarningLevel);
+ */
if (options.OutputAssembly == null || options.OutputAssembly.Length == 0) {
string ext = (options.GenerateExecutable ? "exe" : "dll");
// add standard import to Microsoft.VisualBasic if missing
if (!Reference2MSVBFound)
- args.Append ("/r:\"Microsoft.VisualBasic\" ");
+ args.Append ("/r:\"Microsoft.VisualBasic.dll\" ");
if (options.CompilerOptions != null) {
args.Append (options.CompilerOptions);
+2007-03-05 Peter Dettman <peter.dettman@iinet.net.au>
+
+ * Codegenerator.cs: I noticed an `unreachable code' warning while
+ building Mono:
+
+ System.CodeDom.Compiler/CodeGenerator.cs(1229,42): warning CS0162:
+ Unreachable code detected
+
+ This turned out to be in the method
+ CodeGenerator.IsValidLanguageIndependentIdentifier, which was
+ broken.
+
+ The following patch contains a unit test to demonstrate the
+ problem (checked against MS.NET), and a fix to CodeGenerator.cs.
+
2007-02-22 Marek Habersack <grendello@gmail.com>
* CompilerCollection.cs: be case-insensitive with languages and
return false;
if (value.Equals (string.Empty))
return false;
- switch (char.GetUnicodeCategory (value[0]))
- {
+
+ switch (char.GetUnicodeCategory (value[0])) {
+ case UnicodeCategory.LetterNumber:
+ case UnicodeCategory.LowercaseLetter:
+ case UnicodeCategory.TitlecaseLetter:
+ case UnicodeCategory.UppercaseLetter:
+ case UnicodeCategory.OtherLetter:
+ case UnicodeCategory.ModifierLetter:
+ case UnicodeCategory.ConnectorPunctuation:
+ break;
+ default:
+ return false;
+ }
+
+ for (int x = 1; x < value.Length; ++x) {
+ switch (char.GetUnicodeCategory (value[x])) {
case UnicodeCategory.LetterNumber:
case UnicodeCategory.LowercaseLetter:
case UnicodeCategory.TitlecaseLetter:
case UnicodeCategory.OtherLetter:
case UnicodeCategory.ModifierLetter:
case UnicodeCategory.ConnectorPunctuation:
- if (value.Length > 1)
- {
- for (int x = 0; x < value.Length; x++)
- {
- switch (char.GetUnicodeCategory (value[x]))
- {
- case UnicodeCategory.LetterNumber:
- case UnicodeCategory.LowercaseLetter:
- case UnicodeCategory.TitlecaseLetter:
- case UnicodeCategory.UppercaseLetter:
- case UnicodeCategory.OtherLetter:
- case UnicodeCategory.ModifierLetter:
- case UnicodeCategory.ConnectorPunctuation:
- case UnicodeCategory.DecimalDigitNumber:
- case UnicodeCategory.NonSpacingMark:
- case UnicodeCategory.SpacingCombiningMark:
- case UnicodeCategory.Format:
- return true;
- }
- return false;
- }
- }
- else
- return true;
+ case UnicodeCategory.DecimalDigitNumber:
+ case UnicodeCategory.NonSpacingMark:
+ case UnicodeCategory.SpacingCombiningMark:
+ case UnicodeCategory.Format:
break;
+ default:
+ return false;
+ }
}
- return false;
+
+ return true;
}
protected abstract bool Supports (GeneratorSupport supports);
public Stack ()
{
-#if TARGET_JVM //to work around resize (null) bug
- data = new T [INITIAL_SIZE];
-#endif
defaultCapacity = INITIAL_SIZE;
}
//
// Author:
// Alejandro Sánchez Acosta <raciel@es.gnu.org>
+// Ivan N. Zlatev <contact i-nZ.net>
//
// (C) Alejandro Sánchez Acosta
//
public class DesignerTransactionCloseEventArgs : EventArgs
{
private bool commit;
- public DesignerTransactionCloseEventArgs (bool commit) {
+ private bool last_transaction;
+
+#if NET_2_0
+ public
+#endif
+ DesignerTransactionCloseEventArgs (bool commit, bool lastTransaction)
+ {
this.commit = commit;
+ last_transaction = lastTransaction;
}
-
- public bool TransactionCommitted
+
+ public DesignerTransactionCloseEventArgs (bool commit) : this (commit, false)
{
- get {
- return commit;
- }
+ }
+
+#if NET_2_0
+ public bool LastTransaction {
+ get { return last_transaction; }
+ }
+#endif
+
+ public bool TransactionCommitted {
+ get { return commit; }
}
}
}
+2007-03-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * MaskedTextProvider.cs: Make internal methods private.
+
2007-02-27 Rolf Bjarne Kvinge <RKvinge@novell.com>
* MaskedTextProvider.cs: Added.
return result;
}
- public bool AddInternal (string str_input, out int testPosition, out MaskedTextResultHint resultHint, bool only_test)
+ private bool AddInternal (string str_input, out int testPosition, out MaskedTextResultHint resultHint, bool only_test)
{
EditPosition [] edit_positions;
return true;
}
- public bool VerifyCharInternal (char input, int position, out MaskedTextResultHint hint, bool only_test)
+ private bool VerifyCharInternal (char input, int position, out MaskedTextResultHint hint, bool only_test)
{
hint = MaskedTextResultHint.Unknown;
+2007-03-03 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ConfigurationSettings.cs: On 2.0 profile, use ConfigurationManager
+ to retrieve config section. Fixes bug #81020.
+
2007-01-22 Miguel de Icaza <miguel@novell.com>
* SettingsBase.cs: Removed a NotImplementedException, it provides
#endif
public static object GetConfig (string sectionName)
{
+#if NET_2_0 && CONFIGURATION_DEP
+ return ConfigurationManager.GetSection (sectionName);
+#else
return config.GetConfig (sectionName);
+#endif
}
#if NET_2_0
+2007-03-04 Vladimir Krasnov <vlaimdirk@mainsoft.com>
+
+ * DiagnosticsConfigurationHandler.cs: removed configuration init in
+ TARGET_JVM since not supported
+
2007-02-02 Gert Driesen <drieseng@users.sourceforge.net>
* EventLogImpl.cs: When no log name is specified, return zero-length
elementHandlers ["trace"] = new ElementHandler (AddTraceNode);
#if NET_2_0
elementHandlers ["sources"] = new ElementHandler (AddSourcesNode);
+ elementHandlers ["sharedListeners"] = new ElementHandler (AddSharedListenersNode);
#endif
}
// them
private void AddSwitchesNode (IDictionary d, XmlNode node)
{
+#if !TARGET_JVM
// There are no attributes on <switch/>
ValidateInvalidAttributes (node.Attributes, node);
}
d [node.Name] = newNodes;
+#endif
}
private static int ValidateIntegralValue (string name, string value)
#if NET_2_0
static readonly Hashtable static_sources = new Hashtable ();
+ [MonoTODO]
+ private void AddSharedListenersNode (IDictionary d, XmlNode node)
+ {
+ }
+
private void AddSourcesNode (IDictionary d, XmlNode node)
{
// FIXME: are there valid attributes?
// for add, "name" and "type" are required; initializeData is optional
private void AddTraceListeners (XmlNode listenersNode)
{
+#if !TARGET_JVM
// There are no attributes on <listeners/>
ValidateInvalidAttributes (listenersNode.Attributes, listenersNode);
else
ThrowUnrecognizedNode (child);
}
+#endif
}
private void AddTraceListener (string name, string type, string initializeData)
+2007-03-11 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * TcpClient.cs: Do not initialize network stream in Connect. In
+ Dispose, only nullify client if network stream was not obtained.
+ Fixes bug #81105.
+
2007-01-30 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* Socket.jvm.cs: additional stubs for net_2_0 properties,
{
try {
client.Connect(remote_end_point);
- stream = new NetworkStream(client, true);
active = true;
} finally {
CheckDisposed ();
return;
disposed = true;
- if (disposing){
+ if (disposing) {
// release managed resources
NetworkStream s = stream;
stream = null;
s = null;
} else if (client != null){
client.Close ();
+ client = null;
}
- client = null;
}
}
{
if (disposed)
throw new ObjectDisposedException (GetType().FullName);
- }
+ }
}
}
+2007-03-09 Miguel de Icaza <miguel@novell.com>
+
+ * FtpDataStream.cs: Close must be called on the stream before we
+ attempt to read a status code from the remote server.
+
+ Fixes FTP transfers to complete.
+
+2007-03-05 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
+
+ * HttpWebRequest.cs: properly handle OPTIONS, which may or may not
+ have a request body. Fixes bug #80686.
+
+2007-03-02 Marek Habersack <mhabersack@novell.com>
+
+ * WebClient.cs: Overwrite existing files on download, as
+ documented and as tested on MS.NET. Fixes Bug#81005
+
2007-02-24 Gert Driesen <drieseng@users.sourceforge.net>
* HttpWebRequest.cs: Allow Proxy to be set to null on 2.0 profile.
totalRead += nbytes;
if (nbytes == 0) {
contentLength = totalRead;
- request.SetTransferCompleted ();
networkStream.Close ();
+ request.SetTransferCompleted ();
}
-
+
return nbytes;
}
}
if(method != WebRequestMethods.Ftp.UploadFileWithUniqueName)
- status = SendCommand (method, requestUri.LocalPath);
+ status = SendCommand (method, Uri.UnescapeDataString (requestUri.LocalPath));
else
status = SendCommand (method);
internal bool InternalAllowBuffering {
get {
return (allowBuffering && (method != "HEAD" && method != "GET" &&
- method != "MKCOL" && method != "CONNECT"));
+ method != "MKCOL" && method != "CONNECT" &&
+ method != "DELETE" && method != "TRACE"));
}
}
if (aborted)
throw new WebException ("The request was previosly aborted.");
- bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD");
+ bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" ||
+ method == "TRACE" || method == "DELETE");
if (method == null || !send)
throw new ProtocolViolationException ("Cannot send data when method is: " + method);
writeStream.Write (bodyBuffer, 0, bodyBufferLength);
bodyBuffer = null;
writeStream.Close ();
- } else if (method == "PUT" || method == "POST") {
+ } else if (method == "PUT" || method == "POST" || method == "OPTIONS") {
if (getResponseCalled && !writeStream.RequestWritten)
writeStream.WriteRequest ();
}
int cLength = (int) response.ContentLength;
int length = (cLength <= -1 || cLength > 8192) ? 8192 : cLength;
byte [] buffer = new byte [length];
- FileStream f = new FileStream (fileName, FileMode.CreateNew);
+ FileStream f = new FileStream (fileName, FileMode.Create);
int nread = 0;
while ((nread = st.Read (buffer, 0, length)) != 0)
--- /dev/null
+2007-03-12 Raja R Harinath <rharinath@novell.com>
+
+ * StandardOleMarshalObject.cs: New .net2.0 class.
+ * DefaultParameterValueAttribute.cs: Move here from corlib.
+
--- /dev/null
+//
+// System.Runtime.InteropServices.DefaultParameterValueAttribute.cs
+//
+// Author: Zoltan Varga (vargaz@gmail.com)
+//
+// (C) Ximian, Inc.
+//
+
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0 || BOOTSTRAP_NET_2_0
+
+using System;
+
+namespace System.Runtime.InteropServices {
+ [AttributeUsage (AttributeTargets.Parameter)]
+ public sealed class DefaultParameterValueAttribute : Attribute
+ {
+ object value;
+
+ public DefaultParameterValueAttribute (object value)
+ {
+ this.value = value;
+ }
+
+ public object Value {
+ get {
+ return value;
+ }
+ }
+ }
+}
+
+#endif
--- /dev/null
+//
+// System.Runtime.InteropServices.StandardOleMarshalObject.cs
+//
+// Author: Raja R Harinath <rharinath@novell.com>
+//
+
+//
+// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+
+namespace System.Runtime.InteropServices {
+ [ComVisible (true)]
+ [MonoLimitation ("The runtime does nothing special apart from what it already does with marshal-by-ref objects")]
+ public class StandardOleMarshalObject : MarshalByRefObject
+ {
+ protected StandardOleMarshalObject ()
+ {
+ }
+ }
+}
+
+#endif
System.Net/UploadValuesCompletedEventHandler.cs
System.Net/UploadStringCompletedEventHandler.cs
System.Net/DownloadStringCompletedEventHandler.cs
+System.Runtime.InteropServices/DefaultParameterValueAttribute.cs
+System.Runtime.InteropServices/StandardOleMarshalObject.cs
+2007-03-05 Peter Dettman <peter.dettman@iinet.net.au>
+
+ * Uri.cs: This patch straightens out Equals/GetHashCode for the
+ Uri class:
+
+ - GetHashCode gives sensible values for relative Uri's.
+ - Uri's that compare equal will give same hashcode.
+ - operator == now uses Equals.
+
+ All existing tests still pass, and I have added some extra test
+ cases specifically for Equals/GetHashCode on relative Uri's
+ (included in patch).
+
2007-01-22 Miguel de Icaza <miguel@novell.com>
* Uri.cs (MakeRelativeUri): implement, copy most of the code from
}
// Assumes: uri != null
- // FIXME: Should we have a different implementation for NET_2_0?
bool InternalEquals (Uri uri)
{
+#if NET_2_0
+ if (this.isAbsoluteUri != uri.isAbsoluteUri)
+ return false;
+ if (!this.isAbsoluteUri)
+ return this.source == uri.source;
+#endif
+
CultureInfo inv = CultureInfo.InvariantCulture;
- return ((this.scheme.ToLower (inv) == uri.scheme.ToLower (inv)) &&
- (this.host.ToLower (inv) == uri.host.ToLower (inv)) &&
- (this.port == uri.port) &&
- (this.path == uri.path) &&
- (this.query.ToLower (inv) == uri.query.ToLower (inv)));
- }
+ return this.scheme.ToLower (inv) == uri.scheme.ToLower (inv)
+ && this.host.ToLower (inv) == uri.host.ToLower (inv)
+ && this.port == uri.port
+#if NET_2_0
+ && this.query == uri.query
+#else
+ // Note: MS.NET 1.x has bug - ignores query check altogether
+ && this.query.ToLower (inv) == uri.query.ToLower (inv)
+#endif
+ && this.path == uri.path;
+ }
#if NET_2_0
public static bool operator == (Uri u1, Uri u2)
{
- if ((object) u1 == null)
- return (object) u2 == null;
- else if ((object) u2 == null)
- return false;
-
- return u1.scheme == u2.scheme &&
- u1.userinfo == u2.userinfo &&
- u1.host == u2.host &&
- u1.port == u2.port &&
- u1.path == u2.path &&
- u1.query == u2.query;
+ return object.Equals(u1, u2);
}
public static bool operator != (Uri u1, Uri u2)
public override int GetHashCode ()
{
- if (cachedHashCode == 0)
- cachedHashCode = scheme.GetHashCode ()
- + userinfo.GetHashCode ()
- + host.GetHashCode ()
- + port
- + path.GetHashCode ()
- + query.GetHashCode ();
- return cachedHashCode;
+ if (cachedHashCode == 0) {
+ CultureInfo inv = CultureInfo.InvariantCulture;
+ if (isAbsoluteUri) {
+ cachedHashCode = scheme.ToLower (inv).GetHashCode ()
+ ^ host.ToLower (inv).GetHashCode ()
+ ^ port
+#if NET_2_0
+ ^ query.GetHashCode ()
+#else
+ ^ query.ToLower (inv).GetHashCode ()
+#endif
+ ^ path.GetHashCode ();
+ }
+ else {
+ cachedHashCode = source.GetHashCode ();
+ }
+ }
+ return cachedHashCode;
}
public string GetLeftPart (UriPartial part)
<GHProjectKind>framework</GHProjectKind>\r
<TargetPlatform>0</TargetPlatform>\r
</PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20_Prepare|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <OutputPath>bin\Debug_Java20_Prepare\</OutputPath>\r
+ <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0;CONFIGURATION_2_0</DefineConstants>\r
+ <BaseAddress>285212672</BaseAddress>\r
+ <DebugType>full</DebugType>\r
+ <PlatformTarget>AnyCPU</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <SkipValidation>True</SkipValidation>\r
+ <KeepIntermediate>False</KeepIntermediate>\r
+ <GHProjectType>1</GHProjectType>\r
+ <PreCompile>false</PreCompile>\r
+ <AdditionalClassPath>\r
+ </AdditionalClassPath>\r
+ <ApplicationServerType>\r
+ </ApplicationServerType>\r
+ <Version>2.0</Version>\r
+ <JDKName>1.5.0_05</JDKName>\r
+ <jarserver>iap2</jarserver>\r
+ <GHProjectKind>framework</GHProjectKind>\r
+ <TargetPlatform>0</TargetPlatform>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20_Prepare|AnyCPU' ">\r
+ <OutputPath>bin\Release_Java20_Prepare\</OutputPath>\r
+ <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0;CONFIGURATION_2_0</DefineConstants>\r
+ <BaseAddress>285212672</BaseAddress>\r
+ <Optimize>true</Optimize>\r
+ <DebugType>pdbonly</DebugType>\r
+ <PlatformTarget>AnyCPU</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <SkipValidation>True</SkipValidation>\r
+ <KeepIntermediate>False</KeepIntermediate>\r
+ <GHProjectType>1</GHProjectType>\r
+ <PreCompile>false</PreCompile>\r
+ <AdditionalClassPath>\r
+ </AdditionalClassPath>\r
+ <ApplicationServerType>\r
+ </ApplicationServerType>\r
+ <Version>2.0</Version>\r
+ <JDKName>1.5.0_05</JDKName>\r
+ <jarserver>iap2</jarserver>\r
+ <TargetPlatform>0</TargetPlatform>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20_Prepare1|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <OutputPath>bin\Debug_Java20_Prepare1\</OutputPath>\r
+ <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0;XML_DEP;CONFIGURATION_2_0</DefineConstants>\r
+ <BaseAddress>285212672</BaseAddress>\r
+ <DebugType>full</DebugType>\r
+ <PlatformTarget>AnyCPU</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <SkipValidation>True</SkipValidation>\r
+ <KeepIntermediate>False</KeepIntermediate>\r
+ <GHProjectType>1</GHProjectType>\r
+ <PreCompile>false</PreCompile>\r
+ <AdditionalClassPath>\r
+ </AdditionalClassPath>\r
+ <ApplicationServerType>\r
+ </ApplicationServerType>\r
+ <Version>2.0</Version>\r
+ <JDKName>1.5.0_05</JDKName>\r
+ <jarserver>iap2</jarserver>\r
+ <GHProjectKind>framework</GHProjectKind>\r
+ <TargetPlatform>0</TargetPlatform>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20_Prepare1|AnyCPU' ">\r
+ <OutputPath>bin\Release_Java20_Prepare1\</OutputPath>\r
+ <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0;XML_DEP;CONFIGURATION_2_0</DefineConstants>\r
+ <BaseAddress>285212672</BaseAddress>\r
+ <Optimize>true</Optimize>\r
+ <DebugType>pdbonly</DebugType>\r
+ <PlatformTarget>AnyCPU</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <SkipValidation>True</SkipValidation>\r
+ <KeepIntermediate>False</KeepIntermediate>\r
+ <GHProjectType>1</GHProjectType>\r
+ <PreCompile>false</PreCompile>\r
+ <AdditionalClassPath>\r
+ </AdditionalClassPath>\r
+ <ApplicationServerType>\r
+ </ApplicationServerType>\r
+ <Version>2.0</Version>\r
+ <JDKName>1.5.0_05</JDKName>\r
+ <jarserver>iap2</jarserver>\r
+ <TargetPlatform>0</TargetPlatform>\r
+ </PropertyGroup>\r
<Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />\r
<Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
<Compile Include="System.ComponentModel\MergablePropertyAttribute.cs" />\r
<Compile Include="System.ComponentModel\NotifyParentPropertyAttribute.cs" />\r
<Compile Include="System.ComponentModel\ParenthesizePropertyNameAttribute.cs" />\r
+ <Compile Include="System.ComponentModel\PasswordPropertyTextAttribute.cs" />\r
<Compile Include="System.ComponentModel\ProgressChangedEventArgs.cs" />\r
<Compile Include="System.ComponentModel\ProgressChangedEventHandler.cs" />\r
<Compile Include="System.ComponentModel\PropertyChangedEventArgs.cs" />\r
System.Net/WebPermissionAttributeTest.cs
System.Net/WebProxyTest.cs
System.Net/WebRequestTest.cs
+System.Net/WebClientTest.cs
System.Net.Configuration/ConnectionManagementSectionTest.cs
System.Net.Configuration/HttpWebRequestElementTest.cs
System.Net.Configuration/WebRequestModulesSectionTest.cs
Assert.AreEqual (true, codeGenerator.IsCurrentStruct, "#F5");
}
+ [Test]
+ public void IsValidLanguageIndependentIdentifierTest ()
+ {
+ Assert.AreEqual (true,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("hello"), "#G1");
+ Assert.AreEqual (true,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("good1"), "#G2");
+ Assert.AreEqual (false,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("2bad"), "#G3");
+ Assert.AreEqual (false,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("@start"), "#G4");
+ Assert.AreEqual (false,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("not@start"), "#G5");
+ Assert.AreEqual (false,
+ CodeGenerator.IsValidLanguageIndependentIdentifier(" spaceatstart"), "#G6");
+ Assert.AreEqual (false,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("spaceatend "), "#G7");
+ Assert.AreEqual (false,
+ CodeGenerator.IsValidLanguageIndependentIdentifier("a spacein2ndplace"), "#G8");
+ }
+
private CodeTypeDeclaration GetClassType ()
{
return new CodeTypeDeclaration ();
}
[Test]
-#if TARGET_JVM
- [Ignore("TD BUG ID: 7202")]
-#endif
public void GenericTypeTest1 () {
CodeTypeReference reference = new CodeTypeReference (
typeof (Dictionary<int,string>));
}
[Test]
-#if TARGET_JVM
- [Ignore("TD BUG ID: 7202")]
-#endif
public void GenericTypeTest2 () {
CodeTypeReference reference = new CodeTypeReference (
typeof (Dictionary<List<int>, string>));
}
[Test]
-#if TARGET_JVM
- [Ignore("TD BUG ID: 7202")]
-#endif
public void GenericTypeTest3 ()
{
CodeTypeReference reference = new CodeTypeReference (
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7203")]
-#endif
public void GenericTypeTest5 ()
{
CodeTypeReference reference = new CodeTypeReference (
for (LinkedListNode <int> current = intlist.First; current != null; current = current.Next )
Assert.AreSame (intlist, current.List);
}
-#if !TARGET_JVM
+
[Test]
public void CopyToTest ()
{
for (int i = 0; i < 3; i++)
Assert.AreEqual (values [i], output [i]);
}
-#endif
+
[Test]
public void FindTest ()
{
AssertEquals (s.Contains (1), true);
AssertEquals (s.Contains (0), false);
}
-#if !TARGET_JVM
+
[Test]
public void TestCopyTo ()
{
AssertEquals (x [1], 1);
AssertEquals (x [2], 2);
}
-#endif
+
[Test]
public void TestPeek ()
{
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7204")]
-#endif
public void TestToArray ()
{
Queue <int> s = new Queue <int> ();
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7320")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void IDictionaryAddValueNullValueType ()
{
public void ItemMissingKey () {
string s = list [99];
}
-#if !TARGET_JVM
+
[Test]
public void Keys () {
IList<int> keys = list.Keys;
Assert.AreEqual (2, arr [1]);
Assert.AreEqual (5, arr [2]);
}
-#endif
+
[Test]
public void KeysNonGeneric () {
ICollection keys = ((IDictionary)list).Keys;
AssertEquals (s.Contains (1), true);
AssertEquals (s.Contains (0), false);
}
-#if !TARGET_JVM
+
[Test]
public void TestCopyTo ()
{
AssertEquals (x [1], 2);
AssertEquals (x [2], 1);
}
-#endif
+
[Test]
public void TestPeek ()
{
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7204")]
-#endif
public void TestToArray ()
{
Stack <int> s = new Stack <int> ();
+2007-03-11 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * TcpClientTest.cs: Added test for bug #81105.
+
+2007-03-07 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * SocketTest.jvm.cs: removed not supported calls for TARGET_JVM because
+ of validation failures
+
2007-02-08 Ilya Kharmatsky <ilyak -at- mainsoft.com>
* SocketTest.jvm.cs: added 'Ignore' attributes for non working tests.
private static void BADCallback (IAsyncResult asyncResult)
{
+#if !TARGET_JVM
Socket sock = (Socket)asyncResult.AsyncState;
BADSocket = sock.EndAccept (out BADBytes,
BADAccepted = true;
BADCalledBack.Set ();
+#endif
}
[Test]
private static void BDCallback (IAsyncResult asyncResult)
{
+#if !TARGET_JVM
Socket sock = (Socket)asyncResult.AsyncState;
sock.EndDisconnect (asyncResult);
BDDisconnected = true;
BDCalledBack.Set ();
+#endif
}
[Test]
#endif
public void BeginDisconnect ()
{
+#if !TARGET_JVM
Socket sock = new Socket (AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
sock.Close ();
listen.Close ();
+#endif
}
[Test]
#endif
public void Disconnect ()
{
+#if !TARGET_JVM
Socket sock = new Socket (AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
sock.Close ();
listen.Close ();
+#endif
}
[Test]
outClient.Close();\r
lSock.Close();\r
\r
- } \r
+ }\r
+\r
+ [Test] // bub #81105\r
+ public void CloseTest ()\r
+ {\r
+ IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 8765);\r
+ using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (CloseRequestHandler))) {\r
+ sr.Start ();\r
+\r
+ TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765);\r
+ NetworkStream ns = tcpClient.GetStream ();\r
+ Assert.IsNotNull (ns, "#A1");\r
+#if NET_2_0\r
+ Assert.AreEqual (0, tcpClient.Available, "#A2");\r
+ Assert.IsTrue (tcpClient.Connected, "#A3");\r
+ // Assert.IsFalse (tcpClient.ExclusiveAddressUse, "#A4");\r
+#endif\r
+ tcpClient.Close ();\r
+#if NET_2_0\r
+ Assert.IsNotNull (tcpClient.Client, "#A5");\r
+ try {\r
+ int available = tcpClient.Available;\r
+ Assert.Fail ("#A6: " + available);\r
+ } catch (ObjectDisposedException) {\r
+ }\r
+ Assert.IsFalse (tcpClient.Connected, "#A7");\r
+ // not supported on linux\r
+ /*\r
+ try {\r
+ bool exclusive = tcpClient.ExclusiveAddressUse;\r
+ Assert.Fail ("#A8: " + exclusive);\r
+ } catch (ObjectDisposedException) {\r
+ }\r
+ */\r
+#endif\r
+ }\r
+\r
+ using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (CloseRequestHandler))) {\r
+ sr.Start ();\r
+\r
+ TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765);\r
+#if NET_2_0\r
+ Assert.AreEqual (0, tcpClient.Available, "#B1");\r
+ Assert.IsTrue (tcpClient.Connected, "#B2");\r
+ // Assert.IsFalse (tcpClient.ExclusiveAddressUse, "#B3");\r
+#endif\r
+ tcpClient.Close ();\r
+#if NET_2_0\r
+ Assert.IsNull (tcpClient.Client, "#B4");\r
+ try {\r
+ int available = tcpClient.Available;\r
+ Assert.Fail ("#B5: " + available);\r
+ } catch (NullReferenceException) {\r
+ }\r
+ try {\r
+ bool connected = tcpClient.Connected;\r
+ Assert.Fail ("#B6: " + connected);\r
+ } catch (NullReferenceException) {\r
+ }\r
+ // not supported on linux\r
+ /*\r
+ try {\r
+ bool exclusive = tcpClient.ExclusiveAddressUse;\r
+ Assert.Fail ("#B7: " + exclusive);\r
+ } catch (NullReferenceException) {\r
+ }\r
+ */\r
+#endif\r
+ }\r
+ }\r
+\r
+ byte [] CloseRequestHandler (Socket socket)\r
+ {\r
+ return new byte [0];\r
+ }\r
\r
#if NET_2_0\r
[Test]\r
+2007-03-07 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * HttpListenerPrefixCollectionTest.cs, HttpListenerTest.cs: removed not
+ supported calls for TARGET_JVM because of validation failures
+
2007-02-24 Gert Driesen <drieseng@users.sourceforge.net>
* HttpWebRequestTest.cs: Added test for bug #80944.
[Ignore ("The class System.Net.HttpListenerPrefixCollection - is not supported")]
#endif
public class HttpListenerPrefixCollectionTest {
+#if !TARGET_JVM
// NL -> Not listening -> tests when listener.IsListening == false
[Test]
public void NL_DefaultProperties ()
}
Assert.AreEqual (items, 1);
}
+#endif
}
}
#endif
[Ignore ("The class HttpListener is not implemented")]
#endif
public class HttpListenerTest {
+#if !TARGET_JVM
[Test]
public void DefaultProperties ()
{
Event.Close ();
}
}
+#endif
}
}
#endif
--- /dev/null
+//
+// WebClientTest.cs - NUnit Test Cases for System.Net.WebClient
+//
+// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
+//
+
+using NUnit.Framework;
+using System;
+using System.IO;
+using System.Net;
+using System.Collections;
+using System.Runtime.Serialization;
+
+namespace MonoTests.System.Net {
+ [TestFixture]
+ public class WebClientTest {
+
+ [Test]
+ [Category ("InetAccess")]
+ public void DownloadTwice ()
+ {
+ WebClient wc = new WebClient();
+ string filename = Path.GetTempFileName();
+
+ // A new, but empty file has been created. This is a test case
+ // for bug 81005
+ wc.DownloadFile("http://google.com/", filename);
+
+ // Now, remove the file and attempt to download again.
+ File.Delete(filename);
+ wc.DownloadFile("http://google.com/", filename);
+
+ // We merely want this to reach this point, bug 81066.
+ }
+ }
+
+}
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class System.Security.Cryptography.AsnEncodedData - is not supported")]
+#endif
public class AsnEncodedDataTest {
-
+#if !TARGET_JVM
static byte[] asnNullBytes = { 0x05, 0x00 };
static string asnNullString = "05 00";
static byte[] asnLongBytes = { 0x30,0x5C,0x02,0x55,0x2D,0x58,0xE9,0xBF,0xF0,0x31,0xCD,0x79,0x06,0x50,0x5A,0xD5,0x9E,0x0E,0x2C,0xE6,0xC2,0xF7,0xF9,0xD2,0xCE,0x55,0x64,0x85,0xB1,0x90,0x9A,0x92,0xB3,0x36,0xC1,0xBC,0xEA,0xC8,0x23,0xB7,0xAB,0x3A,0xA7,0x64,0x63,0x77,0x5F,0x84,0x22,0x8E,0xE5,0xB6,0x45,0xDD,0x46,0xAE,0x0A,0xDD,0x00,0xC2,0x1F,0xBA,0xD9,0xAD,0xC0,0x75,0x62,0xF8,0x95,0x82,0xA2,0x80,0xB1,0x82,0x69,0xFA,0xE1,0xAF,0x7F,0xBC,0x7D,0xE2,0x7C,0x76,0xD5,0xBC,0x2A,0x80,0xFB,0x02,0x03,0x01,0x00,0x01 };
Assert.AreEqual ("Subject Alternative Name", aed.Oid.FriendlyName, "FriendlyName");
// anyway the answer is most probably CryptoAPI
}
+#endif
}
}
+2007-03-07 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+ * AsnEncodedDataTest.cs, OidCollectionTest.cs, OidEnumeratorTest.cs,
+ OidTest.cs: removed not supported calls for TARGET_JVM because of
+ validation failures
+
2006-04-25 Atsushi Enomoto <atsushi@ximian.com>
* OidTest.cs,
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class System.Security.Cryptography.OidCollection - is not supported")]
+#endif
public class OidCollectionTest : Assertion {
+#if !TARGET_JVM
[Test]
public void Constructor ()
Oid[] array = null;
oc.CopyTo (array, 0);
}
+#endif
}
}
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class System.Security.Cryptography.OidEnumerator - is not supported")]
+#endif
public class OidEnumeratorTest : Assertion {
-
+#if !TARGET_JVM
private OidEnumerator GetEnumerator ()
{
OidCollection oc = new OidCollection ();
enumerator.Reset ();
AssertNotNull ("Current after reset", enumerator.Current);
}
+#endif
}
}
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class System.Security.Cryptography.Oid - is not supported")]
+#endif
+
public class OidTest {
+#if !TARGET_JVM
static string invalidOid = "1.0";
static string invalidName = "friendlyName";
// TODO: add other well known oid as we find them
}
+#endif
}
}
uri2 = new Uri ("http://www.contoso.com:8080/index.htm");
Assert ("#4", uri1.GetHashCode () != uri2.GetHashCode ());
}
-
+
+#if NET_2_0
+ [Test]
+ public void RelativeEqualsTest()
+ {
+ Uri uri1 = new Uri ("foo/bar", UriKind.Relative);
+ Uri uri2 = new Uri ("foo/bar", UriKind.Relative);
+ Uri uri3 = new Uri ("bar/man", UriKind.Relative);
+ Uri uri4 = new Uri ("BAR/MAN", UriKind.Relative);
+ Assert ("#1a", uri1 == uri2);
+ Assert ("#1b", uri1.Equals(uri2));
+ Assert ("#2a", uri1 != uri3);
+ Assert ("#2b", !uri1.Equals(uri3));
+ Assert ("#3a", uri1 == uri2);
+ Assert ("#3b", uri1.Equals(uri2));
+ Assert ("#4a", uri1 != uri3);
+ Assert ("#4b", !uri1.Equals(uri3));
+ Assert ("#5a", uri3 != uri4);
+ Assert ("#5b", !uri3.Equals(uri4));
+ }
+
+ [Test]
+ public void RelativeGetHashCodeTest()
+ {
+ Uri uri1 = new Uri ("foo/bar", UriKind.Relative);
+ Uri uri2 = new Uri ("foo/bar", UriKind.Relative);
+ Uri uri3 = new Uri ("bar/man", UriKind.Relative);
+ AssertEquals ("#1", uri1.GetHashCode(), uri2.GetHashCode());
+ Assert ("#2", uri1.GetHashCode() != uri3.GetHashCode());
+ }
+#endif
+
[Test]
public void MakeRelative ()
{
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7202")]
-#endif
public void ConvertTo_Bad ()
{
Assert.AreEqual ("System.Object", converter.ConvertTo (new object (), typeof (string)), "object");
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7202")]
-#endif
public void ConvertTo_TypeDescriptorContext_Bad ()
{
Assert.AreEqual ("System.Object", converter.ConvertTo (context, null, new object (), typeof (string)), "object");
REM ********************************************************\r
\r
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\\r
-set JAVA_HOME=%VMW_HOME%\jre5\r
+set JAVA_HOME=%VMW_HOME%\jre6\r
\r
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar\r
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar\r
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * corlib_test.dll.sources: Added StringComparerTest.cs.
+
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * corlib_test.dll.sources: Added ComparerTest.cs.
+
+2007-03-07 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * corlib_test.dll.sources: Added IListTest.cs.
+
2007-01-31 Gert Driesen <drieseng@users.sourceforge.net>
* corlib_test.dll.sources: Added EncodingTest.cs.
+2007-03-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * SimpleCollator.cs : disable QuickCheckPossible(), which is
+ inaccurate and inefficient. Fixed bug #79714.
+
2007-02-15 Atsushi Enomoto <atsushi@ximian.com>
* SimpleCollator.cs : character filtering is needed for
bool QuickCheckPossible (string s1, int idx1, int end1,
string s2, int idx2, int end2)
{
+#if true
+ // looks like it is buggy and inefficient, so just disable it.
+ return false;
+#else
if (QuickCheckDisabled)
return false;
// if (s1.Length > 100 || s2.Length > 100)
if (s2 [i] < 0x20 && (s2 [i] < '\x9' || s2 [i] > '\xD') || s2 [i] >= 0x80 || s2 [i] == '-' || s2 [i] == '\'')
return false;
return true;
+#endif
}
unsafe int CompareInternal (string s1, int idx1, int len1, string s2,
+2007-03-05 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SymmetricTransform.cs: Fix KeepLastBlock to be true for decryption
+ with no padding or zero padding. Part of the fix for #81008.
+
2007-01-08 Sebastien Pouliot <sebastien@ximian.com>
* SymmetricTransform.cs: Fix #80439 again. This time we have tests for
private bool KeepLastBlock {
get {
- return ((!encrypt) && (algo.Mode != CipherMode.ECB) && (algo.Padding != PaddingMode.None));
+ return ((!encrypt) && (algo.Padding != PaddingMode.None) && (algo.Padding != PaddingMode.Zeros));
}
}
// to support both UTCTime and GeneralizedTime (and not so common format)
string mask = null;
int year;
+#if !NET_2_0
bool utc = true;
+#endif
switch (t.Length) {
case 11:
// illegal format, still it's supported for compatibility
t = String.Format ("{0}{1}{2}{3}{4}:{5}{6}", century, t.Substring (0, 12), sign,
t[13], t[14], t[15], t[16]);
mask = "yyyyMMddHHmmsszzz";
+#if !NET_2_0
utc = false;
+#endif
break;
}
#if NET_2_0
+2007-03-11 Zoltan Varga <vargaz@gmail.com>
+
+ * ASN1Convert.cs: Fix a warning.
+
2007-02-12 Sebastien Pouliot <sebastien@ximian.com>
* ASN1Convert.cs: Add support for decoding ASN.1 dates with an UTC
+2007-03-08 David Mitchell <dmitchell@logos.com>
+
+ * List.cs: Fix the case where List.set_Item(int index) throws
+ inappropriate exception when index is equal to List.Count
+
+ List.IndexOf(object item) and IList.Contains(object item) throw
+ exceptions when given invalid types.
+
+ IList.Add(object item) throws InvalidCastException when item is
+ not of the correct type.
+
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * Comparer.cs: Renamed IComparableOfTComparer<T> to GenericComparer<T>
+ to fix binary serialization compatibility with MS.
+
+2007-03-05 David Mitchell <dmitchell@logos.com>
+
+ * Dictionary.cs: An instance of Dictionary<TKey,TValue> is
+ supposed to throw a KeyNotFoundException when
+ the user attempts to retrieve the value associated with a key that
+ is not in the dictionary.
+
+ On the other hand, an instance of IDictionary is supposed to
+ return null in similar circumstances.
+
+2007-03-05 David Mitchell <dmitchell@logos.com>
+
+ * List.cs: Fix InsertRange bug (80930).
+
2006-09-15 Gert Driesen <drieseng@users.sourceforge.net>
* List.cs: Fixed binary serialization compatibility with MS.NET.
static Comparer ()
{
if (typeof (IComparable<T>).IsAssignableFrom (typeof (T)))
- _default = (Comparer<T>) Activator.CreateInstance (typeof (IComparableOfTComparer <>).MakeGenericType (typeof (T)));
+ _default = (Comparer<T>) Activator.CreateInstance (typeof (GenericComparer <>).MakeGenericType (typeof (T)));
else
_default = new DefaultComparer ();
}
-
public abstract int Compare (T x, T y);
static readonly Comparer <T> _default;
}
}
- class IComparableOfTComparer <T> : Comparer <T> where T : IComparable<T> {
+ [Serializable]
+ class GenericComparer <T> : Comparer <T> where T : IComparable<T> {
public override int Compare (T x, T y)
{
// `null' is less than any other ref type
}
object IDictionary.this [object key] {
- get { return this [ToTKey (key)]; }
+ get {
+ if (key is TKey && ContainsKey((TKey) key))
+ return this [ToTKey (key)];
+ return null;
+ }
set { this [ToTKey (key)] = ToTValue (value); }
}
{
CheckCollection (collection);
CheckIndex (index);
- ICollection <T> c = collection as ICollection <T>;
- if (c != null)
- InsertCollection (index, c);
- else
- InsertEnumeration (index, collection);
+ if (collection == this) {
+ T[] buffer = new T[_size];
+ CopyTo (buffer, 0);
+ GrowIfNeeded (_size);
+ Shift (index, buffer.Length);
+ Array.Copy (buffer, 0, _items, index, buffer.Length);
+ } else {
+ ICollection <T> c = collection as ICollection <T>;
+ if (c != null)
+ InsertCollection (index, c);
+ else
+ InsertEnumeration (index, collection);
+ }
_version++;
}
}
set {
CheckIndex (index);
+ if ((uint) index == (uint) _size)
+ throw new ArgumentOutOfRangeException ("index");
_items [index] = value;
}
}
int IList.Add (object item)
{
- Add ((T) item);
+ try {
+ Add ((T) item);
+ } catch (InvalidCastException) {
+ throw new ArgumentException("item");
+ }
return _size - 1;
}
bool IList.Contains (object item)
{
- return Contains ((T) item);
+ try {
+ return Contains ((T) item);
+ } catch (InvalidCastException) {
+ return false;
+ }
}
int IList.IndexOf (object item)
{
- return IndexOf ((T) item);
+ try {
+ return IndexOf((T) item);
+ } catch (InvalidCastException) {
+ return -1;
+ }
}
void IList.Insert (int index, object item)
{
- Insert (index, (T) item);
+ // We need to check this first because, even if the
+ // item is null or not the correct type, we need to
+ // return an ArgumentOutOfRange exception if the
+ // index is out of range
+ CheckIndex (index);
+ try {
+ Insert (index, (T) item);
+ } catch (InvalidCastException) {
+ throw new ArgumentException("item");
+ }
}
void IList.Remove (object item)
{
- Remove ((T) item);
+ try {
+ Remove ((T) item);
+ } catch (InvalidCastException) {
+ // Swallow the exception--if we
+ // can't cast to the correct type
+ // then we've already "succeeded"
+ // in removing the item from the
+ // List.
+ }
}
bool ICollection <T>.IsReadOnly {
public virtual int Compare (string string1, string string2)
{
+ if (string1 == null) {
+ if (string2 == null)
+ return 0;
+ return -1;
+ }
+ if (string2 == null)
+ return 1;
+
/* Short cut... */
if(string1.Length == 0 && string2.Length == 0)
return(0);
public virtual int Compare (string string1, string string2,
CompareOptions options)
{
+ if (string1 == null) {
+ if (string2 == null)
+ return 0;
+ return -1;
+ }
+ if (string2 == null)
+ return 1;
+
/* Short cut... */
if(string1.Length == 0 && string2.Length == 0)
return(0);
public virtual int Compare (string string1, int offset1,
string string2, int offset2)
{
+ if (string1 == null) {
+ if (string2 == null)
+ return 0;
+ return -1;
+ }
+ if (string2 == null)
+ return 1;
+
/* Not in the spec, but ms does these short
* cuts before checking the offsets (breaking
* the offset >= string length specified check
string string2, int offset2,
CompareOptions options)
{
+ if (string1 == null) {
+ if (string2 == null)
+ return 0;
+ return -1;
+ }
+ if (string2 == null)
+ return 1;
+
/* Not in the spec, but ms does these short
* cuts before checking the offsets (breaking
* the offset >= string length specified check
int length1, string string2,
int offset2, int length2)
{
+ if (string1 == null) {
+ if (string2 == null)
+ return 0;
+ return -1;
+ }
+ if (string2 == null)
+ return 1;
+
/* Not in the spec, but ms does these short
* cuts before checking the offsets (breaking
* the offset >= string length specified check
int offset2, int length2,
CompareOptions options)
{
+ if (string1 == null) {
+ if (string2 == null)
+ return 0;
+ return -1;
+ }
+ if (string2 == null)
+ return 1;
+
/* Not in the spec, but ms does these short
* cuts before checking the offsets (breaking
* the offset >= string length specified check
+2007-03-11 Zoltan Varga <vargaz@gmail.com>
+
+ * UnmanagedMemoryStream.cs: Fix a warning.
+
+2007-03-05 Miguel de Icaza <miguel@novell.com>
+
+ * Path.cs: Manually call FileStream and pass the new internal
+ FileOptions.1 flag that means "This is a temporary file, use 600
+ permissions".
+
+ * FileOptions.cs: Document the new private enum value.
+
2007-02-22 Dick Porter <dick@ximian.com>
* MonoIOError.cs:
RandomAccess = 0x10000000,
Asynchronous = 0x40000000,
WriteThrough = -2147483648
+ //
+ // FileIsTemporary = 1
+ // The above is an internal value used by Path.GetTempFile to
+ // get a file with 600 permissions, regardless of the umask
+ // settings. If a value "1" must be introduced here, update
+ // both metadata/file-io.c and Path.GetTempFile
+ //
}
}
path = Path.Combine (GetTempPath(), "tmp" + num.ToString("x") + ".tmp");
try {
- f = new FileStream (path, FileMode.CreateNew);
+ f = new FileStream (path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.Read,
+ 8192, false, (FileOptions) 1);
}
catch (SecurityException) {
// avoid an endless loop
if (count < 2)
return 0;
- if (input_buffer [0] == 0xfe && input_buffer [1] == 0xff){
- this.encoding = Encoding.BigEndianUnicode;
+#if !NET_2_0
+ if (input_buffer [0] == 0xff && input_buffer [1] == 0xfe){
+ this.encoding = Encoding.Unicode;
return 2;
}
+#endif
- if (input_buffer [0] == 0xff && input_buffer [1] == 0xfe){
- this.encoding = Encoding.Unicode;
+ if (input_buffer [0] == 0xfe && input_buffer [1] == 0xff){
+ this.encoding = Encoding.BigEndianUnicode;
return 2;
}
this.encoding = Encoding.UTF8Unmarked;
return 3;
}
+
+#if NET_2_0
+ if (count < 4) {
+ if (input_buffer [0] == 0xff && input_buffer [1] == 0xfe && input_buffer [2] != 0) {
+ this.encoding = Encoding.Unicode;
+ return 2;
+ }
+ return 0;
+ }
+
+ if (input_buffer [0] == 0 && input_buffer [1] == 0
+ && input_buffer [2] == 0xfe && input_buffer [3] == 0xff)
+ {
+ this.encoding = Encoding.BigEndianUTF32;
+ return 4;
+ }
+
+ if (input_buffer [0] == 0xff && input_buffer [1] == 0xfe) {
+ if (input_buffer [2] == 0 && input_buffer[3] == 0) {
+ this.encoding = Encoding.UTF32;
+ return 4;
+ }
+
+ this.encoding = Encoding.Unicode;
+ return 2;
+ }
+#endif
}
return 0;
break;
default:
throw new ArgumentException("Invalid SeekOrigin option");
- break;
}
refpoint =+ (int)offset;
if (refpoint < initial_position)
+2007-03-13 Miguel de Icaza <miguel@novell.com>
+
+ * OpCode.cs: Add a couple of operators for jsc.sf.net
+
+2007-03-12 Zoltan Varga <vargaz@gmail.com>
+
+ * DynamicMethod.cs: Add a field used by unmanaged code.
+
+2007-03-06 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * MonoArrayMethod.cs: Use 'void' as return type in ToString when
+ the return type is null. Fixes #80435.
+
+2007-03-06 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * EnumBuilder.cs: On 2.0 profile, using current EnumBuilder as
+ field type in DefinedLiteral. Fixes bug #81007.
+
2007-02-25 Marek Safar <marek.safar@gmail.com>
* MethodBuilder.cs: Empty string is not allowed for DllImport name.
private ILGenerator ilgen;
private int nrefs;
private object[] refs;
+ private IntPtr referenced_by;
#endregion
private Delegate deleg;
private MonoMethod method;
public FieldBuilder DefineLiteral (string literalName, object literalValue)
{
+#if NET_2_0
+ Type fieldType = this;
+#else
+ Type fieldType = _underlyingType;
+#endif
FieldBuilder fieldBuilder = _tb.DefineField (literalName,
- _underlyingType, (FieldAttributes.Literal |
+ fieldType, (FieldAttributes.Literal |
(FieldAttributes.Static | FieldAttributes.Public)));
fieldBuilder.SetConstant (literalValue);
return fieldBuilder;
parms = parms + ", ";
parms = parms + p [i].ParameterType.Name;
}
- return ReturnType.Name+" "+Name+"("+parms+")";
+ if (ReturnType != null)
+ return ReturnType.Name+" "+Name+"("+parms+")";
+ else
+ return "void "+Name+"("+parms+")";
}
}
}
if (prev != 0)
return prev > 0 ? m2 : m1;
+ Type dt1 = m1.DeclaringType;
+ Type dt2 = m2.DeclaringType;
+ if (dt1 != dt2) {
+ if (dt1.IsSubclassOf(dt2))
+ return m1;
+ if (dt2.IsSubclassOf(dt1))
+ return m2;
+ }
+
bool va1 = (m1.CallingConvention & CallingConventions.VarArgs) != 0;
- bool va2 = (m1.CallingConvention & CallingConventions.VarArgs) != 0;
+ bool va2 = (m2.CallingConvention & CallingConventions.VarArgs) != 0;
if (va1 && !va2)
return m2;
if (va2 && !va1)
+2007-03-05 Peter Dettman <peter.dettman@iinet.net.au>
+
+ * Binder.cs: The patch changes Binder.Default.GetBetterMethod to
+ prefer methods in subclasses if the arg types can't disambiguate
+ them.
+
+ Also fixes a typo in the CallingConventions comparison.
+
+2007-03-01 Alp Toker <alp@atoker.com>
+
+ * FieldInfo.cs:
+ Add GetFieldFromHandle() 2.0 overload stub (NotImplemented).
+
+2007-03-01 Alp Toker <alp@atoker.com>
+
+ * MethodBase.cs: Add missing ComVisible attr.
+ Add GetMethodFromHandle() 2.0 overload stub (NotImplemented).
+
2006-12-30 Marek Safar <marek.safar@gmail.com>
* MonoProperty.cs: Cache frequently used properties.
return internal_from_handle (handle.Value);
}
+#if NET_2_0
+ public static FieldInfo GetFieldFromHandle (RuntimeFieldHandle handle, RuntimeTypeHandle declaringType)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
+
//
// Note: making this abstract imposes an implementation requirement
// on any class that derives from it. However, since it's also
return GetMethodFromHandleInternal (handle.Value);
}
+#if NET_2_0
+ public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType) {
+ throw new NotImplementedException ();
+ }
+#endif
+
public abstract MethodImplAttributes GetMethodImplementationFlags();
public abstract ParameterInfo[] GetParameters();
}
#if NET_2_0 || BOOTSTRAP_NET_2_0
+ [ComVisible (true)]
public virtual Type [] GetGenericArguments ()
{
throw new NotSupportedException ();
try {
int manager_magic = reader.ReadInt32();
- if(manager_magic != ResourceManager.MagicNumber) {
- throw new ArgumentException("Stream is not a valid .resources file!");
- }
+ if(manager_magic != ResourceManager.MagicNumber)
+ throw new ArgumentException(String.Format ("Stream is not a valid .resources file, magic=0x{0:x}", manager_magic));
int manager_ver = reader.ReadInt32();
int manager_len = reader.ReadInt32();
+2007-03-12 Raja R Harinath <rharinath@novell.com>
+
+ * DefaultParameterValueAttribute.cs: Move to System.dll.
+
2007-02-08 Jonathan Chambers <joncham@gmail.com>
* Marshal.cs: Throw exceptions for AddRef, Release,
+++ /dev/null
-//
-// System.Runtime.InteropServices.DefaultParameterValueAttribute.cs
-//
-// Author: Zoltan Varga (vargaz@gmail.com)
-//
-// (C) Ximian, Inc.
-//
-
-//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if NET_2_0
-
-using System;
-
-namespace System.Runtime.InteropServices {
- [AttributeUsage (AttributeTargets.Parameter)]
- public sealed class DefaultParameterValueAttribute : Attribute
- {
- object value;
-
- public DefaultParameterValueAttribute (object value)
- {
- this.value = value;
- }
-
- public object Value {
- get {
- return value;
- }
- }
- }
-}
-
-#endif
+2007-03-05 Sebastien Pouliot <sebastien@ximian.com>
+
+ * CryptoStream.cs: Rework Write to buffer the last block correctly.
+ The new code also reduce memory allocations. Fix for #81008.
+
2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
* HMAC.cs: Handle BlockSizeValue correctly.
// Sebastien Pouliot (sebastien@ximian.com)
//
// Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005, 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
int transformed = 0;
// load a new block
- _workingCount = _stream.Read (_workingBlock, 0, _workingBlock.Length);
+ _workingCount = _stream.Read (_workingBlock, 0, _transform.InputBlockSize);
_endOfStream = (_workingCount < _transform.InputBlockSize);
if (!_endOfStream) {
Locale.GetText ("buffer overflow"));
}
+ if (_stream == null)
+ throw new ArgumentNullException ("inner stream was diposed");
+
// partial block (in progress)
if ((_partialCount > 0) && (_partialCount != _transform.InputBlockSize)) {
int remainder = _transform.InputBlockSize - _partialCount;
}
if (_transform.CanTransformMultipleBlocks) {
- // transform all except the last block (which may be the last block
- // of the stream and require TransformFinalBlock)
- int numBlock = ((_partialCount + count) / _transform.InputBlockSize);
- int multiSize = (numBlock * _transform.InputBlockSize);
- if (numBlock > 0) {
- byte[] multiBlocks = new byte [multiSize];
- int len = _transform.TransformBlock (buffer, offset, multiSize, multiBlocks, 0);
- _stream.Write (multiBlocks, 0, len);
- // copy last block into _currentBlock
- _partialCount = count - multiSize;
- Buffer.BlockCopy (buffer, offset + multiSize, _workingBlock, 0, _partialCount);
- }
- else {
- Buffer.BlockCopy (buffer, offset, _workingBlock, _partialCount, count);
- _partialCount += count;
+ // get the biggest multiple of InputBlockSize in count (without mul or div)
+ int size = (count & ~(_transform.OutputBlockSize - 1));
+ int rem = (count & (_transform.OutputBlockSize - 1));
+ // avoid reallocating memory at each call (reuse same buffer whenever possible)
+ if (_workingBlock.Length < size) {
+ Array.Clear (_workingBlock, 0, _workingBlock.Length);
+ _workingBlock = new byte [size];
}
+
+ int len = _transform.TransformBlock (buffer, offset, size, _workingBlock, 0);
+ _stream.Write (_workingBlock, 0, len);
+
+ if (rem > 0)
+ Buffer.BlockCopy (buffer, buffer.Length - rem, _workingBlock, 0, rem);
+ _partialCount = rem;
count = 0; // the last block, if any, is in _workingBlock
- }
- else {
+ } else {
int len = Math.Min (_transform.InputBlockSize - _partialCount, count);
Buffer.BlockCopy (buffer, bufferPos, _workingBlock, _partialCount, len);
bufferPos += len;
}
// Get the standard big-endian UTF-32 encoding object.
- private static Encoding BigEndianUTF32
+ internal static Encoding BigEndianUTF32
{
get {
if (bigEndianUTF32Encoding == null) {
public override byte[] GetPreamble ()
{
if (byteOrderMark) {
- byte[] preamble = new byte[2];
+ byte[] preamble = new byte[4];
if (bigEndian) {
- preamble[0] = (byte)0xFE;
- preamble[1] = (byte)0xFF;
+ preamble[2] = (byte)0xFE;
+ preamble[3] = (byte)0xFF;
} else {
preamble[0] = (byte)0xFF;
preamble[1] = (byte)0xFE;
+2007-03-11 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * Delegate.cs: Fixed bootstrap build.
+
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * StringComparer.cs: Renamed StringComparer classes and promoted them
+ to top-level classes. Merged Ordinal and OrdinalIgnoreCase comparers.
+ Fixes binary serialization compatibility with MS.
+
+2007-03-06 Zoltan Varga <vargaz@gmail.com>
+
+ * Type.cs (Equals): Remove a useless check.
+
+ * Type.cs: Rename Type:Equals(Type) to EqualsInternal, and add support for checking
+ UnderlyingSystemType. Fixes #81037.
+
+2007-03-05 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
+
+ * TermInfoDriver.cs: adjust buffer indexes after *every* read. Fixes
+ bug #80329. Robert Jordan attached a similar patch to the bug report
+ but I didn't see it until after my commit...
+
+2007-03-05 Peter Dettman <peter.dettman@iinet.net.au>
+
+ * Enum.cs: The above patch makes the formatting for specifiers 'x'
+ and 'X' behave like MS.NET, including the correct length for each
+ possible underlying type, and correctly using capital letters for
+ the 'X' case.
+
+ Patch also includes some more test cases in EnumTests.cs.
+
2007-02-25 Gert Driesen <drieseng@users.sourceforge.net>
* AppDomainSetup.cs: If configuration file is not an absolute path,
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern Delegate CreateDelegate_internal (Type type, object target, MethodInfo info);
- public static Delegate CreateDelegate (Type type, MethodInfo method)
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static Delegate CreateDelegate (Type type, MethodInfo method, bool throwOnBindFailure)
{
if (type == null)
throw new ArgumentNullException ("type");
throw new ArgumentException ("type is not a subclass of Multicastdelegate");
if (!method.IsStatic)
- throw new ArgumentException ("The method should be static.", "method");
+ if (throwOnBindFailure)
+ throw new ArgumentException ("The method should be static.", "method");
+ else
+ return null;
MethodInfo invoke = type.GetMethod ("Invoke");
}
if (!returnMatch)
- throw new ArgumentException ("method return type is incompatible");
+ if (throwOnBindFailure)
+ throw new ArgumentException ("method return type is incompatible");
+ else
+ return null;
#endif
ParameterInfo[] delargs = invoke.GetParameters ();
ParameterInfo[] args = method.GetParameters ();
if (args.Length != delargs.Length)
- throw new ArgumentException ("method argument length mismatch");
+ if (throwOnBindFailure)
+ throw new ArgumentException ("method argument length mismatch");
+ else
+ return null;
int length = delargs.Length;
for (int i = 0; i < length; i++) {
#endif
if (!match)
- throw new ArgumentException ("method arguments are incompatible");
+ if (throwOnBindFailure)
+ throw new ArgumentException ("method arguments are incompatible");
+ else
+ return null;
}
return CreateDelegate_internal (type, null, method);
}
+ public static Delegate CreateDelegate (Type type, MethodInfo method) {
+ return CreateDelegate (type, method, true);
+ }
+
#if NET_2_0
public
#else
internal
#endif
- static Delegate CreateDelegate (Type type, object target, MethodInfo method)
+ static Delegate CreateDelegate (Type type, object target, MethodInfo method, bool throwOnBindFailure)
{
if (type == null)
throw new ArgumentNullException ("type");
return CreateDelegate_internal (type, target, method);
}
+
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static Delegate CreateDelegate (Type type, object target, MethodInfo method) {
+ return CreateDelegate (type, target, method, true);
+ }
public static Delegate CreateDelegate (Type type, object target, string method)
{
return CreateDelegate_internal (type, null, info);
}
- public static Delegate CreateDelegate (Type type, object target, string method, bool ignoreCase)
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static Delegate CreateDelegate (Type type, object target, string method, bool ignoreCase, bool throwOnBindFailure)
{
if (type == null)
throw new ArgumentNullException ("type");
MethodInfo info = target.GetType ().GetMethod (method, flags, null, delargtypes, new ParameterModifier [0]);
if (info == null)
- throw new ArgumentException ("Couldn't bind to method '" + method + "'.");
+ if (throwOnBindFailure)
+ throw new ArgumentException ("Couldn't bind to method '" + method + "'.");
+ else
+ return null;
return CreateDelegate_internal (type, target, info);
}
+ public static Delegate CreateDelegate (Type type, object target, string method, bool ignoreCase) {
+ return CreateDelegate (type, target, method, ignoreCase, true);
+ }
+
public object DynamicInvoke (object[] args)
{
return DynamicInvokeImpl (args);
return v.GetHashCode ();
}
- private static string FormatSpecifier_X (Type enumType, object value)
+ private static string FormatSpecifier_X (Type enumType, object value, bool upper)
{
- // FIXME: Not sure if padding should always be with precision
- // 8, if it's culture specific, or what. This works for me.
- const string format = "x8";
-
switch (Type.GetTypeCode (enumType)) {
- case TypeCode.Char:
- // Char doesn't support ToString(format), so convert to an int and
- // use that...
- char v = (char) value;
- return Convert.ToInt32 (v).ToString(format);
case TypeCode.SByte:
- return ((sbyte)value).ToString (format);
+ return ((sbyte)value).ToString (upper ? "X2" : "x2");
case TypeCode.Byte:
- return ((byte)value).ToString (format);
+ return ((byte)value).ToString (upper ? "X2" : "x2");
case TypeCode.Int16:
- return ((short)value).ToString (format);
+ return ((short)value).ToString (upper ? "X4" : "x4");
case TypeCode.UInt16:
- return ((ushort)value).ToString (format);
+ return ((ushort)value).ToString (upper ? "X4" : "x4");
case TypeCode.Int32:
- return ((int)value).ToString (format);
+ return ((int)value).ToString (upper ? "X8" : "x8");
case TypeCode.UInt32:
- return ((uint)value).ToString (format);
+ return ((uint)value).ToString (upper ? "X8" : "x8");
case TypeCode.Int64:
- return ((long)value).ToString (format);
+ return ((long)value).ToString (upper ? "X16" : "x16");
case TypeCode.UInt64:
- return ((ulong)value).ToString (format);
+ return ((ulong)value).ToString (upper ? "X16" : "x16");
default:
throw new Exception ("Invalid type code for enumeration.");
}
retVal = String.Empty;
switch (formatChar) {
case 'X':
+ retVal = FormatSpecifier_X (enumType, value, true);
+ break;
case 'x':
- retVal = FormatSpecifier_X (enumType, value);
+ retVal = FormatSpecifier_X (enumType, value, false);
break;
case 'D':
case 'd':
[Serializable, ComVisible(true)]
public abstract class StringComparer : IComparer, IEqualityComparer, IComparer<string>, IEqualityComparer<string>
{
- class StringCultureComparer: StringComparer
- {
- CompareOptions co;
- CompareInfo ci;
-
- public StringCultureComparer (CultureInfo ci, bool ignore_case)
- {
- this.ci = ci.CompareInfo;
- co = ignore_case ? CompareOptions.IgnoreCase : CompareOptions.None;
- }
-
- public override int Compare (string x, string y)
- {
- return ci.Compare (x, y, co);
- }
-
- public override bool Equals (string x, string y)
- {
- return Compare (x, y) == 0;
- }
-
- public override int GetHashCode (string s)
- {
- if (s == null)
- throw new ArgumentNullException("s");
-
- return ci.GetSortKey (s, co).GetHashCode ();
- }
- }
-
- class OrdinalComparer : StringComparer
- {
- public OrdinalComparer ()
- {
- }
-
- public override int Compare (string x, string y)
- {
- return String.CompareOrdinal (x, y);
- }
-
- public override bool Equals (string x, string y)
- {
- return x == y;
- }
-
- public override int GetHashCode (string s)
- {
- return s.GetHashCode ();
- }
- }
-
- class OrdinalIgnoreCaseComparer : StringComparer
- {
- public OrdinalIgnoreCaseComparer ()
- {
- }
-
- public override int Compare (string x, string y)
- {
- // copied from String.CompareOrdinal()
- if (x == null) {
- if (y == null)
- return 0;
- else
- return -1;
- }
- else if (y == null) {
- return 1;
- }
-
- int max = x.Length > y.Length ? y.Length : x.Length;
- for (int i = 0; i < max; i++) {
- if (x [i] == y [i])
- continue;
- char xc = Char.ToUpperInvariant (x [i]);
- char yc = Char.ToUpperInvariant (y [i]);
- if (xc != yc)
- return xc - yc;
- }
- return max < x.Length ? -1 :
- max == y.Length ? 0 : 1;
- }
-
- public override bool Equals (string x, string y)
- {
- return Compare (x, y) == 0;
- }
-
- public override int GetHashCode (string s)
- {
- return s.GetCaseInsensitiveHashCode ();
- }
- }
-
- static StringComparer invariantCultureIgnoreCase = new StringCultureComparer (CultureInfo.InvariantCulture, true);
- static StringComparer invariantCulture = new StringCultureComparer (CultureInfo.InvariantCulture, false);
- static StringComparer ordinalIgnoreCase =
- new OrdinalIgnoreCaseComparer ();
- static StringComparer ordinal = new OrdinalComparer ();
+ static StringComparer invariantCultureIgnoreCase = new CultureAwareComparer (CultureInfo.InvariantCulture, true);
+ static StringComparer invariantCulture = new CultureAwareComparer (CultureInfo.InvariantCulture, false);
+ static StringComparer ordinalIgnoreCase = new OrdinalComparer (true);
+ static StringComparer ordinal = new OrdinalComparer (false);
// Constructors
protected StringComparer ()
// Properties
public static StringComparer CurrentCulture {
get {
- return new StringCultureComparer (CultureInfo.CurrentCulture, false);
+ return new CultureAwareComparer (CultureInfo.CurrentCulture, false);
}
}
public static StringComparer CurrentCultureIgnoreCase {
get {
- return new StringCultureComparer (CultureInfo.CurrentCulture, true);
+ return new CultureAwareComparer (CultureInfo.CurrentCulture, true);
}
}
// Methods
public static StringComparer Create (CultureInfo culture, bool ignoreCase)
{
- return new StringCultureComparer (culture, ignoreCase);
+ return new CultureAwareComparer (culture, ignoreCase);
}
public int Compare (object x, object y)
public abstract bool Equals (string x, string y);
public abstract int GetHashCode (string s);
}
+
+ [Serializable]
+ class CultureAwareComparer : StringComparer
+ {
+ readonly bool _ignoreCase;
+ readonly CompareInfo _compareInfo;
+
+ public CultureAwareComparer (CultureInfo ci, bool ignore_case)
+ {
+ _compareInfo = ci.CompareInfo;
+ _ignoreCase = ignore_case;
+ }
+
+ public override int Compare (string x, string y)
+ {
+ CompareOptions co = _ignoreCase ? CompareOptions.IgnoreCase :
+ CompareOptions.None;
+ return _compareInfo.Compare (x, y, co);
+ }
+
+ public override bool Equals (string x, string y)
+ {
+ return Compare (x, y) == 0;
+ }
+
+ public override int GetHashCode (string s)
+ {
+ if (s == null)
+ throw new ArgumentNullException("s");
+
+ CompareOptions co = _ignoreCase ? CompareOptions.IgnoreCase :
+ CompareOptions.None;
+ return _compareInfo.GetSortKey (s, co).GetHashCode ();
+ }
+ }
+
+ [Serializable]
+ internal class OrdinalComparer : StringComparer
+ {
+ public OrdinalComparer (bool ignoreCase)
+ {
+ _ignoreCase = ignoreCase;
+ }
+
+ public override int Compare (string x, string y)
+ {
+ if (!_ignoreCase)
+ return String.CompareOrdinal (x, y);
+
+ // copied from String.CompareOrdinal()
+ if (x == null) {
+ if (y == null)
+ return 0;
+ else
+ return -1;
+ }
+ else if (y == null) {
+ return 1;
+ }
+
+ int max = x.Length > y.Length ? y.Length : x.Length;
+ for (int i = 0; i < max; i++) {
+ if (x [i] == y [i])
+ continue;
+ char xc = Char.ToUpperInvariant (x [i]);
+ char yc = Char.ToUpperInvariant (y [i]);
+ if (xc != yc)
+ return xc - yc;
+ }
+ return max < x.Length ? -1 :
+ max == y.Length ? 0 : 1;
+ }
+
+ public override bool Equals (string x, string y)
+ {
+ if (!_ignoreCase)
+ return x == y;
+ return Compare (x, y) == 0;
+ }
+
+ public override int GetHashCode (string s)
+ {
+ if (!_ignoreCase)
+ return s.GetHashCode ();
+
+ return s.GetCaseInsensitiveHashCode ();
+ }
+
+ readonly bool _ignoreCase;
+ }
}
#endif
void AddToBuffer (int b)
{
- if (buffer == null)
+ if (buffer == null) {
buffer = new byte [1024];
+ } else if (writepos >= buffer.Length) {
+ byte [] newbuf = new byte [buffer.Length * 2];
+ Buffer.BlockCopy (buffer, 0, newbuf, 0, buffer.Length);
+ buffer = newbuf;
+ }
buffer [writepos++] = (byte) b;
}
+ void AdjustBuffer ()
+ {
+ if (readpos >= writepos) {
+ readpos = writepos = 0;
+ }
+ }
+
ConsoleKeyInfo CreateKeyInfoFromInt (int n)
{
char c = (char) n;
int next = buffer [readpos];
if (!cooked || !rootmap.StartsWith (next)) {
readpos++;
+ AdjustBuffer ();
return CreateKeyInfoFromInt (next);
}
key = (ConsoleKeyInfo) keymap [str];
} else {
readpos++;
+ AdjustBuffer ();
return CreateKeyInfoFromInt (next);
}
readpos += used;
- if (readpos >= writepos)
- readpos = writepos = 0;
-
+ AdjustBuffer ();
return key;
}
if (o == null)
return false;
- // TODO: return UnderlyingSystemType == o.UnderlyingSystemType;
Type cmp = o as Type;
if (cmp == null)
return false;
return Equals (cmp);
}
+ public bool Equals (Type type) {
+ return UnderlyingSystemType.EqualsInternal (type.UnderlyingSystemType);
+ }
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- public extern bool Equals (Type type);
+ internal extern bool EqualsInternal (Type type);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern Type internal_from_handle (IntPtr handle);
+2007-03-14 Eyal Alaluf <eyala@mainsoft.com>
+
+ * Mark tests as not working under TargetJvm
+
+2007-03-05 Eyal Alaluf <eyala@mainsoft.com>
+
+ * Port tests to run under TARGET_JVM.
+
+2007-03-05 Roei Erez <roeie@mainsoft.com>
+
+ * StringTest.cs: add test for string properties.
+
200702-20 Boris Kirzner <borisk@mainsoft.com>
* Mscorlib.Test20.sln, Mscorlib.Test20.vmwcsproj,
<DefineConstants>TRACE;DEBUG;JAVA;NET_2_0;NET_1_1;TARGET_JVM</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
+ <NoWarn>67, 169, 168, 219, 414, 618, 628, 649, 672, 688</NoWarn>\r
<BaseAddress>285212672</BaseAddress>\r
<SkipValidation>True</SkipValidation>\r
<KeepIntermediate>False</KeepIntermediate>\r
<DefineConstants>TRACE;JAVA</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
+ <NoWarn>67, 169, 168, 219, 414, 618, 628, 649, 672, 688</NoWarn>\r
<BaseAddress>285212672</BaseAddress>\r
<SkipValidation>false</SkipValidation>\r
<KeepIntermediate>false</KeepIntermediate>\r
<Reference Include="System.Data" />\r
<Reference Include="System.Runtime.Remoting" />\r
<Reference Include="System.Xml" />\r
+ <Reference Include="J2SE.Helpers" >\r
+ <HintPath>..\..\lib\J2SE.Helpers.dll</HintPath>\r
+ <Private>False</Private>\r
+ </Reference>\r
</ItemGroup>\r
<ItemGroup>\r
<Content Include="resources\AFile.txt" />\r
<Compile Include="System.Collections\ReadOnlyCollectionBaseTest.cs" />\r
<Compile Include="System.Collections\SortedListTest.cs" />\r
<Compile Include="System.Collections\StackTest.cs" />\r
- <Compile Include="System.Diagnostics\DebugTest.cs" />\r
- <Compile Include="System.Diagnostics\StackFrameCas.cs" />\r
- <Compile Include="System.Diagnostics\StackFrameTest.cs" />\r
- <Compile Include="System.Diagnostics\StackTraceCas.cs" />\r
- <Compile Include="System.Diagnostics\StackTraceTest.cs" />\r
- <Compile Include="System.Diagnostics\TextWriterTraceListenerTest.cs" />\r
<Compile Include="System.Globalization\CalendarTest.cs" />\r
- <Compile Include="System.Globalization\CompareInfoTest.cs" />\r
+ <Compile Include="System.Globalization\CompareInfoTest.jvm.cs" />\r
<Compile Include="System.Globalization\CultureInfoTest.cs" />\r
<Compile Include="System.Globalization\DateTimeFormatInfoTest.cs" />\r
<Compile Include="System.Globalization\DaylightTimeTest.cs" />\r
<Compile Include="System.Globalization\TextInfoTest.cs" />\r
- <Compile Include="System.IO.IsolatedStorage\IsolatedStorageFileCas.cs" />\r
- <Compile Include="System.IO.IsolatedStorage\IsolatedStorageFileStreamCas.cs" />\r
- <Compile Include="System.IO.IsolatedStorage\IsolatedStorageFileStreamTest.cs" />\r
- <Compile Include="System.IO.IsolatedStorage\IsolatedStorageFileTest.cs" />\r
- <Compile Include="System.IO.IsolatedStorage\IsolatedStorageTest.cs" />\r
<Compile Include="System.IO\BinaryReaderTest.cs" />\r
<Compile Include="System.IO\BinaryWriterTest.cs" />\r
<Compile Include="System.IO\BufferedStreamTest.cs" />\r
- <Compile Include="System.IO\DirectoryCas.cs" />\r
<Compile Include="System.IO\DirectoryInfoTest.cs" />\r
<Compile Include="System.IO\DirectoryTest.cs" />\r
<Compile Include="System.IO\FileInfoTest.cs" />\r
<Compile Include="System.IO\FileLoadExceptionCas.cs" />\r
<Compile Include="System.IO\FileNotFoundExceptionCas.cs" />\r
<Compile Include="System.IO\FileNotFoundExceptionTest.cs" />\r
- <Compile Include="System.IO\FileStreamCas.cs" />\r
<Compile Include="System.IO\FileStreamTest.cs" />\r
<Compile Include="System.IO\FileSystemInfoTest.cs" />\r
<Compile Include="System.IO\FileTest.cs" />\r
<Compile Include="System.IO\StringReaderTest.cs" />\r
<Compile Include="System.IO\StringWriterTest.cs" />\r
<Compile Include="System.IO\TextWriterTest.cs" />\r
- <Compile Include="System.IO\UnmanagedMemoryStreamTest.cs" />\r
- <Compile Include="System.Reflection.Emit\AssemblyBuilderAccessTest.cs" />\r
- <Compile Include="System.Reflection.Emit\AssemblyBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\ConstructorBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\CustomAttributeBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\DynamicMethodTest.cs" />\r
- <Compile Include="System.Reflection.Emit\EnumBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\EventBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\FieldBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\ILGeneratorTest.cs" />\r
- <Compile Include="System.Reflection.Emit\MethodBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\MethodRentalCas.cs" />\r
- <Compile Include="System.Reflection.Emit\MethodRentalTest.cs" />\r
- <Compile Include="System.Reflection.Emit\ModuleBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\PropertyBuilderTest.cs" />\r
- <Compile Include="System.Reflection.Emit\TypeBuilderTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyAlgorithmIdAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyCas.cs" />\r
- <Compile Include="System.Reflection\AssemblyConfigurationAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyCopyrightAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyCultureAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyDelaySignAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyDescriptionAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyFileVersionAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyInformationalVersionAttributeTest.cs" />\r
- <Compile Include="System.Reflection\AssemblyNameCas.cs" />\r
<Compile Include="System.Reflection\AssemblyNameTest.cs" />\r
<Compile Include="System.Reflection\AssemblyTest.cs" />\r
<Compile Include="System.Reflection\BinderTests.cs" />\r
<Compile Include="System.Reflection\EventInfoTest.cs" />\r
<Compile Include="System.Reflection\FieldInfoTest.cs" />\r
<Compile Include="System.Reflection\MethodInfoTest.cs" />\r
- <Compile Include="System.Reflection\ModuleCas.cs" />\r
- <Compile Include="System.Reflection\ModuleTest.cs" />\r
<Compile Include="System.Reflection\ParameterInfoTest.cs" />\r
<Compile Include="System.Reflection\PropertyInfoTest.cs" />\r
<Compile Include="System.Reflection\ReflectedTypeTest.cs" />\r
<Compile Include="System.Resources\ResourceReaderCas.cs" />\r
<Compile Include="System.Resources\ResourceReaderTest.cs" />\r
<Compile Include="System.Resources\ResourceSetCas.cs" />\r
- <Compile Include="System.Runtime.CompilerServices\RuntimeHelpersTest.cs" />\r
- <Compile Include="System.Runtime.CompilerServices\RuntimeWrappedExceptionCas.cs" />\r
- <Compile Include="System.Runtime.CompilerServices\RuntimeWrappedExceptionTest.cs" />\r
- <Compile Include="System.Runtime.InteropServices\GCHandleTest.cs" />\r
- <Compile Include="System.Runtime.InteropServices\MarshalTest.cs" />\r
- <Compile Include="System.Runtime.InteropServices\RuntimeEnvironmentCas.cs" />\r
- <Compile Include="System.Runtime.InteropServices\RuntimeEnvironmentTest.cs" />\r
- <Compile Include="System.Runtime.InteropServices\SafeHandleTest.cs" />\r
<Compile Include="System.Runtime.Remoting.Contexts\SynchronizationAttributeTest.cs" />\r
<Compile Include="System.Runtime.Remoting\ContextTest.cs" />\r
<Compile Include="System.Runtime.Remoting\RemotingConfigurationTest.cs" />\r
<Compile Include="System.Text\EncoderReplacementFallbackBufferTest.cs" />\r
<Compile Include="System.Text\EncoderReplacementFallbackTest.cs" />\r
<Compile Include="System.Text\EncoderTest.cs" />\r
+ <Compile Include="System.Text\EncodingTest.cs" />\r
<Compile Include="System.Text\EncodingInfoTest.cs" />\r
<Compile Include="System.Text\StringBuilderTest.cs" />\r
<Compile Include="System.Text\TestEncoding.cs" />\r
<Compile Include="System.Text\UTF7EncodingTest.cs" />\r
<Compile Include="System.Text\UTF8EncodingTest.cs" />\r
<Compile Include="System.Threading\AutoResetEventTest.cs" />\r
- <Compile Include="System.Threading\CompressedStackCas.cs" />\r
- <Compile Include="System.Threading\CompressedStackTest.cs" />\r
- <Compile Include="System.Threading\ExecutionContextCas.cs" />\r
- <Compile Include="System.Threading\ExecutionContextTest.cs" />\r
<Compile Include="System.Threading\InterlockedTest.cs" />\r
<Compile Include="System.Threading\MonitorTest.cs" />\r
<Compile Include="System.Threading\MutexCas.cs" />\r
<Compile Include="System\ActivatorTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\AppDomainCas.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\AppDomainSetupTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\AppDomainTest.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
- <Compile Include="System\ApplicationIdentityTest.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\ApplicationIdTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<Compile Include="System\EnumTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\EnvironmentCas.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\EnvironmentTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<Compile Include="System\IntegerFormatterTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\IntPtrTest.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\MarshalByRefObjectCas.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<Compile Include="System\MathTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\ModuleHandleTest.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\MulticastDelegate.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<Compile Include="System\TimeZoneTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\TypedReferenceCas.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\TypeTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<Compile Include="System\UInt64Test.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
- <Compile Include="System\UIntPtrTest.cs">\r
- <SubType>Code</SubType>\r
- </Compile>\r
<Compile Include="System\ValueTypeTest.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<UserProperties REFS-JarPath-system-runtime-remoting="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\System.Runtime.Remoting.jar;..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\System.Runtime.Serialization.Formatters.Soap.jar" REFS-JarPath-nunit-framework="..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-rt="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jgac\vmw4j2ee_110\mscorlib.jar" />\r
</VisualStudio>\r
</ProjectExtensions>\r
-</Project>
\ No newline at end of file
+</Project>\r
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ComparerTest.cs: Added test for bug #80929. Added tests to verify
+ binary serialization compatibility.
+ * IListTest.cs: Fixed header.
+
+2007-03-07 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * IListTest.cs: Added test for bug #80260.
+
2006-09-12 Gert Driesen <drieseng@users.sourceforge.net>
* ListTest.cs: Added tests for binary serialization, and Enumerator
--- /dev/null
+//
+// MonoTests.System.Collections.Generic.Test.ComparerTest
+//
+// Authors:
+// Gert Driesen (drieseng@users.sourceforge.net)
+//
+// Copyright (C) 2007 Gert Driesen
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
+
+using NUnit.Framework;
+
+namespace MonoTests.System.Collections.Generic
+{
+ [TestFixture]
+ public class ComparerTest
+ {
+ [Test] // bug #80929
+ public void SerializeDefault ()
+ {
+ Comparer<int> c = Comparer<int>.Default;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, c);
+
+ byte [] buffer = new byte [ms.Length];
+ ms.Position = 0;
+ ms.Read (buffer, 0, buffer.Length);
+
+ Assert.AreEqual (_serializedDefault, buffer);
+ }
+
+ [Test]
+ public void DeserializeDefault ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedDefault, 0, _serializedDefault.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ Comparer<int> c = (Comparer<int>) bf.Deserialize (ms);
+ Assert.IsNotNull (c);
+ }
+
+ private static readonly byte [] _serializedDefault = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x89, 0x01, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x43, 0x6f,
+ 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x47,
+ 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65,
+ 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72,
+ 0x60, 0x31, 0x5b, 0x5b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
+ 0x49, 0x6e, 0x74, 0x33, 0x32, 0x2c, 0x20, 0x6d, 0x73, 0x63, 0x6f,
+ 0x72, 0x6c, 0x69, 0x62, 0x2c, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x3d, 0x32, 0x2e, 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x2c,
+ 0x20, 0x43, 0x75, 0x6c, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x6e, 0x65,
+ 0x75, 0x74, 0x72, 0x61, 0x6c, 0x2c, 0x20, 0x50, 0x75, 0x62, 0x6c,
+ 0x69, 0x63, 0x4b, 0x65, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3d,
+ 0x62, 0x37, 0x37, 0x61, 0x35, 0x63, 0x35, 0x36, 0x31, 0x39, 0x33,
+ 0x34, 0x65, 0x30, 0x38, 0x39, 0x5d, 0x5d, 0x00, 0x00, 0x00, 0x00,
+ 0x0b };
+ }
+}
+
+#endif
+
}
[Test]
+ [Category ("TargetJvmNotWorking")] // BUGBUG Very very slow on TARGET_JVM.
public void SerializationTest()
{
for (int i = 0; i < 50; i++)
IDictionary d = new Dictionary<int, int> ();
d.Remove (null);
}
+
+ [Test]
+ public void IDictionary_IndexerGetNonExistingTest ()
+ {
+ IDictionary d = new Dictionary<int, int> ();
+ d.Add(1, 2);
+ Assert.IsNull(d[2]);
+ Assert.IsNull(d["foo"]);
+ }
}
}
--- /dev/null
+//
+// MonoTests.System.Collections.Generic.Test.IListTest
+//
+// Authors:
+// Gert Driesen (drieseng@users.sourceforge.net)
+//
+// Copyright (C) 2007 Gert Driesen
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections.Generic;
+
+using NUnit.Framework;
+
+namespace MonoTests.System.Collections.Generic
+{
+ [TestFixture]
+ public class IListTest
+ {
+ [Test] // bug #80260
+ public void CastToArray ()
+ {
+ IList<string> list = new string[] { "foo", "bar" };
+ string[] array = (string[]) list;
+ Assert.IsNotNull (array, "#1");
+ Assert.AreEqual (2, array.Length, "#2");
+ Assert.AreEqual ("foo", array [0], "#3");
+ Assert.AreEqual ("bar", array [1], "#4");
+ }
+ }
+}
+#endif
+
newRange.InsertRange (newRange.Count, li);
Assert.AreEqual (2, newRange.Count);
}
+
+ [Test]
+ public void InsertSelfTest()
+ {
+ List <int> range = new List <int> (5);
+ for (int i = 0; i < 5; ++ i)
+ range.Add (i);
+
+ range.InsertRange(2, range);
+ Assert.AreEqual (10, range.Count);
+ Assert.AreEqual (0, range [0]);
+ Assert.AreEqual (1, range [1]);
+ Assert.AreEqual (0, range [2]);
+ Assert.AreEqual (1, range [3]);
+ Assert.AreEqual (2, range [4]);
+ Assert.AreEqual (3, range [5]);
+ Assert.AreEqual (4, range [6]);
+ Assert.AreEqual (2, range [7]);
+ Assert.AreEqual (3, range [8]);
+ Assert.AreEqual (4, range [9]);
+ }
[Test, ExpectedException (typeof (ArgumentNullException))]
public void InsertRangeNullTest ()
Assert.AreEqual (1, l.IndexOf (200), "Could not find value");
}
+
+ [Test, ExpectedException(typeof (ArgumentException))]
+ public void IList_InsertInvalidType ()
+ {
+ IList list = _list1 as IList;
+ list.Insert(0, new object());
+ }
+
+ [Test, ExpectedException(typeof (ArgumentException))]
+ public void IList_AddInvalidType()
+ {
+ IList list = _list1 as IList;
+ list.Add(new object());
+ }
+
+ [Test]
+ public void IList_RemoveInvalidType()
+ {
+ IList list = _list1 as IList;
+ int nCount = list.Count;
+ list.Remove(new object());
+ Assert.AreEqual(nCount, list.Count);
+ }
[Test, ExpectedException (typeof (ArgumentOutOfRangeException))]
public void IndexOfOutOfRangeTest ()
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void SerializeTest ()
{
List <int> list = new List <int> ();
list.Add (0);
list.Add (7);
+#if TARGET_JVM
+ BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
MemoryStream ms = new MemoryStream ();
bf.Serialize (ms, list);
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void DeserializeTest ()
{
MemoryStream ms = new MemoryStream ();
ms.Write (_serializedList, 0, _serializedList.Length);
ms.Position = 0;
+#if TARGET_JVM
+ BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
List<int> list = (List<int>) bf.Deserialize (ms);
Assert.AreEqual (3, list.Count, "#1");
Assert.AreEqual (5, list [0], "#2");
l.Sort ();
// two element -> sort -> exception!
}
+
+ [Test]
+ void IList_Contains_InvalidType()
+ {
+ List<string> list = new List<string>();
+ list.Add("foo");
+ Assert.IsFalse (((IList)list).Contains(new object()));
+ }
+
+ [Test]
+ void IList_IndexOf_InvalidType()
+ {
+ List<string> list = new List<string>();
+ list.Add("foo");
+ Assert.AreEqual (-1, ((IList)list).IndexOf(new object()));
+ }
// for bug #77277 test case
[Test]
Assert.AreEqual (2, list.LastIndexOf (item0), "#4");
Assert.AreEqual (2, list.LastIndexOf (new EquatableClass (0)), "#5");
}
+
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void SetItem_OutOfRange()
+ {
+ List<string> list = new List<string>();
+ list[0] = "foo";
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void SetItem_IList_OutOfRange()
+ {
+ IList<string> list = new List<string>();
+ list[0] = "foo";
+ }
public class EquatableClass : IEquatable<EquatableClass>
{
};
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void SerializationRoundtrip ()
{
CaseInsensitiveHashCodeProvider enus = new CaseInsensitiveHashCodeProvider (new CultureInfo ("en-US"));
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Deserialize ()
{
+#if TARGET_JVM
+ BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
MemoryStream ms = new MemoryStream (serialized_en_us);
CaseInsensitiveHashCodeProvider enus = (CaseInsensitiveHashCodeProvider) bf.Deserialize (ms);
}\r
\r
[Test]\r
-#if TARGET_JVM\r
- [Category ("NotWorking")]\r
-#endif\r
public void TestCopyTo() {\r
{\r
bool errorThrown = false;\r
h['b'] = 2;\r
DictionaryEntry[] o = new DictionaryEntry[2];\r
h.CopyTo(o,0);\r
+#if TARGET_JVM // Hashtable is not an ordered collection!\r
+ if (o[0].Key.Equals('b')) {\r
+ DictionaryEntry v = o[0];\r
+ o[0] = o[1];\r
+ o[1] = v;\r
+ }\r
+#endif // TARGET_JVM\r
AssertEquals("first copy fine.", 'a', o[0].Key);\r
AssertEquals("first copy fine.", 1, o[0].Value);\r
AssertEquals("second copy fine.", 'b', o[1].Key);\r
public void TestSerialization () {\r
Hashtable table1 = new Hashtable();\r
Hashtable table2;\r
- Stream str = new MemoryStream ();
+ Stream str = new MemoryStream ();\r
BinaryFormatter formatter = new BinaryFormatter();\r
\r
for (int i = 0; i < 100; i++)\r
- table1[i] = "TestString Key: " + i.ToString();
-
- formatter.Serialize (str, table1);
- str.Position = 0;
- table2 = (Hashtable) formatter.Deserialize (str);
+ table1[i] = "TestString Key: " + i.ToString();\r
+ \r
+ formatter.Serialize (str, table1);\r
+ str.Position = 0;\r
+ table2 = (Hashtable) formatter.Deserialize (str);\r
\r
bool result;\r
- foreach (DictionaryEntry de in table1)
+ foreach (DictionaryEntry de in table1)\r
AssertEquals (de.Value, table2 [de.Key]);\r
}\r
\r
[Test]\r
-#if TARGET_JVM\r
- [Category ("NotWorking")]\r
-#endif\r
+ [Category ("TargetJvmNotWorking")]\r
public void TestSerialization2 () {\r
// Test from bug #70570\r
MemoryStream stream = new MemoryStream();\r
+2007-03-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * CompareInfoTest.cs : added test for bug #79714.
+
2007-02-15 Atsushi Enomoto <atsushi@ximian.com>
* CompareInfoTest.cs : added test for bug #80865.
AssertEquals ("Compare two strings, with first length zero", -1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, s1.Length));
AssertEquals ("Compare strings, with second length zero", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, s1, 0, 0));
+ AssertEquals ("Compare two null references", 0, CultureInfo.InvariantCulture.CompareInfo.Compare (null, null));
+ AssertEquals ("Compare a string to a null reference", 1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", null));
+ AssertEquals ("Compare a null reference to a string", -1, CultureInfo.InvariantCulture.CompareInfo.Compare (null, ""));
+
}
// Culture-sensitive collation tests
AssertCompare ("#25", -1, "+-+-)", "-+-+)");
AssertCompare ("#26", -1, "+-+)", "-+-+)");
AssertCompare ("#27", -1, "++)", "-+-+)");
+ // bug #79714
+ AssertCompare ("#28", 1, "aa ", "A");
}
[Test]
--- /dev/null
+// CompareInfoTest.cs - NUnit Test Cases for the
+// System.Globalization.CompareInfo class
+//
+// Dick Porter <dick@ximian.com>
+// Atsushi Enomoto <atsushi@ximian.com>
+//
+// (C) 2003-2005 Novell, Inc. http://www.novell.com
+//
+
+using NUnit.Framework;
+using System;
+using System.Globalization;
+
+namespace MonoTests.System.Globalization
+{
+
+[TestFixture]
+public class CompareInfoTest : Assertion
+{
+ static bool doTest = Environment.GetEnvironmentVariable ("MONO_DISABLE_MANAGED_COLLATION") != "yes";
+
+ public CompareInfoTest() {}
+
+ [Test]
+ public void Compare()
+ {
+ string s1 = "foo";
+
+ AssertEquals ("Compare two empty strings", 0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", ""));
+ AssertEquals ("Compare string with empty string", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, ""));
+ AssertEquals ("Compare empty string with string", -1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", s1));
+
+ AssertEquals ("Compare two empty strings, with 0 offsets", 0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "", 0));
+ AssertEquals ("Compare string with empty string, with 0 offsets", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, "", 0));
+ AssertEquals ("Compare empty string with string, with 0 offsets", -1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, s1, 0));
+
+ AssertEquals ("Compare two empty strings, with 0 offsets and specified lengths", 0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "".Length, "", 0, "".Length));
+ AssertEquals ("Compare string with empty string, with 0 offsets and specified lengths", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, "", 0, "".Length));
+ AssertEquals ("Compare empty string with string, with 0 offsets and specified lengths", -1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "".Length, s1, 0, s1.Length));
+
+ AssertEquals ("Compare two strings, with offsets == string lengths", 0, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s1.Length, s1, s1.Length));
+ AssertEquals ("Compare two strings, with first offset == string length", -1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s1.Length, s1, 0));
+ AssertEquals ("Compare two strings, with second offset == string length", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1, s1.Length));
+
+ AssertEquals ("Compare two strings, with zero lengths", 0, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, 0));
+ AssertEquals ("Compare two strings, with first length zero", -1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, s1.Length));
+ AssertEquals ("Compare strings, with second length zero", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, s1, 0, 0));
+
+ }
+
+ // Culture-sensitive collation tests
+
+ CompareInfo invariant = CultureInfo.InvariantCulture.CompareInfo;
+ CompareInfo french = new CultureInfo ("fr").CompareInfo;
+ CompareInfo japanese = new CultureInfo ("ja").CompareInfo;
+ CompareInfo czech = new CultureInfo ("cs").CompareInfo;
+ CompareInfo hungarian = new CultureInfo ("hu").CompareInfo;
+
+ CompareOptions ignoreCN =
+ CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase;
+
+ void AssertCompare (string message, int result, string s1, string s2)
+ {
+ AssertCompare (message, result, s1, s2, CompareOptions.None);
+ }
+
+ void AssertCompare (string message, int result, string s1, string s2,
+ CompareOptions opt)
+ {
+ AssertCompare (message, result, s1, s2, opt, invariant);
+ }
+
+ void AssertCompare (string message, int result, string s1, string s2,
+ CompareOptions opt, CompareInfo ci)
+ {
+ int ret = ci.Compare (s1, s2, opt);
+ if (result == 0)
+ AssertEquals (message, 0, ret);
+ else if (result < 0)
+ Assert (message + String.Format ("(neg: {0})", ret), ret < 0);
+ else
+ Assert (message + String.Format ("(pos: {0})", ret), ret > 0);
+ }
+
+ void AssertCompare (string message, int result,
+ string s1, int idx1, int len1, string s2, int idx2, int len2)
+ {
+ int ret = invariant.Compare (s1, idx1, len1, s2, idx2, len2);
+ if (result == 0)
+ AssertEquals (message, 0, ret);
+ else if (result < 0)
+ Assert (message, ret < 0);
+ else
+ Assert (message, ret > 0);
+ }
+
+ void AssertCompare (string message, int result,
+ string s1, int idx1, int len1, string s2, int idx2, int len2,
+ CompareOptions opt, CompareInfo ci)
+ {
+ int ret = ci.Compare (s1, idx1, len1, s2, idx2, len2, opt);
+ if (result == 0)
+ AssertEquals (message, 0, ret);
+ else if (result < 0)
+ Assert (message, ret < 0);
+ else
+ Assert (message, ret > 0);
+ }
+
+ void AssertIndexOf (string message, int expected,
+ string source, char target)
+ {
+ AssertEquals (message, expected,
+ invariant.IndexOf (source, target));
+ }
+
+ void AssertIndexOf (string message, int expected, string source,
+ char target, CompareOptions opt)
+ {
+ AssertEquals (message, expected,
+ invariant.IndexOf (source, target, opt));
+ }
+
+ void AssertIndexOf (string message, int expected, string source,
+ char target, int idx, int len, CompareOptions opt, CompareInfo ci)
+ {
+ AssertEquals (message, expected,
+ ci.IndexOf (source, target, idx, len, opt));
+ }
+
+ void AssertIndexOf (string message, int expected,
+ string source, string target)
+ {
+ AssertEquals (message, expected,
+ invariant.IndexOf (source, target));
+ }
+
+ void AssertIndexOf (string message, int expected, string source,
+ string target, CompareOptions opt)
+ {
+ AssertEquals (message, expected,
+ invariant.IndexOf (source, target, opt));
+ }
+
+ void AssertIndexOf (string message, int expected, string source,
+ string target, int idx, int len, CompareOptions opt, CompareInfo ci)
+ {
+ AssertEquals (message, expected,
+ ci.IndexOf (source, target, idx, len, opt));
+ }
+
+ void AssertLastIndexOf (string message, int expected,
+ string source, char target)
+ {
+ AssertEquals (message, expected,
+ invariant.LastIndexOf (source, target));
+ }
+
+ void AssertLastIndexOf (string message, int expected, string source,
+ char target, CompareOptions opt)
+ {
+ AssertEquals (message, expected,
+ invariant.LastIndexOf (source, target, opt));
+ }
+
+ void AssertLastIndexOf (string message, int expected, string source,
+ char target, int idx, int len)
+ {
+ AssertEquals (message, expected,
+ invariant.LastIndexOf (source, target, idx, len));
+ }
+
+ void AssertLastIndexOf (string message, int expected, string source,
+ char target, int idx, int len, CompareOptions opt, CompareInfo ci)
+ {
+ AssertEquals (message, expected,
+ ci.LastIndexOf (source, target, idx, len, opt));
+ }
+
+ void AssertLastIndexOf (string message, int expected,
+ string source, string target)
+ {
+ AssertEquals (message, expected,
+ invariant.LastIndexOf (source, target));
+ }
+
+ void AssertLastIndexOf (string message, int expected, string source,
+ string target, CompareOptions opt)
+ {
+ AssertEquals (message, expected,
+ invariant.LastIndexOf (source, target, opt));
+ }
+
+ void AssertLastIndexOf (string message, int expected, string source,
+ string target, int idx, int len)
+ {
+ AssertEquals (message, expected,
+ invariant.LastIndexOf (source, target, idx, len));
+ }
+
+ void AssertLastIndexOf (string message, int expected, string source,
+ string target, int idx, int len, CompareOptions opt, CompareInfo ci)
+ {
+ AssertEquals (message, expected,
+ ci.LastIndexOf (source, target, idx, len, opt));
+ }
+
+ void AssertIsPrefix (string message, bool expected, string source,
+ string target)
+ {
+ Assert (message, expected == invariant.IsPrefix (
+ source, target));
+ }
+
+ void AssertIsPrefix (string message, bool expected, string source,
+ string target, CompareOptions opt)
+ {
+ Assert (message, expected == invariant.IsPrefix (
+ source, target, opt));
+ }
+
+ void AssertIsSuffix (string message, bool expected, string source,
+ string target)
+ {
+ Assert (message, expected == invariant.IsSuffix (
+ source, target));
+ }
+
+ void AssertIsSuffix (string message, bool expected, string source,
+ string target, CompareOptions opt)
+ {
+ Assert (message, expected == invariant.IsSuffix (
+ source, target, opt));
+ }
+
+ [Test]
+#if NET_2_0
+ [Category ("NotDotNet")]
+#endif
+ public void CultureSensitiveCompare ()
+ {
+ if (!doTest)
+ return;
+
+ AssertCompare ("#1", -1, "1", "2");
+ AssertCompare ("#2", 1, "A", "a");
+ AssertCompare ("#3", 0, "A", "a", CompareOptions.IgnoreCase);
+ AssertCompare ("#6", 1, "12", "1");
+// BUG in .NET 2.0: See GetSortKey() test that assures sortkeys for "AE" and
+// "\u00C6" are equivalent.
+ AssertCompare ("#7", 0, "AE", "\u00C6");
+ AssertCompare ("#8", 0, "AB\u01c0C", "A\u01c0B\u01c0C", CompareOptions.IgnoreSymbols);
+// BUG in .NET 2.0: ditto.
+ AssertCompare ("#9", 0, "A\u0304", "\u0100");
+ AssertCompare ("#10", 1, "ABCABC", 5, 1, "1", 0, 1, CompareOptions.IgnoreCase, invariant);
+ AssertCompare ("#11", 0, "-d:NET_2_0", 0, 1, "-", 0, 1);
+
+// BUG in .NET 2.0: ditto.
+ AssertCompare ("#12", 0, "ae", "\u00E6");
+ AssertCompare ("#13", 0, "\u00E6", "ae");
+ AssertCompare ("#14", 0, "\u00E6s", 0, 1, "ae", 0, 2);
+
+ // target is "empty" (in culture-sensitive context).
+// BUG in .NET 2.0: \u3007 is totally-ignored character as a GetSortKey()
+// result, while it is not in Compare().
+ AssertCompare ("#17", 0, String.Empty, "\u3007");
+ AssertCompare ("#18", 1, "A", "\u3007");
+ AssertCompare ("#19", 1, "ABC", "\u3007");
+
+ // shift weight comparison
+ AssertCompare ("#20", 1, "--start", "--");
+ // expansion
+// BUG in .NET 2.0: the same 00C6/00E6 issue.
+ AssertCompare ("#21", -1, "\u00E6", "aes");
+
+// bug #78748
+ AssertCompare ("#22", -1, "++)", "+-+)");
+ AssertCompare ("#23", -1, "+-+)", "+-+-)");
+ AssertCompare ("#24", 1, "+-+-)", "++)");
+ // BUG in .NET: it returns 1
+ AssertCompare ("#25", -1, "+-+-)", "-+-+)");
+ AssertCompare ("#26", -1, "+-+)", "-+-+)");
+ AssertCompare ("#27", -1, "++)", "-+-+)");
+ }
+
+ [Test]
+#if NET_2_0
+ [Category ("NotDotNet")]
+#endif
+ public void CompareSpecialWeight ()
+ {
+ if (!doTest)
+ return;
+
+ // Japanese (in invariant)
+// BUG in .NET 2.0 : half-width kana should be bigger.
+ AssertCompare ("#1", 1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+ AssertCompare ("#4", 1, "\u3042\u309D", "\u3042\u3042");
+ AssertCompare ("#5", 0, "\u3042\u309D", "\u3042\u3042", CompareOptions.IgnoreNonSpace);
+
+ // extender in target
+// BUG in .NET 2.0 : an extender should result in bigger sortkey
+ AssertCompare ("#7", -1, "\u30D1\u30A2", "\u30D1\u30FC");
+ AssertCompare ("#8", 0, "\u30D1\u30A2", "\u30D1\u30FC", CompareOptions.IgnoreNonSpace);
+ // extender in source
+// BUG in .NET 2.0 : vice versa
+ AssertCompare ("#9", 1, "\u30D1\u30FC", "\u30D1\u30A2");
+ AssertCompare ("#10", 0, "\u30D1\u30FC", "\u30D1\u30A2", CompareOptions.IgnoreNonSpace);
+ }
+
+ [Test]
+ public void IndexOfChar ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIndexOf ("#1", -1, "ABC", '1');
+ AssertIndexOf ("#2", 2, "ABCABC", 'c', CompareOptions.IgnoreCase);
+ AssertIndexOf ("#4", 4, "ABCDE", '\u0117', ignoreCN);
+ AssertIndexOf ("#5", 1, "ABCABC", 'B', 1, 5, CompareOptions.IgnoreCase, invariant);
+ AssertIndexOf ("#6", 4, "ABCABC", 'B', 2, 4, CompareOptions.IgnoreCase, invariant);
+ }
+
+ [Test]
+ [Category ("NotDotNet")]
+ public void IndexOfCharMSBug ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIndexOf ("#1", 0, "\u00E6", 'a');
+ }
+
+ [Test]
+ public void LastIndexOfChar ()
+ {
+ if (!doTest)
+ return;
+
+ AssertLastIndexOf ("#1", -1, "ABC", '1');
+ AssertLastIndexOf ("#2", 5, "ABCABC", 'c', CompareOptions.IgnoreCase);
+ AssertLastIndexOf ("#4", 4, "ABCDE", '\u0117', ignoreCN);
+ AssertLastIndexOf ("#5", 1, "ABCABC", 'B', 3, 3);
+ AssertLastIndexOf ("#6", 4, "ABCABC", 'B', 4, 4);
+ AssertLastIndexOf ("#7", -1, "ABCABC", 'B', 5, 1);
+ AssertLastIndexOf ("#11", 0, "\\", '\\');
+ AssertEquals ("#11en", 0, new CultureInfo ("en").CompareInfo.LastIndexOf ("\\", '\\'));
+ AssertEquals ("#11ja", 0, new CultureInfo ("ja").CompareInfo.LastIndexOf ("\\", '\\'));
+ AssertLastIndexOf ("#12", 8, "/system/web", 'w');
+ AssertEquals ("#12sv", 8, new CultureInfo ("sv").CompareInfo.LastIndexOf ("/system/web", 'w'));
+ }
+
+ [Test]
+ [Category ("NotDotNet")]
+ public void LastIndexOfCharMSBug ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIndexOf ("#1", 0, "\u00E6", 'a');
+ }
+
+ [Test]
+#if NET_2_0
+ [Category ("NotDotNet")]
+#endif
+ public void IsPrefix ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIsPrefix ("#1", false, "ABC", "c", CompareOptions.IgnoreCase);
+ AssertIsPrefix ("#2", false, "BC", "c", CompareOptions.IgnoreCase);
+ AssertIsPrefix ("#3", true, "C", "c", CompareOptions.IgnoreCase);
+ AssertIsPrefix ("#4", true, "EDCBA", "\u0117", ignoreCN);
+ AssertIsPrefix ("#5", true, "ABC", "AB", CompareOptions.IgnoreCase);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertIsPrefix ("#6", true, "ae", "\u00E6", CompareOptions.None);
+ AssertIsPrefix ("#7", true, "\u00E6", "ae", CompareOptions.None);
+
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertIsPrefix ("#8", true, "\u00E6", "a", CompareOptions.None);
+ AssertIsPrefix ("#9", true, "\u00E6s", "ae", CompareOptions.None);
+ AssertIsPrefix ("#10", false, "\u00E6", "aes", CompareOptions.None);
+ AssertIsPrefix ("#11", true, "--start", "--", CompareOptions.None);
+ AssertIsPrefix ("#12", true, "-d:NET_1_1", "-", CompareOptions.None);
+ AssertIsPrefix ("#13", false, "-d:NET_1_1", "@", CompareOptions.None);
+ // U+3007 is completely ignored character.
+ AssertIsPrefix ("#14", true, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+ AssertIsPrefix ("#15", true, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+ AssertIsPrefix ("#16", true, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+ AssertIsPrefix ("#17", true, "\\b\\a a", "\\b\\a a");
+ Assert ("#17en", new CultureInfo ("en").CompareInfo.IsPrefix ("\\b\\a a", "\\b\\a a"));
+ Assert ("#17ja", new CultureInfo ("ja").CompareInfo.IsPrefix ("\\b\\a a", "\\b\\a a"));
+ }
+
+ [Test]
+ public void IsPrefixSpecialWeight ()
+ {
+ if (!doTest)
+ return;
+
+ // Japanese (in invariant)
+ AssertIsPrefix ("#1", false, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+ AssertIsPrefix ("#2-2", false, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+ AssertIsPrefix ("#3-2", false, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E",
+ "\u30C0\u30A4\u30D6");
+ AssertIsPrefix ("#4", false, "\u3042\u309D", "\u3042\u3042");
+
+ // extender in target
+ AssertIsPrefix ("#7", false, "\u30D1\u30A2", "\u30D1\u30FC");
+ // extender in source
+ AssertIsPrefix ("#9", false, "\u30D1\u30FC", "\u30D1\u30A2");
+
+ // empty suffix always matches the source.
+ AssertIsPrefix ("#11", true, "", "");
+ AssertIsPrefix ("#12", true, "/test.css", "");
+
+ // bug #76243
+ AssertIsPrefix ("#13", false, "\u00e4_", "a");
+ }
+
+ [Test]
+#if NET_2_0
+ [Category ("NotDotNet")]
+#endif
+ public void IsSuffix ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIsSuffix ("#1", true, "ABC", "c", CompareOptions.IgnoreCase);
+ AssertIsSuffix ("#2", true, "BC", "c", CompareOptions.IgnoreCase);
+ AssertIsSuffix ("#3", false, "CBA", "c", CompareOptions.IgnoreCase);
+ AssertIsSuffix ("#4", true, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
+ AssertIsSuffix ("#5", false, "\u00E6", "a", CompareOptions.None);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertIsSuffix ("#6", true, "\u00E6", "ae", CompareOptions.None);
+ AssertIsSuffix ("#7", true, "ae", "\u00E6", CompareOptions.None);
+ AssertIsSuffix ("#8", false, "e", "\u00E6", CompareOptions.None);
+ // U+3007 is completely ignored character.
+ AssertIsSuffix ("#9", true, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+ AssertIsSuffix ("#10", true, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+ AssertIsSuffix ("#11", true, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+ // extender in target
+ AssertIsSuffix ("#12", false, "\u30D1\u30A2", "\u30D1\u30FC");
+ AssertIsSuffix ("#13", true, "\u30D1\u30A2", "\u30D1\u30FC", CompareOptions.IgnoreNonSpace);
+ // extender in source
+ AssertIsSuffix ("#14", false, "\u30D1\u30FC", "\u30D1\u30A2");
+ AssertIsSuffix ("#15", true, "\u30D1\u30FC", "\u30D1\u30A2", CompareOptions.IgnoreNonSpace);
+ // optimization sanity check
+ AssertIsSuffix ("#16", true,
+ "/configuration/system.runtime.remoting",
+ "system.runtime.remoting");
+
+ // empty suffix always matches the source.
+ AssertIsSuffix ("#17", true, "", "");
+ AssertIsSuffix ("#18", true, "/test.css", "");
+ AssertIsSuffix ("#19", true, "/test.css", "/test.css");
+ AssertIsSuffix ("#20", true, "\\b\\a a", "\\b\\a a");
+ Assert ("#20en", new CultureInfo ("en").CompareInfo.IsSuffix ("\\b\\a a", "\\b\\a a"));
+ Assert ("#20ja", new CultureInfo ("ja").CompareInfo.IsSuffix ("\\b\\a a", "\\b\\a a"));
+ }
+
+ [Test]
+ [Category ("NotDotNet")]
+ [Category ("NotWorking")]
+ public void IsSuffixMSBug ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIsSuffix ("#1", true, "\u00E6", "e", CompareOptions.None);
+ }
+
+ [Test]
+#if NET_2_0
+ [Category ("NotDotNet")]
+#endif
+ public void IndexOfString ()
+ {
+ if (!doTest)
+ return;
+
+ AssertIndexOf ("#1", -1, "ABC", "1", CompareOptions.None);
+ AssertIndexOf ("#2", 2, "ABCABC", "c", CompareOptions.IgnoreCase);
+ AssertIndexOf ("#4", 4, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
+ AssertIndexOf ("#5", 1, "ABCABC", "BC", CompareOptions.IgnoreCase);
+ AssertIndexOf ("#6", 1, "BBCBBC", "BC", CompareOptions.IgnoreCase);
+ AssertIndexOf ("#7", -1, "ABCDEF", "BCD", 0, 3, CompareOptions.IgnoreCase, invariant);
+ AssertIndexOf ("#8", 0, "-ABC", "-", CompareOptions.None);
+ AssertIndexOf ("#9", 0, "--ABC", "--", CompareOptions.None);
+ AssertIndexOf ("#10", -1, "--ABC", "--", 1, 2, CompareOptions.None, invariant);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertIndexOf ("#11", 0, "AE", "\u00C6", CompareOptions.None);
+ // U+3007 is completely ignored character.
+ AssertIndexOf ("#12", 0, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+ AssertIndexOf ("#13", 0, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+ AssertIndexOf ("#14", 0, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+ AssertIndexOf ("#15", 0, "\uff21\uff21", "\u3007", CompareOptions.None);
+ AssertIndexOf ("#15-2", 1, "\u3007\uff21", "\uff21", CompareOptions.None);
+ // target is "empty" (in culture-sensitive context).
+ AssertIndexOf ("#16", -1, String.Empty, "\u3007");
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+ AssertIndexOf ("#17", 0, "A", "\u3007");
+ AssertIndexOf ("#18", 0, "ABC", "\u3007");
+
+ AssertIndexOf ("#19", 0, "\\b\\a a", "\\b\\a a");
+ AssertEquals ("#19en", 0, new CultureInfo ("en").CompareInfo.IndexOf ("\\b\\a a", "\\b\\a a"));
+ AssertEquals ("#19ja", 0, new CultureInfo ("ja").CompareInfo.IndexOf ("\\b\\a a", "\\b\\a a"));
+ }
+
+ [Test]
+ public void IndexOfSpecialWeight ()
+ {
+ if (!doTest)
+ return;
+
+ // Japanese (in invariant)
+ AssertIndexOf ("#1", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+ // extender in target
+ AssertIndexOf ("#1-2", -1, "\u30D1\u30A2", "\u30D1\u30FC");
+ // extender in source
+ AssertIndexOf ("#2-2", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+ AssertIndexOf ("#4", -1, "\u3042\u309D", "\u3042\u3042");
+ }
+
+ [Test]
+#if NET_2_0
+ [Category ("NotDotNet")]
+#endif
+ public void LastIndexOfString ()
+ {
+ if (!doTest)
+ return;
+
+ AssertLastIndexOf ("#1", -1, "ABC", "1", CompareOptions.None);
+ AssertLastIndexOf ("#2", 5, "ABCABC", "c", CompareOptions.IgnoreCase);
+ AssertLastIndexOf ("#4", 4, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
+ AssertLastIndexOf ("#5", 4, "ABCABC", "BC", CompareOptions.IgnoreCase);
+ AssertLastIndexOf ("#6", 4, "BBCBBC", "BC", CompareOptions.IgnoreCase);
+ AssertLastIndexOf ("#7", 1, "original", "rig", CompareOptions.None);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertLastIndexOf ("#8", 0, "\u00E6", "ae", CompareOptions.None);
+ AssertLastIndexOf ("#9", 0, "-ABC", "-", CompareOptions.None);
+ AssertLastIndexOf ("#10", 0, "--ABC", "--", CompareOptions.None);
+ AssertLastIndexOf ("#11", -1, "--ABC", "--", 2, 2, CompareOptions.None, invariant);
+ AssertLastIndexOf ("#12", -1, "--ABC", "--", 4, 2, CompareOptions.None, invariant);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertLastIndexOf ("#13", 0, "AE", "\u00C6", CompareOptions.None);
+ // U+3007 is completely ignored character.
+ AssertLastIndexOf ("#14", 1, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+ AssertLastIndexOf ("#15", 1, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+ AssertLastIndexOf ("#16", 1, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+ AssertLastIndexOf ("#17", 1, "\uff21\uff21", "\u3007", CompareOptions.None);
+ AssertLastIndexOf ("#18", 1, "\u3007\uff21", "\uff21", CompareOptions.None);
+ AssertLastIndexOf ("#19", 0, "\\b\\a a", "\\b\\a a");
+ AssertEquals ("#19en", 0, new CultureInfo ("en").CompareInfo.LastIndexOf ("\\b\\a a", "\\b\\a a"));
+ AssertEquals ("#19ja", 0, new CultureInfo ("ja").CompareInfo.LastIndexOf ("\\b\\a a", "\\b\\a a"));
+ // bug #80612
+ AssertLastIndexOf ("#20", 8, "/system/web", "w");
+ AssertEquals ("#20sv", 8, new CultureInfo ("sv").CompareInfo.LastIndexOf ("/system/web", "w"));
+ }
+
+ [Test]
+ public void LastIndexOfSpecialWeight ()
+ {
+ if (!doTest)
+ return;
+
+ // Japanese (in invariant)
+ AssertLastIndexOf ("#1", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+ // extender in target
+ AssertLastIndexOf ("#1-2", -1, "\u30D1\u30A2", "\u30D1\u30FC");
+ // extender in source
+ AssertLastIndexOf ("#4", -1, "\u3042\u309D", "\u3042\u3042");
+ }
+
+ [Test]
+ public void LastIndexOfOrdinalString ()
+ {
+ if (!doTest)
+ return;
+
+ AssertLastIndexOf ("#1", -1, "ABC", "1", CompareOptions.Ordinal);
+ AssertLastIndexOf ("#2", 5, "ABCABC", "C", CompareOptions.Ordinal);
+ AssertLastIndexOf ("#3", -1, "ABCABC", "\uFF22", CompareOptions.Ordinal);
+ AssertLastIndexOf ("#4", 4, "ABCABC", "BC", CompareOptions.Ordinal);
+ AssertLastIndexOf ("#5", 4, "BBCBBC", "BC", CompareOptions.Ordinal);
+ AssertLastIndexOf ("#6", 1, "original", "rig", CompareOptions.Ordinal);
+ AssertLastIndexOf ("#7", 0, "\\b\\a a", "\\b\\a a", CompareOptions.Ordinal);
+ }
+
+ [Test]
+ [Category ("TargetJvmNotWorking")]
+ // for bug #76702
+ public void NullCharacter ()
+ {
+ AssertEquals ("#1", -1, "MONO".IndexOf ("\0\0\0"));
+ AssertEquals ("#2", -1, "MONO".LastIndexOf ("\0\0\0"));
+ AssertEquals ("#3", 1, "MONO".CompareTo ("\0\0\0"));
+ }
+
+ [Test]
+ [Category ("NotDotNet")]
+ // MS.NET treats it as equivalent, while in IndexOf() it does not match.
+ public void NullCharacterWeird ()
+ {
+ AssertEquals ("#4", -1, "MONO".CompareTo ("MONO\0\0\0"));
+ }
+
+#if NET_2_0
+ [Test]
+ [Category ("NotDotNet")]
+ public void OrdinalIgnoreCaseCompare ()
+ {
+ if (!doTest)
+ return;
+
+ // matches
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+ AssertCompare ("#1", 0, "AE", "\u00C6", CompareOptions.None);
+// BUG in .NET 2.0 : It raises inappropriate ArgumentException.
+ // should not match since it is Ordinal
+ AssertCompare ("#2", -133, "AE", "\u00C6", CompareOptions.OrdinalIgnoreCase);
+
+ AssertCompare ("#3", 1, "AE", "\u00E6", CompareOptions.None);
+ // matches
+ AssertCompare ("#4", 0, "AE", "\u00E6", CompareOptions.IgnoreCase);
+ // should not match since it is Ordinal
+ AssertCompare ("#5", -133, "AE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
+
+ AssertCompare ("#6", 0, "AE", "ae", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#7", 0, "aE", "ae", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#8", 0, "aE", "ae", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#9", 0, "ae", "ae", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#10", 0, "AE", "AE", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#11", 0, "aE", "AE", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#12", 0, "aE", "AE", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#13", 0, "ae", "AE", CompareOptions.OrdinalIgnoreCase);
+ AssertCompare ("#14", 0, "ola", "OLA", CompareOptions.OrdinalIgnoreCase);
+ }
+
+ [Test]
+ public void OrdinalIgnoreCaseIndexOf ()
+ {
+ AssertIndexOf ("#1-1", 0, "ABC", "abc", CompareOptions.OrdinalIgnoreCase);
+ AssertIndexOf ("#1-2", -1, "AEBECE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
+ AssertIndexOf ("#1-3", -1, "@_@", "`_`", CompareOptions.OrdinalIgnoreCase);
+ }
+
+ [Test]
+ public void OrdinalIgnoreCaseIndexOfChar ()
+ {
+ AssertIndexOf ("#2-1", 0, "ABC", 'a', CompareOptions.OrdinalIgnoreCase);
+ AssertIndexOf ("#2-2", -1, "AEBECE", '\u00C0', CompareOptions.OrdinalIgnoreCase);
+ AssertIndexOf ("#2-3", -1, "@_@", '`', CompareOptions.OrdinalIgnoreCase);
+ }
+
+ [Test]
+ public void OrdinalIgnoreCaseLastIndexOf ()
+ {
+ AssertLastIndexOf ("#1-1", 0, "ABC", "abc", CompareOptions.OrdinalIgnoreCase);
+ AssertLastIndexOf ("#1-2", -1, "AEBECE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
+ AssertLastIndexOf ("#1-3", -1, "@_@", "`_`", CompareOptions.OrdinalIgnoreCase);
+ AssertLastIndexOf ("#1-4", 1, "ABCDE", "bc", CompareOptions.OrdinalIgnoreCase);
+ AssertLastIndexOf ("#1-5", -1, "BBBBB", "ab", CompareOptions.OrdinalIgnoreCase);
+ }
+
+ [Test]
+ public void OrdinalIgnoreCaseLastIndexOfChar ()
+ {
+ AssertLastIndexOf ("#2-1", 0, "ABC", 'a', CompareOptions.OrdinalIgnoreCase);
+ AssertLastIndexOf ("#2-2", -1, "AEBECE", '\u00C0', CompareOptions.OrdinalIgnoreCase);
+ AssertLastIndexOf ("#2-3", -1, "@_@", '`', CompareOptions.OrdinalIgnoreCase);
+ }
+
+ [Test] // bug #80865
+ public void IsPrefixOrdinalIgnoreCase ()
+ {
+ Assert ("aaaa".StartsWith ("A", StringComparison.OrdinalIgnoreCase));
+ }
+#endif
+}
+
+}
}
[Test]
+ [Category ("TargetJvmNotWorking")] //OptionalCalendars not yet supported for TARGET_JVM.
// make sure that all CultureInfo holds non-null calendars.
public void OptionalCalendars ()
{
public void DeserializeKnownValue ()
{
MemoryStream ms = new MemoryStream (serialized_daylighttime);
+#if TARGET_JVM
+ BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
DaylightTime dt = (DaylightTime) bf.Deserialize (ms);
Assert.AreEqual (DateTime.MinValue, dt.Start, "Start");
Assert.AreEqual (DateTime.MaxValue, dt.End, "End");
[Test]
[ExpectedException(typeof(EndOfStreamException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void ReadDecimalException ()
{
MemoryStream stream = new MemoryStream (new byte [] {0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0 ,87, 98, 0, 0, 0, 0, 0});
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void ReadSingle ()
{
MemoryStream stream = new MemoryStream (new byte [] {65, 200, 0, 0, 0, 1, 2, 3, 4});
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void WriteFloat ()
{
MemoryStream stream = new MemoryStream ();
+2007-02-19 Eyal Alaluf <eyala@mainsoft.com>
+
+ * FileStreamTest.cs: Mark tests that use TARGET_JVM not supported features.
+
2007-02-19 Boris Kirzner <borisk@mainsoft.com>
* DirectoryTest.cs, PathTest.cs: added test for
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void DirectoryNameWithSpace ()
{
// check for Unix platforms - see FAQ for more details
AssertEquals ("test#12", 0, time.Second);
}
- [Test]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif
+ [Test]
+ [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
info.LastAccessTime = DateTime.Now;
}
- [Test]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif
+ [Test]
+ [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTimeUtc ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
info.LastAccessTimeUtc = DateTime.Now;
}
- [Test]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif
+ [Test]
+ [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTime ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
info.CreationTime = DateTime.Now;
}
- [Test]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif
+ [Test]
+ [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeUtc ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
Assert.IsFalse (Directory.Exists (null as string));\r
}\r
\r
+#if !TARGET_JVM // We don't support yet the Process class.\r
[Test]\r
[Category("NotDotNet")]\r
public void ExistsAccessDenied ()\r
Directory.Delete (path);\r
}\r
}\r
+#endif\r
\r
[Test]\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif \r
public void GetCreationTimeException1 ()\r
{\r
Directory.GetCreationTime (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException2 ()\r
{\r
Directory.GetCreationTime ("");\r
#if !NET_2_0\r
[ExpectedException(typeof(IOException))]\r
#endif\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException4 ()\r
{\r
Directory.GetCreationTime (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException5 ()\r
{\r
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException1 ()\r
{\r
Directory.GetCreationTimeUtc (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException2 ()\r
{\r
Directory.GetCreationTimeUtc ("");\r
#if !NET_2_0\r
[ExpectedException (typeof (IOException))]\r
#endif\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtc_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException4 ()\r
{\r
Directory.GetCreationTimeUtc (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException5 ()\r
{\r
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTime_Null ()\r
{\r
Directory.GetLastAccessTime (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeException2 ()\r
{\r
Directory.GetLastAccessTime ("");\r
#if !NET_2_0\r
[ExpectedException (typeof (IOException))]\r
#endif\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTime_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeException4 ()\r
{\r
Directory.GetLastAccessTime (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeException5 ()\r
{\r
Directory.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtc_Null ()\r
{\r
Directory.GetLastAccessTimeUtc (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtcException2 ()\r
{\r
Directory.GetLastAccessTimeUtc ("");\r
#if !NET_2_0\r
[ExpectedException (typeof (IOException))]\r
#endif\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtc_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtcException4 ()\r
{\r
Directory.GetLastAccessTimeUtc (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtcException5 ()\r
{\r
Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());\r
}\r
\r
[Test]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM\r
public void CreationTime ()\r
{\r
// check for Unix platforms - see FAQ for more details\r
}\r
\r
[Test]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM\r
public void LastAccessTime ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
- [Category("NotWorking")]\r
-#endif\r
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
public void OpenReadIOException ()
{
string path = TempFolder + DSC + "FIT.OpenReadIOException.Test";
}
}
+#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
[Test, ExpectedException (typeof (IOException))]
public void CtorIOException2 ()
{
stream.Close ();
}
}
+#endif // TARGET_JVM
+ [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[Test, ExpectedException (typeof (IOException))]
public void CtorIOException ()
{
}
[Test]
+ [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[ExpectedException (typeof (IOException))]
public void CtorAccess1Read2Write ()
{
string fn = Path.Combine (TempFolder, "temp");
- FileStream fs = null;
+ FileStream fs1 = null;
+ FileStream fs2 = null;
try {
if (!File.Exists (fn)) {
using (TextWriter tw = File.CreateText (fn)) {
tw.Write ("FOO");
}
}
- fs = new FileStream (fn, FileMode.Open, FileAccess.Read);
- fs = new FileStream (fn, FileMode.Create, FileAccess.Write);
+ fs1 = new FileStream (fn, FileMode.Open, FileAccess.Read);
+ fs2 = new FileStream (fn, FileMode.Create, FileAccess.Write);
} finally {
- if (fs != null)
- fs.Close ();
+ if (fs1 != null)
+ fs1.Close ();
+ if (fs2 != null)
+ fs2.Close ();
if (File.Exists (fn))
File.Delete (fn);
}
}
[Test]
+ [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[ExpectedException (typeof (IOException))]
public void CtorAccess1Write2Write ()
{
string fn = Path.Combine (TempFolder, "temp");
- FileStream fs = null;
+ FileStream fs1 = null;
+ FileStream fs2 = null;
try {
if (File.Exists (fn))
File.Delete (fn);
- fs = new FileStream (fn, FileMode.Create, FileAccess.Write);
- fs = new FileStream (fn, FileMode.Create, FileAccess.Write);
+ fs1 = new FileStream (fn, FileMode.Create, FileAccess.Write);
+ fs2 = new FileStream (fn, FileMode.Create, FileAccess.Write);
} finally {
- if (fs != null)
- fs.Close ();
+ if (fs1 != null)
+ fs1.Close ();
+ if (fs2 != null)
+ fs2.Close ();
if (File.Exists (fn))
File.Delete (fn);
}
DeleteFile (path);
}
+ [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
public void TestLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "TestLock";
}
}
+#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
// Check that the stream is flushed even when it doesn't own the
// handle
[Test]
Assert.AreEqual ((int) '1', s.ReadByte ());
s.Close ();
}
+#endif // TARGET_JVM
private void DeleteFile (string path)
{
}
}
+#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Constructor_InvalidFileHandle ()
{
new FileStream ((IntPtr) (-1L), FileAccess.Read);
}
+#endif // TARGET_JVM
[Test]
public void PositionAfterSetLength ()
}
[Test]
+ [Category("TargetJvmNotSupported")] // Async IO not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginRead_Disposed ()
{
}
[Test]
+ [Category("TargetJvmNotSupported")] // Async IO not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginWrite_Disposed ()
{
}
[Test]
+ [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void Lock_Disposed ()
{
}
[Test]
+ [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void Unlock_Disposed ()
{
}
#if NET_2_0
+ [Category("TargetJvmNotSupported")] // FileOptions.DeleteOnClose not supported for TARGET_JVM
[Test] public void DeleteOnClose ()
{
string path = TempFolder + DSC + "created.txt";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeFile ()
{
string path = TempFolder + DSC + "FSIT.CreationTime.Test";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeDirectory ()
{
string path = TempFolder + DSC + "FSIT.CreationTimeDirectory.Test";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeNoFileOrDirectory ()
{
string path = TempFolder + DSC + "FSIT.CreationTimeNoFile.Test";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void DefaultLastAccessTime ()
{
string path = TempFolder + DSC + "FSIT.DefaultLastAccessTime.Test";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + DSC + "FSIT.LastAccessTime.Test";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void DefaultLastWriteTime ()
{
string path = TempFolder + DSC + "FSIT.DefaultLastWriteTime.Test";
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void TestGetCreationTime ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "baz";
// Setting the creation time on Unix is not possible
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void CreationTime ()
{
int platform = (int) Environment.OSVersion.Platform;
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "lastAccessTime";
[Test]
[ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException1 ()
{
File.GetCreationTime (null as string);
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException2 ()
{
File.GetCreationTime ("");
#if !NET_2_0
[ExpectedException(typeof(IOException))]
#endif
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_NonExistingPath ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeException3";
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException4 ()
{
File.GetCreationTime (" ");
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException5 ()
{
File.GetCreationTime (Path.InvalidPathChars [0].ToString ());
[Test]
[ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException1 ()
{
File.GetCreationTimeUtc (null as string);
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException2 ()
{
File.GetCreationTimeUtc ("");
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_NonExistingPath ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeUtcException3";
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException4 ()
{
File.GetCreationTimeUtc (" ");
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException5 ()
{
File.GetCreationTime (Path.InvalidPathChars [0].ToString ());
[Test]
[ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException1 ()
{
File.GetLastAccessTime (null as string);
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException2 ()
{
File.GetLastAccessTime ("");
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_NonExistingPath ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeException3";
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException4 ()
{
File.GetLastAccessTime (" ");
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException5 ()
{
File.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());
[Test]
[ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException1 ()
{
File.GetLastAccessTimeUtc (null as string);
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException2 ()
{
File.GetLastAccessTimeUtc ("");
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_NonExistingPath ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeUtcException3";
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException4 ()
{
File.GetLastAccessTimeUtc (" ");
[Test]
[ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException5 ()
{
File.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());
[Test]
[ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeArgumentNullException1 ()
{
File.SetCreationTime (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeArgumenException1 ()
{
File.SetCreationTime ("", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeArgumenException2 ()
{
File.SetCreationTime (" ", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
// On Unix there are no invalid path chars.
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeArgumenException3 ()
{
if (Path.InvalidPathChars.Length > 1) {
[Test]
[ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeFileNotFoundException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeFileNotFoundException1";
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeIOException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "CreationTimeIOException1";
[Test]
[ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcArgumentNullException1 ()
{
File.SetCreationTimeUtc (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcArgumenException1 ()
{
File.SetCreationTimeUtc ("", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcArgumenException2 ()
{
File.SetCreationTimeUtc (" ", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
// On Unix there are no invalid path chars.
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcArgumentException3 ()
{
if (Path.InvalidPathChars.Length > 1) {
[Test]
[ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcFileNotFoundException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcFileNotFoundException1";
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcIOException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcIOException1";
[Test]
[ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeArgumentNullException1 ()
{
File.SetLastAccessTime (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeArgumenException1 ()
{
File.SetLastAccessTime ("", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeArgumenException2 ()
{
File.SetLastAccessTime (" ", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
// On Unix there are no invalid path chars.
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeArgumenException3 ()
{
if (Path.InvalidPathChars.Length > 1) {
[Test]
[ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeFileNotFoundException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeFileNotFoundException1";
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeIOException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "LastAccessIOException1";
[Test]
[ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcArgumentNullException1 ()
{
File.SetLastAccessTimeUtc (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetCLastAccessTimeUtcArgumenException1 ()
{
File.SetLastAccessTimeUtc ("", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
[ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcArgumenException2 ()
{
File.SetLastAccessTimeUtc (" ", new DateTime (2000, 12, 12, 11, 59, 59));
[Test]
// On Unix there are no invalid path chars.
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcArgumenException3 ()
{
if (Path.InvalidPathChars.Length > 1) {
[Test]
[ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcFileNotFoundException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcFileNotFoundException1";
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
+ [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcIOException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcIOException1";
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void SetLastWriteTimeIOException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "LastWriteTimeIOException1";
//
[Test]
[ExpectedException(typeof (IOException))]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void SetLastWriteTimeUtcIOException1 ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastWriteTimeUtcIOException1";
FileStream stream = null;
try {
stream = File.Create (path);
- File.SetLastAccessTimeUtc (path, new DateTime (1000, 12, 12, 11, 59, 59));
+ File.SetLastWriteTimeUtc (path, new DateTime (1000, 12, 12, 11, 59, 59));
} finally {
if (stream != null)
stream.Close ();
[Test]
public void WindowsSystem32_76191 ()
{
-#if !TARGET_JVM
// check for Unix platforms - see FAQ for more details
// http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
int platform = (int) Environment.OSVersion.Platform;
if ((platform == 4) || (platform == 128))
return;
-#endif
string curdir = Directory.GetCurrentDirectory ();
try {
[Test]
public void WindowsSystem32_77007 ()
{
-#if !TARGET_JVM
// check for Unix platforms - see FAQ for more details
// http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
int platform = (int) Environment.OSVersion.Platform;
if ((platform == 4) || (platform == 128))
return;
-#endif
string curdir = Directory.GetCurrentDirectory ();
try {
{
static string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");
private string _codeFileName = TempFolder + Path.DirectorySeparatorChar + "AFile.txt";
+ private const string TestString = "Hello World!";
[SetUp]
public void SetUp ()
Assert.AreEqual (24, reader.Read (new char[24], 0, 24));
}
+ [Test]
+ public void EncodingDetection()
+ {
+ if (!CheckEncodingDetected(Encoding.UTF8))
+ Assert.Fail ("Failed to detect UTF8 encoded string");
+ if (!CheckEncodingDetected(Encoding.Unicode))
+ Assert.Fail ("Failed to detect UTF16LE encoded string");
+ if (!CheckEncodingDetected(Encoding.BigEndianUnicode))
+ Assert.Fail ("Failed to detect UTF16BE encoded string");
+#if NET_2_0
+ if (!CheckEncodingDetected(Encoding.UTF32))
+ Assert.Fail ("Failed to detect UTF32LE encoded string");
+ if (!CheckEncodingDetected(new UTF32Encoding(true, true)))
+ Assert.Fail ("Failed to detect UTF32BE encoded string");
+#endif
+ }
+
+ private bool CheckEncodingDetected(Encoding encoding)
+ {
+ MemoryStream outStream = new MemoryStream();
+ using (StreamWriter outWriter = new StreamWriter(outStream, encoding))
+ {
+ outWriter.Write(TestString);
+ }
+ byte[] testBytes = outStream.ToArray();
+
+ StreamReader inReader = new StreamReader(new MemoryStream(testBytes, false));
+ string decodedString = inReader.ReadToEnd();
+
+ return decodedString == TestString;
+ }
+
[Test]
public void bug75526 ()
{
+2007-03-12 Zoltan Varga <vargaz@gmail.com>
+
+ * DynamicMethodTest.cs: Add a test for circular references.
+
+2007-03-07 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * EnumBuilderTest.cs: Enabled test that failed due to bug #81037.
+ Coding style fixes.
+ * ModuleBuilderTest.cs: Avoid compiler warning in test for bug #80435.
+ Use Assert instead of deprecated Assertion class. Number tests.
+
+2007-03-06 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * ModuleBuilderTest.cs: Added GetArrayMethodToStringTest () -#80435.
+
+2007-03-05 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * EnumBuilderTest.cs: Added tests for bug #81007. Use Assert instead
+ of deriving from Assertion. Marked HasElementType test NotWorking on
+ 2.0 profile.
+
2007-02-26 Gert Driesen <drieseng@users.sourceforge.net>
* MethodBuilderTest.cs: Move from Assertion to Assert. Added tests
object objRet = hello.Invoke (null, invokeArgs);
Assert.AreEqual (2, objRet, "#3");
}
+
+ [Test]
+ public void Circular_Refs () {
+ DynamicMethod m1 = new DynamicMethod("f1", typeof(int), new Type[] { typeof (int) },
+ typeof(object));
+ DynamicMethod m2 = new DynamicMethod("f2", typeof(int), new Type[] { typeof (int) },
+ typeof(object));
+
+ ILGenerator il1 = m1.GetILGenerator();
+ ILGenerator il2 = m2.GetILGenerator();
+
+ Label l = il1.DefineLabel ();
+ //il1.EmitWriteLine ("f1");
+ il1.Emit (OpCodes.Ldarg_0);
+ il1.Emit (OpCodes.Ldc_I4_0);
+ il1.Emit (OpCodes.Bne_Un, l);
+ il1.Emit (OpCodes.Ldarg_0);
+ il1.Emit (OpCodes.Ret);
+ il1.MarkLabel (l);
+ il1.Emit (OpCodes.Ldarg_0);
+ il1.Emit (OpCodes.Ldc_I4_1);
+ il1.Emit (OpCodes.Sub);
+ il1.Emit (OpCodes.Call, m2);
+ il1.Emit (OpCodes.Ret);
+
+ //il2.EmitWriteLine("f2");
+ il2.Emit(OpCodes.Ldarg_0);
+ il2.Emit(OpCodes.Call, m1);
+ il2.Emit(OpCodes.Ret);
+
+ m1.Invoke(null, new object[] { 5 });
+ }
}
}
using NUnit.Framework;
-namespace MonoTests.System.Reflection.Emit {
+namespace MonoTests.System.Reflection.Emit
+{
[TestFixture]
- public class EnumBuilderTest : Assertion {
+ public class EnumBuilderTest
+ {
private static string _assemblyName = "MonoTests.System.Reflection.Emit.EnumBuilder";
private static string _moduleName = "EmittedModule";
private static string _enumNamespace = "MyNameSpace";
private static string _enumName = "MyEnum";
- private static Type _enumType = typeof(Int32);
+ private static Type _enumType = typeof (Int32);
private static string _fieldName = "MyField";
private static object _fieldValue = 1;
[Test]
- public void TestEnumBuilder()
+ public void TestEnumBuilder ()
{
EnumBuilder enumBuilder = GenerateEnum ();
VerifyType (enumBuilder);
- AssertNotNull (enumBuilder.TypeToken);
- AssertNotNull (enumBuilder.UnderlyingField);
- AssertNull ("type.DeclaringType of toplevel type should be null", enumBuilder.DeclaringType);
- AssertNull ("type.ReflectedType should be null", enumBuilder.ReflectedType);
- AssertEquals (_enumType, enumBuilder.UnderlyingSystemType);
+ Assert.IsNotNull (enumBuilder.TypeToken, "#1");
+ Assert.IsNotNull (enumBuilder.UnderlyingField, "#2");
+ Assert.IsNull (enumBuilder.DeclaringType, "#3");
+ Assert.IsNull (enumBuilder.ReflectedType, "#4");
+ Assert.AreEqual (_enumType, enumBuilder.UnderlyingSystemType, "#5");
}
- [Test][Category("ValueAdd")]
+ [Test]
+ [Category ("ValueAdd")]
public void TestEnumBuilder_NotInMono ()
{
// If we decide to fix this (I dont see why we should),
// move to the routine above
-
+
EnumBuilder enumBuilder = GenerateEnum ();
- AssertEquals ("Comparing the IsSerializable field", false, enumBuilder.IsSerializable);
+ Assert.IsFalse (enumBuilder.IsSerializable);
}
-
[Test]
- [ExpectedException (typeof(NotSupportedException))]
+#if NET_2_0
+ [Category ("NotWorking")]
+#else
+ [ExpectedException (typeof (NotSupportedException))]
+#endif
public void TestHasElementTypeEnumBuilderIncomplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
bool hasElementType = enumBuilder.HasElementType;
+#if NET_2_0
+ Assert.IsFalse (hasElementType);
+#else
+ Assert.Fail ("Should have failed: " + hasElementType);
+#endif
}
[Test]
- [ExpectedException (typeof(NotSupportedException))]
- [Category("ValueAdd")]
- // Is this worth fixing, or is this considered, "extra value"?
+#if ONLY_1_1
+ [ExpectedException (typeof (NotSupportedException))]
+ [Category ("ValueAdd")] // Is this worth fixing, or is this considered, "extra value"?
+#endif
public void TestHasElementTypeEnumBuilderComplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
enumBuilder.CreateType ();
bool hasElementType = enumBuilder.HasElementType;
+#if NET_2_0
+ Assert.IsFalse (hasElementType);
+#else
+ Assert.Fail ("Should have failed: " + hasElementType);
+#endif
}
[Test]
- [ExpectedException (typeof(InvalidOperationException))]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestDefineLiteralTypeComplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
Type enumType = enumBuilder.CreateType ();
// you should not be able to define literal after type
// has been created
- FieldBuilder fieldBuilder = enumBuilder.DefineLiteral (_fieldName, _fieldValue);
+ enumBuilder.DefineLiteral (_fieldName, _fieldValue);
}
[Test]
FieldBuilder fieldBuilder = enumBuilder.DefineLiteral (_fieldName, _fieldValue);
Type enumType = enumBuilder.CreateType ();
- AssertEquals (enumType, fieldBuilder.DeclaringType);
- AssertEquals (_enumType, fieldBuilder.FieldType);
- AssertEquals (true, fieldBuilder.IsPublic);
- AssertEquals (true, fieldBuilder.IsStatic);
- AssertEquals (true, fieldBuilder.IsLiteral);
- AssertEquals (_fieldName, fieldBuilder.Name);
+ Assert.IsTrue (fieldBuilder.IsPublic, "#1");
+ Assert.IsTrue (fieldBuilder.IsStatic, "#2");
+ Assert.IsTrue (fieldBuilder.IsLiteral, "#3");
+ Assert.AreEqual (_fieldName, fieldBuilder.Name, "#4");
+#if NET_2_0
+ Assert.IsFalse (enumType == fieldBuilder.DeclaringType, "#5");
+ Assert.IsFalse (enumBuilder == fieldBuilder.DeclaringType, "#6");
+ Assert.AreEqual (enumType.FullName, fieldBuilder.DeclaringType.FullName, "#7");
+ Assert.IsFalse (enumType == fieldBuilder.FieldType, "#8");
+ Assert.AreEqual (enumBuilder, fieldBuilder.FieldType, "#9");
+#else
+ Assert.AreEqual (enumType, fieldBuilder.DeclaringType, "#5");
+ Assert.AreEqual (_enumType, fieldBuilder.FieldType, "#6");
+#endif
}
[Test]
- public void TestEnumType()
+ public void TestEnumType ()
{
AssemblyBuilder assemblyBuilder = GenerateAssembly ();
}
[Test]
- [ExpectedException (typeof(NotSupportedException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void TestEnumBuilderGUIDIncomplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
- Guid guid = enumBuilder.GUID;
+ Guid guid = enumBuilder.GUID;
}
[Test]
- [Category("NotWorking")] // Bug:71299
+ [Category ("NotWorking")] // Bug:71299
public void TestEnumBuilderGUIDComplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
enumBuilder.CreateType ();
- Assert (enumBuilder.GUID != Guid.Empty);
+ Assert.IsTrue (enumBuilder.GUID != Guid.Empty);
}
[Test]
Type enumType = assemblyBuilder.GetType (_enumNamespace + "." + _enumName, true);
// Tested in above test: Assert (enumType.GUID != Guid.Empty);
- AssertNull ("type.DeclaringType of toplevel type should be null", enumType.DeclaringType);
+ Assert.IsNull (enumType.DeclaringType);
}
[Test]
- public void TestFieldProperties() {
+ public void TestFieldProperties ()
+ {
AssemblyBuilder assemblyBuilder = GenerateAssembly ();
ModuleBuilder modBuilder = GenerateModule (assemblyBuilder);
EnumBuilder enumBuilder = GenerateEnum (modBuilder);
Type enumType = assemblyBuilder.GetType (_enumNamespace + "." + _enumName, true);
FieldInfo fi = enumType.GetField (_fieldName);
- Object o = fi.GetValue(enumType);
-
- AssertEquals ("Checking the value of the Field to be 1", _fieldValue, fi.GetValue (enumType));
- AssertEquals ("Checking if the field is a Literal", true, fi.IsLiteral);
- AssertEquals ("Checking if the field is Public", true, fi.IsPublic);
- AssertEquals ("Checking if the field is Static", true, fi.IsStatic);
+ Object o = fi.GetValue (enumType);
+
+ Assert.IsTrue (fi.IsLiteral, "#1");
+ Assert.IsTrue (fi.IsPublic, "#2");
+ Assert.IsTrue (fi.IsStatic, "#3");
+ Assert.AreEqual (enumBuilder, fieldBuilder.FieldType, "#4");
+ Assert.IsFalse (enumType == fieldBuilder.FieldType, "#5");
+#if NET_2_0
+ Assert.AreEqual (enumType.FullName, fieldBuilder.FieldType.FullName, "#6");
+ Assert.IsFalse (_enumType == fieldBuilder.FieldType, "#7");
+#else
+ Assert.IsFalse (enumType.FullName == fieldBuilder.FieldType.FullName, "#6");
+ Assert.AreEqual (_enumType, fieldBuilder.FieldType, "#7");
+#endif
+
+ object fieldValue = fi.GetValue (enumType);
+#if NET_2_0
+ Assert.IsFalse (_fieldValue == fieldValue, "#8");
+ Assert.IsTrue (fieldValue.GetType ().IsEnum, "#9");
+ Assert.AreEqual (enumType, fieldValue.GetType (), "#10");
+#else
+ Assert.AreEqual (_fieldValue, fieldValue, "#8");
+ Assert.IsFalse (fieldValue.GetType ().IsEnum, "#9");
+ Assert.AreEqual (_enumType, fieldValue.GetType (), "#10");
+#endif
+ Assert.AreEqual (_fieldValue, (int) fieldValue, "#11");
}
[Test]
{
EnumBuilder enumBuilder = GenerateEnum ();
- Type[] interfaces = enumBuilder.FindInterfaces (
- new TypeFilter (MyInterfaceFilter),
+ Type [] interfaces = enumBuilder.FindInterfaces (
+ new TypeFilter (MyInterfaceFilter),
"System.Collections.IEnumerable");
- AssertEquals (0, interfaces.Length);
+ Assert.AreEqual (0, interfaces.Length);
}
[Test]
- [ExpectedException (typeof(NotSupportedException))]
- [Category("ValueAdd")]
+ [ExpectedException (typeof (NotSupportedException))]
+ [Category ("ValueAdd")]
public void TestFindMembersIncomplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
GenerateField (enumBuilder);
- MemberInfo[] members = enumBuilder.FindMembers (
+ MemberInfo [] members = enumBuilder.FindMembers (
MemberTypes.All, BindingFlags.Static |
BindingFlags.Public, new MemberFilter (MemberNameFilter),
_fieldName);
GenerateField (enumBuilder);
enumBuilder.CreateType ();
- MemberInfo[] members = enumBuilder.FindMembers (
+ MemberInfo [] members = enumBuilder.FindMembers (
MemberTypes.Field, BindingFlags.Static |
BindingFlags.Public, new MemberFilter (MemberNameFilter),
_fieldName);
- AssertEquals (1, members.Length);
+ Assert.AreEqual (1, members.Length, "#1");
members = enumBuilder.FindMembers (
MemberTypes.Field, BindingFlags.Static |
BindingFlags.Public, new MemberFilter (MemberNameFilter),
"doesntmatter");
- AssertEquals (0, members.Length);
+ Assert.AreEqual (0, members.Length, "#2");
}
[Test]
- [ExpectedException (typeof(NotSupportedException))]
- [Category("ValueAdd")]
+ [ExpectedException (typeof (NotSupportedException))]
+ [Category ("ValueAdd")]
public void TestGetConstructorIncomplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
enumBuilder.GetConstructor (BindingFlags.Public, null,
- CallingConventions.Any, Type.EmptyTypes, new ParameterModifier[0]);
+ CallingConventions.Any, Type.EmptyTypes, new ParameterModifier [0]);
}
[Test]
enumBuilder.CreateType ();
ConstructorInfo ctor = enumBuilder.GetConstructor (
BindingFlags.Public, null, CallingConventions.Any,
- Type.EmptyTypes, new ParameterModifier[0]);
- AssertNull (ctor);
+ Type.EmptyTypes, new ParameterModifier [0]);
+ Assert.IsNull (ctor);
}
[Test]
- [ExpectedException (typeof(ArgumentNullException))]
+ [ExpectedException (typeof (ArgumentNullException))]
public void TestGetConstructorNullTypes ()
{
EnumBuilder enumBuilder = GenerateEnum ();
enumBuilder.CreateType ();
ConstructorInfo ctor = enumBuilder.GetConstructor (
BindingFlags.Public, null, CallingConventions.Any,
- null, new ParameterModifier[0]);
+ null, new ParameterModifier [0]);
}
[Test]
[Category ("NotWorking")]
- [ExpectedException (typeof(ArgumentNullException))]
+ [ExpectedException (typeof (ArgumentNullException))]
public void TestGetConstructorNullElementType ()
{
EnumBuilder enumBuilder = GenerateEnum ();
enumBuilder.CreateType ();
ConstructorInfo ctor = enumBuilder.GetConstructor (
BindingFlags.Public, null, CallingConventions.Any,
- new Type[] { null }, new ParameterModifier[0]);
+ new Type [] { null }, new ParameterModifier [0]);
}
[Test]
- [ExpectedException (typeof(NotSupportedException))]
- [Category("NotWorking")]
+ [ExpectedException (typeof (NotSupportedException))]
+ [Category ("NotWorking")]
public void TestGetConstructorsIncomplete ()
{
EnumBuilder enumBuilder = GenerateEnum ();
- ConstructorInfo[] ctors = enumBuilder.GetConstructors (
+ ConstructorInfo [] ctors = enumBuilder.GetConstructors (
BindingFlags.Instance | BindingFlags.Public);
- AssertEquals (0, ctors.Length);
+ Assert.AreEqual (0, ctors.Length);
}
[Test]
EnumBuilder enumBuilder = GenerateEnum ();
enumBuilder.CreateType ();
- ConstructorInfo[] ctors = enumBuilder.GetConstructors (
+ ConstructorInfo [] ctors = enumBuilder.GetConstructors (
BindingFlags.Instance | BindingFlags.Public);
- AssertEquals (0, ctors.Length);
+ Assert.AreEqual (0, ctors.Length);
}
-
+
[Test]
public void TestIsValue__SpecialName ()
{
EnumBuilder enumBuilder = GenerateEnum ();
Type enumType = enumBuilder.CreateType ();
FieldInfo value = enumType.GetField ("value__", BindingFlags.Instance | BindingFlags.NonPublic);
- AssertEquals ("value__ must have FieldAttributes.RTSpecialName set", FieldAttributes.RTSpecialName, value.Attributes & FieldAttributes.RTSpecialName);
+ Assert.AreEqual (FieldAttributes.RTSpecialName, value.Attributes & FieldAttributes.RTSpecialName);
}
private static void VerifyType (Type type)
{
- AssertNotNull ("type.Assembly should not be null", type.Assembly);
- AssertNotNull ("type.AssemblyQualifiedName should not be null", type.AssemblyQualifiedName);
- AssertNotNull ("type.BaseType should not be null", type.BaseType);
- AssertNotNull ("type.FullName should not be null", type.FullName);
- AssertNotNull ("type.Module should not be null", type.Module);
- AssertNotNull ("type.Name should not be null", type.Name);
- AssertNotNull ("type.Namespace should not be null", type.Namespace);
- AssertNotNull ("type.UnderlyingSystemType should not be null", type.UnderlyingSystemType);
-
- AssertEquals (_moduleName, type.Module.Name);
- AssertEquals (_enumNamespace, type.Namespace);
- AssertEquals (_enumName, type.Name);
- AssertEquals (typeof(Enum), type.BaseType);
- AssertEquals (MemberTypes.TypeInfo, type.MemberType);
- AssertEquals (typeof(int), Enum.GetUnderlyingType (type));
-
- AssertEquals ("Comparing the IsArray field", false, type.IsArray);
- AssertEquals ("Comparing the IsAutoClass field", false, type.IsAutoClass);
- AssertEquals ("Comparing the IsAutoLayout field", true, type.IsAutoLayout);
- AssertEquals ("Comparing the IsByRef field", false, type.IsByRef);
- AssertEquals ("Comparing the IsClass field", false, type.IsClass);
- AssertEquals ("Comparing the IsComObject field", false, type.IsCOMObject);
- AssertEquals ("Comparing the IsContextful field", false, type.IsContextful);
- AssertEquals ("Comparing the IsEnum field", true, type.IsEnum);
- AssertEquals ("Comparing the IsExplicitLayout field", false, type.IsExplicitLayout);
- AssertEquals ("Comparing the IsImport field", false, type.IsImport);
- AssertEquals ("Comparing the IsInterface field", false, type.IsInterface);
- AssertEquals ("Comparing the IsLayoutSequential field", false, type.IsLayoutSequential);
- AssertEquals ("Comparing the IsMarshalByRef field", false, type.IsMarshalByRef);
- AssertEquals ("Comparing the IsNestedAssembly field", false, type.IsNestedAssembly);
- AssertEquals ("Comparing the IsNestedFamily field", false, type.IsNestedFamily);
- AssertEquals ("Comparing the IsNestedPublic field", false, type.IsNestedPublic);
- AssertEquals ("Comparing the IsNestedPrivate field", false, type.IsNestedPrivate);
- AssertEquals ("Comparing the IsNotPublic field", false, type.IsNotPublic);
- AssertEquals ("Comparing the IsPrimitive field", false, type.IsPrimitive);
- AssertEquals ("Comparing the IsPointer field", false, type.IsPointer);
- AssertEquals ("Comparing the IsPublic field", true, type.IsPublic);
- AssertEquals ("Comparing the IsSealed field", true, type.IsSealed);
- AssertEquals ("Comparing the IsUnicode field", false, type.IsUnicodeClass);
- AssertEquals ("Comparing the requires special handling field", false, type.IsSpecialName);
- AssertEquals ("Comparing the IsValueType field", true, type.IsValueType);
+ Assert.IsNotNull (type.Assembly, "#V1");
+ Assert.IsNotNull (type.AssemblyQualifiedName, "#V2");
+ Assert.IsNotNull (type.BaseType, "#V3");
+ Assert.IsNotNull (type.FullName, "#V4");
+ Assert.IsNotNull (type.Module, "#V5");
+ Assert.IsNotNull (type.Name, "#V6");
+ Assert.IsNotNull (type.Namespace, "#V7");
+ Assert.IsNotNull (type.UnderlyingSystemType, "#V8");
+
+#if ONLY_1_1
+ // on .NET 2.0, module is name is fixed to
+ Assert.AreEqual (_moduleName, type.Module.Name, "#V9");
+#endif
+ Assert.AreEqual (_enumNamespace, type.Namespace, "#V10");
+ Assert.AreEqual (_enumName, type.Name, "#V11");
+ Assert.AreEqual (typeof (Enum), type.BaseType, "#V12");
+ Assert.AreEqual (MemberTypes.TypeInfo, type.MemberType, "#V13");
+ Assert.AreEqual (typeof (int), Enum.GetUnderlyingType (type), "#V14");
+
+ Assert.IsFalse (type.IsArray, "#V15");
+ Assert.IsFalse (type.IsAutoClass, "#V16");
+ Assert.IsTrue (type.IsAutoLayout, "#V17");
+ Assert.IsFalse (type.IsByRef, "#V18");
+ Assert.IsFalse (type.IsClass, "#V19");
+ Assert.IsFalse (type.IsCOMObject, "#V20");
+ Assert.IsFalse (type.IsContextful, "#V21");
+ Assert.IsTrue (type.IsEnum, "#V22");
+ Assert.IsFalse (type.IsExplicitLayout, "#V23");
+ Assert.IsFalse (type.IsImport, "#V24");
+ Assert.IsFalse (type.IsInterface, "#V25");
+ Assert.IsFalse (type.IsLayoutSequential, "#V26");
+ Assert.IsFalse (type.IsMarshalByRef, "#V27");
+ Assert.IsFalse (type.IsNestedAssembly, "#V28");
+ Assert.IsFalse (type.IsNestedFamily, "#V29");
+ Assert.IsFalse (type.IsNestedPublic, "#V30");
+ Assert.IsFalse (type.IsNestedPrivate, "#V31");
+ Assert.IsFalse (type.IsNotPublic, "#V32");
+ Assert.IsFalse (type.IsPrimitive, "#V33");
+ Assert.IsFalse (type.IsPointer, "#V34");
+ Assert.IsTrue (type.IsPublic, "#V35");
+ Assert.IsTrue (type.IsSealed, "#V36");
+ Assert.IsFalse (type.IsUnicodeClass, "#V37");
+ Assert.IsFalse (type.IsSpecialName, "#V38");
+ Assert.IsTrue (type.IsValueType, "#V39");
}
public static bool MyInterfaceFilter (Type t, object filterCriteria)
namespace MonoTests.System.Reflection.Emit
{
+ [TestFixture]
+ public class ModuleBuilderTest
+ {
+ static string TempFolder = Path.Combine (Path.GetTempPath (), "MT.S.R.E.MBT");
+
+ [SetUp]
+ public void SetUp ()
+ {
+ Random AutoRand = new Random ();
+ string TempPath = TempFolder;
+ while (Directory.Exists (TempFolder))
+ TempFolder = Path.Combine (TempPath, AutoRand.Next ().ToString ());
+ Directory.CreateDirectory (TempFolder);
+ }
-[TestFixture]
-public class ModuleBuilderTest : Assertion
-{
- static string TempFolder = Path.Combine (Path.GetTempPath (), "MT.S.R.E.MBT");
-
- [SetUp]
- public void SetUp () {
- Random AutoRand = new Random ( );
- string TempPath = TempFolder;
- while (Directory.Exists (TempFolder))
- TempFolder = Path.Combine (TempPath, AutoRand.Next ().ToString());
- Directory.CreateDirectory (TempFolder);
- }
-
- [TearDown]
- public void TearDown () {
- try {
- // This throws an exception under MS.NET, since the directory contains loaded
- // assemblies.
- Directory.Delete (TempFolder, true);
+ [TearDown]
+ public void TearDown ()
+ {
+ try {
+ // This throws an exception under MS.NET, since the directory contains loaded
+ // assemblies.
+ Directory.Delete (TempFolder, true);
+ } catch (Exception) {
+ }
}
- catch (Exception) {
+
+ [Test]
+ public void TestIsTransient ()
+ {
+ AssemblyName assemblyName = new AssemblyName ();
+ assemblyName.Name = "foo";
+
+ AssemblyBuilder ab
+ = Thread.GetDomain ().DefineDynamicAssembly (
+ assemblyName, AssemblyBuilderAccess.RunAndSave, TempFolder);
+ ModuleBuilder mb1 = ab.DefineDynamicModule ("foo.dll");
+ Assert.IsTrue (mb1.IsTransient (), "#1");
+ ModuleBuilder mb2 = ab.DefineDynamicModule ("foo2.dll", "foo2.dll");
+ Assert.IsFalse (mb2.IsTransient (), "#2");
}
- }
- [Test]
- public void TestIsTransient () {
- AssemblyName assemblyName = new AssemblyName();
- assemblyName.Name = "foo";
-
- AssemblyBuilder ab
- = Thread.GetDomain().DefineDynamicAssembly(
- assemblyName, AssemblyBuilderAccess.RunAndSave, TempFolder);
- ModuleBuilder mb1 = ab.DefineDynamicModule ("foo.dll");
- AssertEquals (true, mb1.IsTransient ());
- ModuleBuilder mb2 = ab.DefineDynamicModule ("foo2.dll", "foo2.dll");
- AssertEquals (false, mb2.IsTransient ());
- }
+ // Some of these tests overlap with the tests for Module
- // Some of these tests overlap with the tests for Module
+ [Test]
+ public void TestGlobalData ()
+ {
- [Test]
- public void TestGlobalData () {
+ AssemblyName assemblyName = new AssemblyName ();
+ assemblyName.Name = "foo";
- AssemblyName assemblyName = new AssemblyName();
- assemblyName.Name = "foo";
+ AssemblyBuilder ab
+ = Thread.GetDomain ().DefineDynamicAssembly (
+ assemblyName, AssemblyBuilderAccess.RunAndSave, TempFolder);
- AssemblyBuilder ab
- = Thread.GetDomain().DefineDynamicAssembly(
- assemblyName, AssemblyBuilderAccess.RunAndSave, TempFolder);
+ string resfile = Path.Combine (TempFolder, "res");
+ using (StreamWriter sw = new StreamWriter (resfile)) {
+ sw.WriteLine ("FOO");
+ }
- string resfile = Path.Combine (TempFolder, "res");
- using (StreamWriter sw = new StreamWriter (resfile)) {
- sw.WriteLine ("FOO");
- }
+ ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll");
- ModuleBuilder mb = ab.DefineDynamicModule("foo.dll", "foo.dll");
+ mb.DefineInitializedData ("DATA", new byte [100], FieldAttributes.Public);
+ mb.DefineInitializedData ("DATA2", new byte [100], FieldAttributes.Public);
+ mb.DefineInitializedData ("DATA3", new byte [99], FieldAttributes.Public);
+ mb.DefineUninitializedData ("DATA4", 101, FieldAttributes.Public);
+ mb.DefineInitializedData ("DATA_PRIVATE", new byte [100], 0);
+ mb.CreateGlobalFunctions ();
- mb.DefineInitializedData ("DATA", new byte [100], FieldAttributes.Public);
- mb.DefineInitializedData ("DATA2", new byte [100], FieldAttributes.Public);
- mb.DefineInitializedData ("DATA3", new byte [99], FieldAttributes.Public);
- mb.DefineUninitializedData ("DATA4", 101, FieldAttributes.Public);
- mb.DefineInitializedData ("DATA_PRIVATE", new byte [100], 0);
- mb.CreateGlobalFunctions ();
+ ab.Save ("foo.dll");
- ab.Save ("foo.dll");
+ Assembly assembly = Assembly.LoadFrom (Path.Combine (TempFolder, "foo.dll"));
- Assembly assembly = Assembly.LoadFrom (Path.Combine (TempFolder, "foo.dll"));
+ Module module = assembly.GetLoadedModules () [0];
- Module module = assembly.GetLoadedModules ()[0];
+ string [] expectedFieldNames = new string [] {
+ "DATA", "DATA2", "DATA3", "DATA4" };
+ ArrayList fieldNames = new ArrayList ();
+ foreach (FieldInfo fi in module.GetFields ()) {
+ fieldNames.Add (fi.Name);
+ }
+ AssertArrayEqualsSorted (expectedFieldNames, fieldNames.ToArray (typeof (string)));
- string[] expectedFieldNames = new string [] {
- "DATA", "DATA2", "DATA3", "DATA4"
- };
- ArrayList fieldNames = new ArrayList ();
- foreach (FieldInfo fi in module.GetFields ()) {
- fieldNames.Add (fi.Name);
+ Assert.IsNotNull (module.GetField ("DATA"), "#1");
+ Assert.IsNotNull (module.GetField ("DATA2"), "#2");
+ Assert.IsNotNull (module.GetField ("DATA3"), "#3");
+ Assert.IsNotNull (module.GetField ("DATA4"), "#4");
+ Assert.IsNull (module.GetField ("DATA_PRIVATE"), "#5");
+ Assert.IsNotNull (module.GetField ("DATA_PRIVATE", BindingFlags.NonPublic | BindingFlags.Static), "#6");
}
- AssertArrayEqualsSorted (expectedFieldNames, fieldNames.ToArray (typeof (string)));
-
- AssertEquals (module.GetField ("DATA") != null, true);
- AssertEquals (module.GetField ("DATA2") != null, true);
- AssertEquals (module.GetField ("DATA3") != null, true);
- AssertEquals (module.GetField ("DATA4") != null, true);
- AssertEquals (module.GetField ("DATA_PRIVATE"), null);
- AssertEquals (module.GetField ("DATA_PRIVATE", BindingFlags.NonPublic | BindingFlags.Static) != null, true);
- }
- [Test]
- public void TestGlobalMethods () {
- AssemblyName an = new AssemblyName();
- an.Name = "TestGlobalMethods";
- AssemblyBuilder builder =
- AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.Run);
- ModuleBuilder module = builder.DefineDynamicModule("MessageModule");
- MethodBuilder method = module.DefinePInvokeMethod("printf", "libc.so",
- MethodAttributes.PinvokeImpl | MethodAttributes.Static | MethodAttributes.Public,
- CallingConventions.Standard, typeof(void), new Type[]{typeof(string)}, CallingConvention.Winapi,
- CharSet.Auto);
- method.SetImplementationFlags (MethodImplAttributes.PreserveSig |
- method.GetMethodImplementationFlags());
- module.CreateGlobalFunctions();
-
- Assert (module.GetMethod ("printf") != null);
- }
+ [Test]
+ public void TestGlobalMethods ()
+ {
+ AssemblyName an = new AssemblyName ();
+ an.Name = "TestGlobalMethods";
+ AssemblyBuilder builder =
+ AppDomain.CurrentDomain.DefineDynamicAssembly (an, AssemblyBuilderAccess.Run);
+ ModuleBuilder module = builder.DefineDynamicModule ("MessageModule");
+ MethodBuilder method = module.DefinePInvokeMethod ("printf", "libc.so",
+ MethodAttributes.PinvokeImpl | MethodAttributes.Static | MethodAttributes.Public,
+ CallingConventions.Standard, typeof (void), new Type [] { typeof (string) }, CallingConvention.Winapi,
+ CharSet.Auto);
+ method.SetImplementationFlags (MethodImplAttributes.PreserveSig |
+ method.GetMethodImplementationFlags ());
+ module.CreateGlobalFunctions ();
+
+ Assert.IsNotNull (module.GetMethod ("printf"));
+ }
- [Test]
- public void DuplicateSymbolDocument () {
- AssemblyName assemblyName = new AssemblyName();
- assemblyName.Name = "ModuleBuilderTest.DuplicateSymbolDocument";
+ [Test]
+ public void DuplicateSymbolDocument ()
+ {
+ AssemblyName assemblyName = new AssemblyName ();
+ assemblyName.Name = "ModuleBuilderTest.DuplicateSymbolDocument";
+
+ AssemblyBuilder ab
+ = Thread.GetDomain ().DefineDynamicAssembly (
+ assemblyName, AssemblyBuilderAccess.RunAndSave, TempFolder);
+
+ ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+
+ // Check that it is possible to redefine a symbol document
+ ISymbolDocumentWriter doc1 =
+ mb.DefineDocument ("foo.il", SymDocumentType.Text,
+ SymLanguageType.ILAssembly, SymLanguageVendor.Microsoft);
+ ISymbolDocumentWriter doc2 =
+ mb.DefineDocument ("foo.il", SymDocumentType.Text,
+ SymLanguageType.ILAssembly, SymLanguageVendor.Microsoft);
+ }
- AssemblyBuilder ab
- = Thread.GetDomain().DefineDynamicAssembly(
- assemblyName, AssemblyBuilderAccess.RunAndSave, TempFolder);
+ [Test] // Test case for #80435.
+ public void GetArrayMethodToStringTest ()
+ {
+ AssemblyName name = new AssemblyName ();
+ name.Name = "a";
+ AssemblyBuilder assembly = AppDomain.CurrentDomain.DefineDynamicAssembly (name, AssemblyBuilderAccess.RunAndSave);
- ModuleBuilder mb = ab.DefineDynamicModule("foo.dll", "foo.dll", true);
+ ModuleBuilder module = assembly.DefineDynamicModule ("m", "test.dll");
- // Check that it is possible to redefine a symbol document
- ISymbolDocumentWriter doc1 =
- mb.DefineDocument("foo.il", SymDocumentType.Text,
- SymLanguageType.ILAssembly,SymLanguageVendor.Microsoft);
- ISymbolDocumentWriter doc2 =
- mb.DefineDocument("foo.il", SymDocumentType.Text,
- SymLanguageType.ILAssembly,SymLanguageVendor.Microsoft);
- }
-
- private static void AssertArrayEqualsSorted (Array o1, Array o2) {
- Array s1 = (Array)o1.Clone ();
- Array s2 = (Array)o2.Clone ();
+ Type [] myArrayClass = new Type [1];
+ Type [] parameterTypes = { typeof (Array) };
+ MethodInfo myMethodInfo = module.GetArrayMethod (myArrayClass.GetType (), "Sort", CallingConventions.Standard, null, parameterTypes);
+
+ string str = myMethodInfo.ToString ();
+ Assert.IsNotNull (str);
+ // Don't compare string, since MS returns System.Reflection.Emit.SymbolMethod here
+ // (they do not provide an implementation of ToString).
+ }
- Array.Sort (s1);
- Array.Sort (s2);
+ private static void AssertArrayEqualsSorted (Array o1, Array o2)
+ {
+ Array s1 = (Array) o1.Clone ();
+ Array s2 = (Array) o2.Clone ();
- AssertEquals (s1.Length, s2.Length);
- for (int i = 0; i < s1.Length; ++i)
- AssertEquals (s1.GetValue (i), s2.GetValue (i));
+ Array.Sort (s1);
+ Array.Sort (s2);
+
+ Assert.AreEqual (s1.Length, s2.Length, "#1");
+ for (int i = 0; i < s1.Length; ++i)
+ Assert.AreEqual (s1.GetValue (i), s2.GetValue (i), "#2: " + i);
+ }
}
}
-}
-
using System.Configuration.Assemblies;
using System.IO;
using System.Reflection;
+#if !TARGET_JVM
using System.Reflection.Emit;
+#endif
using System.Runtime.Serialization;
using System.Threading;
using System.Globalization;
private string tempDir = Path.Combine (Path.GetTempPath (), "MonoTests.System.Reflection.AssemblyNameTest");
+#if !TARGET_JVM // Thread.GetDomain is not supported for TARGET_JVM.
private AppDomain domain;
+#endif // TARGET_JVM
// created with "sn -o test.snk test.txt"
static byte[] publicKey = { 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x3D, 0xBD, 0x72, 0x08, 0xC6, 0x2B, 0x0E, 0xA8, 0xC1, 0xC0, 0x58, 0x07, 0x2B, 0x63, 0x5F, 0x7C, 0x9A, 0xBD, 0xCB, 0x22, 0xDB, 0x20, 0xB2, 0xA9, 0xDA, 0xDA, 0xEF, 0xE8, 0x00, 0x64, 0x2F, 0x5D, 0x8D, 0xEB, 0x78, 0x02, 0xF7, 0xA5, 0x36, 0x77, 0x28, 0xD7, 0x55, 0x8D, 0x14, 0x68, 0xDB, 0xEB, 0x24, 0x09, 0xD0, 0x2B, 0x13, 0x1B, 0x92, 0x6E, 0x2E, 0x59, 0x54, 0x4A, 0xAC, 0x18, 0xCF, 0xC9, 0x09, 0x02, 0x3F, 0x4F, 0xA8, 0x3E, 0x94, 0x00, 0x1F, 0xC2, 0xF1, 0x1A, 0x27, 0x47, 0x7D, 0x10, 0x84, 0xF5, 0x14, 0xB8, 0x61, 0x62, 0x1A, 0x0C, 0x66, 0xAB, 0xD2, 0x4C, 0x4B, 0x9F, 0xC9, 0x0F, 0x3C, 0xD8, 0x92, 0x0F, 0xF5, 0xFF, 0xCE, 0xD7, 0x6E, 0x5C, 0x6F, 0xB1, 0xF5, 0x7D, 0xD3, 0x56, 0xF9, 0x67, 0x27, 0xA4, 0xA5, 0x48, 0x5B, 0x07, 0x93, 0x44, 0x00, 0x4A, 0xF8, 0xFF, 0xA4, 0xCB, 0x73, 0xC0, 0x6A, 0x62, 0xB4, 0xB7, 0xC8, 0x92, 0x58, 0x87, 0xCD, 0x07,
Directory.CreateDirectory (tempDir);
+#if !TARGET_JVM // Thread.GetDomain is not supported for TARGET_JVM.
domain = Thread.GetDomain ();
+#endif // TARGET_JVM
}
[TearDown]
return assemblyName;
}
+#if !TARGET_JVM // Reflection.Emit is not supported for TARGET_JVM.
private Assembly GenerateAssembly (AssemblyName name)
{
AssemblyBuilder ab = domain.DefineDynamicAssembly (
Assert.AreEqual ("1.2.65535.65535", ab.GetName ().Version.ToString (), "1.2.0.0 dynamic");
#endif
}
+#endif // TARGET_JVM
[Test]
public void HashAlgorithm ()
AssertEqualsByteArrays ("PublicToken", an.GetPublicKeyToken (), dsAssemblyName.GetPublicKeyToken ());
}
+#if !TARGET_JVM // Assemblyname.GetObjectData not implemented yet for TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void GetObjectData_Null ()
AssemblyName an = new AssemblyName ();
an.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
}
+#endif // TARGET_JVM
[Test]
#if NET_2_0
}
[Test]
+ [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM.
public void Ctor2 ()
{
const string assemblyName = "TestAssembly";
}
[Test]
+ [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM.
public void Ctor5 ()
{
const string assemblyName = "TestAssembly";
using System.Globalization;
using System.IO;
using System.Reflection;
+#if !TARGET_JVM
using System.Reflection.Emit;
+#endif
using System.Runtime.Serialization;
using System.Security;
string fname = AppDomain.CurrentDomain.FriendlyName;
if (fname.EndsWith (".dll")) { // nunit-console
Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
-#if NET_2_0
+#if NET_2_0 && !TARGET_JVM // IsDefaultAppDomain not supported for TARGET_JVM
Assert.IsFalse (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain");
#endif
} else { // gnunit
Assert.IsNotNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
-#if NET_2_0
+#if NET_2_0 && !TARGET_JVM // IsDefaultAppDomain not supported for TARGET_JVM
Assert.IsTrue (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain");
#endif
}
}
+
+#if !TARGET_JVM // ManifestModule not supported under TARGET_JVM.
#if NET_2_0
[Category ("NotWorking")]
#endif
Assert.AreEqual ("v1.1.4322", corlib_test.ImageRuntimeVersion, "ImageRuntimeVersion");
#endif
}
+#endif
[Test]
public void GetAssembly ()
}
[Test]
+ [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
[ExpectedException (typeof (ArgumentNullException))]
public void GetFile_Null ()
{
}
[Test]
+ [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
[ExpectedException (typeof (ArgumentException))]
public void GetFile_Empty ()
{
}
[Test]
+ [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
public void GetFiles_False ()
{
Assembly corlib = typeof (int).Assembly;
}
[Test]
+ [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
public void GetFiles_True ()
{
Assembly corlib = typeof (int).Assembly;
Assertion.Fail ("Was not able to load any corlib test");
}
+#if !TARGET_JVM // GetObjectData currently not implemented for Assembly.
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void GetObjectData_Null ()
Assembly corlib = typeof (int).Assembly;
corlib.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
}
+#endif // TARGET_JVM
[Test]
public void GetReferencedAssemblies ()
}
}
+#if !TARGET_JVM // Reflection.Emit is not supported.
[Test]
public void Location_Empty() {
string assemblyFileName = Path.Combine (
Directory.Delete (outdir, true);
}
+#endif // TARGET_JVM
[Serializable ()]
private class AssemblyResolveHandler
public class Bug77079C : Bug77079B
{
}
+
+ [Test] // bug #76083
+ public void GetMethodAvoidAmbiguity3 ()
+ {
+ Type[] types = new Type[] { typeof (Bug76083ArgDerived) };
+ MethodInfo m = typeof (Bug76083Derived).GetMethod ("Foo", types);
+ Assert.AreEqual (typeof (Bug76083Derived), m.DeclaringType);
+ }
+
+ public class Bug76083ArgBase {}
+ public class Bug76083ArgDerived : Bug76083ArgBase {}
+
+ public class Bug76083Base
+ {
+ public void Foo (Bug76083ArgBase a) {}
+ }
+
+ public class Bug76083Derived : Bug76083Base
+ {
+ public new void Foo (Bug76083ArgBase a) {}
+ }
}
}
using System;
using System.Threading;
using System.Reflection;
+#if !TARGET_JVM
using System.Reflection.Emit;
+#endif // TARGET_JVM
using System.Runtime.InteropServices;
using NUnit.Framework;
using System;
using System.Threading;
using System.Reflection;
+#if !TARGET_JVM
using System.Reflection.Emit;
+#endif // TARGET_JVM
using System.Runtime.InteropServices;
using NUnit.Framework;
*/
}
+#if !TARGET_JVM // ReflectionOnlyLoad not supported for TARGET_JVM
[Test]
[ExpectedException (typeof (InvalidOperationException))]
public void GetValueOnRefOnlyAssembly ()
f.SetValue (null, 8);
}
+#endif // TARGET_JVM
const int literal = 42;
AssertEquals (null, fi2.GetValue (t));
}
+#if !TARGET_JVM // TypeBuilder not supported for TARGET_JVM
[Test]
public void NonPublicTests ()
{
FieldInfo f = TypeBuilder.GetField (t, fi);
AssertNotNull (f);
}
+#endif // TARGET_JVM
#endif
}
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ReturnTypePseudoCustomAttributes () {
MethodInfo mi = typeof (MethodInfoTest).GetMethod ("ReturnTypeMarshalAs");
}
public void MakeGenericMethodArgsMismatchFoo<T> () {}
-
+
[Test]
[ExpectedException (typeof (ArgumentException))]
public void MakeGenericMethodArgsMismatch ()
using System;
using System.Threading;
using System.Reflection;
+#if !TARGET_JVM
using System.Reflection.Emit;
+#endif // TARGET_JVM
using System.Runtime.InteropServices;
using NUnit.Framework;
public static void paramMethod (int i, [In] int j, [Out] int k, [Optional] int l, [In,Out] int m, [DefaultParameterValue (ParamEnum.Foo)] ParamEnum n) {
}
-#if !TARGET_JVM
+#if !TARGET_JVM // No support for extern methods in TARGET_JVM
[DllImport ("foo")]
public extern static void marshalAsMethod (
[MarshalAs(UnmanagedType.Bool)]int p0,
AssertEquals (1, info[3].GetCustomAttributes (typeof (OptionalAttribute), true).Length);
AssertEquals (2, info[4].GetCustomAttributes (true).Length);
+#if !TARGET_JVM // No support for extern methods in TARGET_JVM
ParameterInfo[] pi = typeof (ParameterInfoTest).GetMethod ("marshalAsMethod").GetParameters ();
MarshalAsAttribute attr;
AssertEquals (UnmanagedType.CustomMarshaler, attr.Value);
AssertEquals ("5", attr.MarshalCookie);
AssertEquals (typeof (Marshal1), Type.GetType (attr.MarshalType));
+#endif
}
#endif
}
using System;
using System.Threading;
using System.Reflection;
+#if !TARGET_JVM
using System.Reflection.Emit;
+#endif // TARGET_JVM
using NUnit.Framework;
public void DeserializeKnownValue ()
{
MemoryStream ms = new MemoryStream (serialized_sync_attr);
+#if TARGET_JVM
+ BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
SynchronizationAttribute sa = (SynchronizationAttribute) bf.Deserialize (ms);
Assert.IsTrue (sa.IsReEntrant, "IsReEntrant");
Assert.IsFalse (sa.Locked, "Locked");
+2007-03-05 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SymmetricAlgorithmTransformTest.cs: Add test cases for #81008 by
+ looking at the encrypted/decrypted block length when TransformBlock is
+ called with different MoO and paddings.
+
2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
* HashAlgorithmTest.cs: Convert to NUnit 2.2 format.
DontDecryptMultipleBlock_Final (CipherMode.ECB, PaddingMode.ISO10126);
}
#endif
+
+ private void TransformBlock_One (string msg, ICryptoTransform ct, int expected)
+ {
+ byte[] data = new byte[ct.InputBlockSize];
+ Assert.AreEqual (expected, ct.TransformBlock (data, 0, ct.InputBlockSize, data, 0), msg);
+ }
+
+ [Test]
+ public void CreateEncryptor_TransformBlock_One ()
+ {
+ SymmetricAlgorithm sa = Algorithm;
+ sa.Padding = PaddingMode.PKCS7;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("PKCS7-ECB", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("PKCS7-CBC", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("PKCS7-CFB", sa.CreateEncryptor (), BlockSize);
+
+ sa.Padding = PaddingMode.Zeros;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("Zeros-ECB", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("Zeros-CBC", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("Zeros-CFB", sa.CreateEncryptor (), BlockSize);
+
+ sa.Padding = PaddingMode.None;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("None-ECB", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("None-CBC", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("None-CFB", sa.CreateEncryptor (), BlockSize);
+#if NET_2_0
+ sa.Padding = PaddingMode.ANSIX923;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("ANSIX923-ECB", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("ANSIX923-CBC", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("ANSIX923-CFB", sa.CreateEncryptor (), BlockSize);
+
+ sa.Padding = PaddingMode.ISO10126;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("ISO10126-ECB", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("ISO10126-CBC", sa.CreateEncryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("ISO10126-CFB", sa.CreateEncryptor (), BlockSize);
+#endif
+ }
+
+ [Test]
+ public void CreateDecryptor_TransformBlock_One ()
+ {
+ SymmetricAlgorithm sa = Algorithm;
+ sa.Padding = PaddingMode.PKCS7;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("PKCS7-ECB", sa.CreateDecryptor (), 0);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("PKCS7-CBC", sa.CreateDecryptor (), 0);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("PKCS7-CFB", sa.CreateDecryptor (), 0);
+
+ sa.Padding = PaddingMode.Zeros;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("Zeros-ECB", sa.CreateDecryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("Zeros-CBC", sa.CreateDecryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("Zeros-CFB", sa.CreateDecryptor (), BlockSize);
+
+ sa.Padding = PaddingMode.None;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("None-ECB", sa.CreateDecryptor (), BlockSize);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("None-CBC", sa.CreateDecryptor (), BlockSize);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("None-CFB", sa.CreateDecryptor (), BlockSize);
+#if NET_2_0
+ sa.Padding = PaddingMode.ANSIX923;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("ANSIX923-ECB", sa.CreateDecryptor (), 0);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("ANSIX923-CBC", sa.CreateDecryptor (), 0);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("ANSIX923-CFB", sa.CreateDecryptor (), 0);
+
+ sa.Padding = PaddingMode.ISO10126;
+ sa.Mode = CipherMode.ECB;
+ TransformBlock_One ("ISO10126-ECB", sa.CreateDecryptor (), 0);
+ sa.Mode = CipherMode.CBC;
+ TransformBlock_One ("ISO10126-CBC", sa.CreateDecryptor (), 0);
+ sa.Mode = CipherMode.CFB;
+ TransformBlock_One ("ISO10126-CFB", sa.CreateDecryptor (), 0);
+#endif
+ }
}
[TestFixture]
public class EncodingInfoTest
{
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
// The purpose of this test is to make sure that
// new encodings added to I18N are also listed in the
// returned array from Encoding.GetEncodings() so that
--- /dev/null
+using NUnit.Framework;
+using System;
+using System.Text;
+
+#if NET_2_0
+
+namespace MonoTests.System.Text {
+
+ [TestFixture]
+ public class UTF32EncodingTest : Assertion {
+
+ [Test]
+ public void TestGetPreamble() {
+ byte[] lePreamble = new UTF32Encoding(false, true).GetPreamble();
+ if (!AreEqual(lePreamble, new byte[]{ 0xff, 0xfe, 0, 0 })) {
+ Fail ("Little-endian UTF32 preamble is incorrect");
+ }
+
+ byte[] bePreamble = new UTF32Encoding(true, true).GetPreamble();
+ if (!AreEqual(bePreamble, new byte[]{ 0, 0, 0xfe, 0xff })) {
+ Fail ("Big-endian UTF32 preamble is incorrect");
+ }
+ }
+
+ private bool AreEqual(byte[] a, byte[] b) {
+ if (a.Length != b.Length)
+ return false;
+ for (int i = 0; i < a.Length; ++i) {
+ if (a[i] != b[i])
+ return false;
+ }
+ return true;
+ }
+ }
+}
+
+#endif
+
readonly object obj_1 = "obj_1";
readonly object obj_2 = "obj_2";
readonly object obj_3 = "obj_3";
+#if !TARGET_JVM // No support for exchanging two IntPtrs
readonly IntPtr iptr_1 = (IntPtr)int32_1;
readonly IntPtr iptr_2 = (IntPtr)int32_2;
readonly IntPtr iptr_3 = (IntPtr)int32_3;
+#endif // TARGET_JVM
[Test]
public void TestExchange_Int32 ()
Assert.AreEqual(dbl_2, dbl);
}
+#if !TARGET_JVM // No support for exchanging two IntPtrs
[Test]
public void TestExchange_Iptr ()
{
Assert.AreEqual(iptr_1, Interlocked.Exchange(ref iptr, iptr_2));
Assert.AreEqual(iptr_2, iptr);
}
+#endif // TARGET_JVM
#endif
[Test]
Assert.AreEqual(dbl_2, dbl);
}
+#if !TARGET_JVM // No support for compare exchanging two IntPtrs
[Test]
public void TestCompareExchange_Iptr ()
{
Assert.AreEqual(iptr_1, Interlocked.CompareExchange(ref iptr, iptr_2, iptr_1));
Assert.AreEqual(iptr_2, iptr);
}
+#endif // TARGET_JVM
#endif
[Test]
Assert.AreEqual(dbl_1, dbl);
}
+#if !TARGET_JVM // No support for compare exchanging two IntPtrs
[Test]
public void TestCompareExchange_Failed_Iptr ()
{
Assert.AreEqual(iptr_1, Interlocked.CompareExchange(ref iptr, iptr_2, iptr_3));
Assert.AreEqual(iptr_1, iptr);
}
+#endif // TARGET_JVM
#endif
[Test]
this.id = id;\r
this.mut = mut;\r
}\r
- public void wait()\r
+ public void Wait()\r
{\r
mut.WaitOne();\r
}\r
- public void signal()\r
+ public void Signal()\r
{\r
mut.ReleaseMutex();\r
}\r
public void WithoutWait()\r
{\r
this.marker = this.id;\r
- this.signal();\r
+ this.Signal();\r
}\r
\r
\r
{\r
while (this.marker<100)\r
{\r
- this.wait();\r
+ this.Wait();\r
this.marker++;\r
- this.signal();\r
+ this.Signal();\r
}\r
}\r
\r
public void WaitAndForget()\r
{\r
- this.wait();\r
+ this.Wait();\r
this.marker = id;\r
}\r
public void WaitAndWait()\r
}\r
\r
[Test]\r
+ [Category("TargetJvmNotSupported")] // IntPtr native handles are not supported for TARGET_JVM.\r
public void TestHandle()\r
{\r
Mutex Sem = new Mutex();\r
public static void NoPrincipal ()
{
+#if !TARGET_JVM // AppDomain.SetPrincipalPolicy not supported for TARGET_JVM
AppDomain.CurrentDomain.SetPrincipalPolicy (PrincipalPolicy.NoPrincipal);
+#endif
IPrincipal p = Thread.CurrentPrincipal;
AssertNull ("Thread.CurrentPrincipal-1", p);
// in this case we can return to null
}
+#if !TARGET_JVM // AppDomain.SetPrincipalPolicy not supported for TARGET_JVM
public static void UnauthenticatedPrincipal ()
{
AppDomain.CurrentDomain.SetPrincipalPolicy (PrincipalPolicy.UnauthenticatedPrincipal);
AssertNotNull ("Thread.CurrentPrincipal-3", Thread.CurrentPrincipal);
// in this case we can't return to null
}
+#endif // TARGET_JVM
public static void CopyOnNewThread ()
{
}
}
+#if !TARGET_JVM // AppDomain.SetPrincipalPolicy not supported for TARGET_JVM
[Test]
[Ignore ("see comment below.")]
public void CurrentPrincipal_PrincipalPolicy_UnauthenticatedPrincipal ()
t.Abort ();
}
}
+#endif // TARGET_JVM
[Test]
public void IPrincipal_CopyOnNewThread ()
using System.Globalization;
using System.IO;
using System.Reflection;
+#if !TARGET_JVM // Reflection.Emit not supported for TARGET_JVM
using System.Reflection.Emit;
+#endif
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
Assert.AreEqual (7, objCOMTest.Id, "#A05");
}
+#if !TARGET_JVM // Reflection.Emit not supported for TARGET_JVM
[Test]
[ExpectedException (typeof (MissingMethodException))]
public void CreateInstance_TypeBuilder ()
{
Activator.CreateInstance (typeof (ArgIterator), null);
}
+#endif // TARGET_JVM
[Test]
[ExpectedException (typeof (NotSupportedException))]
Activator.CreateInstance (typeof (void), null);
}
+#if !TARGET_JVM // RuntimeArgumentHandle not supported for TARGET_JVM
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void CreateInstance_RuntimeArgumentHandle ()
{
Activator.CreateInstance (typeof (RuntimeArgumentHandle), null);
}
+#endif // TARGET_JVM
[Test]
[ExpectedException (typeof (NotSupportedException))]
#else
[ExpectedException(typeof(MemberAccessException))]
#endif
+ [Category ("TargetJvmNotWorking")]
public void CreateInstanceAbstract2 ()
{
Activator.CreateInstance (typeof (Type), true);
#else
[ExpectedException (typeof (MemberAccessException))]
#endif
+ [Category ("TargetJvmNotWorking")]
public void CreateInstanceAbstract5 ()
{
Activator.CreateInstance (typeof (Type), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
#if NET_2_0
[Test]
+ [Category ("TargetJvmNotWorking")]
public void CreateInstance_Nullable ()
{
Assert.AreEqual (5, Activator.CreateInstance (typeof (Nullable<int>), new object [] { 5 }));
[Test]
[ExpectedException (typeof (ArgumentNullException))]
+ [Category ("TargetJvmNotWorking")]
public void GetObject_UrlNull ()
{
Activator.GetObject (typeof (COMTest), null);
}
[Test]
+ [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx10 ()
{
Unification (String.Format (CorlibPermissionPattern, fx10version));
}
[Test]
+ [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx11 ()
{
Unification (String.Format (CorlibPermissionPattern, fx11version));
}
[Test]
+ [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx20 ()
{
Unification (String.Format (CorlibPermissionPattern, fx20version));
}
[Test]
+ [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx99_Corlib ()
{
Unification (String.Format (CorlibPermissionPattern, "9.99.999.9999"));
#if NET_2_0
[Test]
+ [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
[Category ("NotWorking")]
public void Unification_FromFx99_System ()
{
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ConfigurationFile_Relative_ApplicationBase ()
{
string fileName = "blar.config";
[Test]
[ExpectedException (typeof (MemberAccessException))] // The ApplicationBase must be set before retrieving this property
+ [Category ("TargetJvmNotWorking")]
public void ConfigurationFile_Relative_NoApplicationBase ()
{
AppDomainSetup setup = new AppDomainSetup();
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ApplicationBase1 ()
{
string expected_path = tmpPath.Replace(@"\", @"/");
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ApplicationBase2 ()
{
AppDomainSetup setup = new AppDomainSetup ();
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ApplicationBase3 ()
{
AppDomainSetup setup = new AppDomainSetup ();
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ApplicationBase4 ()
{
AppDomainSetup setup = new AppDomainSetup ();
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ApplicationBase5 ()
{
// This is failing because of (probably) a windows-ism, so don't worry
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void ApplicationBase6 ()
{
AppDomainSetup setup = new AppDomainSetup ();
} catch (ArgumentException) {
errorThrown = true;
}
+#if TARGET_JVM // This is really implementation dependent behaviour.
+ catch (RankException) {
+ errorThrown = true;
+ }
+#endif // TARGET_JVM
Assert("#E62", errorThrown);
}
{
Assert("#F03b", errorThrown);
}
#endif
+#if !TARGET_JVM // Arrays lower bounds are not supported for TARGET_JVM
{
bool errorThrown = false;
try {
}
Assert("#F04", errorThrown);
}
+#endif // TARGET_JVM
{
bool errorThrown = false;
try {
}
Assert("#F05", errorThrown);
}
+#if !TARGET_JVM // CreateInstance with lower bounds not supported for TARGET_JVM
{
bool errorThrown = false;
try {
Type szarrayType = new int [10].GetType ();
Assert (szarrayType == (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0})).GetType ());
Assert (szarrayType != (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {1})).GetType ());
+#endif // TARGET_JVM
}
[Test]
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestGetEnumeratorNonZeroLowerBounds() {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Add () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Insert () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Remove () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_RemoveAt () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Contains () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
[Test]
+ [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_IndexOf () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
}
+#if !TARGET_JVM // BugBUG: T[] is not yet ICollection<T> under TARGET_JVM
[Test]
// From bug #80563
public void ICollectionNull ()
test = new List<object>(test);
AssertEquals ("array with test", test.Contains (null), false);
}
+#endif // TARGET_JVM
#endif
#region Bug 80299
Assert.IsNotNull (bif.Message, "#4");
Assert.AreEqual ("message", bif.Message, "#5");
Assert.IsNull (bif.FusionLog, "#6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": message"), "#7");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#7");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#4");
Assert.AreEqual (string.Empty, bif.Message, "#5");
Assert.IsNull (bif.FusionLog, "#6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#7");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": ",
bif.ToString (), "#7");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual ("message", bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": message ---> "
+ ame.GetType ().FullName + ": something", bif.ToString (), "#8");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual (string.Empty, bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": ---> "
+ ame.GetType ().FullName + ": something", bif.ToString (), "#8");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNull (bif.FusionLog, "#7");
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName), "#8");
Assert.IsTrue (bif.ToString ().IndexOf ("---> " + ame.GetType ().FullName) != -1, "#9");
+#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#10");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#4");
Assert.AreEqual ("message", bif.Message, "#5");
Assert.IsNull (bif.FusionLog, "#6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#7");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#7");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual ("message", bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#8");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#8");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#A4");
Assert.AreEqual ("message", bif.Message, "#A5");
Assert.IsNull (bif.FusionLog, "#A6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#A7");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#A7");
+#endif // TARGET_JVM
bif = new BadImageFormatException (string.Empty, (string) null);
Assert.IsNotNull (bif.Message, "#B4");
Assert.AreEqual (string.Empty, bif.Message, "#B5");
Assert.IsNull (bif.FusionLog, "#B6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#B7");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": ",
bif.ToString (), "#B7");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual (string.Empty, bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+ Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#8");
+#else
Assert.AreEqual (bif.GetType ().FullName + ": ", bif.ToString (), "#8");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNull (bif.FusionLog, "#5");
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
+ ": "), "#6");
+#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#7");
+#endif // TARGET_JVM
}
[Test]
Assert.IsNull (bif.FusionLog, "#B6");
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
+ ": "), "#B7");
+#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#B8");
+#endif // TARGET_JVM
Assert.IsTrue (bif.ToString ().IndexOf ("''") != -1, "#B9");
}
}
+2007-03-13 Alp Toker <alp@atoker.com>
+
+ * TypeTest.cs: Add a regression test for #63841.
+
+2007-03-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * StringComparerTest.cs: Added tests for bug #80928. Added binary
+ serialization compatibility tests.
+
+2007-03-06 Zoltan Varga <vargaz@gmail.com>
+
+ * TypeTest.cs: Add a regression test for #81037.
+
+2007-03-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * StringTest.cs : revert r73699 which does not make sense.
+
2007-02-25 Gert Driesen <drieseng@users.sourceforge.net>
* AppDomainSetupTest.cs: Added tests for bug #80934.
[Test]
[ExpectedException (typeof (FormatException))]
+ [Category ("TargetJvmNotWorking")]
public void FormatBase64CharArray_OnlyWhitespace ()
{
Convert.FromBase64CharArray (new char[3] {' ',
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void FromBase64_Empty ()
{
AssertEquals (new byte[0], Convert.FromBase64String (string.Empty));
DateTime.Parse (s, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces);
DateTime.Parse (s, new CultureInfo ("ja-JP"), DateTimeStyles.AllowWhiteSpaces);
-// DateTime.Parse (s, null); currently am not sure if it works for _every_ culture.
+ //DateTime.Parse (s, null); currently am not sure if it works for _every_ culture.
}
Assert(1.2345678901234e-14 == (double)d);
d = new Decimal(1.2342278901234e-25);
- Assert((decimal)d == 1.234e-25m);
+ AssertEquals("A10", d, 1.234e-25m);
// test exceptions
try
public void TestRemainder()\r
{\r
Assert((decimal)Decimal.Remainder(3.6m, 1.3m) == 1.0m);\r
- Assert((decimal)Decimal.Remainder(79228162514264337593543950335m , \r
- 27703302467091960609331879.53200m) == 24420760848422211464106753m);\r
+ AssertEquals("A02", Decimal.Remainder(79228162514264337593543950335m, \r
+ 27703302467091960609331879.53200m), 24420760848422211464106753m);\r
\r
Assert((decimal)Decimal.Remainder(45937986975432m, 43987453m)\r
== 42334506m);\r
Fail("" + errOp + " wrong multiplications, " + errOverflow + " wrong overflows");\r
}\r
}\r
-
- // MS 1.x is being less precise than Mono (2 cases). MS 2.0 is correct.
- // Mono doesn't produce the same result for (i==21/j==3)
+\r
+ // MS 1.x is being less precise than Mono (2 cases). MS 2.0 is correct.\r
+ // Mono doesn't produce the same result for (i==21/j==3)\r
public void TestDiv()\r
{\r
decimal[] args = auto_build2;\r
enum TestingEnum {This, Is, A, Test};
enum TestingEnum2 {This, Is, A, Test};
enum TestingEnum3: ulong {This, Is, A, Test = ulong.MaxValue };
+ enum TestingEnum4: byte { This, Is, A, Test = byte.MaxValue }
+ enum TestingEnum5: short { This, Is, A, Test = short.MaxValue }
+ enum TestingEnum6 { This, Is, A, Test = int.MaxValue }
public void TestCompareTo() {
Enum e1 = new TestingEnum();
AssertEquals ("#F_FS:f", fFormatOutput, fOutput);
string xOutput = Enum.Format (pa.GetType(), pa, "x");
AssertEquals ("#F_FS:x", xFormatOutput, xOutput);
+
+ AssertEquals ("#F_FSX:01", "00", TestingEnum4.This.ToString("x"));
+ AssertEquals ("#F_FSX:02", "00", TestingEnum4.This.ToString("X"));
+ AssertEquals ("#F_FSX:03", "ff", TestingEnum4.Test.ToString("x"));
+ AssertEquals ("#F_FSX:04", "FF", TestingEnum4.Test.ToString("X"));
+
+ AssertEquals ("#F_FSX:05", "0000", TestingEnum5.This.ToString("x"));
+ AssertEquals ("#F_FSX:06", "0000", TestingEnum5.This.ToString("X"));
+ AssertEquals ("#F_FSX:07", "7fff", TestingEnum5.Test.ToString("x"));
+ AssertEquals ("#F_FSX:08", "7FFF", TestingEnum5.Test.ToString("X"));
+
+ AssertEquals ("#F_FSX:09", "00000000", TestingEnum6.This.ToString("x"));
+ AssertEquals ("#F_FSX:10", "00000000", TestingEnum6.This.ToString("X"));
+ AssertEquals ("#F_FSX:11", "7fffffff", TestingEnum6.Test.ToString("x"));
+ AssertEquals ("#F_FSX:12", "7FFFFFFF", TestingEnum6.Test.ToString("X"));
+
+ AssertEquals ("#F_FSX:13", "0000000000000000", TestingEnum3.This.ToString("x"));
+ AssertEquals ("#F_FSX:14", "0000000000000000", TestingEnum3.This.ToString("X"));
+ AssertEquals ("#F_FSX:15", "ffffffffffffffff", TestingEnum3.Test.ToString("x"));
+ AssertEquals ("#F_FSX:16", "FFFFFFFFFFFFFFFF", TestingEnum3.Test.ToString("X"));
}
public void TestGetHashCode() {
Environment.GetEnvironmentVariables ((EnvironmentVariableTarget)Int32.MinValue);
}
+#if !TARGET_JVM // Environment.SetEnvironmentVariable not supported under TARGET_JVM
[Test]\r
[ExpectedException (typeof (ArgumentException))]\r
public void SetEnvironmentVariable_Target ()
Environment.SetEnvironmentVariable ("A3", "\0");
Assert.AreEqual (Environment.GetEnvironmentVariables ()["A3"], null);
}
+#endif // TARGET_JVM
#endif
}
}
[TestFixture]
public class MathTest : Assertion {
+ private static double double_epsilon =
+#if TARGET_JVM
+ 1E-15;
+#else
+ double.Epsilon;
+#endif
+
static double x = 0.1234;
static double y = 12.345;
double b = 1.4470809809523457;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Acos(-1.01D)));
Assert(double.IsNaN(Math.Acos(1.01D)));
Assert(double.IsNaN(Math.Acos(Double.MinValue)));
double b = 0.12371534584255098;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Asin(-1.01D)));
Assert(double.IsNaN(Math.Asin(1.01D)));
Assert(double.IsNaN(Math.Asin(Double.MinValue)));
double d = -1.5707963267948966;
Assert("#1: " + a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert("should return NaN",
double.IsNaN(Math.Atan(double.NaN)));
Assert("#2: " + Math.Atan(double.PositiveInfinity).ToString("G99")+" != "+c.ToString("G99"),
double b = 0.0099956168687207747;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Acos(-2D)));
Assert(double.IsNaN(Math.Acos(2D)));
}
double b = 0.99239587670489104;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Cos(Double.NaN)));
Assert(double.IsNaN(Math.Cos(Double.NegativeInfinity)));
Assert(double.IsNaN(Math.Cos(Double.PositiveInfinity)));
double b = 1.0076234465130722;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(Math.Cosh(double.NegativeInfinity) == double.PositiveInfinity);
Assert(Math.Cosh(double.PositiveInfinity) == double.PositiveInfinity);
Assert(double.IsNaN(Math.Cosh(double.NaN)));
double b = 0.12308705821137626;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Sin(Double.NaN)));
Assert(double.IsNaN(Math.Sin(Double.NegativeInfinity)));
Assert(double.IsNaN(Math.Sin(Double.PositiveInfinity)));
double b = 0.12403019913793806;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(Double.IsNaN(Math.Tan(Double.NaN)));
Assert(Double.IsNaN(Math.Tan(Double.PositiveInfinity)));
Assert(Double.IsNaN(Math.Tan(Double.NegativeInfinity)));
double b = 0.12277743150353424;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert("Tanh(NaN) should be NaN",
Double.IsNaN(Math.Tanh(Double.NaN)));
Assert("Tanh(+Infinity) should be 1",
double b = 0.35128336140500593;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(Double.IsNaN(Math.Sqrt(Double.NaN)));
Assert(Double.IsPositiveInfinity(Math.Sqrt(Double.PositiveInfinity)));
Assert(Double.IsNaN(Math.Sqrt(Double.NegativeInfinity)));
double b = 1.1313368651986859;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Exp(double.NaN)));
Assert(Math.Exp(double.NegativeInfinity) == 0);
Assert(Math.Exp(double.PositiveInfinity) == double.PositiveInfinity);
iTest++;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
iTest++;
Assert(Math.Ceiling(double.NegativeInfinity) == double.NegativeInfinity);
iTest++;
double b = 1;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(Math.Floor(double.NegativeInfinity) == double.NegativeInfinity);
Assert(Math.Floor(double.PositiveInfinity) == double.PositiveInfinity);
Assert(double.IsNaN(Math.Floor(double.NaN)));
double b = 0.0050000000000007816;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert ("Positive 0", double.IsNaN (Math.IEEERemainder (y, 0)));
double b = 2.513251122797143;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Log(-1)));
Assert(double.IsNaN(Math.Log(double.NaN)));
double b = -0.90868484030277719;
Assert(a.ToString("G99") + " != " + b.ToString("G99"),
- (Math.Abs(a - b) <= double.Epsilon));
+ (Math.Abs(a - b) <= double_epsilon));
Assert(double.IsNaN(Math.Log10(-1)));
Assert(double.IsNaN(Math.Log10(double.NaN)));
double a = Math.Pow(y, x);
double b = 1.363609446060212;
- Assert(a.ToString("G99") + " != " + b.ToString("G99"), (Math.Abs(a - b) <= double.Epsilon));
+ Assert(a.ToString("G99") + " != " + b.ToString("G99"), (Math.Abs(a - b) <= double_epsilon));
iTest++;
Assert (double.IsNaN(Math.Pow(y, double.NaN)));
iTest++;
iTest++;
Assert("Math.Pow(1, NaN) should be NaN",
Double.IsNaN(Math.Pow(1, Double.NaN)));
-
+#if !TARGET_JVM
iTest++;
Assert("Math.Pow(NaN, 0) should be NaN",
Double.IsNaN(Math.Pow(Double.NaN, 0)));
-
+#endif
iTest++;
Assert("Math.Pow(-1, MaxValue) should be 1.0",
1.0 == Math.Pow(-1, Double.MaxValue));
Assert(b == Math.Max(a, b));
Assert(b == Math.Max(b, a));
+
Assert("Max(NaN,NaN) should be NaN",
Double.IsNaN(Math.Max(Double.NaN, Double.NaN)));
Assert("Max(NaN,x) should be NaN",
--- /dev/null
+//
+// MonoTests.System.StringComparerTest
+//
+// Authors:
+// Gert Driesen (drieseng@users.sourceforge.net)
+//
+// Copyright (C) 2007 Gert Driesen
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+using System.Globalization;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.Threading;
+
+using NUnit.Framework;
+
+namespace MonoTests.System
+{
+ [TestFixture]
+ public class StringComparerTest
+ {
+ [Test]
+ public void Serialize_CurrentCulture ()
+ {
+ Thread.CurrentThread.CurrentCulture = new CultureInfo ("nl-BE");
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, StringComparer.CurrentCulture);
+
+ // Assert.AreEqual (_serializedCurrentCulture, buffer);
+ }
+
+ [Test]
+ public void Deserialize_CurrentCulture ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedCurrentCulture, 0, _serializedCurrentCulture.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ StringComparer sc = (StringComparer) bf.Deserialize (ms);
+ Assert.IsNotNull (sc);
+ }
+
+ [Test]
+ public void Serialize_CurrentCultureIgnoreCase ()
+ {
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, StringComparer.CurrentCultureIgnoreCase);
+
+ // Assert.AreEqual (_serializedCurrentCultureIgnoreCase, buffer);
+ }
+
+ [Test]
+ public void Deserialize_CurrentCultureIgnoreCase ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedCurrentCultureIgnoreCase, 0, _serializedCurrentCultureIgnoreCase.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ StringComparer sc = (StringComparer) bf.Deserialize (ms);
+ Assert.IsNotNull (sc);
+ }
+
+ [Test]
+ public void Serialize_InvariantCulture ()
+ {
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, StringComparer.InvariantCulture);
+
+ byte [] buffer = new byte [ms.Length];
+ ms.Position = 0;
+ ms.Read (buffer, 0, buffer.Length);
+
+ // Assert.AreEqual (_serializedInvariantCulture, buffer);
+ }
+
+ [Test]
+ public void Deserialize_InvariantCulture ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedInvariantCulture, 0, _serializedInvariantCulture.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ StringComparer sc = (StringComparer) bf.Deserialize (ms);
+ Assert.IsNotNull (sc);
+ }
+
+ [Test]
+ public void Serialize_InvariantCultureIgnoreCase ()
+ {
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, StringComparer.InvariantCultureIgnoreCase);
+
+ byte [] buffer = new byte [ms.Length];
+ ms.Position = 0;
+ ms.Read (buffer, 0, buffer.Length);
+
+ // Assert.AreEqual (_serializedInvariantCultureIgnoreCase, buffer);
+ }
+
+ [Test]
+ public void Deserialize_InvariantCultureIgnoreCase ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedInvariantCultureIgnoreCase, 0, _serializedInvariantCultureIgnoreCase.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ StringComparer sc = (StringComparer) bf.Deserialize (ms);
+ Assert.IsNotNull (sc);
+ }
+
+ [Test]
+ public void Serialize_Ordinal ()
+ {
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, StringComparer.Ordinal);
+
+ byte [] buffer = new byte [ms.Length];
+ ms.Position = 0;
+ ms.Read (buffer, 0, buffer.Length);
+
+ Assert.AreEqual (_serializedOrdinal, buffer);
+ }
+
+ [Test]
+ public void Deserialize_Ordinal ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedOrdinal, 0, _serializedOrdinal.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ StringComparer sc = (StringComparer) bf.Deserialize (ms);
+ Assert.IsNotNull (sc);
+ }
+
+ [Test]
+ public void Serialize_OrdinalIgnoreCase ()
+ {
+ BinaryFormatter bf = new BinaryFormatter ();
+ MemoryStream ms = new MemoryStream ();
+ bf.Serialize (ms, StringComparer.OrdinalIgnoreCase);
+
+ byte [] buffer = new byte [ms.Length];
+ ms.Position = 0;
+ ms.Read (buffer, 0, buffer.Length);
+
+ Assert.AreEqual (_serializedOrdinalIgnoreCase, buffer);
+ }
+
+ [Test]
+ public void Deserialize_OrdinalIgnoreCase ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ ms.Write (_serializedOrdinalIgnoreCase, 0, _serializedOrdinalIgnoreCase.Length);
+ ms.Position = 0;
+
+ BinaryFormatter bf = new BinaryFormatter ();
+ StringComparer sc = (StringComparer) bf.Deserialize (ms);
+ Assert.IsNotNull (sc);
+ }
+
+ private static readonly byte [] _serializedCurrentCulture = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x1b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x43, 0x75, 0x6c,
+ 0x74, 0x75, 0x72, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x43, 0x6f,
+ 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72, 0x02, 0x00, 0x00, 0x00, 0x0c,
+ 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x0b, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61,
+ 0x73, 0x65, 0x03, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x01, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x02, 0x00, 0x00, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72,
+ 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x03, 0x00, 0x00, 0x00, 0x09, 0x77,
+ 0x69, 0x6e, 0x33, 0x32, 0x4c, 0x43, 0x49, 0x44, 0x07, 0x63, 0x75,
+ 0x6c, 0x74, 0x75, 0x72, 0x65, 0x06, 0x6d, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x00, 0x00, 0x01, 0x08, 0x08, 0x13, 0x08, 0x00, 0x00, 0x13,
+ 0x08, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x05, 0x6e, 0x6c,
+ 0x2d, 0x42, 0x45, 0x0b };
+
+ private static readonly byte [] _serializedCurrentCultureIgnoreCase = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x1b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x43, 0x75, 0x6c,
+ 0x74, 0x75, 0x72, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x43, 0x6f,
+ 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72, 0x02, 0x00, 0x00, 0x00, 0x0c,
+ 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x0b, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61,
+ 0x73, 0x65, 0x03, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x01, 0x09, 0x02, 0x00, 0x00, 0x00, 0x01,
+ 0x04, 0x02, 0x00, 0x00, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72,
+ 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x03, 0x00, 0x00, 0x00, 0x09, 0x77,
+ 0x69, 0x6e, 0x33, 0x32, 0x4c, 0x43, 0x49, 0x44, 0x07, 0x63, 0x75,
+ 0x6c, 0x74, 0x75, 0x72, 0x65, 0x06, 0x6d, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x00, 0x00, 0x01, 0x08, 0x08, 0x13, 0x08, 0x00, 0x00, 0x13,
+ 0x08, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x05, 0x6e, 0x6c,
+ 0x2d, 0x42, 0x45, 0x0b };
+
+
+ private static readonly byte [] _serializedInvariantCulture = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x1b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x43, 0x75, 0x6c,
+ 0x74, 0x75, 0x72, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x43, 0x6f,
+ 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72, 0x02, 0x00, 0x00, 0x00, 0x0c,
+ 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x0b, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61,
+ 0x73, 0x65, 0x03, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x01, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x02, 0x00, 0x00, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72,
+ 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x03, 0x00, 0x00, 0x00, 0x09, 0x77,
+ 0x69, 0x6e, 0x33, 0x32, 0x4c, 0x43, 0x49, 0x44, 0x07, 0x63, 0x75,
+ 0x6c, 0x74, 0x75, 0x72, 0x65, 0x06, 0x6d, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x00, 0x00, 0x01, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x00, 0x7f,
+ 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0b };
+
+ private static readonly byte [] _serializedInvariantCultureIgnoreCase = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x1b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x43, 0x75, 0x6c,
+ 0x74, 0x75, 0x72, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x43, 0x6f,
+ 0x6d, 0x70, 0x61, 0x72, 0x65, 0x72, 0x02, 0x00, 0x00, 0x00, 0x0c,
+ 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x0b, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61,
+ 0x73, 0x65, 0x03, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x01, 0x09, 0x02, 0x00, 0x00, 0x00, 0x01,
+ 0x04, 0x02, 0x00, 0x00, 0x00, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72,
+ 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x03, 0x00, 0x00, 0x00, 0x09, 0x77,
+ 0x69, 0x6e, 0x33, 0x32, 0x4c, 0x43, 0x49, 0x44, 0x07, 0x63, 0x75,
+ 0x6c, 0x74, 0x75, 0x72, 0x65, 0x06, 0x6d, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x00, 0x00, 0x01, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x00, 0x7f,
+ 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0b };
+
+ private static readonly byte [] _serializedOrdinal = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x16, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x4f, 0x72, 0x64,
+ 0x69, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
+ 0x72, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x5f, 0x69, 0x67, 0x6e, 0x6f,
+ 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x00, 0x01, 0x00, 0x0b };
+
+ private static readonly byte [] _serializedOrdinalIgnoreCase = new byte [] {
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
+ 0x16, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x4f, 0x72, 0x64,
+ 0x69, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
+ 0x72, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x5f, 0x69, 0x67, 0x6e, 0x6f,
+ 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x00, 0x01, 0x01, 0x0b };
+ }
+}
+
+#endif
using System;
using System.Text;
using System.Globalization;
+using System.Reflection;
namespace MonoTests.System
{
-1, s1.LastIndexOf("translator", 2));
AssertEquals("stepped string index #5",
0, "".LastIndexOf("", 0));
+#if !TARGET_JVM
AssertEquals("stepped string index #6",
-1, "".LastIndexOf("A", -1));
+#endif
AssertEquals("stepped limited string index #1",
10, s1.LastIndexOf("rig", s1.Length-1, 10));
AssertEquals("stepped limited string index #2",
AssertEquals ("..aaaaaaa.bbbbbbbbb,......ccccccc.u..", s2.Replace("..", "."));
// Test replacing null characters (bug #67395)
+#if !TARGET_JVM //bug #7276
AssertEquals ("should not strip content after nullchar",
"is this ok ?", "is \0 ok ?".Replace ("\0", "this"));
+#endif
+
}
public void TestSplit() {
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void CurrentTimeZone_SerializationRoundtrip ()
{
TimeZone tz = TimeZone.CurrentTimeZone;
using System.Collections;
using System.IO;
using System.Reflection;
+using System.Reflection.Emit;
using System.Runtime.InteropServices;
class NoNamespaceClass {
Assert.AreEqual (typeof (ICloneable[][]).IsAssignableFrom (typeof (Duper[][])), true, "#12");
// Tests for vectors<->one dimensional arrays */
+#if TARGET_JVM // Lower bounds arrays are not supported for TARGET_JVM.
+ Array arr1 = Array.CreateInstance (typeof (int), new int[] {1});
+ Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr1.GetType ()), true, "#13");
+#else
Array arr1 = Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0});
Array arr2 = Array.CreateInstance (typeof (int), new int[] {1}, new int[] {10});
Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr1.GetType ()), true, "#13");
Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr2.GetType ()), false, "#14");
+#endif // TARGET_JVM
// Test that arrays of enums can be cast to their base types
Assert.AreEqual (typeof (int[]).IsAssignableFrom (typeof (TypeCode[])), true, "#15");
}
[Test]
+ [Category ("TargetJvmNotWorking")]
public void TestGetPropertyImpl() {
// Test getting property that is exact
Assert.AreEqual (typeof (NewVTable), typeof (NewVTable).GetProperty ("Item", new Type[1] { typeof (Int32) }).DeclaringType, "#01");
Assert.AreEqual (1, typeof (Derived1).GetProperties ().Length, "#03");
}
+#if !TARGET_JVM // StructLayout not supported for TARGET_JVM
[StructLayout(LayoutKind.Explicit, Pack = 4, Size = 64)]
public class Class1 {
}
Assert.AreEqual (CharSet.Unicode, attr3.CharSet);
}
#endif
+#endif // TARGET_JVM
[Test]
public void Namespace () {
Assert.IsNull (i);
}
+#if !TARGET_JVM // Reflection.Emit is not supported for TARGET_JVM
+ [Test]
+ public void EqualsUnderlyingType ()
+ {
+ AssemblyBuilderAccess access = AssemblyBuilderAccess.RunAndSave;
+ TypeAttributes attribs = TypeAttributes.Public;
+
+ AssemblyName name = new AssemblyName ();
+ name.Name = "enumtest";
+ AssemblyBuilder assembly =
+ AppDomain.CurrentDomain.DefineDynamicAssembly (
+ name, access);
+
+ ModuleBuilder module = assembly.DefineDynamicModule
+ ("m", "enumtest.dll");
+ EnumBuilder e = module.DefineEnum ("E", attribs, typeof (int));
+
+ Assert.IsTrue (typeof (int).Equals (e));
+ }
+#endif // TARGET_JVM
+
+ [Test]
+ public void GetElementType_Bug63841 ()
+ {
+ Assert.IsNull (typeof (TheEnum).GetElementType (), "#1");
+ }
+
#if NET_2_0
[Test]
public void FullNameGenerics ()
System.Runtime.InteropServices/CriticalHandle.cs
System.Runtime.InteropServices/CurrencyWrapper.cs
System.Runtime.InteropServices/DefaultCharSetAttribute.cs
-System.Runtime.InteropServices/DefaultParameterValueAttribute.cs
System.Runtime.InteropServices/DESCKIND.cs
System.Runtime.InteropServices/DispatchWrapper.cs
System.Runtime.InteropServices/DISPPARAMS.cs
System.Collections/ReadOnlyCollectionBaseTest.cs
System.Collections/SortedListTest.cs
System.Collections/StackTest.cs
+System.Collections.Generic/ComparerTest.cs
System.Collections.Generic/DictionaryTest.cs
+System.Collections.Generic/IListTest.cs
System.Collections.Generic/ListTest.cs
System.Collections.ObjectModel/CollectionTest.cs
System.Collections.ObjectModel/KeyedCollectionTest.cs
System.Security/SecurityTransparentAttributeTest.cs
System/SingleTest.cs
System/SingleFormatterTest.cs
+System/StringComparerTest.cs
System/StringTest.cs
System.Text/ASCIIEncodingTest.cs
System.Text/DecoderReplacementFallbackTest.cs
System.Text/UnicodeEncodingTest.cs
System.Text/UTF7EncodingTest.cs
System.Text/UTF8EncodingTest.cs
+System.Text/UTF32EncodingTest.cs
System.Threading/AutoResetEventTest.cs
System.Threading/CompressedStackTest.cs
System.Threading/ExecutionContextTest.cs
set BUILD_OPTION=%1\r
)\r
\r
-set OUTPUT_FILE_PREFIX=MonoTests.System\r
+set OUTPUT_FILE_PREFIX=MonoTests.Corlib\r
set RUNNING_FIXTURE=MonoTests.System\r
\r
call run-tests.test.bat %BUILD_OPTION% %SECURE_MODE% %OUTPUT_FILE_PREFIX% %RUNNING_FIXTURE%\r
REM ********************************************************
set BUILD_OPTION=%1
-set OUTPUT_FILE_PREFIX=System_MonoTests
+set OUTPUT_FILE_PREFIX=Corlib_MonoTests
set RUNNING_FIXTURE=MonoTests.System
set TEST_SOLUTION=Test\Mscorlib.Test20.sln
set TEST_ASSEMBLY=Mscorlib.Test20.jar
REM ********************************************************
set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\
-set JAVA_HOME=%VMW_HOME%\jre5
+set JAVA_HOME=%VMW_HOME%\jre6
set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar
set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar
if "%XMLTOOL_BUILD%" == "DONE" goto XMLTOOLSKIP
REM devenv %XML_TOOL_PATH%\XmlTool.sln /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1
-msbuild %XML_TOOL_PATH%\XmlTool20.vmwcsproj /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%BUILD_LOG% 2<&1
+msbuild %XML_TOOL_PATH%\XmlTool20.csproj /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%BUILD_LOG% 2<&1
IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
-// cs0110.cs: The evaluation of the constant value for `E.c' involves a circular definition
+// cs0110.cs: The evaluation of the constant value for `E.a' involves a circular definition
// Line: 6
enum E
--- /dev/null
+// CS0162: Unreachable code detected
+// Line: 9
+// Compiler options: -warnaserror -warn:2
+
+class Error
+{
+ void Test ()
+ {
+ if (1 == 0) {
+ try {
+ } catch (System.Net.Sockets.SocketException sex) {
+ int x = (int)sex.SocketErrorCode;
+ }
+ }
+ }
+
+}
\ No newline at end of file
-// cs3005-13.cs: Identifier `CLSEnum.Label' differing only in case is not CLS-compliant
+// cs3005-13.cs: Identifier `CLSEnum.label' differing only in case is not CLS-compliant
// Line: 9
// Compiler options: -warnaserror
-// cs3005-15.cs: Identifier `a' differing only in case is not CLS-compliant
+// cs3005-15.cs: Identifier `A' differing only in case is not CLS-compliant
// Line: 10
// Compiler options: -warnaserror
+2007-03-10 Marek Safar <marek.safar@gmail.com>
+
+ * generic.cs (TypeArguments.Resolve): Avoid redundant checks.
+
+2007-03-09 Raja R Harinath <rharinath@novell.com>
+
+ * cs-parser.jay (WHERE): Move before QUERY_FIRST_TOKEN. 'where'
+ is a valid keyword outside a linq expression too.
+
+2007-03-03 Marek Safar <marek.safar@gmail.com>
+
+ * cs-parser.jay: Implemented basic linq grammar.
+
+ * linq.cs: New file for hosting query specific classes.
+
2007-02-26 Marek Safar <marek.safar@gmail.com>
* cs-parser.jay, expression.cs: Compile empty __arglist correctly.
%token ARGLIST
%token PARTIAL
%token ARROW
+%token QUERY_FIRST_TOKEN
+%token FROM
+%token JOIN
+%token ON
+%token EQUALS
+%token SELECT
+%token GROUP
+%token BY
+%token LET
+%token ORDERBY
+%token ASCENDING
+%token DESCENDING
+%token INTO
+%token QUERY_LAST_TOKEN
/* C# keywords which are not really keywords */
%token GET "get"
EnumMember em = null;
foreach (VariableDeclaration ev in (ArrayList) $7) {
- em = new EnumMember (e, em, (Expression) ev.expression_or_array_initializer,
- new MemberName (ev.identifier, ev.Location), ev.OptAttributes);
+ em = new EnumMember (
+ e, em, ev.identifier, (Expression) ev.expression_or_array_initializer,
+ ev.OptAttributes, ev.Location);
// if (RootContext.Documentation != null)
em.DocComment = ev.DocComment;
;
expression
+ : assignment_expression
+ | non_assignment_expression
+ ;
+
+non_assignment_expression
: conditional_expression
- | assignment_expression
| lambda_expression
+ | query_expression
;
constant_expression
| expression
;
+
+// LINQ
+
+query_expression
+ : from_clause query_body
+ {
+ lexer.QueryParsing = false;
+ $$ = new QueryExpression ();
+ }
+ ;
+
+from_clause
+ : FROM IDENTIFIER IN expression opt_join_clauses
+ | FROM type IDENTIFIER IN expression opt_join_clauses
+ ;
+
+opt_join_clauses
+ : /* empty */
+ | join_clauses
+ ;
+
+join_clauses
+ : join_clause
+ | join_clauses join_clause
+ ;
+
+join_clause
+ : JOIN join_clause_body
+ | JOIN join_clause_body INTO IDENTIFIER
+ | JOIN type join_clause_body
+ | JOIN type join_clause_body INTO IDENTIFIER
+ ;
+
+join_clause_body
+ : IDENTIFIER IN expression ON expression EQUALS expression
+ ;
+
+query_body
+ : opt_from_let_where_clauses opt_orderby_clause select_clause opt_query_continuation
+ | opt_from_let_where_clauses opt_orderby_clause group_clause opt_query_continuation
+ ;
+
+opt_from_let_where_clauses
+ : /* empty */
+ | from_let_where_clauses
+ ;
+
+from_let_where_clauses
+ : from_let_where_clause
+ | from_let_where_clauses from_let_where_clause
+ ;
+
+from_let_where_clause
+ : from_clause
+ | let_clause
+ | where_clause
+ ;
+
+let_clause
+ : LET IDENTIFIER ASSIGN expression
+ ;
+
+where_clause
+ : WHERE boolean_expression
+ ;
+
+opt_orderby_clause
+ : /* empty */
+ | orderby_clause
+ ;
+
+orderby_clause
+ : ORDERBY orderings
+ ;
+
+orderings
+ : ordering
+ | orderings COMMA ordering
+ ;
+
+ordering
+ : expression
+ | expression ASCENDING
+ | expression DESCENDING
+ ;
+
+select_clause
+ : SELECT expression
+ ;
+
+group_clause
+ : GROUP expression BY expression
+ ;
+
+opt_query_continuation
+ : /* empty */
+ | query_continuation
+ ;
+
+query_continuation
+ : INTO IDENTIFIER opt_join_clauses query_body
+ ;
+
%%
// <summary>
ok = false;
continue;
}
- if (te is TypeParameterExpr)
+
+ atypes[i] = te.Type;
+
+ if (te is TypeParameterExpr) {
has_type_args = true;
+ continue;
+ }
-#if !MS_COMPATIBLE
if (te.Type.IsSealed && te.Type.IsAbstract) {
Report.Error (718, Location, "`{0}': static classes cannot be used as generic arguments",
te.GetSignatureForError ());
return false;
}
-#endif
+
if (te.Type.IsPointer) {
Report.Error (306, Location, "The type `{0}' may not be used " +
"as a type argument", TypeManager.CSharpName (te.Type));
Expression.Error_VoidInvalidInTheContext (Location);
return false;
}
-
- atypes [i] = te.Type;
}
return ok;
}
return true;
}
+ //
+ // Infers the remaining inferred_types from lambda expressions contained in the
+ // invocation call.
+ //
+ static bool LambdaInfer (EmitContext ec, ArrayList arguments,
+ Type[] param_types, Type[] arg_types, Type[] inferred_types)
+ {
+ int arg_count = arg_types.Length;
+
+ for (int i = 0; i < arg_count; i++){
+ Argument a = (Argument) arguments [i];
+
+ LambdaExpression le = a.Expr as LambdaExpression;
+
+ if (a == null)
+ continue;
+
+ //
+ // TODO: "The argument is a lambda expression, in
+ // the following called L, from which no inferences
+ // have yet been made."
+ //
+
+ //
+ // "The corresponding parameter’s type, in the
+ // following called P, is a delegate type with a
+ // return type that involves one or more method type
+ // parameters."
+ //
+ //
+ if (!TypeManager.IsDelegateType (param_types [i]))
+ continue;
+
+ Type p_type = param_types [i];
+ MethodGroupExpr method_group = Expression.MemberLookup (
+ ec.ContainerType, p_type, "Invoke", MemberTypes.Method,
+ Expression.AllBindingFlags, Location.Null) as MethodGroupExpr;
+
+ if (method_group == null){
+ // This we report elsewhere as -200, but here we can ignore
+ continue;
+ }
+ MethodInfo delegate_method = method_group.Methods [0] as MethodInfo;
+ if (delegate_method == null){
+ // This should not happen.
+ continue;
+ }
+
+ Type return_type = delegate_method.ReturnType;
+ if (!return_type.IsGenericParameter)
+ continue;
+
+ //
+ // P and L have the same number of parameters, and
+ // each parameter in P has the same modifiers as the
+ // corresponding parameter in L, or no modifiers if
+ // L has an implicitly typed parameter list.
+ //
+ ParameterData delegate_pd = TypeManager.GetParameterData (delegate_method);
+ int delegate_pc = delegate_pd.Count;
+ if (delegate_pc != le.Parameters.Count)
+ continue;
+
+#if false
+ //FIXME
+ if (le.HasExplicitParameters){
+ for (int j = 0; j < delegate_pc; j++){
+ if (delegate_pd.ParameterModifier [j] !=
+ le.Parameters.ParameterModifier[j])
+ goto do_continue;
+ }
+ } else {
+ for (int j = 0; j < delegate_pc; j++)
+ if (le.Parameters.ParameterModifier [j] != Parameter.Modifier.NONE)
+ goto do_continue;
+ }
+#endif
+
+ //
+ // TODO: P’s parameter types involve no method type
+ // parameters or involve only method type parameters
+ // for which a consistent set of inferences have
+ // already been made.
+ //
+
+ if (le.HasExplicitParameters){
+ //
+ // TODO: If L has an explicitly typed parameter
+ // list, when inferred types are substituted for
+ // method type parameters in P, each parameter in P
+ // has the same type as the corresponding parameter
+ // in L.
+ //
+ } else {
+ //
+ // TODO: If L has an implicitly typed parameter
+ // list, when inferred types are substituted for
+ // method type parameters in P and the resulting
+ // parameter types are given to the parameters of L,
+ // the body of L is a valid expression or statement
+ // block.
+ }
+
+ do_continue:
+ ;
+ }
+
+ return true;
+ }
+
/// <summary>
/// Type inference. Try to infer the type arguments from `method',
/// which is invoked with the arguments `arguments'. This is used
/// when resolving an Invocation or a DelegateInvocation and the user
/// did not explicitly specify type arguments.
/// </summary>
- public static bool InferTypeArguments (ArrayList arguments,
+ public static bool InferTypeArguments (EmitContext ec,
+ ArrayList arguments,
ref MethodBase method)
{
if (!TypeManager.IsGenericMethod (method))
Type[] param_types = new Type [pd.Count];
Type[] arg_types = new Type [pd.Count];
+ int lambdas = 0;
for (int i = 0; i < arg_count; i++) {
param_types [i] = pd.ParameterType (i);
Argument a = (Argument) arguments [i];
+ if (a.Expr is LambdaExpression)
+ lambdas++;
+
if ((a.Expr is NullLiteral) || (a.Expr is MethodGroupExpr) ||
(a.Expr is AnonymousMethodExpression))
continue;
arg_types [i] = a.Type;
}
- if (!InferTypeArguments (param_types, arg_types, inferred_types))
- return false;
+ if (!InferTypeArguments (param_types, arg_types, inferred_types)){
+ Type it;
+ if (lambdas == 0)
+ return false;
+
+ if (!LambdaInfer (ec, arguments, param_types, arg_types, inferred_types))
+ return false;
+ }
method = ((MethodInfo)method).MakeGenericMethod (inferred_types);
return true;
<Compile Include="..\mcs\convert.cs">\r
<Link>convert.cs</Link>\r
</Compile>\r
+ <Compile Include="..\mcs\lambda.cs">\r
+ <Link>lambda.cs</Link>\r
+ </Compile>\r
<Compile Include="cs-parser.cs" />\r
<Compile Include="..\mcs\cs-tokenizer.cs">\r
<Link>cs-tokenizer.cs</Link>\r
<Compile Include="..\mcs\typemanager.cs">\r
<Link>typemanager.cs</Link>\r
</Compile>\r
+ <Compile Include="linq.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<Folder Include="Properties\" />\r
../mcs/flowanalysis.cs
generic.cs
../mcs/iterators.cs
-../mcs/lambda.cs
+../mcs/lambda.cs\r
+linq.cs
../mcs/literal.cs
../mcs/location.cs
../mcs/modifiers.cs
--- /dev/null
+//
+// linq.cs: support for query expressions
+//
+// Authors: Marek Safar (marek.safar@gmail.com)
+//
+// Licensed under the terms of the GNU GPL
+//
+// (C) 2007 Novell, Inc
+//
+
+using System;
+
+namespace Mono.CSharp
+{
+ public class QueryExpression : Expression
+ {
+ public override Expression DoResolve (EmitContext ec)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override void Emit (EmitContext ec)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+2007-03-09 Martin Baulig <martin@ximian.com>
+
+ * enum.cs (Enum): Make this a TypeContainer.
+ (EnumMember): Derive from `Const'.
+
+ * const.cs
+ (Const.DoResolveValue): New protected virtual method; move most of
+ the functionality of ResolveValue() here so we can override it in
+ `EnumMember'.
+ (Const.CreateConstantReference): Make this virtual.
+
+ * class.cs (Kind): Add `Kind.Enum'.
+ (TypeContainer.Emit): Don't emit the enums here; they're already
+ in the `RootContext.typecontainer_resolve_order'.
+
+ * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
+ here; they're already in the `typecontainer_resolve_order'.
+
+ * ecore.cs (EnumConstant.ConvertImplicitly): Add
+ TypeManager.DropGenericTypeArguments().
+
+ * typemanager.cs
+ (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
+ (TypeManager.IsEnumType): Likewise.
+ (TypeManager.EnumToUnderlying): Likewise.
+ (TypeManager.IsEqual): Add support for enums.
+
+2007-03-12 Raja R Harinath <rharinath@novell.com>
+
+ * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
+ DefaultParameterValueAttribute to be undefined, say if System.dll
+ is not referenced.
+
+2007-03-11 Marek Safar <marek.safar@gmail.com>
+
+ * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
+ any mscorlib.
+
+2007-03-10 Marek Safar <marek.safar@gmail.com>
+
+ * class.cs, parameter.cs: Unified parameters verification.
+
+2007-03-08 Martin Baulig <martin@ximian.com>
+
+ * cs-parser.jay (constructor_header): Pass the location to the
+ newly created TopLevelBlock.
+
+2007-03-07 Martin Baulig <martin@ximian.com>
+
+ * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
+
+2007-03-06 Miguel de Icaza <miguel@novell.com>
+
+ * convert.cs (ExplicitReferenceConversionExists): Sync this method
+ with the changes from David, fixes the build.
+
+2007-03-05 David Mitchell <dmitchell@logos.com>
+
+ * convert.cs: Implement From System.Collecitons.Generic.IList<T>
+ and its base interfaces to a one-dimensional array type S[],
+ provided there is an implicit or explicit reference conversion
+ from S to T.
+
+2007-03-03 Marek Safar <marek.safar@gmail.com>
+
+ * cs-tokenizer.cs: Implemented basic linq grammar.
+
+ * driver.cs: Set linq lang version on demand.
+
2007-02-26 Marek Safar <marek.safar@gmail.com>
* cs-parser.jay, expression.cs: Compile empty __arglist correctly.
Root,
Struct,
Class,
- Interface
+ Interface,
+ Enum
}
/// <summary>
bool DefineTypeBuilder ()
{
try {
+ Type default_parent = null;
+ if (Kind == Kind.Struct)
+ default_parent = TypeManager.value_type;
+ else if (Kind == Kind.Enum)
+ default_parent = TypeManager.enum_type;
+
if (IsTopLevel){
if (TypeManager.NamespaceClash (Name, Location)) {
return false;
}
ModuleBuilder builder = CodeGen.Module.Builder;
- Type default_parent = null;
- if (Kind == Kind.Struct)
- default_parent = TypeManager.value_type;
TypeBuilder = builder.DefineType (
Name, TypeAttr, default_parent, null);
} else {
TypeBuilder builder = Parent.TypeBuilder;
TypeBuilder = builder.DefineNestedType (
- Basename, TypeAttr, null, null);
+ Basename, TypeAttr, default_parent, null);
}
} catch (ArgumentException) {
Report.RuntimeMissingSupport (Location, "static classes");
}
}
- if (enums != null) {
- foreach (Enum e in enums) {
- e.Emit ();
- }
- }
-
if (pending != null)
if (pending.VerifyPendingMethods ())
return;
}
}
- protected bool DoDefineParameters ()
- {
- IResolveContext rc = GenericMethod == null ? this : (IResolveContext)ds;
-
- // Check if arguments were correct
- if (!Parameters.Resolve (rc))
- return false;
-
- return CheckParameters (Parameters);
- }
-
protected override bool CheckBase ()
{
// Check whether arguments were correct.
- if (!DoDefineParameters ())
+ if (!DefineParameters (Parameters))
return false;
if (!base.CheckBase ())
return true;
}
- protected bool CheckParameters (Parameters parameters)
+ protected bool DefineParameters (Parameters parameters)
{
- bool error = false;
+ IResolveContext rc = GenericMethod == null ? this : (IResolveContext)ds;
- foreach (Type partype in parameters.Types){
- if (partype.IsPointer){
- if (!TypeManager.VerifyUnManaged (TypeManager.GetElementType (partype), Location))
- error = true;
- }
+ if (!parameters.Resolve (rc))
+ return false;
- if (ds.AsAccessible (partype, ModFlags))
+ bool error = false;
+ foreach (Parameter p in parameters.FixedParameters) {
+ if (p.CheckAccessibility (this))
continue;
- Report.SymbolRelatedToPreviousError (partype);
+ Report.SymbolRelatedToPreviousError (p.ParameterType);
if (this is Indexer)
Report.Error (55, Location,
"Inconsistent accessibility: parameter type `" +
- TypeManager.CSharpName (partype) + "' is less " +
+ TypeManager.CSharpName (p.ParameterType) + "' is less " +
"accessible than indexer `" + GetSignatureForError () + "'");
else if (this is Operator)
Report.Error (57, Location,
"Inconsistent accessibility: parameter type `" +
- TypeManager.CSharpName (partype) + "' is less " +
+ TypeManager.CSharpName (p.ParameterType) + "' is less " +
"accessible than operator `" + GetSignatureForError () + "'");
else
Report.Error (51, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than method `{1}'",
- TypeManager.CSharpName (partype), GetSignatureForError ());
+ TypeManager.CSharpName (p.ParameterType), GetSignatureForError ());
error = true;
}
-
return !error;
}
}
// Check whether arguments were correct.
- if (!DoDefineParameters ())
+ if (!DefineParameters (Parameters))
return false;
if (!CheckForDuplications ())
if (!base.Define ())
return false;
- if (!parameters.Resolve (ds))
- return false;
-
- if (!CheckParameters (parameters))
+ if (!DefineParameters (parameters))
return false;
if (MemberType == TypeManager.void_type) {
}
public class Const : FieldBase, IConstant {
- Constant value;
+ protected Constant value;
bool in_transit;
+ bool resolved;
bool define_called;
public const int AllowedModifiers =
// return true;
while (ttype.IsArray)
- ttype = TypeManager.GetElementType (ttype);
+ ttype = TypeManager.GetElementType (ttype);
FieldAttributes field_attr = FieldAttributes.Static | Modifiers.FieldAttr (ModFlags);
// Decimals cannot be emitted into the constant blob. So, convert to 'readonly'.
public bool ResolveValue ()
{
- if (value != null)
- return true;
+ if (resolved)
+ return value != null;
SetMemberIsUsed ();
if (in_transit) {
Error_CyclicDeclaration (this);
// Suppress cyclic errors
value = New.Constantify (MemberType);
+ resolved = true;
return false;
}
in_transit = true;
// TODO: IResolveContext here
- EmitContext ec = new EmitContext (this, Parent, Location, null, MemberType, ModFlags);
- value = initializer.ResolveAsConstant (ec, this);
+ EmitContext ec = new EmitContext (
+ this, Parent, Location, null, MemberType, ModFlags);
+ ec.InEnumContext = this is EnumMember;
+ value = DoResolveValue (ec);
in_transit = false;
+ resolved = true;
+ return value != null;
+ }
+ protected virtual Constant DoResolveValue (EmitContext ec)
+ {
+ Constant value = initializer.ResolveAsConstant (ec, this);
if (value == null)
- return false;
+ return null;
- Constant c = value.ConvertImplicitly (MemberType);
+ Constant c = value.ConvertImplicitly (MemberType);
if (c == null) {
if (!MemberType.IsValueType && MemberType != TypeManager.string_type && !value.IsDefaultValue)
Error_ConstantCanBeInitializedWithNullOnly (Location, GetSignatureForError ());
else
value.Error_ValueCannotBeConverted (null, Location, MemberType, false);
- return false;
}
- value = c;
- return true;
+ return c;
}
- public Constant CreateConstantReference (Location loc)
+ public virtual Constant CreateConstantReference (Location loc)
{
if (value == null)
return null;
return false;
#endif
}
+
+ static bool IList_To_Array(Type list, Type array)
+ {
+# if GMCS_SOURCE
+ if (!list.IsGenericType || !array.IsArray || array.GetArrayRank() != 1)
+ return false;
+
+ Type gt = list.GetGenericTypeDefinition();
+ if (gt != TypeManager.generic_ilist_type &&
+ gt != TypeManager.generic_icollection_type &&
+ gt != TypeManager.generic_ienumerable_type)
+ return false;
+
+ Type arg_type = TypeManager.GetTypeArguments(list)[0];
+ Type element_type = TypeManager.GetElementType(array);
+
+ if (element_type == arg_type)
+ return true;
+
+ if (MyEmptyExpr == null)
+ MyEmptyExpr = new EmptyExpression();
+ MyEmptyExpr.SetType(element_type);
+ return ImplicitReferenceConversionExists(MyEmptyExpr, arg_type) || ExplicitReferenceConversionExists(element_type, arg_type);
+#else
+ return false;
+#endif
+ }
static Expression ImplicitTypeParameterConversion (Expression expr,
Type target_type)
return true;
+ if (source_type.IsInterface && IList_To_Array (source_type, target_type))
+ return true;
+
// From an array type S with an element type Se to an array type T with an
// element type Te provided all the following are true:
// * S and T differe only in element type, in other words, S and T
return new UnboxCast (source, target_type);
}
+ //
+ // From System.Collecitons.Generic.IList<T> and its base interfaces to a one-dimensional
+ // array type S[], provided there is an implicit or explicit reference conversion from S to T.
+ //
+ if (IList_To_Array(source_type, target_type))
+ return new EmptyCast(source, target_type);
+
return null;
}
}
open_parens opt_formal_parameter_list CLOSE_PARENS
{
+ LocatedToken lt = (LocatedToken) $1;
current_local_parameters = (Parameters) $4;
current_block = top_current_block = new ToplevelBlock (null,
- current_local_parameters, null, Location.Null);
-
- LocatedToken lt = (LocatedToken) $1;
+ current_local_parameters, null, lt.Location);
+
$$ = new Constructor (current_class, lt.Value, 0, current_local_parameters,
null, lt.Location);
EnumMember em = null;
foreach (VariableDeclaration ev in (ArrayList) $7) {
- em = new EnumMember (e, em, (Expression) ev.expression_or_array_initializer,
- new MemberName (ev.identifier, ev.Location), ev.OptAttributes);
+ em = new EnumMember (
+ e, em, ev.identifier, (Expression) ev.expression_or_array_initializer,
+ ev.OptAttributes, ev.Location);
// if (RootContext.Documentation != null)
em.DocComment = ev.DocComment;
bool handle_assembly = false;
bool handle_constraints = false;
bool handle_typeof = false;
- bool linq;
+ bool query_parsing;
Location current_location;
Location current_comment_location = Location.Null;
ArrayList escapedIdentifiers = new ArrayList ();
+ static bool linq;
+
//
// XML documentation buffer. The save point is used to divide
// comments on types and comments on members.
}
}
+ public static bool LinqEnabled {
+ set {
+ linq = value;
+ }
+ }
+
public bool TypeOfParsing {
get {
return handle_typeof;
}
}
+ public bool QueryParsing {
+ set {
+ query_parsing = value;
+ }
+ }
+
public XmlCommentState doc_state {
get { return xmlDocState; }
set {
// Class variables
//
static CharArrayHashtable[] keywords;
- static Hashtable keywordStrings = new Hashtable ();
+ static Hashtable keywordStrings;
static NumberStyles styles;
static NumberFormatInfo csharp_format_info;
position_stack.Pop ();
}
- static void AddKeyword (string kw, int token) {
+ static void AddKeyword (string kw, int token)
+ {
keywordStrings.Add (kw, kw);
if (keywords [kw.Length] == null) {
keywords [kw.Length] = new CharArrayHashtable (kw.Length);
static void InitTokens ()
{
+ keywordStrings = new Hashtable ();
keywords = new CharArrayHashtable [64];
AddKeyword ("__arglist", Token.ARGLIST);
AddKeyword ("partial", Token.PARTIAL);
#if GMCS_SOURCE
AddKeyword ("where", Token.WHERE);
+
+ if (linq) {
+ AddKeyword ("from", Token.FROM);
+ AddKeyword ("join", Token.JOIN);
+ AddKeyword ("on", Token.ON);
+ AddKeyword ("equals", Token.EQUALS);
+ AddKeyword ("select", Token.SELECT);
+ AddKeyword ("group", Token.GROUP);
+ AddKeyword ("by", Token.BY);
+ AddKeyword ("let", Token.LET);
+ AddKeyword ("orderby", Token.ORDERBY);
+ AddKeyword ("ascending", Token.ASCENDING);
+ AddKeyword ("descending", Token.DESCENDING);
+ AddKeyword ("into", Token.INTO);
+ }
#endif
}
// Class initializer
//
static Tokenizer ()
+ {
+ Reset ();
+ }
+
+ public static void Reset ()
{
InitTokens ();
csharp_format_info = NumberFormatInfo.InvariantInfo;
styles = NumberStyles.Float;
-
+
string_builder = new System.Text.StringBuilder ();
}
if (handle_assembly == false && res == Token.ASSEMBLY)
return -1;
#if GMCS_SOURCE
- if (handle_constraints == false && res == Token.WHERE)
+ if (linq) {
+ if (res == Token.FROM &&
+ (current_token == Token.ASSIGN || current_token == Token.OPEN_BRACKET ||
+ current_token == Token.RETURN || current_token == Token.IN)) {
+ query_parsing = true;
+ return res;
+ }
+
+ if (!query_parsing && res > Token.QUERY_FIRST_TOKEN && res < Token.QUERY_LAST_TOKEN)
+ return -1;
+
+ return res;
+ }
+
+ if (!handle_constraints && res == Token.WHERE)
return -1;
#endif
return res;
{
this.ref_name = file;
this.file_name = file;
- linq = RootContext.Version == LanguageVersion.LINQ;
reader = input;
putback_char = -1;
case "linq":
RootContext.Version = LanguageVersion.LINQ;
+ Tokenizer.LinqEnabled = true;
return true;
}
Report.Error (1617, "Invalid option `{0}' for /langversion. It must be either `ISO-1' or `Default'", value);
static void Reset ()
{
Driver.Reset ();
+ Tokenizer.Reset ();
Location.Reset ();
RootContext.Reset ();
Report.Reset ();
if (te == null)
return null;
- if (!silent) {
+ if (!silent) { // && !(te is TypeParameterExpr)) {
ObsoleteAttribute obsolete_attr = AttributeTester.GetObsoleteAttribute (te.Type);
if (obsolete_attr != null && !ec.IsInObsoleteScope) {
AttributeTester.Report_ObsoleteMessage (obsolete_attr, te.GetSignatureForError (), Location);
public override Constant ConvertImplicitly (Type type)
{
- if (Type == type) {
+ Type this_type = TypeManager.DropGenericTypeArguments (Type);
+ type = TypeManager.DropGenericTypeArguments (type);
+
+ if (this_type == type) {
// This is workaround of mono bug. It can be removed when the latest corlib spreads enough
if (TypeManager.IsEnumType (type.UnderlyingSystemType))
return this;
- if (type.UnderlyingSystemType != Child.Type)
+ Type child_type = TypeManager.DropGenericTypeArguments (Child.Type);
+ if (type.UnderlyingSystemType != child_type)
Child = Child.ConvertImplicitly (type.UnderlyingSystemType);
return this;
}
public MethodGroupExpr (ArrayList list, Location l)
{
- Methods = new MethodBase [list.Count];
-
try {
- list.CopyTo (Methods, 0);
+ Methods = (MethodBase[])list.ToArray (typeof (MethodBase));
} catch {
foreach (MemberInfo m in list){
if (!(m is MethodBase)){
continue;
#if GMCS_SOURCE
- if (!TypeManager.InferTypeArguments (Arguments, ref c))
+ if (!TypeManager.InferTypeArguments (ec, Arguments, ref c))
continue;
if (TypeManager.IsGenericMethodDefinition (c))
continue;
Invocation.VerifyArgumentsCompat (ec, Arguments, arg_count,
c, false, null, may_fail, loc);
- if (!may_fail && errors == Report.Errors)
+ if (!may_fail && errors == Report.Errors){
+
throw new InternalErrorException (
"VerifyArgumentsCompat and IsApplicable do not agree; " +
"likely reason: ImplicitConversion and ImplicitConversionExists have gone out of sync");
+ }
break;
}
if (pd.Count != arg_count)
continue;
- if (TypeManager.InferTypeArguments (Arguments, ref c))
+ if (TypeManager.InferTypeArguments (ec, Arguments, ref c))
continue;
Report.Error (
ArrayList list = new ArrayList ();
foreach (MethodBase mb in Methods) {
MethodInfo mi = mb as MethodInfo;
- if ((mi == null) || !mi.IsGenericMethod)
+ if ((mi == null) || !mb.IsGenericMethod)
continue;
- Type[] gen_params = mi.GetGenericArguments ();
+ Type[] gen_params = mb.GetGenericArguments ();
if (first == null) {
first = mi;
if (gen_params.Length != atypes.Length)
continue;
- list.Add (mi.MakeGenericMethod (atypes));
+ mi = mi.MakeGenericMethod (atypes);
+ list.Add (mi);
+
+#if MS_COMPATIBLE
+ // MS implementation throws NotSupportedException for GetParameters
+ // on unbaked generic method
+ Parameters p = ((Parameters)TypeManager.GetParameterData (mi)).Clone ();
+ p.InflateTypes (atypes);
+ TypeManager.RegisterMethod (mi, p);
+#endif
}
if (list.Count > 0) {
namespace Mono.CSharp {
- public class EnumMember : MemberCore, IConstant {
- static string[] attribute_targets = new string [] { "field" };
-
- public FieldBuilder builder;
-
- readonly Enum parent_enum;
- readonly Expression ValueExpr;
+ public class EnumMember : Const {
+ protected readonly Enum ParentEnum;
+ protected readonly Expression ValueExpr;
readonly EnumMember prev_member;
- EnumConstant value;
- bool in_transit;
-
- // TODO: remove or simplify
- EmitContext ec;
-
- public EnumMember (Enum parent_enum, EnumMember prev_member, Expression expr,
- MemberName name, Attributes attrs):
- base (parent_enum, name, attrs)
+ public EnumMember (Enum parent, EnumMember prev_member, string name, Expression expr,
+ Attributes attrs, Location loc)
+ : base (parent, new EnumTypeExpr (parent), name, expr, Modifiers.PUBLIC,
+ attrs, loc)
{
- this.parent_enum = parent_enum;
- this.ModFlags = parent_enum.ModFlags;
+ this.ParentEnum = parent;
this.ValueExpr = expr;
this.prev_member = prev_member;
-
- ec = new EmitContext (this, parent_enum, parent_enum, Location, null, null, ModFlags, false);
- ec.InEnumContext = true;
}
- public override void ApplyAttributeBuilder (Attribute a, CustomAttributeBuilder cb)
+ protected class EnumTypeExpr : TypeExpr
{
- if (a.Type == TypeManager.marshal_as_attr_type) {
- UnmanagedMarshal marshal = a.GetMarshal (this);
- if (marshal != null) {
- builder.SetMarshal (marshal);
- }
- return;
+ public readonly Enum Enum;
+
+ public EnumTypeExpr (Enum e)
+ {
+ this.Enum = e;
}
- if (a.Type.IsSubclassOf (TypeManager.security_attr_type)) {
- a.Error_InvalidSecurityParent ();
- return;
+ protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
+ {
+ type = Enum.CurrentType != null ? Enum.CurrentType : Enum.TypeBuilder;
+ return this;
}
- builder.SetCustomAttribute (cb);
- }
+ public override TypeExpr ResolveAsTypeTerminal (IResolveContext ec, bool silent)
+ {
+ return DoResolveAsTypeStep (ec);
+ }
- public override AttributeTargets AttributeTargets {
- get {
- return AttributeTargets.Field;
+ public override string Name {
+ get { return Enum.Name; }
+ }
+
+ public override string FullName {
+ get { return Enum.Name; }
}
}
t == TypeManager.ushort_type || t == TypeManager.uint64_type || t == TypeManager.char_type ||
t.IsEnum);
}
-
- public override bool Define ()
- {
- const FieldAttributes attr = FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.Literal;
- TypeBuilder tb = parent_enum.TypeBuilder;
- builder = tb.DefineField (Name, tb, attr);
- ec.ContainerType = tb;
-
- TypeManager.RegisterConstant (builder, this);
- return true;
- }
-
- // Because parent is TypeContainer and we have DeclSpace only
- public override void CheckObsoleteness (Location loc)
- {
- parent_enum.CheckObsoleteness (loc);
-
- ObsoleteAttribute oa = GetObsoleteAttribute ();
- if (oa == null) {
- return;
- }
- AttributeTester.Report_ObsoleteMessage (oa, GetSignatureForError (), loc);
+ public object Value {
+ get { return value.GetValue (); }
}
-
- public bool ResolveValue ()
+
+ protected override Constant DoResolveValue (EmitContext ec)
{
- if (value != null)
- return true;
-
- if (in_transit) {
- Const.Error_CyclicDeclaration (this);
- return false;
- }
-
if (ValueExpr != null) {
- in_transit = true;
Constant c = ValueExpr.ResolveAsConstant (ec, this);
- in_transit = false;
-
if (c == null)
- return false;
+ return null;
if (c is EnumConstant)
c = ((EnumConstant)c).Child;
-
- c = c.ImplicitConversionRequired (parent_enum.UnderlyingType, Location);
+
+ c = c.ImplicitConversionRequired (ParentEnum.UnderlyingType, Location);
if (c == null)
- return false;
+ return null;
if (!IsValidEnumType (c.Type)) {
- Report.Error (1008, Location, "Type byte, sbyte, short, ushort, int, uint, long or ulong expected");
- return false;
+ Enum.Error_1008 (Location);
+ return null;
}
- in_transit = false;
- value = new EnumConstant (c, parent_enum.TypeBuilder);
- return true;
+ return new EnumConstant (c, MemberType);
}
if (prev_member == null) {
- value = new EnumConstant (New.Constantify (parent_enum.UnderlyingType), parent_enum.TypeBuilder);
- return true;
+ return new EnumConstant (
+ New.Constantify (ParentEnum.UnderlyingType), MemberType);
}
if (!prev_member.ResolveValue ()) {
- // Suppress cyclic error
- prev_member.value = new EnumConstant (New.Constantify (parent_enum.UnderlyingType), parent_enum.TypeBuilder);
- return false;
+ prev_member.value = new EnumConstant (
+ New.Constantify (ParentEnum.UnderlyingType), MemberType);
+ return null;
}
- in_transit = true;
-
try {
- value = (EnumConstant)prev_member.value.Increment ();
- }
- catch (OverflowException) {
- Report.Error (543, Location, "The enumerator value `{0}' is too large to fit in its type `{1}'",
- GetSignatureForError (), TypeManager.CSharpName (parent_enum.UnderlyingType));
- return false;
- }
- in_transit = false;
-
- return true;
- }
-
- public override void Emit ()
- {
- if (OptAttributes != null)
- OptAttributes.Emit ();
-
- if (!ResolveValue ()) {
- // Suppress cyclic errors
- value = new EnumConstant(New.Constantify(parent_enum.UnderlyingType), parent_enum.TypeBuilder);
- return;
- }
-
- builder.SetConstant (value.GetValue ());
- base.Emit ();
- }
-
- public override string GetSignatureForError()
- {
- return String.Concat (parent_enum.GetSignatureForError (), '.', Name);
- }
-
- public override string[] ValidAttributeTargets {
- get {
- return attribute_targets;
- }
- }
-
- public override string DocCommentHeader {
- get { return "F:"; }
- }
-
- public object Value { get { return value.GetValue (); } }
-
- #region IConstant Members
-
- public Constant CreateConstantReference (Location loc)
- {
- if (value == null)
+ return (EnumConstant) prev_member.value.Increment ();
+ } catch (OverflowException) {
+ Report.Error (543, Location, "The enumerator value `{0}' is too " +
+ "large to fit in its type `{1}'", GetSignatureForError (),
+ TypeManager.CSharpName (ParentEnum.UnderlyingType));
return null;
-
- return new EnumConstant (Constant.CreateConstant (value.Child.Type, value.Child.GetValue(), loc),
- value.Type);
+ }
}
-
- #endregion
}
/// <summary>
/// Enumeration container
/// </summary>
- public class Enum : DeclSpace {
- Expression BaseType;
+ public class Enum : TypeContainer
+ {
+ Expression base_type;
+
public Type UnderlyingType;
- static MemberList no_list = new MemberList (new object[0]);
-
public const int AllowedModifiers =
Modifiers.NEW |
Modifiers.PUBLIC |
public Enum (NamespaceEntry ns, DeclSpace parent, Expression type,
int mod_flags, MemberName name, Attributes attrs)
- : base (ns, parent, name, attrs)
+ : base (ns, parent, name, attrs, Kind.Enum)
{
- this.BaseType = type;
- ModFlags = Modifiers.Check (AllowedModifiers, mod_flags,
- IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE, name.Location);
+ this.base_type = type;
+ int accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;
+ ModFlags = Modifiers.Check (AllowedModifiers, mod_flags, accmods, Location);
}
public void AddEnumMember (EnumMember em)
{
if (em.Name == "value__") {
- Report.Error (76, em.Location, "An item in an enumeration cannot have an identifier `value__'");
+ Report.Error (76, em.Location, "An item in an enumeration cannot " +
+ "have an identifier `value__'");
return;
}
- if (!AddToContainer (em, em.Name))
- return;
+ AddConstant (em);
+ }
+
+ public static void Error_1008 (Location loc)
+ {
+ Report.Error (1008, loc, "Type byte, sbyte, short, ushort, " +
+ "int, uint, long or ulong expected");
}
-
- public override TypeBuilder DefineType ()
+
+ protected override bool DefineNestedTypes ()
{
- if (TypeBuilder != null)
- return TypeBuilder;
+ if (!base.DefineNestedTypes ())
+ return false;
- if (!(BaseType is TypeLookupExpression)) {
- Report.Error (1008, Location,
- "Type byte, sbyte, short, ushort, int, uint, long or ulong expected");
- return null;
+ if (!(base_type is TypeLookupExpression)) {
+ Error_1008 (Location);
+ return false;
}
- TypeExpr ute = BaseType.ResolveAsTypeTerminal (this, false);
+ TypeExpr ute = base_type.ResolveAsTypeTerminal (this, false);
UnderlyingType = ute.Type;
if (UnderlyingType != TypeManager.int32_type &&
UnderlyingType != TypeManager.ushort_type &&
UnderlyingType != TypeManager.byte_type &&
UnderlyingType != TypeManager.sbyte_type) {
- Report.Error (1008, Location,
- "Type byte, sbyte, short, ushort, int, uint, long or ulong expected");
- return null;
- }
-
- if (IsTopLevel) {
- if (TypeManager.NamespaceClash (Name, Location))
- return null;
-
- ModuleBuilder builder = CodeGen.Module.Builder;
-
- TypeBuilder = builder.DefineType (Name, TypeAttr, TypeManager.enum_type);
- } else {
- TypeBuilder builder = Parent.TypeBuilder;
-
- TypeBuilder = builder.DefineNestedType (
- Basename, TypeAttr, TypeManager.enum_type);
+ Error_1008 (Location);
+ return false;
}
//
FieldAttributes.Public | FieldAttributes.SpecialName
| FieldAttributes.RTSpecialName);
- TypeManager.AddUserType (this);
-
- foreach (EnumMember em in defined_names.Values) {
- if (!em.Define ())
- return null;
- }
-
- return TypeBuilder;
- }
-
- public override bool Define ()
- {
return true;
}
- public override void Emit ()
- {
- if (OptAttributes != null) {
- OptAttributes.Emit ();
- }
-
- foreach (EnumMember em in defined_names.Values) {
- em.Emit ();
- }
-
- base.Emit ();
- }
-
- //
- // IMemberFinder
- //
- public override MemberList FindMembers (MemberTypes mt, BindingFlags bf,
- MemberFilter filter, object criteria)
- {
- if ((mt & MemberTypes.Field) == 0)
- return no_list;
-
- EnumMember em = defined_names [criteria] as EnumMember;
- if (em == null)
- return no_list;
-
- FieldBuilder[] fb = new FieldBuilder[] { em.builder };
- return new MemberList (fb);
- }
-
//
// Used for error reporting only
//
throw new ArgumentOutOfRangeException (value.ToString ());
}
-
- void VerifyClsName ()
- {
- HybridDictionary dict = new HybridDictionary (defined_names.Count, true);
- foreach (EnumMember em in defined_names.Values) {
- if (!em.IsClsComplianceRequired ())
- continue;
-
- try {
- dict.Add (em.Name, em);
- }
- catch (ArgumentException) {
- Report.SymbolRelatedToPreviousError (em);
- MemberCore col = (MemberCore)dict [em.Name];
-#if GMCS_SOURCE
- Report.Warning (3005, 1, col.Location, "Identifier `{0}' differing only in case is not CLS-compliant", col.GetSignatureForError ());
-#else
- Report.Error (3005, col.Location, "Identifier `{0}' differing only in case is not CLS-compliant", col.GetSignatureForError ());
-#endif
- }
- }
- }
-
protected override bool VerifyClsCompliance ()
{
if (!base.VerifyClsCompliance ())
return false;
- VerifyClsName ();
-
if (UnderlyingType == TypeManager.uint32_type ||
UnderlyingType == TypeManager.uint64_type ||
UnderlyingType == TypeManager.ushort_type) {
}
return true;
- }
-
-
- public override MemberCache MemberCache {
- get {
- return null;
- }
- }
+ }
public override AttributeTargets AttributeTargets {
get {
protected override TypeAttributes TypeAttr {
get {
return Modifiers.TypeAttr (ModFlags, IsTopLevel) |
- TypeAttributes.Class | TypeAttributes.Sealed |
- base.TypeAttr;
- }
- }
-
- //
- // Generates xml doc comments (if any), and if required,
- // handle warning report.
- //
- internal override void GenerateDocComment (DeclSpace ds)
- {
- base.GenerateDocComment (ds);
-
- foreach (EnumMember em in defined_names.Values) {
- em.GenerateDocComment (this);
+ TypeAttributes.Class | TypeAttributes.Sealed | base.TypeAttr;
}
}
-
- //
- // Represents header string for documentation comment.
- //
- public override string DocCommentHeader {
- get { return "T:"; }
- }
}
}
{
#if GMCS_SOURCE
if (!me.HasTypeArguments &&
- !TypeManager.InferTypeArguments (arguments, ref candidate))
+ !TypeManager.InferTypeArguments (ec, arguments, ref candidate))
return false;
if (TypeManager.IsGenericMethodDefinition (candidate))
Parameters = new Parameters (new Parameter [0]);
}
+ public bool HasImplicitParameters {
+ get {
+ return !explicit_parameters;
+ }
+ }
+
+ public bool HasExplicitParameters {
+ get {
+ return explicit_parameters;
+ }
+ }
+
public override Expression DoResolve (EmitContext ec)
{
eclass = ExprClass.Value;
{
}
+ public override bool CheckAccessibility (InterfaceMemberBase member)
+ {
+ return true;
+ }
+
public override bool Resolve (IResolveContext ec)
{
return true;
}
#if GMCS_SOURCE
+ public bool IsTypeParameter;
GenericConstraints constraints;
+#else
+ public bool IsTypeParameter {
+ get {
+ return false;
+ }
+ set {
+ if (value)
+ throw new Exception ("You can not se TypeParameter in MCS");
+ }
+ }
#endif
public Parameter (Expression type, string name, Modifier mod, Attributes attrs, Location loc)
Report.Warning (3022, 1, a.Location, "CLSCompliant attribute has no meaning when applied to parameters. Try putting it on the method instead");
}
- // TypeManager.default_parameter_value_attribute_type is null if !NET_2_0
+ // TypeManager.default_parameter_value_attribute_type is null if !NET_2_0, or if System.dll is not referenced
if (a.Type == TypeManager.default_parameter_value_attribute_type) {
object val = a.GetParameterDefaultValue ();
if (val != null) {
base.ApplyAttributeBuilder (a, cb);
}
+ public virtual bool CheckAccessibility (InterfaceMemberBase member)
+ {
+ if (IsTypeParameter)
+ return true;
+
+ return member.ds.AsAccessible (parameter_type, member.ModFlags);
+ }
+
public override IResolveContext ResolveContext {
get {
return resolve_context;
#if GMCS_SOURCE
TypeParameterExpr tparam = texpr as TypeParameterExpr;
if (tparam != null) {
+ IsTypeParameter = true;
constraints = tparam.TypeParameter.Constraints;
return true;
}
get {
return parameter_type;
}
+ set {
+ parameter_type = value;
+ IsTypeParameter = false;
+ }
}
#if GMCS_SOURCE
{
Parameter p = new Parameter (TypeName, Name, ModFlags, attributes, Location);
p.parameter_type = parameter_type;
+ p.IsTypeParameter = IsTypeParameter;
return p;
}
static readonly Parameter ArgList = new ArglistParameter ();
#if GMCS_SOURCE
- public readonly TypeParameter[] TypeParameters;
+// public readonly TypeParameter[] TypeParameters;
#endif
private Parameters ()
}
}
+ [System.Diagnostics.Conditional ("MS_COMPATIBLE")]
+ public void InflateTypes (Type[] genTypes)
+ {
+ int pos = 0;
+ for (int i = 0; i < count; ++i) {
+ if (!FixedParameters[i].IsTypeParameter)
+ continue;
+
+ types[i] = genTypes[pos];
+ FixedParameters[i].ParameterType = genTypes[pos];
+ ++pos;
+ }
+ }
+
public void VerifyClsCompliance ()
{
foreach (Parameter p in FixedParameters)
int i = 0;
foreach (Parameter p in FixedParameters)
parameters_copy [i++] = p.Clone ();
- return new Parameters (parameters_copy, HasArglist);
+ Parameters ps = new Parameters (parameters_copy, HasArglist);
+ if (types != null)
+ ps.types = (Type[])types.Clone ();
+ return ps;
}
#endregion
static public void EmitCode ()
{
- if (root.Enums != null) {
- foreach (Enum e in root.Enums)
- e.Emit ();
- }
-
if (type_container_resolve_order != null) {
foreach (TypeContainer tc in type_container_resolve_order)
tc.EmitType ();
Report.Debug (4, "RESOLVE BLOCK DONE", StartLocation,
ec.CurrentBranching, statement_count, num_statements);
+ if (!ok)
+ return false;
+
while (ec.CurrentBranching is FlowBranchingLabeled)
ec.EndFlowBranching ();
//
Expression SwitchGoverningType (EmitContext ec, Expression expr)
{
- Type t = expr.Type;
+ Type t = TypeManager.DropGenericTypeArguments (expr.Type);
if (t == TypeManager.byte_type ||
t == TypeManager.sbyte_type ||
// Used for error reporting to show symbolic name instead of underlying value
public static string CSharpEnumValue (Type t, object value)
{
+ t = DropGenericTypeArguments (t);
Enum e = LookupDeclSpace (t) as Enum;
if (e == null)
return System.Enum.GetName (t, value);
in_attribute_type = CoreLookupType ("System.Runtime.InteropServices", "InAttribute");
out_attribute_type = CoreLookupType ("System.Runtime.InteropServices", "OutAttribute");
#if NET_2_0
- default_parameter_value_attribute_type = CoreLookupType ("System.Runtime.InteropServices", "DefaultParameterValueAttribute");
+ // this can fail if the user doesn't have an -r:System.dll
+ default_parameter_value_attribute_type = CoreLookupType ("System.Runtime.InteropServices", "DefaultParameterValueAttribute", true);
#endif
typed_reference_type = CoreLookupType ("System", "TypedReference");
arg_iterator_type = CoreLookupType ("System", "ArgIterator");
public static bool IsEnumType (Type t)
{
+ t = DropGenericTypeArguments (t);
if (builder_to_declspace [t] is Enum)
return true;
if (mb is MethodBuilder || mb is ConstructorBuilder)
throw new InternalErrorException ("Argument for Method not registered" + mb);
+#if MS_COMPATIBLE
+ if (mb.IsGenericMethod && !mb.IsGenericMethodDefinition)
+ return GetParameterData (((MethodInfo)mb).GetGenericMethodDefinition ());
+#endif
pd = new ReflectionParameters (mb);
method_params.Add (mb, pd);
}
//
public static Type EnumToUnderlying (Type t)
{
+ t = DropGenericTypeArguments (t);
if (t == TypeManager.enum_type)
return t;
return IsEqual (a.GetElementType (), b.GetElementType ());
if (a.IsGenericType && b.IsGenericType) {
- if (a.GetGenericTypeDefinition () != b.GetGenericTypeDefinition ())
+ Type adef = a.GetGenericTypeDefinition ();
+ Type bdef = b.GetGenericTypeDefinition ();
+
+ if (adef != bdef)
return false;
+ if (adef.IsEnum && bdef.IsEnum)
+ return true;
+
Type[] aargs = a.GetGenericArguments ();
Type[] bargs = b.GetGenericArguments ();
--- /dev/null
+using System.Collections.Generic;
+
+class CantCastGenericListToArray
+{
+ public static void Main(string[] args)
+ {
+ IList<string> list = new string[] { "foo", "bar" };
+ string[] array = (string[])list;
+ if (list.Count != array.Length)
+ {
+ throw new System.ApplicationException();
+ }
+ }
+}
--- /dev/null
+using System;
+
+class Foo<T>
+{
+ public enum TestEnum { One, Two, Three }
+
+ public TestEnum Test;
+
+ public Foo (TestEnum test)
+ {
+ this.Test = test;
+ }
+}
+
+class X
+{
+ static void Main ()
+ {
+ Foo<int>.TestEnum e = Foo<int>.TestEnum.One;
+ Console.WriteLine (e);
+
+ Foo<int> foo = new Foo<int> (e);
+ foo.Test = e;
+ }
+}
--- /dev/null
+// Compiler options: -langversion:linq
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace from
+{
+ interface ITest
+ {
+ int Id { get; }
+ }
+
+ class C
+ {
+ // This is pure grammar test
+ public static void Main ()
+ {
+ int[] i2 = new int [] { 0, 1 };
+ int[] i_b = new int [] { 0, 1 };
+ ITest[] join_test = null;
+
+ IEnumerable<int> e;
+ IEnumerable<IGrouping<int,int>> g;
+
+ // FROM
+ e = from i in i2 select i;
+ e = from int i in i2 select i;
+ e = from i in new int[0] select i;
+ e = from x in i2 from y in i2 select y;
+
+ // WHERE
+ e = from i in i2 where i % 3 != 0 select i;
+
+ // ORDER BY
+ e = from i in i2 orderby i select i;
+ e = from i in i2 orderby i, i, i, i select i;
+ e = from i in i2 orderby i descending select i;
+ e = from i in i2 orderby i ascending select i;
+
+ // JOIN
+ e = from i in i2 join j in join_test on i equals j.Id select i;
+ e = from i in i2 join ITest j in join_test on i equals j.Id select i;
+ e = from i in i2 join j in join_test on i equals j.Id
+ join j2 in join_test on i equals j2.Id select i;
+ e = from i in i2 join j in i_b on i equals j into j select i;
+ e = from i in i2 join int j in i_b on i equals j into j select i;
+
+ // GROUP BY
+ g = from i in i2 group i by 2;
+ g = from i in i2 group i by 2 into i select i;
+
+ // LET
+ e = from i in i2 let l = i + 4 select i;
+ e = from i in i2 let l = i + 4 let l2 = l + 2 select i;
+
+ int from = 0;
+ bool let = false;
+
+ //object o = (object)from i in i2 select i;
+ }
+ }
+}
\ No newline at end of file
test-562.cs
gtest-230.cs
-gtest-291.cs IGNORE
+
+gtest-linq-01.cs
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile: Added the installvst utility.
+
+2007-01-28 Wade Berrier <wberrier@novell.com>
+
+ * Makefile: Added security to net_2_0_SUBDIRS (so httpcfg.exe
+ gets installed)
+
2007-01-12 Gert Driesen <drieseng@users.sourceforge.net>
* Makefile: Added al to net_2_0_SUBDIRS.
al cilc corcompare ictool mono-xsd security wsdl genxs sqlsharp \
disco soapsuds browsercaps-updater monop gacutil \
resgen macpack mkbundle dtd2rng dtd2xsd mjs prj2make mono-service \
- mono-shlib-cop compiler-tester mono-xmltool
+ mono-shlib-cop compiler-tester mono-xmltool installvst
net_1_1_bootstrap_SUBDIRS = gacutil security resgen
net_2_0_bootstrap_SUBDIRS = resgen
-net_2_0_SUBDIRS = al corcompare wsdl compiler-tester monop xbuild resgen mono-service mkbundle sgen
+net_2_0_SUBDIRS = al corcompare wsdl compiler-tester monop xbuild resgen mono-service mkbundle sgen security
DIST_ONLY_SUBDIRS = xbuild sgen
+2007-03-13 Alp Toker <alp@atoker.com>
+
+ * cilc.exe.sources:
+ * cilc.cs:
+ * CodeWriter.cs: Split out CodeWriter class.
+
+2007-03-13 Alp Toker <alp@atoker.com>
+
+ * cilc.cs: Use String.Empty.
+
2006-08-23 Alp Toker <alp@atoker.com>
* cilc.cs: Relicense from GPL to MIT License
--- /dev/null
+// cilc -- a CIL-to-C binding generator
+// Copyright (C) 2003, 2004, 2005, 2006, 2007 Alp Toker <alp@atoker.com>
+// Licensed under the terms of the MIT License
+
+using System;
+using System.IO;
+
+class CodeWriter
+{
+ private StreamWriter w;
+
+ public CodeWriter (string fname)
+ {
+ Init (fname);
+ }
+
+ public bool IsDuplicate = false;
+
+ void Init (string fname)
+ {
+ if (File.Exists (fname)) {
+ string newfname = fname + ".x";
+ //Console.WriteLine ("Warning: File " + fname + " already exists, using " + newfname);
+ IsDuplicate = true;
+ Init (newfname);
+ return;
+ }
+
+ FileStream fs = new FileStream (fname, FileMode.OpenOrCreate, FileAccess.Write);
+ w = new StreamWriter (fs);
+ }
+
+ public string Indenter = " ";
+ string cur_indent = String.Empty;
+ int level = 0;
+
+ public void Indent ()
+ {
+ level++;
+ cur_indent = String.Empty;
+ for (int i = 0; i != level ; i++) cur_indent += Indenter;
+ }
+
+ public void Outdent ()
+ {
+ level--;
+ cur_indent = String.Empty;
+ for (int i = 0; i != level ; i++) cur_indent += Indenter;
+ }
+
+ public void Write (string text)
+ {
+ w.Write (text);
+ }
+
+ public void WriteLine (string text)
+ {
+ WriteLine (text, true);
+ }
+
+ public void WriteLine (string text, bool autoindent)
+ {
+ char[] opentags = {'{', '('};
+ char[] closetags = {'}', ')'};
+
+ if (autoindent && text.TrimStart (closetags) != text)
+ Outdent ();
+
+ w.Write (cur_indent);
+ w.WriteLine (text);
+
+ if (autoindent && text.TrimEnd (opentags) != text)
+ Indent ();
+ }
+
+ public void WriteLine (string text, CodeWriter cc)
+ {
+ WriteLine (text, String.Empty, cc, String.Empty);
+ }
+
+ public void WriteLine (string text, CodeWriter cc, string suffix)
+ {
+ WriteLine (text, String.Empty, cc, suffix);
+ }
+
+ public void WriteLine (string text, string prefix, CodeWriter cc)
+ {
+ WriteLine (text, prefix, cc, String.Empty);
+ }
+
+ public void WriteLine (string text, string prefix, CodeWriter cc, string suffix)
+ {
+ WriteLine (text);
+ cc.WriteLine (prefix + text + suffix);
+ }
+
+ public void WriteComment (string text)
+ {
+ w.WriteLine ("/* " + text + " */");
+ }
+
+ public void WriteLine ()
+ {
+ w.WriteLine (String.Empty);
+ }
+
+ public void Close ()
+ {
+ w.Flush ();
+ w.Close ();
+ }
+}
// cilc -- a CIL-to-C binding generator
-// Copyright (C) 2003, 2004, 2005, 2006 Alp Toker <alp@atoker.com>
+// Copyright (C) 2003, 2004, 2005, 2006, 2007 Alp Toker <alp@atoker.com>
// Licensed under the terms of the MIT License
using System;
static bool verbose = false;
- static string extpkgs = "";
+ static string extpkgs = String.Empty;
static string[] extsubpkgs = {};
static string[] extincludes = {};
//string cmd = "gcc";
//string args = "-E " + cflags + " " + includedir + "/" + hname;
- string cppincludes = "";
+ string cppincludes = String.Empty;
foreach (string include in extincludes)
cppincludes += " -include " + include;
makefile_defs.WriteLine ("SONAME = " + soname);
makefile_defs.WriteLine (@"OBJS = $(shell ls *.c | sed -e 's/\.c/.o/')");
- if (extpkgs != "") {
+ if (extpkgs != String.Empty) {
makefile_defs.WriteLine ("EXTRAINCLUDES = $(shell pkg-config --cflags" + extpkgs + ")");
makefile_defs.WriteLine ("EXTRALIBS = $(shell pkg-config --libs" + extpkgs + ")");
}
if (t.IsEnum)
RegisterByVal (t);
- string tns = t.Namespace == null ? "" : t.Namespace;
+ string tns = t.Namespace == null ? String.Empty : t.Namespace;
if (!ns_types.Contains (tns))
ns_types[tns] = new ArrayList ();
case "get_type":
return "retrieve_type";
default:
- return name;
+ return name;
}
}
static void FunctionGen (ParameterInfo[] parameters, MethodBase m, Type t, Type ret_type, bool ctor)
{
- string myargs = "";
+ string myargs = String.Empty;
bool has_return = !ctor && ret_type != null && ret_type != typeof (void);
bool stat = m.IsStatic;
funcs_done.Add (myname);
//handle the parameters
- string mycsargs = "";
+ string mycsargs = String.Empty;
for (int i = 0 ; i < parameters.Length ; i++) {
ParameterInfo p = parameters[i];
}
}
- if (myargs == "")
+ if (myargs == String.Empty)
myargs = "void";
C.WriteLine ();
static string NsToC (string s)
{
if (s == null)
- return "";
+ return String.Empty;
s = s.Replace ('.', '_');
return CamelToC (s);
static string NsToFlat (string s)
{
if (s == null)
- return "";
+ return String.Empty;
- s = s.Replace (".", "");
+ s = s.Replace (".", String.Empty);
return s;
}
{
//converts camel case to c-style
- string o = "";
+ string o = String.Empty;
bool prev_is_cap = true;
return o;
}
}
-
-class CodeWriter
-{
- private StreamWriter w;
-
- public CodeWriter (string fname)
- {
- Init (fname);
- }
-
- public bool IsDuplicate = false;
-
- void Init (string fname)
- {
- if (File.Exists (fname)) {
- string newfname = fname + ".x";
- //Console.WriteLine ("Warning: File " + fname + " already exists, using " + newfname);
- IsDuplicate = true;
- Init (newfname);
- return;
- }
-
- FileStream fs = new FileStream (fname, FileMode.OpenOrCreate, FileAccess.Write);
- w = new StreamWriter (fs);
- }
-
- public string Indenter = " ";
- string cur_indent = "";
- int level = 0;
-
- public void Indent ()
- {
- level++;
- cur_indent = "";
- for (int i = 0; i != level ; i++) cur_indent += Indenter;
- }
-
- public void Outdent ()
- {
- level--;
- cur_indent = "";
- for (int i = 0; i != level ; i++) cur_indent += Indenter;
- }
-
- public void Write (string text)
- {
- w.Write (text);
- }
-
- public void WriteLine (string text)
- {
- WriteLine (text, true);
- }
-
- public void WriteLine (string text, bool autoindent)
- {
- char[] opentags = {'{', '('};
- char[] closetags = {'}', ')'};
-
- if (autoindent && text.TrimStart (closetags) != text)
- Outdent ();
-
- w.Write (cur_indent);
- w.WriteLine (text);
-
- if (autoindent && text.TrimEnd (opentags) != text)
- Indent ();
- }
-
- public void WriteLine (string text, CodeWriter cc)
- {
- WriteLine (text, "", cc, "");
- }
-
- public void WriteLine (string text, CodeWriter cc, string suffix)
- {
- WriteLine (text, "", cc, suffix);
- }
-
- public void WriteLine (string text, string prefix, CodeWriter cc)
- {
- WriteLine (text, prefix, cc, "");
- }
-
- public void WriteLine (string text, string prefix, CodeWriter cc, string suffix)
- {
- WriteLine (text);
- cc.WriteLine (prefix + text + suffix);
- }
-
- public void WriteComment (string text)
- {
- w.WriteLine ("/* " + text + " */");
- }
-
- public void WriteLine ()
- {
- w.WriteLine ("");
- }
-
- public void Close ()
- {
- w.Flush ();
- w.Close ();
- }
-}
--- /dev/null
+2007-03-09 Marek Habersack <mhabersack@novell.com>
+
+ * installvst.cs, Makefile, installvst.exe.sources: initial
+ implementation of the utility to install VisualStudio source
+ packages (e.g. starter kits) that use the .vstemplate files to
+ define installation layout.
+
+
--- /dev/null
+thisdir = tools/installvst
+SUBDIRS =
+include ../../build/rules.make
+
+LOCAL_MCS_FLAGS = -r:System.Xml.dll
+PROGRAM = installvst.exe
+
+include ../../build/executable.make
--- /dev/null
+This is a _very_ quick hack to install those starter kits from http://asp.net/
+which come with *.vstemplate files in the package.
+
+Usage:
+
+ installvst <full path to vstemplate> <full path to target directory>
+
+A subdirectory with the name specified in the vstemplate file will be created
+in the directory indicated above.
--- /dev/null
+//
+// Authors:
+// Marek Habersack (mhabersack@novell.com)
+//
+// (C) 2007 Novell, Inc
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections;
+using System.IO;
+using System.Xml;
+
+public class App
+{
+ string templateFile;
+ string targetDir;
+ string targetPath;
+ string sourceDir;
+
+ XmlNamespaceManager nsmgr;
+
+ Stack folders;
+
+ public App (string templateFile, string targetDir)
+ {
+ this.templateFile = templateFile;
+ this.targetDir = targetDir;
+
+ this.sourceDir = Path.GetDirectoryName (templateFile);
+ if (this.sourceDir == null || this.sourceDir.Length == 0)
+ this.sourceDir = Directory.GetCurrentDirectory ();
+ }
+
+ public void Run ()
+ {
+ if (templateFile == null || templateFile.Length == 0 ||
+ targetDir == null || targetDir.Length == 0)
+ throw new ApplicationException ("Missing or invalid installation data");
+
+ XmlDocument doc = new XmlDocument ();
+ doc.Load (templateFile);
+ nsmgr = new XmlNamespaceManager (doc.NameTable);
+ nsmgr.AddNamespace ("def", "http://schemas.microsoft.com/developer/vstemplate/2005");
+
+ ReadTemplateData (doc);
+ InstallProject (doc);
+ }
+
+ void ReadTemplateData (XmlDocument doc)
+ {
+ XmlNode defaultName = doc.SelectSingleNode ("//def:VSTemplate[@Type='Project']/def:TemplateData/def:DefaultName", nsmgr);
+ if (defaultName == null)
+ throw new ApplicationException ("Input file is not a VisualStudio Template");
+ string folderName = defaultName.InnerText;
+ targetPath = Path.Combine (targetDir, folderName);
+
+ if (!Directory.Exists (targetPath))
+ Directory.CreateDirectory (targetPath);
+
+ folders = new Stack ();
+ }
+
+ string SafeGetAttribute (XmlNode node, string name)
+ {
+ XmlAttribute attr = node.Attributes [name];
+ if (attr != null)
+ return attr.Value;
+ return String.Empty;
+ }
+
+ string GetCurPath ()
+ {
+ string curPath = folders.Count > 0 ? (string) folders.Peek () : null;
+ if (curPath == null || curPath.Length == 0)
+ return targetPath;
+ return curPath;
+ }
+
+ void ProcessFolder (XmlNode node)
+ {
+ string curPath = GetCurPath ();
+ string folderPath = Path.Combine (curPath, SafeGetAttribute (node, "Name"));
+ if (!Directory.Exists (folderPath))
+ Directory.CreateDirectory (folderPath);
+ folders.Push (folderPath);
+ foreach (XmlNode child in node.ChildNodes)
+ ProcessNode (child);
+ folders.Pop ();
+ }
+
+ void ProcessItem (XmlNode node)
+ {
+ string curPath = GetCurPath ();
+ string srcName = node.InnerText;
+ string targetName = SafeGetAttribute (node, "TargetFileName");
+ string src = Path.Combine (sourceDir, srcName);
+ string dst = Path.Combine (curPath, targetName.Length > 0 ? targetName : srcName);
+
+ if (!File.Exists (src)) {
+ Console.WriteLine ("Warning: source file {0} does not exist.", src);
+ return;
+ }
+ File.Copy (src, dst, true);
+ }
+
+ void ProcessNode (XmlNode node)
+ {
+ if (node.NodeType != XmlNodeType.Element)
+ return;
+
+ switch (node.Name) {
+ case "Folder":
+ ProcessFolder (node);
+ break;
+
+ case "ProjectItem":
+ ProcessItem (node);
+ break;
+ }
+ }
+
+ void InstallProject (XmlDocument doc)
+ {
+ XmlNode project = doc.SelectSingleNode ("//def:VSTemplate[@Type='Project']/def:TemplateContent/def:Project", nsmgr);
+ if (project == null)
+ throw new ApplicationException ("Missing project contents in the template file");
+
+ foreach (XmlNode child in project.ChildNodes)
+ ProcessNode (child);
+ }
+}
+
+public class AppMain
+{
+ public static void Main (string[] args)
+ {
+ if (args.Length < 2)
+ Usage ();
+
+ App app = new App (args [0], args [1]);
+
+ try {
+ app.Run ();
+ } catch (Exception ex) {
+ Console.WriteLine ("Failed to install template {0} in {1}\n{2}\n", args [0], args [1], ex.Message);
+ Console.WriteLine ("Exception: {0}", ex);
+ Environment.Exit (1);
+ }
+ }
+
+ static void Usage ()
+ {
+ Console.WriteLine ("Usage: installvst <VSTemplateFile> <DestinationPath>\n");
+ Environment.Exit (1);
+ }
+}
--- /dev/null
+installvst.cs
+2007-02-28 Wade Berrier <wberrier@novell.com>
+
+ * Makefile: Consolidate more lists and make some
+ 2.0 friendly vars (ultimately to include httpcfg.cs in
+ make dist)
+
+2007-02-28 Wade Berrier <wberrier@novell.com>
+
+ * Makefile: install httpcfg.exe in the 2.0 profile
+ and keep old list of programs for 1.0 profile
+
2007-02-27 Sebastien Pouliot <sebastien@ximian.com>
* signcode.cs: Handle passowrd-protected PVK files correctly. Fix
DIST_ONLY_SUBDIRS = certview
include ../../build/rules.make
-ifeq (net_2_0, $(PROFILE))
-HTTPCFG = httpcfg.exe
-else
-HTTPCFG =
-endif
-
LOCAL_MCS_FLAGS = /lib:$(topdir)/class/lib/$(PROFILE) -r:Mono.Security.dll
SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe makecert.exe chktrust.exe \
- signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe $(HTTPCFG)
+ signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe
+SECURITY_PROGRAMS_2_0 = httpcfg.exe
+
+HELPER_SOURCES = AssemblyInfo.cs $(topdir)/build/common/Consts.cs
+SN_SOURCES = sn.cs StrongNameManager.cs $(HELPER_SOURCES)
-SECURITY_SOURCES = AssemblyInfo.cs $(topdir)/build/common/Consts.cs StrongNameManager.cs $(SECURITY_PROGRAMS:.exe=.cs)
+SECURITY_SOURCES = $(HELPER_SOURCES) $(SN_SOURCES) $(SECURITY_PROGRAMS:.exe=.cs) $(SECURITY_PROGRAMS_2_0:.exe=.cs)
+
+ifeq (default, $(PROFILE))
+SECURITY_TARGETS = $(SECURITY_PROGRAMS)
+else
+SECURITY_TARGETS = $(SECURITY_PROGRAMS_2_0)
+endif
PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
ifeq (net_1_1_bootstrap, $(PROFILE))
all-local: $(topdir)/class/lib/$(PROFILE)/sn.exe
else
-all-local: $(SECURITY_PROGRAMS)
+all-local: $(SECURITY_TARGETS)
endif
install-local: all-local
uninstall-local:
ifndef NO_INSTALL
-install-local: $(SECURITY_PROGRAMS)
+install-local: $(SECURITY_TARGETS)
$(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
- for p in $(SECURITY_PROGRAMS) ; do \
+ for p in $(SECURITY_TARGETS) ; do \
$(INSTALL_BIN) $$p $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
test ! -f $$p.mdb || $(INSTALL_BIN) $$p.mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
done
uninstall-local:
- for p in $(SECURITY_PROGRAMS) ; do \
+ for p in $(SECURITY_TARGETS) ; do \
rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$$p* ; \
done
endif
dist-local: dist-default
-sn_sources = sn.cs StrongNameManager.cs AssemblyInfo.cs $(topdir)/build/common/Consts.cs
-sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(sn_sources)
- $(CSCOMPILE) /out:$@ $(sn_sources)
+sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(SN_SOURCES)
+ $(CSCOMPILE) /out:$@ $(SN_SOURCES)
-%.exe: %.cs AssemblyInfo.cs $(topdir)/build/common/Consts.cs
+%.exe: %.cs $(HELPER_SOURCES)
$(CSCOMPILE) $^
+2007-03-10 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * xbuild/Microsoft.Common.tasks: Added Vbc task.
+
+ * xbuild/Microsoft.VisualBasic.targets: Added CoreCompile target for
+ VB.
+
+2007-03-08 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * Microsoft.CSharp.targets: Add @(ChildProjectReferences) to
+ References.
+
+ * Microsoft.Common.targets: Add ResolveProjectReferences target.
+
2007-01-23 Marek Sieradzki <marek.sieradzki@gmail.com>
* Makefile: Removed hack.
OutputAssembly="$(OutputPath)$(AssemblyName)$(TargetExt)"
PdbFile="$(PdbFile)"
Platform="$(PlatformTarget)"
- References="@(ResolvedFiles)"
+ References="@(ResolvedFiles);@(ChildProjectReferences)"
ResponseFiles="$(CompilerResponseFile)"
Sources="@(Compile)"
TargetType="$(OutputType)"
</ResolveAssemblyReference>
</Target>
+ <Target
+ Name="ResolveProjectReferences"
+ Condition=" '@(ProjectReference)' != ''"
+ Inputs="@(ProjectReference)"
+ Outputs="@(ChildProjectReferences)"
+ >
+ <MSBuild
+ Projects="@(ProjectReference)"
+ Targets="Build"
+ RebaseOutputs="true"
+ >
+ <Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
+ </MSBuild>
+ </Target>
+
+<!--
+ Not needed at the moment
<Target Name="_ComputeNonExistentFileProperty" Condition='false'>
<CreateProperty Value="__NonExistentSubDir__\__NonExistentFile__">
<Output TaskParameter="Value" PropertyName="NonExistentFile"/>
</CreateProperty>
</Target>
+-->
- <Target Name="Build" DependsOnTargets="PrepareForBuild;ResolveAssemblyReferences;CoreCompile"/>
+ <Target
+ Name="Build"
+ DependsOnTargets="PrepareForBuild;ResolveAssemblyReferences;ResolveProjectReferences;CoreCompile"
+ Outputs="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ />
+
+<!--
+ Doesn't work because it treats every property in Delete.Files as separate ITaskItem
+ <Target Name="Clean">
+ <Message Text="Trying to delete $(OutputPath)$(AssemblyName)$(TargetExt)"/>
+ <Delete Files="$(OutputPath)$(AssemblyName)$(TargetExt)" />
+ </Target>
+-->
</Project>
<UsingTask TaskName="Microsoft.Build.Tasks.ResolveAssemblyReference" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="Microsoft.Build.Tasks.SignFile" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="Microsoft.Build.Tasks.Touch" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Vbc" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="Microsoft.Build.Tasks.Warning" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="Microsoft.Build.Tasks.WriteLinesToFile" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</Project>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-<!-- empty at the moment -->
+ <PropertyGroup>
+ <DefaultLanguageSourceExtension>.vb</DefaultLanguageSourceExtension>
+ <Language>VB</Language>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <FinalDefineConstants>CONFIG="$(Configuration)"</FinalDefineConstants>
+ <FinalDefineConstants Condition=" '$(DefineDebug)' == 'true' ">$(FinalDefineConstants),DEBUG=-1</FinalDefineConstants>
+ <FinalDefineConstants Condition=" '$(DefineTrace)' == 'true' ">$(FinalDefineConstants),TRACE=-1</FinalDefineConstants>
+ <FinalDefineConstants Condition=" '$(MyType)' != '' ">$(FinalDefineConstants),_MyType="$(MyType)"</FinalDefineConstants>
+ <FinalDefineConstants Condition=" '$(Platform)' != '' ">$(FinalDefineConstants),PLATFORM="$(Platform)"</FinalDefineConstants>
+ <FinalDefineConstants Condition=" '$(Platform)' == '' ">$(FinalDefineConstants),PLATFORM="AnyCPU"</FinalDefineConstants>
+ <FinalDefineConstants Condition=" '$(DefineConstants)' != '' ">$(FinalDefineConstants),$(DefineConstants)</FinalDefineConstants>
+
+ <_NoWarnings Condition=" '$(WarningLevel)' == '0' ">true</_NoWarnings>
+ <_NoWarnings Condition=" '$(WarningLevel)' == '1' ">false</_NoWarnings>
+
+ <DebugSymbols Condition=" '$(DebugType)' == 'none' ">false</DebugSymbols>
+ <DebugType Condition=" '$(DebugType)' == 'none' "></DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)'!=''"/>
+ </ItemGroup>
+
+ <Target
+ Name="CoreCompile"
+ Inputs="@(Compile)"
+ Outputs="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ >
+
+ <Vbc
+ AdditionalLibPaths="$(AdditionalLibPaths)"
+ AddModules="@(AddModules)"
+ BaseAddress="$(BaseAddress)"
+ CodePage="$(CodePage)"
+ DebugType="$(DebugType)"
+ DefineConstants="$(FinalDefineConstants)"
+ DelaySign="$(DelaySign)"
+ DisabledWarnings="$(NoWarn)"
+ DocumentationFile="@(DocFileItem)"
+ EmitDebugInformation="$(DebugSymbols)"
+ ErrorReport="$(ErrorReport)"
+ FileAlignment="$(FileAlignment)"
+ GenerateDocumentation="$(GenerateDocumentation)"
+ Imports="@(Import)"
+ KeyContainer="$(KeyContainerName)"
+ KeyFile="$(KeyOriginatorFile)"
+ MainEntryPoint="$(StartupObject)"
+ NoConfig="true"
+ NoStandardLib="$(NoStdLib)"
+ NoWarnings="$(_NoWarnings)"
+ Optimize="$(Optimize)"
+ OptionCompare="$(OptionCompare)"
+ OptionExplicit="$(OptionExplicit)"
+ OptionStrict="$(OptionStrict)"
+ OptionStrictType="$(OptionStrictType)"
+ OutputAssembly="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ Platform="$(PlatformTarget)"
+ References="@(ReferencePath)"
+ RemoveIntegerChecks="$(RemoveIntegerChecks)"
+ ResponseFiles="$(CompilerResponseFile)"
+ RootNamespace="$(RootNamespace)"
+ SdkPath="$(FrameworkPathOverride)"
+ Sources="@(Compile)"
+ TargetCompactFramework="$(TargetCompactFramework)"
+ TargetType="$(OutputType)"
+ TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
+ UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
+ Utf8Output="$(Utf8Output)"
+ Verbosity="$(VbcVerbosity)"
+ WarningsAsErrors="$(WarningsAsErrors)"
+ WarningsNotAsErrors="$(WarningsNotAsErrors)"
+ Win32Icon="$(ApplicationIcon)"
+ Win32Resource="$(Win32Resource)"
+ />
+
+ <!--
+ Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
+ ToolPath="$(VbcToolPath)"
+
+ -->
+
+ </Target>
+
+ <Import Project="Microsoft.Common.targets" />
</Project>
+++ /dev/null
-\r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmdesc", "genmdesc.vcproj", "{B7098DFA-31E6-4006-8A15-1C9A4E925149}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmono", "libmono.vcproj", "{CB0D9E92-293C-439C-9AC7-C5F59B6E0771}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {B7098DFA-31E6-4006-8A15-1C9A4E925149}\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5} = {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {EB56000B-C80B-4E8B-908D-D84D31B517D3}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-invoke", "samples\embed\test-invoke.vcproj", "{C5639B3F-288A-4A4B-A4A5-C0D85834221D}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Embedded Samples", "Embedded Samples", "{5FE09AA5-C3C9-45EA-A323-36A11B653CEC}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "teste", "samples\embed\teste.vcproj", "{6FDE4E5E-57D0-432F-A987-6C226A7827E4}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{EE2CC761-9652-44AC-9204-7EB31194CAA6}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mono", "mono.vcproj", "{A0EDDCD9-940F-432C-A28F-7EF322437D79}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgc", "libgc\libgc.vcproj", "{EB56000B-C80B-4E8B-908D-D84D31B517D3}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monodis", "mono\dis\monodis.vcproj", "{37F50E5A-4818-46CF-81FE-4BB06DE5D42E}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pedump", "mono\pedump.vcproj", "{84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monodiet", "mono\monodiet.vcproj", "{8F90007F-8019-4191-8808-891E4762D958}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monoburg", "mono\monoburg\monoburg.vcproj", "{5DCFA645-3358-4A20-9630-AEAAC5EED2D5}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monograph", "mono\monograph\monograph.vcproj", "{CA2A69D6-3B9D-45A5-8BF7-4E242E683122}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{0EBA83B7-0EB4-4C83-A900-77300A97E8B1}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-metadata", "samples\embed\test-metadata.vcproj", "{C2EB666E-9146-4B7A-85F6-25F9EA313770}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
- EndProjectSection\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Any CPU = Debug|Any CPU\r
- Debug|Mixed Platforms = Debug|Mixed Platforms\r
- Debug|Win32 = Debug|Win32\r
- Release|Any CPU = Release|Any CPU\r
- Release|Mixed Platforms = Release|Mixed Platforms\r
- Release|Win32 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Win32.Build.0 = Debug|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Win32.ActiveCfg = Release|Win32\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Win32.Build.0 = Release|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Win32.Build.0 = Debug|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Win32.ActiveCfg = Release|Win32\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Win32.Build.0 = Release|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Win32.Build.0 = Debug|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Win32.ActiveCfg = Release|Win32\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Win32.Build.0 = Release|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Win32.Build.0 = Debug|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Win32.ActiveCfg = Release|Win32\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Win32.Build.0 = Release|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Win32.Build.0 = Debug|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Win32.ActiveCfg = Release|Win32\r
- {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Win32.Build.0 = Release|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Win32.Build.0 = Debug|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Win32.ActiveCfg = Release|Win32\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Win32.Build.0 = Release|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Win32.Build.0 = Debug|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Win32.ActiveCfg = Release|Win32\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Win32.Build.0 = Release|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Win32.Build.0 = Debug|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Win32.ActiveCfg = Release|Win32\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Win32.Build.0 = Release|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Debug|Win32.Build.0 = Debug|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Release|Win32.ActiveCfg = Release|Win32\r
- {8F90007F-8019-4191-8808-891E4762D958}.Release|Win32.Build.0 = Release|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Win32.Build.0 = Debug|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Win32.ActiveCfg = Release|Win32\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Win32.Build.0 = Release|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Win32.Build.0 = Debug|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Win32.ActiveCfg = Release|Win32\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Win32.Build.0 = Release|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Win32.Build.0 = Debug|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Any CPU.ActiveCfg = Release|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Mixed Platforms.Build.0 = Release|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Win32.ActiveCfg = Release|Win32\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Win32.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
- GlobalSection(NestedProjects) = preSolution\r
- {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
- {37F50E5A-4818-46CF-81FE-4BB06DE5D42E} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
- {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
- {8F90007F-8019-4191-8808-891E4762D958} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
- {5DCFA645-3358-4A20-9630-AEAAC5EED2D5} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
- {CA2A69D6-3B9D-45A5-8BF7-4E242E683122} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
- {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
- {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
- {C5639B3F-288A-4A4B-A4A5-C0D85834221D} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
- {6FDE4E5E-57D0-432F-A987-6C226A7827E4} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
- {C2EB666E-9146-4B7A-85F6-25F9EA313770} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
- EndGlobalSection\r
-EndGlobal\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="mono"\r
- ProjectGUID="{A0EDDCD9-940F-432C-A28F-7EF322437D79}"\r
- RootNamespace="mono"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="./VSDependancies/temp/mono/Debug"\r
- IntermediateDirectory="./VSDependancies/temp/mono/Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories=".;.\libgc\include;.\mono;".\VSDependancies\include\glib-2.0";".\VSDependancies\include\glib-2.0\glib";.\VSDependancies\include;".\VSDependancies\lib\glib-2.0\include""\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4996"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories=".;.\VSDependancies\lib"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\mono\mini\main.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+Mon Mar 12 17:07:32 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+ * amd64/amd64-codegen.h: removed some useless size rex prefixes.
+
Wed Jan 24 21:00:40 CET 2007 Paolo Molaro <lupus@ximian.com>
* arm/arm-codegen.h: fixed encoding of short/byte load/store
/* Generated from x86-codegen.h */
-#define amd64_breakpoint_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_breakpoint(inst); } while (0)
+#define amd64_breakpoint_size(inst,size) do { x86_breakpoint(inst); } while (0)
#define amd64_cld_size(inst,size) do { amd64_emit_rex ((inst),0,0,0,0); x86_cld(inst); } while (0)
#define amd64_stosb_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_stosb(inst); } while (0)
#define amd64_stosl_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_stosl(inst); } while (0)
#define amd64_enter_size(inst,framesize) do { amd64_emit_rex ((inst),(size),0,0,0); x86_enter((inst),(framesize)); } while (0)
//#define amd64_leave_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_leave(inst); } while (0)
#define amd64_sahf_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_sahf(inst); } while (0)
-#define amd64_fsin_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fsin(inst); } while (0)
-#define amd64_fcos_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fcos(inst); } while (0)
-#define amd64_fabs_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fabs(inst); } while (0)
-#define amd64_ftst_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_ftst(inst); } while (0)
-#define amd64_fxam_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fxam(inst); } while (0)
-#define amd64_fpatan_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fpatan(inst); } while (0)
-#define amd64_fprem_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fprem(inst); } while (0)
-#define amd64_fprem1_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fprem1(inst); } while (0)
-#define amd64_frndint_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_frndint(inst); } while (0)
-#define amd64_fsqrt_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fsqrt(inst); } while (0)
-#define amd64_fptan_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_fptan(inst); } while (0)
-//#define amd64_padding_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_padding((inst),(size)); } while (0)
+#define amd64_fsin_size(inst,size) do { x86_fsin(inst); } while (0)
+#define amd64_fcos_size(inst,size) do { x86_fcos(inst); } while (0)
+#define amd64_fabs_size(inst,size) do { x86_fabs(inst); } while (0)
+#define amd64_ftst_size(inst,size) do { x86_ftst(inst); } while (0)
+#define amd64_fxam_size(inst,size) do { x86_fxam(inst); } while (0)
+#define amd64_fpatan_size(inst,size) do { x86_fpatan(inst); } while (0)
+#define amd64_fprem_size(inst,size) do { x86_fprem(inst); } while (0)
+#define amd64_fprem1_size(inst,size) do { x86_fprem1(inst); } while (0)
+#define amd64_frndint_size(inst,size) do { x86_frndint(inst); } while (0)
+#define amd64_fsqrt_size(inst,size) do { x86_fsqrt(inst); } while (0)
+#define amd64_fptan_size(inst,size) do { x86_fptan(inst); } while (0)
+//#define amd64_padding_size(inst,size) do { x86_padding((inst),(size)); } while (0)
#define amd64_prolog_size(inst,frame_size,reg_mask,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_prolog((inst),(frame_size),(reg_mask)); } while (0)
#define amd64_epilog_size(inst,reg_mask,size) do { amd64_emit_rex ((inst),(size),0,0,0); x86_epilog((inst),(reg_mask)); } while (0)
#define amd64_xadd_reg_reg_size(inst,dreg,reg,size) do { amd64_emit_rex ((inst),(size),(dreg),0,(reg)); x86_xadd_reg_reg ((inst), (dreg), (reg), (size)); } while (0)
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+ * monodis.vcproj: Move to msvc directory.
+
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * monodis.vcproj: Begin Win64 port.
+
Fri Jan 26 12:30:22 CET 2007 Paolo Molaro <lupus@ximian.com>
* get.c, dis-cil.c: warning fixes.
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="monodis"\r
- ProjectGUID="{37F50E5A-4818-46CF-81FE-4BB06DE5D42E}"\r
- RootNamespace="dis"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../../VSDependancies/temp/monodis/Debug"\r
- IntermediateDirectory="../../VSDependancies/temp/monodis/Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\;..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0\glib";..\..\VSDependancies\include;..\..\mono\;..\..\mono\jit"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4996;4018;4244"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\declsec.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\dis-cil.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\dump.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\get.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\main.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\util.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\declsec.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\dis-cil.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\dump.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\get.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\meta.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\push-pop.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\util.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+2007-03-09 Jonathan Chambers <joncham@gmail.com>
+
+ * io-layer.h: Remove UNICODE and _UNICODE defines as
+ these are done by configure.in now.
+
+ Code is contributed under MIT/X11 license.
+
+Thu Mar 8 19:42:17 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+ * shared.c: partial support for MONO_DISABLE_SHM env var.
+
+2007-03-05 Wade Berrier <wberrier@novell.com>
+
+ * atomic.h: atomic fixes from Michael Matz for for s390
+ and s390x ( bnc #237611 and bxc #80892 )
+
+2007-03-05 Miguel de Icaza <miguel@novell.com>
+
+ * io.c (CreateFile): Use FILE_ATTRIBUTE_TEMPORARY to mean 0600
+ permissions. For 80688
+
+ (MoveFile): Use errno_copy here, just to avoid a potential
+ errno-changing code in the future from g_free.
+
+ Also, ignore EXDEV errors as they are handled immediately after
+ (avoid printing out an error).
+
+ Fixes: 80655
Mon Feb 12 15:50:24 CET 2007 Paolo Molaro <lupus@ximian.com>
__asm__ __volatile__ ("\tLA\t1,%0\n"
"\tLR\t%1,%3\n"
"\tCS\t%1,%2,0(1)\n"
- : "+m" (*dest), "=r" (old)
+ : "+m" (*dest), "=&r" (old)
: "r" (exch), "r" (comp)
: "1", "cc");
return(old);
__asm__ __volatile__ ("\tLA\t1,%0\n"
"\tLR\t%1,%3\n"
"\tCS\t%1,%2,0(1)\n"
- : "+m" (*dest), "=r" (old)
+ : "+m" (*dest), "=&r" (old)
: "r" (exch), "r" (comp)
: "1", "cc");
return(old);
__asm__ __volatile__ ("\tLA\t1,%0\n"
"\tLGR\t%1,%3\n"
"\tCSG\t%1,%2,0(1)\n"
- : "+m" (*dest), "=r" (old)
+ : "+m" (*dest), "=&r" (old)
: "r" (exch), "r" (comp)
: "1", "cc");
"0:\tL\t%1,%0\n"
"\tCS\t%1,%2,0(1)\n"
"\tJNZ\t0b"
- : "+m" (*val), "=r" (ret)
+ : "+m" (*val), "=&r" (ret)
: "r" (new_val)
: "1", "cc");
"0:\tL\t%1,%0\n"
"\tCS\t%1,%2,0(1)\n"
"\tJNZ\t0b"
- : "+m" (*val), "=r" (ret)
+ : "+m" (*val), "=&r" (ret)
: "r" (new_val)
: "1", "cc");
"0:\tLG\t%1,%0\n"
"\tCSG\t%1,%2,0(1)\n"
"\tJNZ\t0b"
- : "+m" (*val), "=r" (ret)
+ : "+m" (*val), "=&r" (ret)
: "r" (new_val)
: "1", "cc");
"\tAR\t1,%2\n"
"\tCS\t%0,1,0(2)\n"
"\tJNZ\t0b"
- : "=r" (ret), "+m" (*val)
+ : "=&r" (ret), "+m" (*val)
: "r" (add)
: "1", "2", "cc");
"\tAGR\t1,%2\n"
"\tCS\t%0,1,0(2)\n"
"\tJNZ\t0b"
- : "=r" (ret), "+m" (*val)
+ : "=&r" (ret), "+m" (*val)
: "r" (add)
: "1", "2", "cc");
#if defined(__WIN32__)
/* Native win32 */
-#define UNICODE
-#define _UNICODE
#define __USE_W32_SOCKETS
#include <winsock2.h>
#include <windows.h>
mono_once (&io_ops_once, io_ops_init);
+ if (attrs & FILE_ATTRIBUTE_TEMPORARY)
+ perms = 0600;
+
if (attrs & FILE_ATTRIBUTE_ENCRYPTED){
SetLastError (ERROR_ENCRYPTION_FAILED);
return INVALID_HANDLE_VALUE;
gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name)
{
gchar *utf8_name, *utf8_dest_name;
- int result;
+ int result, errno_copy;
struct stat stat_src, stat_dest;
gboolean ret = FALSE;
}
result = _wapi_rename (utf8_name, utf8_dest_name);
-
+ errno_copy = errno;
+
if (result == -1) {
- switch(errno) {
+ switch(errno_copy) {
case EEXIST:
SetLastError (ERROR_ALREADY_EXISTS);
break;
+
+ case EXDEV:
+ /* Ignore here, it is dealt with below */
+ break;
default:
_wapi_set_last_path_error_from_errno (NULL, utf8_name);
g_free (utf8_name);
g_free (utf8_dest_name);
- if (result != 0 && errno == EXDEV) {
+ if (result != 0 && errno_copy == EXDEV) {
/* Try a copy to the new location, and delete the source */
if (CopyFile (name, dest_name, TRUE)==FALSE) {
/* CopyFile will set the error */
return(fd);
}
+static gboolean wapi_shm_disabled = 0;
+
/*
* _wapi_shm_attach:
* @success: Was it a success
case WAPI_SHM_FILESHARE:
size = sizeof(struct _WapiFileShareLayout);
break;
+ default:
+ g_error ("Invalid type in _wapi_shm_attach ()");
+ return NULL;
}
-
+
+ if (g_getenv ("MONO_DISABLE_SHM")) {
+ const char* val = g_getenv ("MONO_DISABLE_SHM");
+ if (*val == '1' || *val == 'y' || *val == 'Y') {
+ wapi_shm_disabled = TRUE;
+ return g_malloc0 (size);
+ }
+ }
+
fd = _wapi_shm_file_open (filename, size);
if (fd == -1) {
g_critical ("%s: shared file [%s] open error", __func__,
_wapi_shm_sem_unlock (_WAPI_SHARED_SEM_PROCESS_COUNT_LOCK);
- munmap (tmp_shared, sizeof(struct _WapiHandleSharedLayout));
+ if (wapi_shm_disabled)
+ g_free (tmp_shared);
+ else
+ munmap (tmp_shared, sizeof(struct _WapiHandleSharedLayout));
}
void _wapi_shm_semaphores_remove (void)
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * icall.c: Fix environ access in VS.
+
+2007-03-13 Alp Toker <alp@atoker.com>
+
+ * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
+ rather than the underlying type. Based on a patch by Ben Maurer. Fixes
+ #63841.
+
+2007-03-12 Zoltan Varga <vargaz@gmail.com>
+
+ * reflection.c (mono_reflection_create_dynamic_method): Add support for
+ circular references among dynamic methods. Fixes #81091.
+
+ * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
+
+2007-03-09 Martin Baulig <martin@ximian.com>
+
+ * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
+
+2007-03-09 Jonathan Chambers <joncham@gmail.com>
+
+ * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
+ of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
+
+ Code is contributed under MIT/X11 license.
+
+2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
+
+ * loader.c: Reapply patch for bug #79424.
+
+2007-03-06 Zoltan Varga <vargaz@gmail.com>
+
+ * metadata.c (mono_type_to_unmanaged): Only convert object to
+ MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
+
+Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+ * class-internals.h, class.c, metadata.c, reflection.c: removed unused
+ (and incorrectly set) is_reference field from MonoGenericInst.
+
+2007-03-06 Zoltan Varga <vargaz@gmail.com>
+
+ * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
+ a little earlier.
+
+ * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
+
+ * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
+
+2007-03-05 Miguel de Icaza <miguel@novell.com>
+
+ * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
+ FileOptions.1 value to mean "temporary", map that to
+ FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
+
+ Fixes 80688
+
+2007-03-03 Marek Habersack <mhabersack@novell.com>
+
+ * appdomain.c: implement MS .Net style shadow copying. Copies of
+ the assemblies are made in a subdirectory of the dynamic base
+ directory, the assembly names are preserved.
+ Copy .mdb and .config files along with the assemblies being shadowed.
+
+2007-02-28 Zoltan Varga <vargaz@gmail.com>
+
+ * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
+ (emit_marshal_handleref): Ditto.
+
+ * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
+ on Visual C++. Fixes #80671.
+
+Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+ * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
+ for clone operations.
+
+2007-02-28 Zoltan Varga <vargaz@gmail.com>
+
+ * marshal.c: Fix warnings.
Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
#include <glib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <mono/os/gc_wrapper.h>
#include <mono/utils/mono-logger.h>
#include <mono/utils/mono-path.h>
#include <mono/utils/mono-stdlib.h>
+#ifdef PLATFORM_WIN32
+#include <direct.h>
+#endif
#define MONO_CORLIB_VERSION 54
g_strfreev (pvt_split);
}
+static gboolean
+shadow_copy_sibling (gchar *src, gint srclen, const char *extension, gchar *target, gint targetlen, gint tail_len)
+{
+ guint16 *orig, *dest;
+ gboolean copy_result;
+
+ strcpy (src + srclen - tail_len, extension);
+ if (!g_file_test (src, G_FILE_TEST_IS_REGULAR))
+ return TRUE;
+ orig = g_utf8_to_utf16 (src, strlen (src), NULL, NULL, NULL);
+
+ strcpy (target + targetlen - tail_len, extension);
+ dest = g_utf8_to_utf16 (target, strlen (target), NULL, NULL, NULL);
+
+ copy_result = CopyFile (orig, dest, FALSE);
+ g_free (orig);
+ g_free (dest);
+
+ return copy_result;
+}
+
+static gint32
+get_cstring_hash (const char *str)
+{
+ int len, i;
+ const char *p;
+ gint32 h = 0;
+
+ if (!str || !str [0])
+ return 0;
+
+ len = strlen (str);
+ p = str;
+ for (i = 0; i < len; i++) {
+ h = (h << 5) - h + *p;
+ p++;
+ }
+
+ return h;
+}
+
+static char *
+get_shadow_assembly_location (const char *filename)
+{
+ gint32 hash = 0, hash2 = 0;
+ char name_hash [9];
+ char path_hash [19];
+ char *bname = g_path_get_basename (filename);
+ MonoDomain *domain = mono_domain_get ();
+
+ hash = get_cstring_hash (bname);
+ hash2 = get_cstring_hash (g_path_get_dirname (filename));
+ g_snprintf (name_hash, sizeof (name_hash), "%08x", hash);
+ g_snprintf (path_hash, sizeof (path_hash), "%08x_%08x", hash ^ hash2, hash2);
+ return g_build_filename (mono_string_to_utf8 (domain->setup->dynamic_base),
+ "assembly",
+ "shadow",
+ name_hash,
+ path_hash,
+ bname,
+ NULL);
+}
+
+static gboolean
+ensure_directory_exists (const char *filename)
+{
+#ifdef PLATFORM_WIN32
+ gchar *dir_utf8 = g_path_get_dirname (filename);
+ gunichar2 *p;
+ gunichar2 *dir_utf16 = NULL;
+ int retval;
+
+ if (!dir_utf8 || !dir_utf8 [0])
+ return FALSE;
+
+ dir_utf16 = g_utf8_to_utf16 (dir_utf8, strlen (dir_utf8), NULL, NULL, NULL);
+ g_free (dir_utf8);
+
+ if (!dir_utf16)
+ return FALSE;
+
+ p = dir_utf16;
+
+ /* make life easy and only use one directory seperator */
+ while (*p != '\0')
+ {
+ if (*p == '/')
+ *p = '\\';
+ p++;
+ }
+
+ p = dir_utf16;
+
+ /* get past C:\ )*/
+ while (*p++ != '\\')
+ {
+ }
+
+ while (1) {
+ BOOL bRet = FALSE;
+ p = wcschr (p, '\\');
+ if (p)
+ *p = '\0';
+ retval = _wmkdir (dir_utf16);
+ if (retval != 0 && errno != EEXIST) {
+ g_free (dir_utf16);
+ return FALSE;
+ }
+ if (!p)
+ break;
+ *p++ = '\\';
+ }
+
+ g_free (dir_utf16);
+ return TRUE;
+#else
+ char *p;
+ gchar *dir = g_path_get_dirname (filename);
+ int retval;
+
+ if (!dir || !dir [0])
+ return FALSE;
+
+ p = dir;
+ while (*p == '/')
+ p++;
+
+ while (1) {
+ p = strchr (p, '/');
+ if (p)
+ *p = '\0';
+ retval = mkdir (dir, 0777);
+ if (retval != 0 && errno != EEXIST) {
+ g_free (dir);
+ return FALSE;
+ }
+ if (!p)
+ break;
+ *p++ = '/';
+ }
+
+ g_free (dir);
+ return TRUE;
+#endif
+}
+
static char *
make_shadow_copy (const char *filename)
{
- gchar *tmp;
+ gchar *sibling_source, *sibling_target;
+ gint sibling_source_len, sibling_target_len;
guint16 *orig, *dest;
- MonoDomain *domain = mono_domain_get ();
- char *db;
- int fd;
+ char *shadow;
gboolean copy_result;
MonoException *exc;
-
- db = mono_string_to_utf8 (domain->setup->dynamic_base);
- tmp = g_build_filename (db, "shadow-XXXXXX", NULL);
- fd = mono_mkstemp (tmp);
- if (fd == -1) {
- exc = mono_get_exception_execution_engine ("Failed to create shadow copy (mkstemp).");
- g_free (tmp);
- g_free (db);
+
+ shadow = get_shadow_assembly_location (filename);
+ if (ensure_directory_exists (shadow) == FALSE) {
+ exc = mono_get_exception_execution_engine ("Failed to create shadow copy (ensure directory exists).");
mono_raise_exception (exc);
- }
- close (fd);
- remove (tmp);
+ }
+
orig = g_utf8_to_utf16 (filename, strlen (filename), NULL, NULL, NULL);
- dest = g_utf8_to_utf16 (tmp, strlen (tmp), NULL, NULL, NULL);
- copy_result = CopyFile (orig, dest, TRUE);
+ dest = g_utf8_to_utf16 (shadow, strlen (shadow), NULL, NULL, NULL);
+ copy_result = CopyFile (orig, dest, FALSE);
g_free (dest);
g_free (orig);
- g_free (db);
if (copy_result == FALSE) {
- g_free (tmp);
+ g_free (shadow);
exc = mono_get_exception_execution_engine ("Failed to create shadow copy (CopyFile).");
mono_raise_exception (exc);
}
- return tmp;
+
+ /* attempt to copy .mdb, .config if they exist */
+ sibling_source = g_strconcat (filename, ".config", NULL);
+ sibling_source_len = strlen (sibling_source);
+ sibling_target = g_strconcat (shadow, ".config", NULL);
+ sibling_target_len = strlen (sibling_target);
+
+ copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".mdb", sibling_target, sibling_target_len, 7);
+ if (copy_result == TRUE)
+ copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".config", sibling_target, sibling_target_len, 7);
+
+ g_free (sibling_source);
+ g_free (sibling_target);
+
+ if (copy_result == FALSE) {
+ g_free (shadow);
+ exc = mono_get_exception_execution_engine ("Failed to create shadow copy of sibling data (CopyFile).");
+ mono_raise_exception (exc);
+ }
+
+ return shadow;
}
static gboolean
/* avoid loading the same assembly twice for now... */
ass2 = search_loaded (&ass->aname, refonly);
if (ass2) {
+ mono_assemblies_unlock ();
g_free (ass);
g_free (base_dir);
mono_image_close (image);
*status = MONO_IMAGE_OK;
- mono_assemblies_unlock ();
return ass2;
}
}
{
}
+void
+mono_gc_wbarrier_object (MonoObject *object)
+{
+}
+
#endif /* no Boehm GC */
if (options & FileOptions_RandomAccess)
attributes |= FILE_FLAG_RANDOM_ACCESS;
+ if (options & FileOptions_Temporary)
+ attributes |= FILE_ATTRIBUTE_TEMPORARY;
+
/* Not sure if we should set FILE_FLAG_OVERLAPPED, how does this mix with the "Async" bool here? */
if (options & FileOptions_Asynchronous)
attributes |= FILE_FLAG_OVERLAPPED;
/* This is a copy of System.IO.FileOptions */
typedef enum {
FileOptions_None = 0,
+ FileOptions_Temporary = 1, // Internal. See note in System.IO.FileOptions
FileOptions_Encrypted = 0x4000,
FileOptions_DeleteOnClose = 0x4000000,
FileOptions_SequentialScan = 0x8000000,
ICALL(WAITH_3, "WaitOne_internal", ves_icall_System_Threading_WaitHandle_WaitOne_internal)
ICALL_TYPE(TYPE, "System.Type", TYPE_1)
-ICALL(TYPE_1, "Equals", ves_icall_type_Equals)
+ICALL(TYPE_1, "EqualsInternal", ves_icall_System_Type_EqualsInternal)
ICALL(TYPE_2, "GetGenericParameterAttributes", ves_icall_Type_GetGenericParameterAttributes)
ICALL(TYPE_3, "GetGenericParameterConstraints_impl", ves_icall_Type_GetGenericParameterConstraints)
ICALL(TYPE_4, "GetGenericParameterPosition", ves_icall_Type_GetGenericParameterPosition)
}
static MonoBoolean
-ves_icall_type_Equals (MonoReflectionType *type, MonoReflectionType *c)
+ves_icall_System_Type_EqualsInternal (MonoReflectionType *type, MonoReflectionType *c)
{
MONO_ARCH_SAVE_REGS;
MONO_ARCH_SAVE_REGS;
- // GelElementType should only return a type for:
+ // GetElementType should only return a type for:
// Array Pointer PassedByRef
if (type->type->byref)
return mono_type_get_object (mono_object_domain (type), &class->byval_arg);
- if (class->enumtype && class->enum_basetype) /* types that are modifierd typebuilkders may not have enum_basetype set */
- return mono_type_get_object (mono_object_domain (type), class->enum_basetype);
else if (class->element_class && MONO_CLASS_IS_ARRAY (class))
return mono_type_get_object (mono_object_domain (type), &class->element_class->byval_arg);
else if (class->element_class && type->type->type == MONO_TYPE_PTR)
/*
* There is no standard way to get at environ.
*/
-#ifndef __MINGW32_VERSION
#ifndef _MSC_VER
+#ifndef __MINGW32_VERSION
extern
-#endif
char **environ;
#endif
+#endif
static MonoArray *
ves_icall_System_Environment_GetEnvironmentVariableNames (void)
else
msg = g_strdup_printf ("Could not load file or assembly '%s' or one of its dependencies.", error->assembly_name);
- mono_loader_clear_error ();
ex = mono_get_exception_file_not_found2 (msg, mono_string_new (mono_domain_get (), error->assembly_name));
+ mono_loader_clear_error ();
g_free (msg);
break;
}
case MONO_MARSHAL_CONV_HANDLEREF: {
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_ldloc (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+ mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+ mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_byte (mb, CEE_STIND_I);
break;
"HandleRefs can not be returned from unmanaged code (or passed by ref)");
break;
}
- mono_mb_emit_ldarg (mb, argnum);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+ mono_mb_emit_ldarg_addr (mb, argnum);
+ mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+ mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, conv_arg);
break;
return (*(MonoIUnknown**)pUnk)->Release(pUnk);
}
-void*
+static void*
cominterop_get_idispatch_for_object (MonoObject* object)
{
if (!object)
ccw_list->data = ccw;
}
else
- g_list_append (ccw_list, ccw);
+ ccw_list = g_list_append (ccw_list, ccw);
g_hash_table_insert (ccw_hash, GINT_TO_POINTER (mono_object_hash (object)), ccw_list);
/* register for finalization to clean up ccw */
mono_object_register_finalizer (object);
* Converts the standard string representation of a GUID
* to a 16 byte Microsoft GUID.
*/
-void
+static void
cominterop_mono_string_to_guid (const MonoString* string, guint8 *guid) {
gunichar2 * chars = mono_string_chars (string);
int i = 0;
g_assert (ccw);
g_assert (ccw->gc_handle);
g_assert (ccw->ref_count >= 0);
- ref_count = InterlockedIncrement (&ccw->ref_count);
+ ref_count = InterlockedIncrement ((gint32*)&ccw->ref_count);
if (ref_count == 1) {
guint32 oldhandle = ccw->gc_handle;
g_assert (oldhandle);
MonoCCW* ccw = ccwe->ccw;
g_assert (ccw);
g_assert (ccw->ref_count > 0);
- ref_count = InterlockedDecrement (&ccw->ref_count);
+ ref_count = InterlockedDecrement ((gint32*)&ccw->ref_count);
if (ref_count == 0) {
/* allow gc of object */
guint32 oldhandle = ccw->gc_handle;
*conv = MONO_MARSHAL_CONV_DEL_FTN;
return MONO_NATIVE_FUNC;
}
- if (type->data.klass == mono_defaults.safehandle_class){
+ if (mono_defaults.safehandle_class && type->data.klass == mono_defaults.safehandle_class){
*conv = MONO_MARSHAL_CONV_SAFEHANDLE;
return MONO_NATIVE_INT;
}
{
}
+void
+mono_gc_wbarrier_object (MonoObject* obj)
+{
+}
+
#endif
MonoReflectionILGen *ilgen;
gint32 nrefs;
MonoArray *refs;
+ GSList *referenced_by;
} MonoReflectionDynamicMethod;
typedef struct {
o = mono_object_allocate (size, obj->vtable);
/* do not copy the sync state */
memcpy ((char*)o + sizeof (MonoObject), (char*)obj + sizeof (MonoObject), size - sizeof (MonoObject));
-
+
+#ifdef HAVE_SGEN_GC
+ if (obj->vtable->klass->has_references)
+ mono_gc_wbarrier_object (o);
+#endif
mono_profiler_allocation (o, obj->vtable->klass);
if (obj->vtable->klass->has_finalize)
size = mono_array_length (src);
g_assert (size == mono_array_length (dest));
size *= mono_array_element_size (klass);
+#ifdef HAVE_SGEN_GC
+ if (klass->valuetype) {
+ if (klass->has_references)
+ mono_value_copy_array (dest, 0, src, mono_array_length (src));
+ else
+ memcpy (&dest->vector, &src->vector, size);
+ } else {
+ mono_array_memcpy_refs (dest, 0, src, 0, mono_array_length (src));
+ }
+#else
memcpy (&dest->vector, &src->vector, size);
+#endif
}
/**
o = mono_array_new_full (domain, klass, &size, NULL);
size *= mono_array_element_size (klass);
+#ifdef HAVE_SGEN_GC
+ if (klass->valuetype) {
+ if (klass->has_references)
+ mono_value_copy_array (o, 0, array, mono_array_length (array));
+ else
+ memcpy (&o->vector, &array->vector, size);
+ } else {
+ mono_array_memcpy_refs (o, 0, array, 0, mono_array_length (array));
+ }
+#else
memcpy (&o->vector, &array->vector, size);
+#endif
return o;
}
sizes [i + klass->rank] = array->bounds [i].lower_bound;
}
o = mono_array_new_full (domain, klass, sizes, sizes + klass->rank);
+#ifdef HAVE_SGEN_GC
+ if (klass->valuetype) {
+ if (klass->has_references)
+ mono_value_copy_array (o, 0, array, mono_array_length (array));
+ else
+ memcpy (&o->vector, &array->vector, size);
+ } else {
+ mono_array_memcpy_refs (o, 0, array, 0, mono_array_length (array));
+ }
+#else
memcpy (&o->vector, &array->vector, size);
+#endif
return o;
}
size = size - sizeof (MonoObject);
+#ifdef HAVE_SGEN_GC
+ mono_gc_wbarrier_value_copy ((char *)res + sizeof (MonoObject), value, 1, class);
+#endif
+
#if NO_UNALIGNED_ACCESS
memcpy ((char *)res + sizeof (MonoObject), value, size);
#else
void mono_gc_wbarrier_arrayref_copy (MonoArray *arr, gpointer slot_ptr, int count);
void mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value);
void mono_gc_wbarrier_value_copy (gpointer dest, gpointer src, int count, MonoClass *klass);
+void mono_gc_wbarrier_object (MonoObject* obj);
G_END_DECLS
static void output_callers (MethodProfile *p);
+/* This isn't defined on older glib versions and on some platforms */
+#ifndef G_GUINT64_FORMAT
+#define G_GUINT64_FORMAT "ul"
+#endif
+#ifndef G_GINT64_FORMAT
+#define G_GINT64_FORMAT "lld"
+#endif
+
static void
output_profile (GList *funcs)
{
m = method_get_name (p->method);
fprintf (poutput, "########################\n");
fprintf (poutput, "% 8.3f ", (double) (p->total * 1000));
- fprintf (poutput, "%7llu ", (unsigned long long)p->count);
+ fprintf (poutput, "%7" G_GUINT64_FORMAT " ", (unsigned long long)p->count);
fprintf (poutput, "% 8.3f ", (double) (p->total * 1000)/(double)p->count);
fprintf (poutput, " %s\n", m);
/* callers */
output_callers (p);
}
- fprintf (poutput, "Total number of calls: %lld\n", (long long)total_calls);
+ fprintf (poutput, "Total number of calls: %" G_GINT64_FORMAT "\n", (long long)total_calls);
}
typedef struct {
}
}
-/* This isn't defined on older glib versions and on some platforms */
-#ifndef G_GUINT64_FORMAT
-#define G_GUINT64_FORMAT "ul"
-#endif
-
static void
output_newobj_profile (GList *proflist)
{
g_free (buf);
return idx;
}
+ case MONO_TYPE_GENERICINST:
+ *ret_type = val->vtable->klass->generic_class->container_class->byval_arg.type;
+ goto handle_enum;
default:
g_error ("we don't encode constant type 0x%02x yet", *ret_type);
}
{
ReflectionMethodBuilder rmb;
MonoMethodSignature *sig;
+ GSList *l;
int i;
sig = dynamic_method_to_signature (mb);
rmb.refs = g_new0 (gpointer, mb->nrefs + 1);
for (i = 0; i < mb->nrefs; i += 2) {
MonoClass *handle_class;
- gpointer ref = resolve_object (mb->module->image,
- mono_array_get (mb->refs, MonoObject*, i), &handle_class);
- if (!ref) {
- g_free (rmb.refs);
- mono_raise_exception (mono_get_exception_type_load (NULL, NULL));
- return;
+ gpointer ref;
+ MonoObject *obj = mono_array_get (mb->refs, MonoObject*, i);
+
+ if (strcmp (obj->vtable->klass->name, "DynamicMethod") == 0) {
+ MonoReflectionDynamicMethod *method = (MonoReflectionDynamicMethod*)obj;
+ /*
+ * The referenced DynamicMethod should already be created by the managed
+ * code, except in the case of circular references. In that case, we store
+ * NULL in the refs array, and fix it up later when the referenced
+ * DynamicMethod is created.
+ */
+ if (method->mhandle) {
+ ref = method->mhandle;
+ } else {
+ ref = NULL;
+
+ /* FIXME: GC object stored in unmanaged memory */
+ method->referenced_by = g_slist_append (method->referenced_by, mb);
+ }
+ handle_class = mono_defaults.methodhandle_class;
+ } else {
+ ref = resolve_object (mb->module->image, obj, &handle_class);
+ if (!ref) {
+ g_free (rmb.refs);
+ mono_raise_exception (mono_get_exception_type_load (NULL, NULL));
+ return;
+ }
}
+
rmb.refs [i] = ref; /* FIXME: GC object stored in unmanaged memory (change also resolve_object() signature) */
rmb.refs [i + 1] = handle_class;
}
/* FIXME: class */
mb->mhandle = reflection_methodbuilder_to_mono_method (mono_defaults.object_class, &rmb, sig);
+ /* Fix up refs entries pointing at us */
+ for (l = mb->referenced_by; l; l = l->next) {
+ MonoReflectionDynamicMethod *method = (MonoReflectionDynamicMethod*)l->data;
+ MonoMethodWrapper *wrapper = (MonoMethodWrapper*)method->mhandle;
+ gpointer *data;
+
+ g_assert (method->mhandle);
+
+ data = (gpointer*)wrapper->method_data;
+ for (i = 0; i < GPOINTER_TO_UINT (data [0]); i += 2) {
+ if ((data [i + 1] == NULL) && (data [i + 1 + 1] == mono_defaults.methodhandle_class))
+ data [i + 1] = mb->mhandle;
+ }
+ }
+ g_slist_free (mb->referenced_by);
+
g_free (rmb.refs);
/* ilgen is no longer needed */
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * runmdesc.bat: Move to msvc directory.
+
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * runmdesc.bat: Run executable that was produced by the current
+ target and sent via an argument.
+
+2007-03-11 Zoltan Varga <vargaz@gmail.com>
+
+ * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
+ #81102.
+
+ * generics.2.cs: Add regression test.
+
+2007-03-09 Wade berrier <wberrier@novell.com>
+
+ * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
+
+2007-03-09 Zoltan Varga <vargaz@gmail.com>
+
+ * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
+ AOT code depends on this.
+
+Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+ * mini.c: more precise tracking of types in the eval stack
+ (part of fix for bug #81044).
+
+2007-03-07 Zoltan Varga <vargaz@gmail.com>
+
+ * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
+
+ * aot-compiler.c (encode_patch): Remove an obsolete comment.
+
+2007-03-06 Zoltan Varga <vargaz@gmail.com>
+
+ * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
+
+ * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
+
2007-02-22 Zoltan Varga <vargaz@gmail.com>
* mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
guint32 image_index = get_image_index (acfg, patch_info->data.token->image);
guint32 token = patch_info->data.token->token;
g_assert (mono_metadata_token_code (token) == MONO_TOKEN_STRING);
- /*
- * An optimization would be to emit shared code for ldstr
- * statements followed by a throw.
- */
encode_value (image_index, p, &p);
encode_value (patch_info->data.token->token - MONO_TOKEN_STRING, p, &p);
break;
/* Pointer to the Global Offset Table */
gpointer *got;
guint32 got_size;
+ GHashTable *name_cache;
MonoAssemblyName *image_names;
char **image_guids;
MonoImage **image_table;
gpointer *got_addr = NULL;
gpointer *got = NULL;
guint32 *got_size_ptr = NULL;
+ int i;
if (mono_compile_aot)
return;
mono_jit_info_add_aot_module (assembly->image, info->code, info->code_end);
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT loaded AOT Module for %s.\n", assembly->image->name);
+ /*
+ * Since we store methoddef and classdef tokens when referring to methods/classes in
+ * referenced assemblies, we depend on the exact versions of the referenced assemblies.
+ * MS calls this 'hard binding'. This means we have to load all referenced assemblies
+ * non-lazily, since we can't handle out-of-date errors later.
+ */
+ for (i = 0; i < info->image_table_len; ++i)
+ load_image (info, i);
+
+ if (info->out_of_date)
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT Module %s is unusable because a dependency is out-of-date.\n", assembly->image->name);
+ else
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT loaded AOT Module for %s.\n", assembly->image->name);
}
void
const char *name2, *name_space2;
MonoTableInfo *t;
guint32 cols [MONO_TYPEDEF_SIZE];
+ GHashTable *nspace_table;
if (!aot_modules)
return FALSE;
*klass = NULL;
+ /* First look in the cache */
+ if (!aot_module->name_cache)
+ aot_module->name_cache = g_hash_table_new (g_str_hash, g_str_equal);
+ nspace_table = g_hash_table_lookup (aot_module->name_cache, name_space);
+ if (nspace_table) {
+ *klass = g_hash_table_lookup (nspace_table, name);
+ if (*klass) {
+ mono_aot_unlock ();
+ return TRUE;
+ }
+ }
+
table_size = aot_module->class_name_table [0];
table = aot_module->class_name_table + 1;
if (!strcmp (name, name2) && !strcmp (name_space, name_space2)) {
mono_aot_unlock ();
*klass = mono_class_get (image, token);
+
+ /* Add to cache */
+ if (*klass) {
+ mono_aot_lock ();
+ nspace_table = g_hash_table_lookup (aot_module->name_cache, name_space);
+ if (!nspace_table) {
+ nspace_table = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_insert (aot_module->name_cache, (char*)name_space2, nspace_table);
+ }
+ g_hash_table_insert (nspace_table, (char*)name2, *klass);
+ mono_aot_unlock ();
+ }
return TRUE;
}
return 0;
}
+ public static int test_0_box_brtrue_opt_regress_81102 () {
+ if (new Foo<int>(5).ToString () == "null")
+ return 0;
+ else
+ return 1;
+ }
+
+ public class Foo<T1>
+ {
+ public Foo(T1 t1)
+ {
+ m_t1 = t1;
+ }
+
+ public override string ToString()
+ {
+ return Bar(m_t1 == null ? "null" : "null");
+ }
+
+ public String Bar (String s) {
+ return s;
+ }
+
+ readonly T1 m_t1;
+ }
+
public interface IMyHandler {
object Bar<T>();
}
#ifndef PLATFORM_WIN32
struct sigaction sa;
#endif
- const char *signal_str = (signal == SIGSEGV) ? "SIGSEGV" : "SIGABRT";
-
if (handling_sigsegv)
return;
int i, size;
gchar *out, *err;
gint exit_status;
+ const char *signal_str = (signal == SIGSEGV) ? "SIGSEGV" : "SIGABRT";
fprintf (stderr, "\nNative stacktrace:\n\n");
MonoPPCStackFrame *sframe; \
__asm__ volatile("lwz %0,0(r1)" : "=r" (sframe)); \
MONO_CONTEXT_SET_BP ((ctx), sframe->sp); \
- MONO_CONTEXT_SET_SP ((ctx), sframe->sp); \
sframe = (MonoPPCStackFrame*)sframe->sp; \
MONO_CONTEXT_SET_IP ((ctx), sframe->lr); \
} while (0)
MONO_INIT_VARINFO (cfg->vars [num], num);
cfg->num_varinfo++;
- //g_print ("created temp %d of type %s\n", num, mono_type_get_name (type));
+ if (cfg->verbose_level > 2)
+ g_print ("created temp %d of type %s\n", num, mono_type_get_name (type));
return inst;
}
return &ins->klass->this_arg;
else
return &mono_defaults.object_class->this_arg;
- case STACK_OBJ: return &mono_defaults.object_class->byval_arg;
+ case STACK_OBJ:
+ /* ins->klass may not be set for ldnull.
+ * Also, if we have a boxed valuetype, we want an object lass,
+ * not the valuetype class
+ */
+ if (ins->klass && !ins->klass->valuetype)
+ return &ins->klass->byval_arg;
+ return &mono_defaults.object_class->byval_arg;
case STACK_VTYPE: return &ins->klass->byval_arg;
default:
g_error ("stack type %d to montype not handled\n", ins->type);
}
static MonoClass*
-array_access_to_klass (int opcode)
+array_access_to_klass (int opcode, MonoInst *array_obj)
{
switch (opcode) {
case CEE_LDELEM_U1:
case CEE_STELEM_R8:
return mono_defaults.double_class;
case CEE_LDELEM_REF:
- case CEE_STELEM_REF:
+ case CEE_STELEM_REF: {
+ MonoClass *klass = array_obj->klass;
+ /* FIXME: add assert */
+ if (klass && klass->rank)
+ return klass->element_class;
return mono_defaults.object_class;
+ }
default:
g_assert_not_reached ();
}
* in the inlined methods do not inherit their in_stack from
* the bblock they are inlined to. See bug #58863 for an
* example.
+ * This hack is disabled since it also prevents proper tracking of types.
*/
+#if 1
+ bb->out_stack [i] = mono_compile_create_var (cfg, type_from_stack_type (sp [i]), OP_LOCAL);
+#else
if (cfg->inlined_method)
bb->out_stack [i] = mono_compile_create_var (cfg, type_from_stack_type (sp [i]), OP_LOCAL);
else
bb->out_stack [i] = mono_compile_get_interface_var (cfg, i, sp [i]);
+#endif
}
}
}
if (arg->type != STACK_I4 && arg->type != STACK_PTR)
return 1;
return 0;
- case MONO_TYPE_CLASS:
- case MONO_TYPE_STRING:
case MONO_TYPE_OBJECT:
+ if (arg->type != STACK_OBJ)
+ return 1;
+ return 0;
+ case MONO_TYPE_STRING:
+ if (arg->type != STACK_OBJ)
+ return 1;
+ /* ldnull has arg->klass unset */
+ /*if (arg->klass && arg->klass != mono_defaults.string_class) {
+ G_BREAKPOINT ();
+ return 1;
+ }*/
+ return 0;
+ case MONO_TYPE_CLASS:
case MONO_TYPE_SZARRAY:
case MONO_TYPE_ARRAY:
if (arg->type != STACK_OBJ)
} else if (constrained_call) {
cmethod = mono_get_method_constrained (image, token, constrained_call, generic_context, &cil_method);
cmethod = mono_get_inflated_method (cmethod);
+ cil_method = cmethod;
} else {
cmethod = mini_get_method (method, token, NULL, generic_context);
cil_method = cmethod;
n = read32 (ip + 1);
if (method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD) {
+ /* FIXME: moving GC */
NEW_PCONST (cfg, ins, mono_method_get_wrapper_data (method, n));
ins->cil_code = ip;
ins->type = STACK_OBJ;
link_bblock (cfg, bblock, tblock);
CHECK_BBLOCK (target, ip, tblock);
ins->inst_target_bb = tblock;
+ GET_BBLOCK (cfg, bbhash, tblock, ip);
+ link_bblock (cfg, bblock, tblock);
if (sp != stack_start) {
handle_stack_args (cfg, bblock, stack_start, sp - stack_start);
sp = stack_start;
ins->inst_newa_class = klass;
ins->inst_newa_len = *sp;
ins->type = STACK_OBJ;
- ins->klass = klass;
+ ins->klass = mono_array_class_get (klass, 1);
ip += 5;
*sp++ = ins;
/*
sp -= 2;
if (sp [0]->type != STACK_OBJ)
UNVERIFIED;
- klass = array_access_to_klass (*ip);
+ klass = array_access_to_klass (*ip, sp [0]);
NEW_LDELEMA (cfg, load, sp, klass);
load->cil_code = ip;
#ifdef MONO_ARCH_SOFT_FLOAT
sp -= 3;
if (sp [0]->type != STACK_OBJ)
UNVERIFIED;
- klass = array_access_to_klass (*ip);
+ klass = array_access_to_klass (*ip, sp [0]);
NEW_LDELEMA (cfg, load, sp, klass);
load->cil_code = ip;
#ifdef MONO_ARCH_SOFT_FLOAT
+++ /dev/null
-@echo off
-rem This runs genmdesc on the x86 files when called on Visual Studio
-echo Running genmdesc on the x86 files...
-cd mono\mini
-..\..\VSDependancies\genmdesc___win32_debug\genmdesc cpu-x86.md cpu-x86.h x86_desc
-echo done
-
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * runburg.bat, monoburg.vcproj: Move to msvc directory.
+
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * runburg.bat: Run executable that was produced by the current
+ target and sent via an argument.
+ * monoburg.vcproj: Fix Release build target, add define to remove CRT warnings,
+ structure output folders a bit better, begin WIN64 port.
+
2007-02-03 Pekka J Enberg <penberg@cs.helsinki.fi>
* monoburg.c: Let the Monoburg specification override MBState reg1
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="monoburg"\r
- ProjectGUID="{5DCFA645-3358-4A20-9630-AEAAC5EED2D5}"\r
- RootNamespace="monoburg"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../../VSDependancies/temp/monoburg/Debug"\r
- IntermediateDirectory="../../VSDependancies/temp/monoburg/Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="copy wparser.c parser.c"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories=""..\..\VSDependancies\include\glib-2.0";".\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- BufferSecurityCheck="false"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="4"\r
- DisableSpecificWarnings="4996"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib "\r
- LinkIncremental="2"\r
- AdditionalLibraryDirectories="..\..\VSDependancies\lib"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- CommandLine="runburg.bat"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\monoburg.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\parser.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\monoburg.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-@echo off
-rem This runs Monoburg on the various x86 files when called on Visual Studio
-echo Running Monoburg on the x86 inssel.brg files...
-cd ..\mini
-..\..\VSDependancies\temp\monoburg\Debug\monoburg -c 1 -p -e inssel.brg inssel-float.brg inssel-long32.brg inssel-x86.brg -d inssel.h -s inssel.c
-echo done
-
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="monodiet"\r
- ProjectGUID="{8F90007F-8019-4191-8808-891E4762D958}"\r
- RootNamespace="monodiet"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../VSDependancies/temp/monodiet/Debug"\r
- IntermediateDirectory="../VSDependancies/temp/monodiet/Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\;..\libgc\include;"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;..\mono\"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- ObjectFile="$(IntDir)/monodiet/"\r
- ProgramDataBaseFileName="$(IntDir)/monodiet/vc80.pdb"\r
- XMLDocumentationFileName="$(IntDir)/monodiet/"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4996"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\;..\VSDependancies\lib"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\metadata\monodiet.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+ * monograph.vcproj: Move to msvc directory.
+
+2007-03-13 Jonathan Chambers <joncham@gmail.com>
+
+ * monograph.vcproj: Begin WIN64 port.
+
Fri Jan 26 12:37:14 CET 2007 Paolo Molaro <lupus@ximian.com>
* monograph.c: warning fixes.
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="monograph"\r
- ProjectGUID="{CA2A69D6-3B9D-45A5-8BF7-4E242E683122}"\r
- RootNamespace="monograph"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../../VSDependancies/temp/monograph/Debug"\r
- IntermediateDirectory="../../VSDependancies/temp/monograph/Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\;..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0\glib";..\..\VSDependancies\include;..\..\mono\"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4996"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\monograph.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="pedump"\r
- ProjectGUID="{84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}"\r
- RootNamespace="pedump"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../VSDependancies/temp/pedump/Debug"\r
- IntermediateDirectory="../VSDependancies/temp/pedump/Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\;..\libgc\include;"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;..\mono\"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- ObjectFile="$(IntDir)/pedump/"\r
- ProgramDataBaseFileName="$(IntDir)/pedump/vc80.pdb"\r
- XMLDocumentationFileName="$(IntDir)/pedump/"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- DisableSpecificWarnings="4018;4996"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\;..\VSDependancies\lib"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="TRUE"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\metadata\pedump.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+2007-03-09 Jonathan Chambers <joncham@gmail.com>
+
+ * mono-dl.c: Use Unicode characters for Win32 functions.
+
+ Code is contributed under MIT/X11 license.
+
2007-01-26 Robert Jordan <robertj@gmx.net>
* mono-dl.c (w32_find_symbol): Implement in-proc symbol lookup
#include <psapi.h>
#define SO_HANDLE_TYPE HMODULE
-#define LL_SO_OPEN(file,flags) (file)? LoadLibrary ((file)): GetModuleHandle (NULL)
+#define LL_SO_OPEN(file,flags) w32_load_module ((file), (flags))
#define LL_SO_CLOSE(module) do { if (!(module)->main_module) FreeLibrary ((module)->handle); } while (0)
#define LL_SO_SYMBOL(module, name) w32_find_symbol ((module), (name))
#define LL_SO_TRFLAGS(flags) 0
static char*
w32_dlerror (void)
{
- char* ret;
- TCHAR* buf = NULL;
+ char* ret = NULL;
+ wchar_t* buf = NULL;
DWORD code = GetLastError ();
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL,
- code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL);
-
- ret = g_strdup (buf);
- LocalFree (buf);
+ if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL,
+ code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL))
+ {
+ ret = g_utf16_to_utf8 (buf, wcslen(buf), NULL, NULL, NULL);
+ LocalFree (buf);
+ }
return ret;
}
return NULL;
}
+
+static gpointer
+w32_load_module (const char* file, int flags)
+{
+ gpointer hModule = NULL;
+ if (file)
+ {
+ gunichar2* file_utf16 = g_utf8_to_utf16 (file, strlen (file), NULL, NULL, NULL);
+ hModule = LoadLibrary (file_utf16);
+ g_free (file_utf16);
+ }
+ else
+ {
+ hModule = GetModuleHandle (NULL);
+ }
+ return hModule;
+}
#endif
/*
--- /dev/null
+
+EXTRA_DIST=create-windef.pl mono.def README *.vcproj mono.sln
+
+update-def:
+ perl create-windef.pl mono.def
+
--- /dev/null
+README Last updated: 2007-03-09
+
+
+INTRODUCTION
+
+This directory (msvc) serves as a central location for
+all things needed to build the mono runtime using
+Microsoft Visual Studio.
+
+When new exported API calls are added to the runtime, issue the
+command:
+ make update-def
+in this directory and commit the resulting mono.def file.
+This must happen on a Linux system, because we get the list
+of the exported symbols from the generated shared library.
+
--- /dev/null
+#!/usr/bin/perl -w
+
+use strict;
+
+my $outfile = shift || usage ();
+my @symbols = ();
+my %excludes = ();
+my $cmd = "nm -D ../mono/mini/.libs/libmono.so";
+
+@excludes {qw(
+ mono_class_setup_vtable_general_new mono_debugger_init mono_debugger_main
+ mono_once mono_pthread_key_for_tls
+)} = ();
+
+open (SYMS, "$cmd |") || die "Cannot run \$cmd': $!\n";
+while (<SYMS>) {
+ next unless / T (mono_.*)/;
+ next if exists $excludes {$1};
+ push @symbols, $1;
+}
+close (SYMS);
+@symbols = sort @symbols;
+
+open (OUT, ">$outfile") || die "Cannot open '$outfile': $!\n";
+print OUT "; file generated by create-windef.pl\n";
+print OUT "LIBRARY mono.dll\nEXPORTS\n";
+print OUT join ("\n", @symbols);
+
+close (OUT);
+
+sub usage {
+ print "Usage: create-windef.pl output_file\n";
+ exit (1);
+}
+
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="genmdesc"\r
+ ProjectGUID="{B7098DFA-31E6-4006-8A15-1C9A4E925149}"\r
+ RootNamespace="genmdesc"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="./bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="winsetup.bat"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TypeLibraryName=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.tlb"\r
+ HeaderFileName=""\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ WarningLevel="3"\r
+ SuppressStartupBanner="true"\r
+ DebugInformationFormat="4"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="_DEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib"\r
+ OutputFile="$(OutDir)/genmdesc.exe"\r
+ LinkIncremental="2"\r
+ SuppressStartupBanner="true"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/genmdesc.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runmdesc.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="./bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="winsetup.bat"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ TypeLibraryName=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.tlb"\r
+ HeaderFileName=""\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ WarningLevel="3"\r
+ SuppressStartupBanner="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="_DEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib"\r
+ OutputFile="$(OutDir)/genmdesc.exe"\r
+ LinkIncremental="2"\r
+ SuppressStartupBanner="true"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/genmdesc.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runmdesc.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="./bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="winsetup.bat"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TypeLibraryName=".\Release/genmdesc.tlb"\r
+ HeaderFileName=""\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ InlineFunctionExpansion="1"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ StringPooling="true"\r
+ RuntimeLibrary="0"\r
+ EnableFunctionLevelLinking="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ SuppressStartupBanner="true"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="NDEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib"\r
+ OutputFile="$(OutDir)/genmdesc.exe"\r
+ LinkIncremental="1"\r
+ SuppressStartupBanner="true"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ ProgramDatabaseFile=".\Release/genmdesc.pdb"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\Release/genmdesc.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runmdesc.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="./bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="winsetup.bat"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ TypeLibraryName=".\Release/genmdesc.tlb"\r
+ HeaderFileName=""\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ InlineFunctionExpansion="1"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ StringPooling="true"\r
+ RuntimeLibrary="0"\r
+ EnableFunctionLevelLinking="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ SuppressStartupBanner="true"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="NDEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib"\r
+ OutputFile="$(OutDir)/genmdesc.exe"\r
+ LinkIncremental="1"\r
+ SuppressStartupBanner="true"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ ProgramDatabaseFile=".\Release/genmdesc.pdb"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\Release/genmdesc.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runmdesc.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\mini\genmdesc.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\helpers.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\monobitset.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\opcodes.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="libgc"\r
+ ProjectGUID="{EB56000B-C80B-4E8B-908D-D84D31B517D3}"\r
+ RootNamespace="libgc"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="../msvc/lib/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="../msvc/obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="4"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include"\r
+ PreprocessorDefinitions="GC_THREADS;WIN32_THREADS;GC_INSIDE_DLL;GC_GCJ_SUPPORT;WIN32;_DEBUG;_LIB;_WINDOWS;__WIN32__;__i386__;PLATFORM_WIN32;SILENT;ALL_INTERIOR_POINTERS;__STDC__;GC_BUILD;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ProgramDataBaseFileName="$(OutDir)\vc80.pdb"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4311;4312;4996;4005"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLibrarianTool"\r
+ OutputFile="$(OutDir)\libgc.lib"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="4"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include"\r
+ PreprocessorDefinitions="WIN64;_WIN64;GC_THREADS;WIN32_THREADS;GC_INSIDE_DLL;GC_GCJ_SUPPORT;WIN32;_DEBUG;_LIB;_WINDOWS;__WIN32__;__i386__;PLATFORM_WIN32;SILENT;ALL_INTERIOR_POINTERS;__STDC__;GC_BUILD;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ProgramDataBaseFileName="$(OutDir)\vc80.pdb"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4311;4312;4996;4005"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLibrarianTool"\r
+ OutputFile="$(OutDir)\libgc.lib"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="../msvc/lib/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="../msvc/obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="4"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\libgc\include"\r
+ PreprocessorDefinitions="GC_THREADS;WIN32_THREADS;GC_INSIDE_DLL;GC_GCJ_SUPPORT;WIN32;NDEBUG;_LIB;_WINDOWS;__WIN32__;__i386__;PLATFORM_WIN32;SILENT;ALL_INTERIOR_POINTERS;__STDC__;GC_BUILD;_CRT_SECURE_NO_DEPRECATE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ProgramDataBaseFileName="$(OutDir)\vc80.pdb"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLibrarianTool"\r
+ OutputFile="$(OutDir)\libgc.lib"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="4"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\libgc\include"\r
+ PreprocessorDefinitions="GC_THREADS;WIN32_THREADS;GC_INSIDE_DLL;GC_GCJ_SUPPORT;WIN32;NDEBUG;_LIB;_WINDOWS;__WIN32__;__i386__;PLATFORM_WIN32;SILENT;ALL_INTERIOR_POINTERS;__STDC__;GC_BUILD;_CRT_SECURE_NO_DEPRECATE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ProgramDataBaseFileName="$(OutDir)\vc80.pdb"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLibrarianTool"\r
+ OutputFile="$(OutDir)\libgc.lib"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ <File\r
+ RelativePath="..\libgc\allchblk.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\alloc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\blacklst.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\dbg_mlc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\dyn_load.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\finalize.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\gcj_mlc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\headers.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\mach_dep.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\malloc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\mallocx.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\mark.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\mark_rts.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\misc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\new_hblk.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\obj_map.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\os_dep.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\ptr_chck.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\reclaim.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\stubborn.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\typd_mlc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\win32_threads.c"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+ >\r
+ <File\r
+ RelativePath="..\libgc\include\gc.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\include\private\gc_hdrs.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\include\private\gc_locks.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\include\gc_mark.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\include\private\gc_pmark.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\include\private\gc_priv.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\libgc\include\private\gcconfig.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="libmono"\r
+ ProjectGUID="{CB0D9E92-293C-439C-9AC7-C5F59B6E0771}"\r
+ RootNamespace="libmono"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="./bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalOptions="/D /NODEFAULTLIB:LIBCD" ""\r
+ Optimization="2"\r
+ InlineFunctionExpansion="1"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;__WIN32__;HAVE_CONFIG_H;__i386__;PLATFORM_WIN32;GC_NOT_DLL;GC_GCJ_SUPPORT;GC_WIN32_THREADS;_CRT_SECURE_NO_DEPRECATE"\r
+ StringPooling="true"\r
+ RuntimeLibrary="2"\r
+ EnableFunctionLevelLinking="true"\r
+ UsePrecompiledHeader="0"\r
+ PrecompiledHeaderFile=".\Release/libmono.pch"\r
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).pdb"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="NDEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="libgc.lib glib-2.0.lib ws2_32.lib gthread-2.0.lib Psapi.lib winmm.lib"\r
+ OutputFile="$(OutDir)\mono.dll"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib;".\lib\libgc\$(PlatformName)\$(ConfigurationName)""\r
+ ModuleDefinitionFile="mono.def"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\Release/libmono.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="./bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalOptions="/D /NODEFAULTLIB:LIBCD" ""\r
+ Optimization="2"\r
+ InlineFunctionExpansion="1"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;__WIN32__;HAVE_CONFIG_H;__i386__;PLATFORM_WIN32;GC_NOT_DLL;GC_GCJ_SUPPORT;GC_WIN32_THREADS;_CRT_SECURE_NO_DEPRECATE"\r
+ StringPooling="true"\r
+ RuntimeLibrary="2"\r
+ EnableFunctionLevelLinking="true"\r
+ UsePrecompiledHeader="0"\r
+ PrecompiledHeaderFile=".\Release/libmono.pch"\r
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).pdb"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="NDEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="libgc.lib glib-2.0.lib ws2_32.lib gthread-2.0.lib Psapi.lib winmm.lib"\r
+ OutputFile="$(OutDir)\mono.dll"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib;".\lib\libgc\$(PlatformName)\$(ConfigurationName)""\r
+ ModuleDefinitionFile="mono.def"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\Release/libmono.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="./bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalOptions="/D /NODEFAULTLIB:LIBCD" ""\r
+ Optimization="0"\r
+ InlineFunctionExpansion="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;__WIN32__;HAVE_CONFIG_H;__i386__;PLATFORM_WIN32;GC_NOT_DLL;GC_GCJ_SUPPORT;GC_WIN32_THREADS;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ UsePrecompiledHeader="0"\r
+ PrecompiledHeaderFile=""\r
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).pdb"\r
+ BrowseInformation="1"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996;4018;4244"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="_DEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="libgc.lib glib-2.0.lib ws2_32.lib gthread-2.0.lib Psapi.lib winmm.lib"\r
+ OutputFile="$(OutDir)\mono.dll"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib;".\lib\libgc\$(PlatformName)\$(ConfigurationName)""\r
+ ModuleDefinitionFile="mono.def"\r
+ GenerateDebugInformation="true"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\./VSDependancies/temp/libmono___Win32_Debug/libmono.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="./bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="./obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="2"\r
+ UseOfMFC="0"\r
+ ATLMinimizesCRunTimeLibraryUsage="false"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalOptions="/D /NODEFAULTLIB:LIBCD" ""\r
+ Optimization="0"\r
+ InlineFunctionExpansion="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN64;_WIN64;_DEBUG;WIN32;_WINDOWS;__WIN32__;HAVE_CONFIG_H;__i386__;PLATFORM_WIN32;GC_NOT_DLL;GC_GCJ_SUPPORT;GC_WIN32_THREADS;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ UsePrecompiledHeader="0"\r
+ PrecompiledHeaderFile=""\r
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).pdb"\r
+ BrowseInformation="1"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996;4018;4244"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ PreprocessorDefinitions="_DEBUG"\r
+ Culture="1033"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="libgc.lib glib-2.0.lib ws2_32.lib gthread-2.0.lib Psapi.lib winmm.lib"\r
+ OutputFile="$(OutDir)\mono.dll"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib;".\lib\libgc\$(PlatformName)\$(ConfigurationName)""\r
+ ModuleDefinitionFile="mono.def"\r
+ GenerateDebugInformation="true"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ SuppressStartupBanner="true"\r
+ OutputFile=".\./VSDependancies/temp/libmono___Win32_Debug/libmono.bsc"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl"\r
+ >\r
+ <File\r
+ RelativePath="..\config.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\io-layer\io-layer.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="utils"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\utils\mono-codeman.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-codeman.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-compiler.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-counters.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-counters.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-digest.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-dl.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-dl.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-hash.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-hash.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-logger.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-logger.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-math.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-math.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-md5.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-mmap.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-mmap.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-path.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-path.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-poll.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-poll.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-sha1.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-stdlib.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-stdlib.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-uri.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\mono-uri.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\monobitset.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\monobitset.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\strenc.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\strenc.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\strtod.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\utils\strtod.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="metadata"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\metadata\appdomain.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\appdomain.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\assembly.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\boehm-gc.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\char-conversions.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\cil-coff.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\class-internals.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\class.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\console-io.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\console-io.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\culture-info-tables.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\culture-info.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\debug-helpers.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\debug-mono-symfile.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\debug-mono-symfile.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\decimal.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\decimal.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\domain-internals.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\domain.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\environment.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\environment.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\exception.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\exception.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\file-io.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\file-io.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\filewatcher.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\filewatcher.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\gc-internal.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\gc.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\icall.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\image.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\loader.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\locales.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\locales.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\marshal.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\marshal.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mempool.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\metadata-internals.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\metadata.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\monitor.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\monitor.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-config.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-debug-debugger.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-debug-debugger.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-debug.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-debug.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-endian.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-mlist.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\mono-mlist.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\object-internals.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\object.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\opcodes.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\process.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\process.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\profiler-private.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\profiler.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\rand.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\rand.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\rawbuffer.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\reflection.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\security-manager.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\security-manager.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\security.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\security.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\socket-io.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\socket-io.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\string-icalls.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\string-icalls.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\sysmath.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\sysmath.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\tabledefs.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\threadpool.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\threadpool.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\threads-types.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\threads.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\verify.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="os"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\os\gc_wrapper.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="mini"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\mini\abcremoval.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\abcremoval.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\aliasing.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\aot-compiler.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\aot-runtime.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\branch-opts.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\cfold.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\cpu-pentium.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\debug-mini.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\declsec.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\declsec.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\dominators.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\driver.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\exceptions-x86.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\graph.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\helpers.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\inssel.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\inssel.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\jit-icalls.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\jit-icalls.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\linear-scan.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\liveness.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\local-propagation.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-arch.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-codegen.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-exceptions.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-ops.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-trampolines.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-x86.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini-x86.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\mini.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\regalloc.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\regalloc.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\ssa.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\ssapre-cee-ops.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\ssapre-mini-ops.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\ssapre.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\ssapre.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\trace.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\trace.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\tramp-x86.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Debug|x64"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""\r
+ PreprocessorDefinitions=""\r
+ UsePrecompiledHeader="0"\r
+ BrowseInformation="1"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\mini\wapihandles.c"\r
+ >\r
+ </File>\r
+ <Filter\r
+ Name="x86"\r
+ >\r
+ </Filter>\r
+ <Filter\r
+ Name="x64"\r
+ >\r
+ </Filter>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+; file generated by create-windef.pl
+LIBRARY mono.dll
+EXPORTS
+mono_add_internal_call
+mono_alloc_special_static_data
+mono_array_class_get
+mono_array_clone
+mono_array_element_size
+mono_array_new
+mono_array_new_full
+mono_array_new_specific
+mono_assemblies_cleanup
+mono_assemblies_init
+mono_assembly_close
+mono_assembly_fill_assembly_name
+mono_assembly_foreach
+mono_assembly_get_assemblyref
+mono_assembly_get_image
+mono_assembly_get_main
+mono_assembly_get_object
+mono_assembly_getrootdir
+mono_assembly_invoke_load_hook
+mono_assembly_invoke_search_hook
+mono_assembly_load
+mono_assembly_load_from
+mono_assembly_load_from_full
+mono_assembly_load_full
+mono_assembly_load_module
+mono_assembly_load_reference
+mono_assembly_load_references
+mono_assembly_load_with_partial_name
+mono_assembly_loaded
+mono_assembly_loaded_full
+mono_assembly_names_equal
+mono_assembly_open
+mono_assembly_open_full
+mono_assembly_set_main
+mono_assembly_setrootdir
+mono_bitset_alloc_size
+mono_bitset_clear
+mono_bitset_clear_all
+mono_bitset_clone
+mono_bitset_copyto
+mono_bitset_count
+mono_bitset_equal
+mono_bitset_find_first
+mono_bitset_find_first_unset
+mono_bitset_find_last
+mono_bitset_find_start
+mono_bitset_foreach
+mono_bitset_free
+mono_bitset_intersection
+mono_bitset_intersection_2
+mono_bitset_invert
+mono_bitset_mem_new
+mono_bitset_new
+mono_bitset_set
+mono_bitset_set_all
+mono_bitset_size
+mono_bitset_sub
+mono_bitset_test
+mono_bitset_test_bulk
+mono_bitset_union
+mono_bounded_array_class_get
+mono_burg_emit
+mono_burg_init
+mono_burg_kids
+mono_burg_label
+mono_burg_rule
+mono_check_corlib_version
+mono_class_array_element_size
+mono_class_data_size
+mono_class_describe_statics
+mono_class_enum_basetype
+mono_class_from_generic_parameter
+mono_class_from_mono_type
+mono_class_from_name
+mono_class_from_name_case
+mono_class_from_typeref
+mono_class_get
+mono_class_get_byref_type
+mono_class_get_element_class
+mono_class_get_event_token
+mono_class_get_events
+mono_class_get_field
+mono_class_get_field_from_name
+mono_class_get_field_token
+mono_class_get_fields
+mono_class_get_flags
+mono_class_get_full
+mono_class_get_image
+mono_class_get_interfaces
+mono_class_get_method_from_name
+mono_class_get_method_from_name_flags
+mono_class_get_methods
+mono_class_get_name
+mono_class_get_namespace
+mono_class_get_nested_types
+mono_class_get_nesting_type
+mono_class_get_parent
+mono_class_get_properties
+mono_class_get_property_from_name
+mono_class_get_property_token
+mono_class_get_rank
+mono_class_get_type
+mono_class_get_type_token
+mono_class_inflate_generic_method
+mono_class_inflate_generic_method_full
+mono_class_inflate_generic_type
+mono_class_init
+mono_class_instance_size
+mono_class_is_assignable_from
+mono_class_is_enum
+mono_class_is_subclass_of
+mono_class_is_valuetype
+mono_class_min_align
+mono_class_name_from_token
+mono_class_num_events
+mono_class_num_fields
+mono_class_num_methods
+mono_class_num_properties
+mono_class_value_size
+mono_class_vtable
+mono_cli_rva_image_map
+mono_code_manager_commit
+mono_code_manager_destroy
+mono_code_manager_foreach
+mono_code_manager_invalidate
+mono_code_manager_new
+mono_code_manager_new_dynamic
+mono_code_manager_reserve
+mono_compile_method
+mono_config_for_assembly
+mono_config_parse
+mono_config_parse_memory
+mono_config_string_for_assembly_file
+mono_context_get
+mono_context_init
+mono_context_set
+mono_counters_dump
+mono_counters_enable
+mono_counters_register
+mono_custom_attrs_construct
+mono_custom_attrs_free
+mono_custom_attrs_from_assembly
+mono_custom_attrs_from_class
+mono_custom_attrs_from_event
+mono_custom_attrs_from_field
+mono_custom_attrs_from_index
+mono_custom_attrs_from_method
+mono_custom_attrs_from_param
+mono_custom_attrs_from_property
+mono_custom_attrs_get_attr
+mono_custom_attrs_has_attr
+mono_debug_add_method
+mono_debug_cleanup
+mono_debug_close_mono_symbol_file
+mono_debug_find_method
+mono_debug_free_method_jit_info
+mono_debug_free_source_location
+mono_debug_init
+mono_debug_init_1
+mono_debug_init_2
+mono_debug_init_2_memory
+mono_debug_lookup_method
+mono_debug_lookup_source_location
+mono_debug_open_mono_symbols
+mono_debug_print_stack_frame
+mono_debug_print_vars
+mono_debug_read_method
+mono_debug_symfile_lookup_location
+mono_debug_symfile_lookup_method
+mono_debug_using_mono_debugger
+mono_debugger_add_symbol_file
+mono_debugger_breakpoint_callback
+mono_debugger_check_runtime_version
+mono_debugger_cleanup
+mono_debugger_event
+mono_debugger_handle_exception
+mono_debugger_initialize
+mono_debugger_insert_breakpoint
+mono_debugger_insert_breakpoint_full
+mono_debugger_lock
+mono_debugger_lookup_assembly
+mono_debugger_lookup_type
+mono_debugger_method_has_breakpoint
+mono_debugger_remove_breakpoint
+mono_debugger_run_finally
+mono_debugger_runtime_invoke
+mono_debugger_start_add_type
+mono_debugger_throw_exception
+mono_debugger_unhandled_exception
+mono_debugger_unlock
+mono_declsec_flags_from_assembly
+mono_declsec_flags_from_class
+mono_declsec_flags_from_method
+mono_declsec_get_assembly_action
+mono_declsec_get_class_action
+mono_declsec_get_demands
+mono_declsec_get_inheritdemands_class
+mono_declsec_get_inheritdemands_method
+mono_declsec_get_linkdemands
+mono_declsec_get_method_action
+mono_digest_get_public_token
+mono_disasm_code
+mono_disasm_code_one
+mono_dllmap_insert
+mono_domain_add_class_static_data
+mono_domain_assembly_open
+mono_domain_create
+mono_domain_finalize
+mono_domain_foreach
+mono_domain_free
+mono_domain_get
+mono_domain_get_by_id
+mono_domain_get_id
+mono_domain_has_type_resolve
+mono_domain_is_unloading
+mono_domain_owns_vtable_slot
+mono_domain_set
+mono_domain_set_internal
+mono_domain_try_type_resolve
+mono_environment_exitcode_get
+mono_environment_exitcode_set
+mono_escape_uri_string
+mono_event_get_add_method
+mono_event_get_flags
+mono_event_get_name
+mono_event_get_object
+mono_event_get_parent
+mono_event_get_raise_method
+mono_event_get_remove_method
+mono_exception_from_name
+mono_exception_from_name_domain
+mono_exception_from_name_msg
+mono_exception_from_name_two_strings
+mono_exception_from_token
+mono_field_from_token
+mono_field_get_data
+mono_field_get_flags
+mono_field_get_name
+mono_field_get_object
+mono_field_get_parent
+mono_field_get_type
+mono_field_get_value
+mono_field_get_value_object
+mono_field_set_value
+mono_field_static_get_value
+mono_field_static_set_value
+mono_file_map
+mono_file_unmap
+mono_free_method
+mono_free_verify_list
+mono_g_hash_table_destroy
+mono_g_hash_table_foreach
+mono_g_hash_table_foreach_remove
+mono_g_hash_table_foreach_steal
+mono_g_hash_table_insert
+mono_g_hash_table_lookup
+mono_g_hash_table_lookup_extended
+mono_g_hash_table_new
+mono_g_hash_table_new_full
+mono_g_hash_table_new_type
+mono_g_hash_table_remap
+mono_g_hash_table_remove
+mono_g_hash_table_replace
+mono_g_hash_table_size
+mono_g_hash_table_steal
+mono_gc_collect
+mono_gc_collection_count
+mono_gc_enable_events
+mono_gc_get_generation
+mono_gc_get_heap_size
+mono_gc_get_used_size
+mono_gc_is_finalizer_thread
+mono_gc_max_generation
+mono_gc_out_of_memory
+mono_gc_wbarrier_arrayref_copy
+mono_gc_wbarrier_generic_store
+mono_gc_wbarrier_object
+mono_gc_wbarrier_set_arrayref
+mono_gc_wbarrier_set_field
+mono_gc_wbarrier_value_copy
+mono_gchandle_free
+mono_gchandle_get_target
+mono_gchandle_new
+mono_gchandle_new_weakref
+mono_get_array_class
+mono_get_boolean_class
+mono_get_byte_class
+mono_get_char_class
+mono_get_config_dir
+mono_get_corlib
+mono_get_dbnull_object
+mono_get_delegate_invoke
+mono_get_double_class
+mono_get_enum_class
+mono_get_exception_appdomain_unloaded
+mono_get_exception_argument
+mono_get_exception_argument_null
+mono_get_exception_argument_out_of_range
+mono_get_exception_arithmetic
+mono_get_exception_array_type_mismatch
+mono_get_exception_bad_image_format
+mono_get_exception_bad_image_format2
+mono_get_exception_cannot_unload_appdomain
+mono_get_exception_class
+mono_get_exception_divide_by_zero
+mono_get_exception_execution_engine
+mono_get_exception_file_not_found
+mono_get_exception_file_not_found2
+mono_get_exception_index_out_of_range
+mono_get_exception_invalid_cast
+mono_get_exception_invalid_operation
+mono_get_exception_io
+mono_get_exception_missing_field
+mono_get_exception_missing_method
+mono_get_exception_not_implemented
+mono_get_exception_not_supported
+mono_get_exception_null_reference
+mono_get_exception_overflow
+mono_get_exception_reflection_type_load
+mono_get_exception_security
+mono_get_exception_serialization
+mono_get_exception_stack_overflow
+mono_get_exception_synchronization_lock
+mono_get_exception_thread_abort
+mono_get_exception_thread_interrupted
+mono_get_exception_thread_state
+mono_get_exception_type_initialization
+mono_get_exception_type_load
+mono_get_inflated_method
+mono_get_int16_class
+mono_get_int32_class
+mono_get_int64_class
+mono_get_intptr_class
+mono_get_machine_config
+mono_get_method
+mono_get_method_constrained
+mono_get_method_full
+mono_get_object_class
+mono_get_root_domain
+mono_get_sbyte_class
+mono_get_single_class
+mono_get_special_static_data
+mono_get_string_class
+mono_get_thread_class
+mono_get_uint16_class
+mono_get_uint32_class
+mono_get_uint64_class
+mono_get_uintptr_class
+mono_get_void_class
+mono_guid_to_string
+mono_image_add_to_name_cache
+mono_image_addref
+mono_image_close
+mono_image_ensure_section
+mono_image_ensure_section_idx
+mono_image_get_assembly
+mono_image_get_entry_point
+mono_image_get_filename
+mono_image_get_guid
+mono_image_get_name
+mono_image_get_public_key
+mono_image_get_resource
+mono_image_get_strong_name
+mono_image_get_table_info
+mono_image_get_table_rows
+mono_image_has_authenticode_entry
+mono_image_init
+mono_image_init_name_cache
+mono_image_is_dynamic
+mono_image_load_file_for_image
+mono_image_loaded
+mono_image_loaded_by_guid
+mono_image_loaded_by_guid_full
+mono_image_loaded_full
+mono_image_lookup_resource
+mono_image_open
+mono_image_open_from_data
+mono_image_open_from_data_full
+mono_image_open_full
+mono_image_rva_map
+mono_image_strerror
+mono_image_strong_name_position
+mono_image_verify_tables
+mono_images_cleanup
+mono_images_init
+mono_init
+mono_init_from_assembly
+mono_init_version
+mono_inst_name
+mono_install_assembly_load_hook
+mono_install_assembly_postload_refonly_search_hook
+mono_install_assembly_postload_search_hook
+mono_install_assembly_preload_hook
+mono_install_assembly_refonly_preload_hook
+mono_install_assembly_refonly_search_hook
+mono_install_assembly_search_hook
+mono_install_runtime_cleanup
+mono_jit_cleanup
+mono_jit_exec
+mono_jit_info_get_code_size
+mono_jit_info_get_code_start
+mono_jit_info_get_method
+mono_jit_info_table_find
+mono_jit_init
+mono_jit_init_version
+mono_jit_thread_attach
+mono_ldstr
+mono_ldtoken
+mono_load_remote_field
+mono_load_remote_field_new
+mono_locks_dump
+mono_lookup_internal_call
+mono_lookup_pinvoke_call
+mono_main
+mono_marshal_string_to_utf16
+mono_md5_final
+mono_md5_get_digest
+mono_md5_get_digest_from_file
+mono_md5_init
+mono_md5_update
+mono_mempool_alloc
+mono_mempool_alloc0
+mono_mempool_contains_addr
+mono_mempool_destroy
+mono_mempool_empty
+mono_mempool_get_allocated
+mono_mempool_invalidate
+mono_mempool_new
+mono_mempool_stats
+mono_mempool_strdup
+mono_metadata_blob_heap
+mono_metadata_cleanup
+mono_metadata_compute_size
+mono_metadata_custom_attrs_from_index
+mono_metadata_declsec_from_index
+mono_metadata_decode_blob_size
+mono_metadata_decode_row
+mono_metadata_decode_row_col
+mono_metadata_decode_signed_value
+mono_metadata_decode_table_row
+mono_metadata_decode_table_row_col
+mono_metadata_decode_value
+mono_metadata_encode_value
+mono_metadata_events_from_typedef
+mono_metadata_field_info
+mono_metadata_free_array
+mono_metadata_free_marshal_spec
+mono_metadata_free_method_signature
+mono_metadata_free_mh
+mono_metadata_free_type
+mono_metadata_generic_class_is_valuetype
+mono_metadata_get_constant_index
+mono_metadata_get_generic_param_row
+mono_metadata_get_marshal_info
+mono_metadata_get_param_attrs
+mono_metadata_guid_heap
+mono_metadata_implmap_from_method
+mono_metadata_init
+mono_metadata_interfaces_from_typedef
+mono_metadata_load_generic_param_constraints
+mono_metadata_load_generic_params
+mono_metadata_locate
+mono_metadata_locate_token
+mono_metadata_methods_from_event
+mono_metadata_methods_from_property
+mono_metadata_nested_in_typedef
+mono_metadata_nesting_typedef
+mono_metadata_packing_from_typedef
+mono_metadata_parse_array
+mono_metadata_parse_custom_mod
+mono_metadata_parse_field_type
+mono_metadata_parse_marshal_spec
+mono_metadata_parse_method_signature
+mono_metadata_parse_method_signature_full
+mono_metadata_parse_mh
+mono_metadata_parse_mh_full
+mono_metadata_parse_param
+mono_metadata_parse_signature
+mono_metadata_parse_type
+mono_metadata_parse_type_full
+mono_metadata_parse_typedef_or_ref
+mono_metadata_properties_from_typedef
+mono_metadata_signature_alloc
+mono_metadata_signature_dup
+mono_metadata_signature_equal
+mono_metadata_string_heap
+mono_metadata_token_from_dor
+mono_metadata_translate_token_index
+mono_metadata_type_equal
+mono_metadata_type_hash
+mono_metadata_typedef_from_field
+mono_metadata_typedef_from_method
+mono_metadata_user_string
+mono_method_body_get_object
+mono_method_desc_free
+mono_method_desc_from_method
+mono_method_desc_full_match
+mono_method_desc_match
+mono_method_desc_new
+mono_method_desc_search_in_class
+mono_method_desc_search_in_image
+mono_method_full_name
+mono_method_get_class
+mono_method_get_flags
+mono_method_get_header
+mono_method_get_index
+mono_method_get_last_managed
+mono_method_get_marshal_info
+mono_method_get_name
+mono_method_get_object
+mono_method_get_param_names
+mono_method_get_param_token
+mono_method_get_signature
+mono_method_get_signature_full
+mono_method_get_token
+mono_method_has_marshal_info
+mono_method_header_get_clauses
+mono_method_header_get_code
+mono_method_header_get_locals
+mono_method_header_get_num_clauses
+mono_method_signature
+mono_method_verify
+mono_mlist_alloc
+mono_mlist_append
+mono_mlist_get_data
+mono_mlist_last
+mono_mlist_length
+mono_mlist_next
+mono_mlist_prepend
+mono_mlist_remove_item
+mono_mlist_set_data
+mono_module_file_get_object
+mono_module_get_object
+mono_monitor_enter
+mono_monitor_exit
+mono_monitor_try_enter
+mono_mprotect
+mono_object_castclass_mbyref
+mono_object_clone
+mono_object_describe
+mono_object_describe_fields
+mono_object_get_class
+mono_object_get_domain
+mono_object_get_size
+mono_object_get_virtual_method
+mono_object_hash
+mono_object_is_alive
+mono_object_isinst
+mono_object_isinst_mbyref
+mono_object_new
+mono_object_new_alloc_specific
+mono_object_new_fast
+mono_object_new_from_token
+mono_object_new_specific
+mono_object_unbox
+mono_opcode_name
+mono_opcode_value
+mono_pagesize
+mono_param_get_objects
+mono_parse_default_optimizations
+mono_path_canonicalize
+mono_path_resolve_symlinks
+mono_pe_file_open
+mono_pmip
+mono_poll
+mono_print_method_from_ip
+mono_print_thread_dump
+mono_print_unhandled_exception
+mono_profiler_coverage_get
+mono_profiler_get_events
+mono_profiler_install
+mono_profiler_install_allocation
+mono_profiler_install_appdomain
+mono_profiler_install_assembly
+mono_profiler_install_class
+mono_profiler_install_coverage_filter
+mono_profiler_install_enter_leave
+mono_profiler_install_gc
+mono_profiler_install_jit_compile
+mono_profiler_install_jit_end
+mono_profiler_install_module
+mono_profiler_install_statistical
+mono_profiler_install_thread
+mono_profiler_install_transition
+mono_profiler_load
+mono_profiler_set_events
+mono_property_get_flags
+mono_property_get_get_method
+mono_property_get_name
+mono_property_get_object
+mono_property_get_parent
+mono_property_get_set_method
+mono_property_get_value
+mono_property_set_value
+mono_ptr_class_get
+mono_raise_exception
+mono_reflection_get_custom_attrs
+mono_reflection_get_custom_attrs_blob
+mono_reflection_get_custom_attrs_by_type
+mono_reflection_get_custom_attrs_data
+mono_reflection_get_custom_attrs_info
+mono_reflection_get_token
+mono_reflection_get_type
+mono_reflection_parse_type
+mono_reflection_type_from_name
+mono_register_bundled_assemblies
+mono_register_config_for_assembly
+mono_register_machine_config
+mono_remote_class
+mono_runtime_class_init
+mono_runtime_cleanup
+mono_runtime_delegate_invoke
+mono_runtime_exec_main
+mono_runtime_exec_managed_code
+mono_runtime_get_main_args
+mono_runtime_init
+mono_runtime_invoke
+mono_runtime_invoke_array
+mono_runtime_is_shutting_down
+mono_runtime_object_init
+mono_runtime_quit
+mono_runtime_run_main
+mono_runtime_set_shutting_down
+mono_set_config_dir
+mono_set_defaults
+mono_set_dirs
+mono_set_rootdir
+mono_sha1_final
+mono_sha1_get_digest
+mono_sha1_get_digest_from_file
+mono_sha1_init
+mono_sha1_update
+mono_signature_explicit_this
+mono_signature_get_call_conv
+mono_signature_get_desc
+mono_signature_get_param_count
+mono_signature_get_params
+mono_signature_get_return_type
+mono_signature_hash
+mono_signature_is_instance
+mono_signature_vararg_start
+mono_signbit_double
+mono_signbit_float
+mono_stack_walk
+mono_stack_walk_no_il
+mono_store_remote_field
+mono_store_remote_field_new
+mono_string_equal
+mono_string_from_utf16
+mono_string_hash
+mono_string_intern
+mono_string_is_interned
+mono_string_new
+mono_string_new_len
+mono_string_new_size
+mono_string_new_utf16
+mono_string_new_wrapper
+mono_string_to_utf16
+mono_string_to_utf8
+mono_stringify_assembly_name
+mono_table_info_get_rows
+mono_thread_abort_all_other_threads
+mono_thread_attach
+mono_thread_cleanup
+mono_thread_create
+mono_thread_current
+mono_thread_detach
+mono_thread_exit
+mono_thread_force_interruption_checkpoint
+mono_thread_get_abort_signal
+mono_thread_get_main
+mono_thread_get_pending_exception
+mono_thread_has_appdomain_ref
+mono_thread_init
+mono_thread_interruption_checkpoint
+mono_thread_interruption_request_flag
+mono_thread_interruption_requested
+mono_thread_manage
+mono_thread_new_init
+mono_thread_pop_appdomain_ref
+mono_thread_push_appdomain_ref
+mono_thread_request_interruption
+mono_thread_set_main
+mono_thread_stop
+mono_thread_suspend_all_other_threads
+mono_threads_abort_appdomain_threads
+mono_threads_clear_cached_culture
+mono_threads_get_default_stacksize
+mono_threads_install_cleanup
+mono_threads_request_thread_dump
+mono_threads_set_default_stacksize
+mono_trace
+mono_trace_cleanup
+mono_trace_is_traced
+mono_trace_pop
+mono_trace_push
+mono_trace_set_level
+mono_trace_set_level_string
+mono_trace_set_mask
+mono_trace_set_mask_string
+mono_tracev
+mono_type_create_from_typespec
+mono_type_full_name
+mono_type_generic_inst_is_valuetype
+mono_type_get_array_type
+mono_type_get_class
+mono_type_get_desc
+mono_type_get_modifiers
+mono_type_get_name
+mono_type_get_object
+mono_type_get_ptr_type
+mono_type_get_signature
+mono_type_get_type
+mono_type_get_underlying_type
+mono_type_is_byref
+mono_type_size
+mono_type_stack_size
+mono_type_to_unmanaged
+mono_unhandled_exception
+mono_unicode_from_external
+mono_unicode_to_external
+mono_upgrade_remote_class_wrapper
+mono_utf8_from_external
+mono_valloc
+mono_value_box
+mono_value_copy
+mono_value_copy_array
+mono_value_describe_fields
+mono_verify_corlib
+mono_vfree
+mono_vtable_get_static_field_data
+mono_walk_stack
\ No newline at end of file
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmdesc", "genmdesc.vcproj", "{B7098DFA-31E6-4006-8A15-1C9A4E925149}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmono", "libmono.vcproj", "{CB0D9E92-293C-439C-9AC7-C5F59B6E0771}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {B7098DFA-31E6-4006-8A15-1C9A4E925149}\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5} = {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {EB56000B-C80B-4E8B-908D-D84D31B517D3}\r
+ EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-invoke", "test-invoke.vcproj", "{C5639B3F-288A-4A4B-A4A5-C0D85834221D}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Embedded Samples", "Embedded Samples", "{5FE09AA5-C3C9-45EA-A323-36A11B653CEC}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "teste", "teste.vcproj", "{6FDE4E5E-57D0-432F-A987-6C226A7827E4}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{EE2CC761-9652-44AC-9204-7EB31194CAA6}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mono", "mono.vcproj", "{A0EDDCD9-940F-432C-A28F-7EF322437D79}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgc", "libgc.vcproj", "{EB56000B-C80B-4E8B-908D-D84D31B517D3}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monodis", "monodis.vcproj", "{37F50E5A-4818-46CF-81FE-4BB06DE5D42E}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pedump", "pedump.vcproj", "{84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monodiet", "monodiet.vcproj", "{8F90007F-8019-4191-8808-891E4762D958}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monoburg", "monoburg.vcproj", "{5DCFA645-3358-4A20-9630-AEAAC5EED2D5}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monograph", "monograph.vcproj", "{CA2A69D6-3B9D-45A5-8BF7-4E242E683122}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{0EBA83B7-0EB4-4C83-A900-77300A97E8B1}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-metadata", "test-metadata.vcproj", "{C2EB666E-9146-4B7A-85F6-25F9EA313770}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+ EndProjectSection\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Debug|Mixed Platforms = Debug|Mixed Platforms\r
+ Debug|Win32 = Debug|Win32\r
+ Debug|x64 = Debug|x64\r
+ Release|Any CPU = Release|Any CPU\r
+ Release|Mixed Platforms = Release|Mixed Platforms\r
+ Release|Win32 = Release|Win32\r
+ Release|x64 = Release|x64\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Win32.Build.0 = Debug|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|x64.ActiveCfg = Debug|x64\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|x64.Build.0 = Debug|x64\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Win32.ActiveCfg = Release|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Win32.Build.0 = Release|Win32\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|x64.ActiveCfg = Release|x64\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|x64.Build.0 = Release|x64\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Win32.Build.0 = Debug|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|x64.ActiveCfg = Debug|x64\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|x64.Build.0 = Debug|x64\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Win32.ActiveCfg = Release|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Win32.Build.0 = Release|Win32\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|x64.ActiveCfg = Release|x64\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|x64.Build.0 = Release|x64\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Win32.Build.0 = Debug|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|x64.ActiveCfg = Debug|x64\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|x64.Build.0 = Debug|x64\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Win32.ActiveCfg = Release|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Win32.Build.0 = Release|Win32\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|x64.ActiveCfg = Release|x64\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|x64.Build.0 = Release|x64\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Win32.Build.0 = Debug|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|x64.ActiveCfg = Debug|x64\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|x64.Build.0 = Debug|x64\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Win32.ActiveCfg = Release|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Win32.Build.0 = Release|Win32\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|x64.ActiveCfg = Release|x64\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|x64.Build.0 = Release|x64\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Win32.Build.0 = Debug|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|x64.ActiveCfg = Debug|x64\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|x64.Build.0 = Debug|x64\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Win32.ActiveCfg = Release|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Win32.Build.0 = Release|Win32\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|x64.ActiveCfg = Release|x64\r
+ {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|x64.Build.0 = Release|x64\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Win32.Build.0 = Debug|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|x64.ActiveCfg = Debug|x64\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|x64.Build.0 = Debug|x64\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Win32.ActiveCfg = Release|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Win32.Build.0 = Release|Win32\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|x64.ActiveCfg = Release|x64\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|x64.Build.0 = Release|x64\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Win32.Build.0 = Debug|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|x64.ActiveCfg = Debug|x64\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|x64.Build.0 = Debug|x64\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Win32.ActiveCfg = Release|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Win32.Build.0 = Release|Win32\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|x64.ActiveCfg = Release|x64\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|x64.Build.0 = Release|x64\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Win32.Build.0 = Debug|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|x64.ActiveCfg = Debug|x64\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|x64.Build.0 = Debug|x64\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Win32.ActiveCfg = Release|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Win32.Build.0 = Release|Win32\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|x64.ActiveCfg = Release|x64\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|x64.Build.0 = Release|x64\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|Win32.Build.0 = Debug|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|x64.ActiveCfg = Debug|x64\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Debug|x64.Build.0 = Debug|x64\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|Win32.ActiveCfg = Release|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|Win32.Build.0 = Release|Win32\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|x64.ActiveCfg = Release|x64\r
+ {8F90007F-8019-4191-8808-891E4762D958}.Release|x64.Build.0 = Release|x64\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|Win32.Build.0 = Debug|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|x64.ActiveCfg = Debug|x64\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Debug|x64.Build.0 = Debug|x64\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Win32.ActiveCfg = Release|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|Win32.Build.0 = Release|Win32\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|x64.ActiveCfg = Release|x64\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5}.Release|x64.Build.0 = Release|x64\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Win32.Build.0 = Debug|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|x64.ActiveCfg = Debug|x64\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|x64.Build.0 = Debug|x64\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Win32.ActiveCfg = Release|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Win32.Build.0 = Release|Win32\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|x64.ActiveCfg = Release|x64\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|x64.Build.0 = Release|x64\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Any CPU.ActiveCfg = Debug|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Win32.Build.0 = Debug|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|x64.ActiveCfg = Debug|x64\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|x64.Build.0 = Debug|x64\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Any CPU.ActiveCfg = Release|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Win32.ActiveCfg = Release|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Win32.Build.0 = Release|Win32\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|x64.ActiveCfg = Release|x64\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|x64.Build.0 = Release|x64\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+ GlobalSection(NestedProjects) = preSolution\r
+ {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+ {37F50E5A-4818-46CF-81FE-4BB06DE5D42E} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+ {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+ {8F90007F-8019-4191-8808-891E4762D958} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+ {5DCFA645-3358-4A20-9630-AEAAC5EED2D5} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+ {CA2A69D6-3B9D-45A5-8BF7-4E242E683122} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+ {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
+ {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
+ {C5639B3F-288A-4A4B-A4A5-C0D85834221D} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
+ {6FDE4E5E-57D0-432F-A987-6C226A7827E4} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
+ {C2EB666E-9146-4B7A-85F6-25F9EA313770} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="mono"\r
+ ProjectGUID="{A0EDDCD9-940F-432C-A28F-7EF322437D79}"\r
+ RootNamespace="mono"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ProgramDataBaseFileName="$(OutDir)\mono.exe.pdb"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib mono.lib Psapi.lib winmm.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ProgramDataBaseFileName="$(OutDir)\mono.exe.pdb"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib mono.lib Psapi.lib winmm.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib mono.lib Psapi.lib winmm.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="bin/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ IntermediateDirectory="obj/$(ProjectName)/$(PlatformName)/$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="1"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__;_CRT_SECURE_NO_DEPRECATE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib mono.lib Psapi.lib winmm.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\mono\mini\main.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="monoburg"\r
+ ProjectGUID="{5DCFA645-3358-4A20-9630-AEAAC5EED2D5}"\r
+ RootNamespace="monoburg"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory=".\bin\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory=".\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="cd ..\mono\monoburg
copy wparser.c parser.c"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BufferSecurityCheck="false"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="4"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib"\r
+ LinkIncremental="2"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runburg.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory=".\bin\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory=".\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="cd ..\mono\monoburg
copy wparser.c parser.c"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ BufferSecurityCheck="false"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib"\r
+ LinkIncremental="2"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runburg.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory=".\bin\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory=".\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="cd ..\mono\monoburg
copy wparser.c parser.c"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runburg.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory=".\bin\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory=".\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ CommandLine="cd ..\mono\monoburg
copy wparser.c parser.c"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\libgc\include;..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ CommandLine="runburg.bat $(TargetPath)"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\monoburg\monoburg.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\monoburg\parser.c"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\monoburg\monoburg.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="monodiet"\r
+ ProjectGUID="{8F90007F-8019-4191-8808-891E4762D958}"\r
+ RootNamespace="monodiet"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="../VSDependancies/temp/monodiet/Debug"\r
+ IntermediateDirectory="../VSDependancies/temp/monodiet/Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;..\libgc\include;"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;..\mono\"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/monodiet/"\r
+ ProgramDataBaseFileName="$(IntDir)/monodiet/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/monodiet/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\;..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;..\libgc\include;"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;..\mono\"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/monodiet/"\r
+ ProgramDataBaseFileName="$(IntDir)/monodiet/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/monodiet/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\;..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\mono\metadata\monodiet.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="monodis"\r
+ ProjectGUID="{37F50E5A-4818-46CF-81FE-4BB06DE5D42E}"\r
+ RootNamespace="dis"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="../../VSDependancies/temp/monodis/Debug"\r
+ IntermediateDirectory="../../VSDependancies/temp/monodis/Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996;4018;4244"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996;4018;4244"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\dis\declsec.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\dis-cil.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\dump.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\get.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\main.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\opcodes.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\util.c"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+ >\r
+ <File\r
+ RelativePath="..\mono\dis\declsec.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\dis-cil.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\dump.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\get.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\meta.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\push-pop.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\dis\util.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="monograph"\r
+ ProjectGUID="{CA2A69D6-3B9D-45A5-8BF7-4E242E683122}"\r
+ RootNamespace="monograph"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="../../VSDependancies/temp/monograph/Debug"\r
+ IntermediateDirectory="../../VSDependancies/temp/monograph/Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ AdditionalIncludeDirectories="..\;"..\VSDependancies\include\glib-2.0";"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;"..\VSDependancies\lib\glib-2.0\include";..\mono\;..\mono\jit"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\mono\monograph\monograph.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\mono\metadata\opcodes.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="pedump"\r
+ ProjectGUID="{84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}"\r
+ RootNamespace="pedump"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="../VSDependancies/temp/pedump/Debug"\r
+ IntermediateDirectory="../VSDependancies/temp/pedump/Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;..\libgc\include;"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;..\mono\"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/pedump/"\r
+ ProgramDataBaseFileName="$(IntDir)/pedump/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/pedump/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4018;4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\;..\libgc\include;"..\VSDependancies\include\glib-2.0\glib";..\VSDependancies\include;..\mono\"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;PLATFORM_WIN32;__i386__"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/pedump/"\r
+ ProgramDataBaseFileName="$(IntDir)/pedump/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/pedump/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ DisableSpecificWarnings="4018;4996"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib ws2_32.lib gthread-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="../VSDependancies/lib;bin/mono/$(PlatformName)/$(ConfigurationName)"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\mono\metadata\pedump.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+@echo off
+rem This runs Monoburg on the various x86 files when called on Visual Studio
+echo Running Monoburg on the x86 inssel.brg files...
+cd ..\mono\mini
+set PATH=%PATH%;..\..\VSDependancies\lib
+%1 -c 1 -p -e inssel.brg inssel-float.brg inssel-long32.brg inssel-x86.brg -d inssel.h -s inssel.c
+echo done
+
--- /dev/null
+@echo off
+rem This runs genmdesc on the x86 files when called on Visual Studio
+echo Running genmdesc on the x86 files...
+cd ..\mono\mini
+set PATH=%PATH%;..\..\VSDependancies\lib
+%1 cpu-x86.md cpu-x86.h x86_desc
+echo done
+
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="test-invoke"\r
+ ProjectGUID="{C5639B3F-288A-4A4B-A4A5-C0D85834221D}"\r
+ RootNamespace="testinvoke"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="Debug"\r
+ IntermediateDirectory="Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0";"..\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include;..\..\;C:\cygwin\opt\mono\include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/invoke/"\r
+ ProgramDataBaseFileName="$(IntDir)/invoke/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/invoke/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0";"..\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include;..\..\;C:\cygwin\opt\mono\include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/invoke/"\r
+ ProgramDataBaseFileName="$(IntDir)/invoke/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/invoke/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\samples\embed\test-invoke.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="test-metadata"\r
+ ProjectGUID="{C2EB666E-9146-4B7A-85F6-25F9EA313770}"\r
+ RootNamespace="testmetadata"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="Debug"\r
+ IntermediateDirectory="Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\..;"..\..\VSDependancies\include\glib-2.0\glib";..\..\VSDependancies\include;C:\cygwin\opt\mono\include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/metadata/"\r
+ ProgramDataBaseFileName="$(IntDir)/metadata/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/metadata/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\..;"..\..\VSDependancies\include\glib-2.0\glib";..\..\VSDependancies\include;C:\cygwin\opt\mono\include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/metadata/"\r
+ ProgramDataBaseFileName="$(IntDir)/metadata/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/metadata/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\samples\embed\test-metadata.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="8.00"\r
+ Name="teste"\r
+ ProjectGUID="{6FDE4E5E-57D0-432F-A987-6C226A7827E4}"\r
+ RootNamespace="teste"\r
+ Keyword="Win32Proj"\r
+ >\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"\r
+ />\r
+ <Platform\r
+ Name="x64"\r
+ />\r
+ </Platforms>\r
+ <ToolFiles>\r
+ </ToolFiles>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="Debug"\r
+ IntermediateDirectory="Debug"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0";"..\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include;..\..\;C:\cygwin\opt\mono\include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/e/"\r
+ ProgramDataBaseFileName="$(IntDir)/e/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/e/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="1"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Debug|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories="..\..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0";"..\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include;..\..\;C:\cygwin\opt\mono\include"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="1"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ ObjectFile="$(IntDir)/e/"\r
+ ProgramDataBaseFileName="$(IntDir)/e/vc80.pdb"\r
+ XMLDocumentationFileName="$(IntDir)/e/"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ CompileAs="1"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|x64"\r
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+ ConfigurationType="1"\r
+ CharacterSet="2"\r
+ >\r
+ <Tool\r
+ Name="VCPreBuildEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCCustomBuildTool"\r
+ />\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"\r
+ />\r
+ <Tool\r
+ Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
+ />\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+ RuntimeLibrary="2"\r
+ BufferSecurityCheck="true"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="true"\r
+ DebugInformationFormat="3"\r
+ />\r
+ <Tool\r
+ Name="VCManagedResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCResourceCompilerTool"\r
+ />\r
+ <Tool\r
+ Name="VCPreLinkEventTool"\r
+ />\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ LinkIncremental="1"\r
+ GenerateDebugInformation="true"\r
+ SubSystem="1"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ TargetMachine="17"\r
+ />\r
+ <Tool\r
+ Name="VCALinkTool"\r
+ />\r
+ <Tool\r
+ Name="VCManifestTool"\r
+ />\r
+ <Tool\r
+ Name="VCXDCMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCBscMakeTool"\r
+ />\r
+ <Tool\r
+ Name="VCFxCopTool"\r
+ />\r
+ <Tool\r
+ Name="VCAppVerifierTool"\r
+ />\r
+ <Tool\r
+ Name="VCWebDeploymentTool"\r
+ />\r
+ <Tool\r
+ Name="VCPostBuildEventTool"\r
+ />\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <File\r
+ RelativePath="..\samples\embed\teste.c"\r
+ >\r
+ </File>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
--- /dev/null
+@echo off
+cd ..
+if not exist VSDependancies\lib goto error
+copy winconfig.h config.h
+goto end
+:error
+echo fatal error: the VSDepenancies directory was not found in the "mono" directory
+echo error: you must download and unzip that file
+exit /b 100
+goto end
+:ok
+echo OK
+:end
+exit /b 0
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="test-invoke"\r
- ProjectGUID="{C5639B3F-288A-4A4B-A4A5-C0D85834221D}"\r
- RootNamespace="testinvoke"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="Debug"\r
- IntermediateDirectory="Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0";"..\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include;..\..\;C:\cygwin\opt\mono\include"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- ObjectFile="$(IntDir)/invoke/"\r
- ProgramDataBaseFileName="$(IntDir)/invoke/vc80.pdb"\r
- XMLDocumentationFileName="$(IntDir)/invoke/"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\test-invoke.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="test-metadata"\r
- ProjectGUID="{C2EB666E-9146-4B7A-85F6-25F9EA313770}"\r
- RootNamespace="testmetadata"\r
- Keyword="Win32Proj"\r
- SignManifests="true"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="Debug"\r
- IntermediateDirectory="Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..;"..\..\VSDependancies\include\glib-2.0\glib";..\..\VSDependancies\include;C:\cygwin\opt\mono\include"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- ObjectFile="$(IntDir)/metadata/"\r
- ProgramDataBaseFileName="$(IntDir)/metadata/vc80.pdb"\r
- XMLDocumentationFileName="$(IntDir)/metadata/"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\test-metadata.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="teste"\r
- ProjectGUID="{6FDE4E5E-57D0-432F-A987-6C226A7827E4}"\r
- RootNamespace="teste"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="Debug"\r
- IntermediateDirectory="Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\..\libgc\include;"..\..\VSDependancies\include\glib-2.0";"..\..\VSDependancies\include\glib-2.0\glib";"..\..\VSDependancies\lib\glib-2.0\include";..\..\VSDependancies\include;..\..\;C:\cygwin\opt\mono\include"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- ObjectFile="$(IntDir)/e/"\r
- ProgramDataBaseFileName="$(IntDir)/e/vc80.pdb"\r
- XMLDocumentationFileName="$(IntDir)/e/"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- CompileAs="1"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib ws2_32.lib gthread-2.0.lib gobject-2.0.lib libmono.lib Psapi.lib"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="..\..\;..\..\VSDependancies\lib"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- BufferSecurityCheck="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <File\r
- RelativePath=".\teste.c"\r
- >\r
- </File>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
gacutil \
genxs \
ilasm \
+ installvst \
macpack \
mbas \
mcs \
+++ /dev/null
-@echo off
-if not exist VSDependancies\lib goto error
-copy winconfig.h config.h
-goto end
-:error
-echo fatal error: the VSDepenancies directory was not found in the "mono" directory
-echo error: you must download and unzip that file
-exit /b 100
-goto end
-:ok
-echo OK
-:end
-exit /b 0