Index: Doc/Extra/version.html
==================================================================
--- Doc/Extra/version.html
+++ Doc/Extra/version.html
@@ -48,16 +48,12 @@
Updated to SQLite 3.8.1.
Use declared column sizes for the AnsiStringFixedLength and StringFixedLength mapped database types. Fix for [3113734605].
Check the result of sqlite3_column_name function against NULL.
Return false for the SQLiteParameterCollection.IsSynchronized property because it is not thread-safe.
Raise the static SQLiteConnection.Changed event when any SQLiteCommand, SQLiteDataReader, or CriticalHandle derived object instance is created. Fix for [aba4549801].
- Add SQLiteCommand.Execute, SQLiteCommand.ExecuteNonQuery, and SQLiteCommand.ExecuteScalar method overloads that take a CommandBehavior parameter.
Revise how the extra object data is passed to the static SQLiteConnection.Changed event. ** Potentially Incompatible Change **
- Make sure the database cannot be changed by a query when the CommandBehavior.SchemaOnly flag is used. Fix for [f8dbab8baf]. ** Potentially Incompatible Change **
Include the XML documentation files in the NuGet packages. Fix for [5970d5b0a6].
- Add InteropVersion, InteropSourceId, ProviderVersion, and ProviderSourceId properties to the SQLiteConnection class.
- Add experimental support for interfacing with the authorizer callback in the SQLite core library.
1.0.88.0 - August 7, 2013
- Various fixes to managed virtual table integration infrastructure.
- Implement workaround for an incorrect PROCESSOR_ARCHITECTURE being reported. Fix for [9ac9862611].
Index: Doc/buildChm.tcl
==================================================================
--- Doc/buildChm.tcl
+++ Doc/buildChm.tcl
@@ -31,65 +31,16 @@
regsub -all -- {&} $data {\\\&} data
regsub -all -- {\\(\d+)} $data {\\\\\1} data
return $data
}
-proc getFileHash { fileName } {
- if {[catch {
- exec fossil.exe sha1sum [file nativename $fileName]
- } result] == 0} then {
- return [string trim [lindex [split $result " "] 0]]
- }
- return ""
-}
-
-#
-# HACK: Copy our local [fixed] copy of the MSDN documenter assembly into the
-# installed location of NDoc3, if necessary. Actually copying the file
-# will require elevated administrator privileges; otherwise, it will
-# fail. Any errors encountered while copying the file are reported via
-# the console; however, they will not halt further processing (i.e. the
-# CHM file will probably still get built, but it may contain some links
-# to built-in types that are blank).
-#
-proc copyMsdnDocumenter { sourceDirectory destinationDirectory } {
- set fileNameOnly NDoc3.Documenter.Msdn.dll
-
- set sourceFileName [file join $sourceDirectory bin $fileNameOnly]
- set destinationFileName [file join $destinationDirectory bin $fileNameOnly]
-
- set sourceFileHash [getFileHash $sourceFileName]
- # puts stdout "Hashed \"$sourceFileName\" ==> \"$sourceFileHash\""
-
- set destinationFileHash [getFileHash $destinationFileName]
- # puts stdout "Hashed \"$destinationFileName\" ==> \"$destinationFileHash\""
-
- if {[string length $sourceFileHash] > 0 && \
- [string length $destinationFileHash] > 0 && \
- $sourceFileHash ne $destinationFileHash} then {
- if {[catch {
- file copy -force $destinationFileName $destinationFileName.bak
- file copy -force $sourceFileName $destinationFileName
- } result] == 0} then {
- puts stdout \
- "finished copying \"$sourceFileName\" to \"$destinationFileName\""
- } else {
- puts stdout $result
- }
- } else {
- puts stdout \
- "skipped copying \"$sourceFileName\" to \"$destinationFileName\""
- }
-}
-
-set path [file normalize [file dirname [info script]]]
-
-set nDocExtPath [file join [file dirname $path] Externals NDoc3]
-set nDocInstPath [file join $env(ProgramFiles) NDoc3]
-
-if {![file isdirectory $nDocInstPath]} then {
- puts stdout "NDoc3 must be installed to: $nDocInstPath"
+set path [file dirname [info script]]
+
+set nDocPath [file join $env(ProgramFiles) NDoc3]
+
+if {![file isdirectory $nDocPath]} then {
+ puts stdout "NDoc3 must be installed to: $nDocPath"
exit 1
}
set hhcPath [file join $env(ProgramFiles) "HTML Help Workshop"]
@@ -144,25 +95,20 @@
#
# TODO: If the NDoc version number ever changes, the next line of code will
# probably need to be updated.
#
-set outputPath [file join Output]
-set temporaryPath [file join $outputPath ndoc3_msdn_temp]
-
-if {[file isdirectory $nDocExtPath]} then {
- copyMsdnDocumenter $nDocExtPath $nDocInstPath
-}
-
-set code [catch {exec [file join $nDocInstPath bin NDoc3Console.exe] \
+set outputPath [file join Output ndoc3_msdn_temp]
+
+set code [catch {exec [file join $nDocPath bin NDoc3Console.exe] \
"-project=[file nativename $projectFile]"} result]
puts stdout $result; if {$code != 0} then {exit $code}
set fileNames [list SQLite.NET.hhp SQLite.NET.hhc]
-foreach fileName [glob -nocomplain [file join $temporaryPath *.html]] {
+foreach fileName [glob -nocomplain [file join $outputPath *.html]] {
lappend fileNames [file tail $fileName]
}
set patterns(.hhc,1) {}
@@ -206,11 +152,11 @@
set subSpecs(.html,6) {"\1~Overloads.html"}
set subSpecs(.html,7) {"\1~Overloads.html"}
set subSpecs(.html,8) {"\1~Overloads.html"}
foreach fileName $fileNames {
- set fileName [file join $path $temporaryPath $fileName]
+ set fileName [file join $path $outputPath $fileName]
#
# NOTE: Make sure the file we need actually exists.
#
if {![file isfile $fileName]} then {
@@ -256,17 +202,17 @@
writeFile $fileName $data
}
}
set code [catch {exec [file join $hhcPath hhc.exe] \
- [file nativename [file join $path $temporaryPath SQLite.NET.hhp]]} result]
+ [file nativename [file join $path $outputPath SQLite.NET.hhp]]} result]
#
# NOTE: For hhc.exe, zero means failure.
#
puts stdout $result; if {$code == 0} then {exit 1}
-file copy -force [file join $path $temporaryPath SQLite.NET.chm] \
+file copy -force [file join $path $outputPath SQLite.NET.chm] \
[file join $path SQLite.NET.chm]
puts stdout SUCCESS
exit 0
Index: Externals/Eagle/lib/Eagle1.0/init.eagle
==================================================================
--- Externals/Eagle/lib/Eagle1.0/init.eagle
+++ Externals/Eagle/lib/Eagle1.0/init.eagle
@@ -1166,79 +1166,61 @@
[file join $directory Hippogriff.exe] -delay 2000]
eval $command &; exit -force
}
- proc getUpdateData { uri } {
+ #
+ # NOTE: This proc is used to check for new versions of the runtime
+ # when the user executes the interactive "#check" command. To
+ # disable that functionality, redefine this proc to do nothing.
+ #
+ proc checkForUpdate {} {
+ #
+ # NOTE: This should work properly in Eagle only.
+ #
+ set uri [appendArgs [info engine Uri] [info engine UpdateFile]]
+ set fileName [file tempname]; # unique local temp file name.
+
#
- # NOTE: Temporarily start trusting ONLY our own self-signed
- # certificate which is used primarily for updates.
+ # NOTE: Temporarily start trusting ONLY our self-signed certificate
+ # which is used primarily for "software updates".
#
uri softwareupdates true
try {
#
# NOTE: Download the tag file from the web site.
#
- return [uri download -inline $uri]; # synchronous.
- } finally {
- #
- # NOTE: Stop trusting ONLY our own self-signed certificate
- # which is used primarily for updates.
- #
- uri softwareupdates false
- }
- }
-
- proc getUpdateScriptData { uri } {
- #
- # NOTE: Temporarily start trusting ONLY our own self-signed
- # certificate which is used primarily for updates.
- #
- uri softwareupdates true
-
- try {
- #
- # NOTE: Download the script file from the web site.
- #
- return [interp readorgetscriptfile $uri]; # synchronous.
- } finally {
- #
- # NOTE: Stop trusting ONLY our own self-signed certificate
- # which is used primarily for updates.
- #
- uri softwareupdates false
- }
- }
-
- #
- # NOTE: This proc is used to check for new versions -OR- new update
- # scripts for the runtime when a user executes the interactive
- # "#check" command. To disable this functionality, simply
- # redefine this procedure to do nothing.
- #
- proc checkForUpdate { {wantScripts false} } {
- #
- # NOTE: This should work properly in Eagle only.
- #
- set updateUri [appendArgs [info engine Uri] [info engine UpdateFile]]
-
- #
- # NOTE: Fetch the master update data from the distribution site
- # and normalize to Unix-style line-endings.
- #
- set updateData [string map [list \r\n \n] [getUpdateData $updateUri]]
+ uri download $uri $fileName; # synchronous.
+ } finally {
+ #
+ # NOTE: Stop trusting ONLY our self-signed certificate which is
+ # used primarily for "software updates".
+ #
+ uri softwareupdates false
+ }
+
+ #
+ # NOTE: Read all the data out of the downloaded text file.
+ #
+ set data [readFile $fileName]
+
+ #
+ # NOTE: Remove the downloaded temporary file. We no longer need
+ # it because we just read all the data from it.
+ #
+ file delete $fileName
+
+ #
+ # NOTE: Normalize to Unix line-endings.
+ #
+ set data [string map [list \r\n \n] $data]; # Unix.
#
# NOTE: Split the data into lines.
#
- set lines [split $updateData \n]
-
- #
- # NOTE: Keep track of how many update scripts are processed.
- #
- set scriptCount 0
+ set lines [split $data \n]
#
# NOTE: Check each line to find the build information...
#
foreach line $lines {
@@ -1256,16 +1238,15 @@
#
if {[string index $line 0] ne "#" && \
[string index $line 0] ne ";"} then {
#
# NOTE: Split the tab-delimited line into fields. The format
- # of all lines in the data must be as follows:
+ # of the lines must be as follows:
#
- # protocolId publicKeyToken name
- # culture patchLevel timeStamp
- # baseUri md5Hash sha1Hash sha512Hash
- # notes
+ # protocolId publicKeyToken name culture
+ # patchLevel timeStamp uri md5Hash
+ # sha1Hash sha512Hash notes
#
set fields [split $line \t]
#
# NOTE: Grab the protocol Id field.
@@ -1285,30 +1266,20 @@
#
# NOTE: Grab the culture field.
#
set culture [lindex $fields 3]
- #
- # NOTE: Figure out which protocol is in use for this line.
- # The value "1" means this line specifies a build of
- # the script engine. The value "2" means this line
- # specifies an update script (via a URI) to evaluate.
- # All other values are currently reserved and ignored.
- #
- set checkBuild [expr {!$wantScripts && $protocolId eq "1"}]
- set checkScript [expr {$wantScripts && $protocolId eq "2"}]
-
#
# NOTE: We only want to find the first line that matches our
# engine. The public key token is being used here to
# make sure we get the same "flavor" of the engine.
# The lines are organized so that the "latest stable
# version" is on the first line (for a given public key
# token), followed by development builds, experimental
# builds, etc.
#
- if {($checkBuild || $checkScript) && \
+ if {$protocolId eq "1" && \
[matchEnginePublicKeyToken $publicKeyToken] && \
[matchEngineName $name] && \
[matchEngineCulture $culture]} then {
#
# NOTE: Grab the patch level field.
@@ -1328,12 +1299,11 @@
# NOTE: Compare the patch level from the line to the one we
# are currently using.
#
set compare [package vcompare $patchLevel $enginePatchLevel]
- if {($checkBuild && $compare > 0) || \
- ($checkScript && $compare == 0)} then {
+ if {$compare > 0} then {
#
# NOTE: Grab the time-stamp field.
#
set timeStamp [lindex $fields 5]
@@ -1345,11 +1315,11 @@
# NOTE: Grab the base URI field (i.e. it may be a mirror
# site).
#
set baseUri [lindex $fields 6]
- if {$checkBuild && [string length $baseUri] == 0} then {
+ if {[string length $baseUri] == 0} then {
set baseUri [info engine Uri]; # primary site.
}
#
# NOTE: Grab the notes field (which may be empty).
@@ -1369,215 +1339,24 @@
} else {
set dateTime [clock format [clock scan $timeStamp]]
}
#
- # NOTE: The engine patch level from the line is greater,
- # we are out-of-date. Return the result of our
- # checking now.
- #
- if {$checkBuild} then {
- return [list [appendArgs "newer build " $patchLevel \
- " is available as of " $dateTime] [list $baseUri \
- $patchLevel] [list $notes]]
- }
-
- #
- # NOTE: The script patch level from the line matches the
- # current engine patch level exactly, this script
- # should be evaluated if it can be authenticated.
- #
- if {$checkScript} then {
- #
- # NOTE: First, set the default channel for update script
- # status messages. If the test channel has been
- # set (i.e. by the test suite), it will be used
- # instead.
- #
- if {![info exists channel]} then {
- set channel [expr {[info exists ::test_channel] ? \
- $::test_channel : "stdout"}]
- }
-
- #
- # NOTE: Next, verify the script has a valid base URI.
- # For update scripts, this must be the location
- # where the update script data can be downloaded.
- #
- if {[string length $baseUri] == 0} then {
- tqputs $channel [appendArgs \
- "---- invalid baseUri value for update script line: " \
- $line \"\n]
-
- continue
- }
-
- #
- # NOTE: Next, grab the md5 field and see if it looks valid.
- # Below, the value of this field will be compared to
- # that of the actual MD5 hash of the downloaded script
- # data.
- #
- set lineMd5 [lindex $fields 7]
-
- if {[string length $lineMd5] == 0} then {
- tqputs $channel [appendArgs \
- "---- invalid md5 value for update script line: " \
- $line \"\n]
-
- continue
- }
-
- #
- # NOTE: Next, grab the sha1 field and see if it looks valid.
- # Below, the value of this field will be compared to
- # that of the actual SHA1 hash of the downloaded script
- # data.
- #
- set lineSha1 [lindex $fields 8]
-
- if {[string length $lineSha1] == 0} then {
- tqputs $channel [appendArgs \
- "---- invalid sha1 value for update script line: " \
- $line \"\n]
-
- continue
- }
-
- #
- # NOTE: Next, grab the sha512 field and see if it looks
- # valid. Below, the value of this field will be
- # compared to that of the actual SHA512 hash of the
- # downloaded script data.
- #
- set lineSha512 [lindex $fields 9]
-
- if {[string length $lineSha512] == 0} then {
- tqputs $channel [appendArgs \
- "---- invalid sha512 value for update script line: " \
- $line \"\n]
-
- continue
- }
-
- #
- # NOTE: Next, show the extra information associated with
- # this update script, if any.
- #
- tqputs $channel [appendArgs \
- "---- fetching update script from \"" $baseUri "\" (" \
- $dateTime ") with notes:\n"]
-
- set trimNotes [string trim $notes]
-
- tqputs $channel [appendArgs \
- [expr {[string length $trimNotes] > 0 ? $trimNotes : \
- ""}] "\n---- end of update script notes\n"]
-
- #
- # NOTE: Next, attempt to fetch the update script data.
- #
- set code [catch {getUpdateScriptData $baseUri} result]
-
- if {$code == 0} then {
- #
- # NOTE: Success, set the script data from the result.
- #
- set scriptData $result
- } else {
- #
- # NOTE: Failure, report the error message to the log.
- #
- tqputs $channel [appendArgs \
- "---- failed to fetch update script: " $result \n]
-
- continue
- }
-
- #
- # NOTE: Next, verify that the md5, sha1, and sha512
- # hashes of the raw script data match what was
- # specified in the md5, sha1, and sha512 fields.
- #
- set scriptMd5 [hash normal md5 $scriptData]
-
- if {![string equal -nocase $lineMd5 $scriptMd5]} then {
- tqputs $channel [appendArgs \
- "---- wrong md5 value \"" $scriptMd5 \
- "\" for update script line: " $line \"\n]
-
- continue
- }
-
- set scriptSha1 [hash normal sha1 $scriptData]
-
- if {![string equal -nocase $lineSha1 $scriptSha1]} then {
- tqputs $channel [appendArgs \
- "---- wrong sha1 value \"" $scriptSha1 \
- "\" for update script line: " $line \"\n]
-
- continue
- }
-
- set scriptSha512 [hash normal sha512 $scriptData]
-
- if {![string equal -nocase $lineSha512 $scriptSha512]} then {
- tqputs $channel [appendArgs \
- "---- wrong sha512 value \"" $scriptSha512 \
- "\" for update script line: " $line \"\n]
-
- continue
- }
-
- #
- # NOTE: Finally, everything looks good. Therefore, just
- # evaluate the update script and print the result.
- #
- tqputs $channel [appendArgs \
- "---- evaluating update script from \"" $baseUri \
- \"...\n]
-
- #
- # NOTE: Reset the variables that will be used to contain
- # the result of the update script.
- #
- set code 0; set result ""
-
- #
- # NOTE: Manually override file name to be returned by
- # [info script] to refer back to the originally
- # read script base URI.
- #
- object invoke -flags +NonPublic Interpreter.GetActive \
- PushScriptLocation $baseUri true
-
- try {
- #
- # NOTE: Evaluate the update script in the context of
- # the caller.
- #
- set code [catch {uplevel 1 $scriptData} result]
- } finally {
- #
- # NOTE: Reset manual override of the script file name
- # to be returned by [info script].
- #
- object invoke -flags +NonPublic Interpreter.GetActive \
- PopScriptLocation true
- }
-
- host result $code $result; incr scriptCount
- tqputs $channel "\n---- end of update script results\n"
- }
- } elseif {$checkBuild && $compare < 0} then {
+ # NOTE: The patch level from the line is greater, we are
+ # out-of-date.
+ #
+ return [list [appendArgs "newer build " $patchLevel \
+ " is available as of " $dateTime] [list $baseUri \
+ $patchLevel] [list $notes]]
+ } elseif {$compare < 0} then {
#
# NOTE: The patch level from the line is less, we are more
# up-to-date than the latest version?
#
return [list [appendArgs "running build " $enginePatchLevel \
" is newer than the latest build " $patchLevel]]
- } elseif {$checkBuild} then {
+ } else {
#
# NOTE: The patch levels are equal, we are up-to-date.
#
return [list "running build is the latest"]
}
@@ -1584,26 +1363,11 @@
}
}
}
}
- #
- # NOTE: Figure out what the final result should be. If we get
- # to this point when checking for a new build, something
- # must have gone awry. Otherwise, report the number of
- # update scripts that were successfully processed.
- #
- if {$wantScripts} then {
- if {$scriptCount > 0} then {
- return [list [appendArgs \
- "processed " $scriptCount " update scripts"]]
- } else {
- return [list "no update scripts were processed"]
- }
- } else {
- return [list "cannot determine if running build is the latest"]
- }
+ return [list "cannot determine if running build is the latest"]
}
proc getReturnType { object member } {
if {[string length $object] == 0 || [string length $member] == 0} then {
return ""
Index: Externals/Eagle/lib/Eagle1.0/test.eagle
==================================================================
--- Externals/Eagle/lib/Eagle1.0/test.eagle
+++ Externals/Eagle/lib/Eagle1.0/test.eagle
@@ -78,12 +78,12 @@
}
}
}
proc getSoftwareRegistryKey { wow64 } {
- if {$wow64 && [info exists ::tcl_platform(machine)] && [lsearch -exact \
- [list ia64 amd64] $::tcl_platform(machine)] != -1} then {
+ if {$wow64 && [info exists ::tcl_platform(machine)] && \
+ $::tcl_platform(machine) eq "amd64"} then {
#
# NOTE: Return the WoW64 registry key name because we are running on a
# 64-bit operating system and the caller specifically requested
# the WoW64 registry key name.
#
@@ -837,20 +837,13 @@
lappend command -- $commandName
if {[llength $args] > 0} then {eval lappend command $args}
- if {[info exists ::no(exec)]} then {
- tputs $::test_channel [appendArgs "---- skipping command: " $command \n]
-
- set procName [lindex [info level [info level]] 0]
- error "test use of \[$procName\] has been disabled"
- } else {
- tputs $::test_channel [appendArgs "---- running command: " $command \n]
-
- return [uplevel 1 $command]
- }
+ tputs $::test_channel [appendArgs "---- running command: " $command \n]
+
+ return [uplevel 1 $command]
}
proc testClrExec { commandName options args } {
set command [list exec]
@@ -868,37 +861,22 @@
lappend command $commandName
}
if {[llength $args] > 0} then {eval lappend command $args}
- if {[info exists ::no(exec)]} then {
- tputs $::test_channel [appendArgs "---- skipping command: " $command \n]
-
- set procName [lindex [info level [info level]] 0]
- error "test use of \[$procName\] has been disabled"
- } else {
- tputs $::test_channel [appendArgs "---- running command: " $command \n]
-
- return [uplevel 1 $command]
- }
+ tputs $::test_channel [appendArgs "---- running command: " $command \n]
+
+ return [uplevel 1 $command]
}
proc execTestShell { options args } {
- if {[info exists ::no(exec)]} then {
- tputs $::test_channel [appendArgs \
- "---- skipping nested shell: exec " [string trim [appendArgs \
- $options " " -- " \"" [info nameofexecutable] "\" " $args]] \n]
-
- set procName [lindex [info level [info level]] 0]
- error "test use of \[$procName\] has been disabled"
- } else {
- tputs $::test_channel [appendArgs \
- "---- running nested shell: exec " [string trim [appendArgs \
- $options " " -- " \"" [info nameofexecutable] "\" " $args]] \n]
-
- return [uplevel 1 execShell [list $options] $args]
- }
+ tputs $::test_channel [appendArgs \
+ "---- running nested shell: exec " \
+ [string trim [appendArgs $options " " -- " \"" \
+ [info nameofexecutable] "\" " $args]] \n]
+
+ return [uplevel 1 execShell [list $options] $args]
}
proc isRandomOrder {} {
return [expr {[info exists ::test_random_order] && \
[string is boolean -strict $::test_random_order] && \
@@ -2186,16 +2164,10 @@
catch {file delete $fileName}
}
}
}
- proc getTclVersionForTclShell {} {
- return [testExecTclScript {
- puts -nonewline stdout [info tclversion]
- }]
- }
-
proc getCommandsForTclShell {} {
return [testExecTclScript {
puts -nonewline stdout [info commands]
}]
}
@@ -2204,11 +2176,11 @@
return [testExecTclScript {
puts -nonewline stdout $tcl_platform(machine)
}]
}
- proc getTkVersionForTclShell {} {
+ proc getTkVersion {} {
return [testExecTclScript {
puts -nonewline stdout [package require Tk]; exit
}]
}
@@ -2291,63 +2263,33 @@
object unimport -importpattern System.Windows.Forms.Layout
object unimport -importpattern System.Windows.Forms.PropertyGridInternal
object unimport -importpattern System.Windows.Forms.VisualStyles
}
- proc getTestLibraryDirectory {} {
- #
- # NOTE: First, query the location of the script library.
- #
- set result [info library]
-
- #
- # NOTE: Next, If the script library is embedded within the core
- # library itself (i.e. the script library location refers
- # to a file, not a directory), strip off the file name.
- #
- if {[file exists $result] && [file isfile $result]} then {
- set result [file dirname $result]
- }
-
- #
- # NOTE: Finally, return the resulting script library directory.
- #
- return $result
- }
-
#
# NOTE: Setup the test path relative to the library path.
#
if {![interp issafe] && ![info exists ::test_path]} then {
#
- # NOTE: Try the source release directory structure. For this case,
- # the final test path would be:
- #
- # $library/../../Library/Tests
+ # NOTE: Try the source release directory structure.
#
set ::test_path [file join [file normalize [file dirname \
- [file dirname [getTestLibraryDirectory]]]] Library Tests]
+ [file dirname [info library]]]] Library Tests]
if {![file exists $::test_path] || \
![file isdirectory $::test_path]} then {
#
# NOTE: Try the source release directory structure again; this time,
- # assume only the embedded script library was used. For this
- # case, the final test path would be:
- #
- # $base/Library/Tests
+ # assume only the embedded script library was used.
#
set ::test_path [file join [info base] Library Tests]
}
if {![file exists $::test_path] || \
![file isdirectory $::test_path]} then {
#
- # NOTE: Try for the test package directory. For this case, the final
- # test path would be:
- #
- # $script/../Test1.0
+ # NOTE: Try for the test package directory.
#
set ::test_path [file join [file normalize [file dirname \
[file dirname [info script]]]] [appendArgs Test \
[info engine Version]]]
}
@@ -2355,25 +2297,20 @@
if {![file exists $::test_path] || \
![file isdirectory $::test_path]} then {
#
# NOTE: Try for the test package directory again; this time, use the
# base path and assume the source release directory structure.
- # For this case, the final test path would be:
- #
- # $base/lib/Test1.0
#
set ::test_path [file join [info base] lib [appendArgs Test \
[info engine Version]]]
}
if {![file exists $::test_path] || \
![file isdirectory $::test_path]} then {
#
# NOTE: Try for the test package directory again; this time, use the
- # base path. For this case, the final test path would be:
- #
- # $base/Test1.0
+ # base path.
#
set ::test_path [file join [info base] [appendArgs Test \
[info engine Version]]]
}
@@ -2381,27 +2318,21 @@
![file isdirectory $::test_path]} then {
#
# NOTE: This must be a binary release, no "Library" directory then.
# Also, binary releases have an upper-case "Tests" directory
# name that originates from the "update.bat" tool. This must
- # match the casing used in "update.bat". For this case, the
- # final test path would be:
- #
- # $library/../../Tests
+ # match the casing used in "update.bat".
#
set ::test_path [file join [file normalize [file dirname \
- [file dirname [getTestLibraryDirectory]]]] Tests]
+ [file dirname [info library]]]] Tests]
}
if {![file exists $::test_path] || \
![file isdirectory $::test_path]} then {
#
# NOTE: Fallback to using the base directory and checking for a
- # "Tests" directory beneath it. For this case, the final
- # test path would be:
- #
- # $base/Tests
+ # "Tests" directory beneath it.
#
set ::test_path [file join [info base] Tests]
}
}
Index: Externals/Eagle/lib/Test1.0/constraints.eagle
==================================================================
--- Externals/Eagle/lib/Test1.0/constraints.eagle
+++ Externals/Eagle/lib/Test1.0/constraints.eagle
@@ -207,11 +207,11 @@
tputs $channel no\n
}
proc checkForTclOptions { channel } {
- tputs $channel "---- checking for Tcl options... "
+ tputs $channel "---- checking for Tcl options..."
if {![isEagle]} then {
set result [list]
#
@@ -652,22 +652,10 @@
} else {
tputs $channel no\n
}
}
- proc checkForTestExec { channel } {
- tputs $channel "---- checking for test use of \"exec\" command... "
-
- if {![info exists ::no(testExec)]} then {
- addConstraint testExec
-
- tputs $channel yes\n
- } else {
- tputs $channel no\n
- }
- }
-
proc checkForTestMachine { channel } {
tputs $channel "---- checking for test machine... "
if {[info exists ::test_machine] && \
[string length $::test_machine] > 0} then {
@@ -964,25 +952,24 @@
}
}
proc checkForTiming {
channel threshold {constraint ""} {tries 1} {delay 1000}
- {average false} {asynchronous false} } {
+ {asynchronous false} } {
tputs $channel [appendArgs \
"---- checking for precision timing (threshold of " $threshold \
- " milliseconds" [expr {$average ? " average" : ""}] ", delay of " \
- $delay " milliseconds)... "]
+ " milliseconds, delay of " $delay " milliseconds)... "]
#
# HACK: Sometimes the first try takes quite a bit longer than subsequent
# tries. We attempt to bypass this problem by retrying a set number
# of times (which can be overridden by the caller) before giving up.
#
- set total 0
+ set try 0
set difference unknown
- for {set try 0} {$try < $tries} {incr try} {
+ for {} {$try < $tries} {incr try} {
#
# NOTE: Create a script that will set the final clicks value. This must
# use a global variable due to the nature of [after].
#
set stopScript {
@@ -1011,53 +998,37 @@
# NOTE: Calculate the difference between the actual and expected
# number of milliseconds.
#
set difference [expr {abs($stop - $start - $delay)}]
- #
- # NOTE: Keep track of the total number of milliseconds elapsed for
- # all iterations of this loop.
- #
- incr total $difference
-
- #
- # NOTE: If we are using the average difference, handle that now.
- #
- if {$average && $tries > 1} then {
- set difference [expr {$total / $tries}]
- }
-
#
# NOTE: Are we within the threshold specified by the caller?
#
if {$difference >= 0 && $difference <= $threshold} then {
#
# NOTE: We appear to be capable of fairly precise timing.
#
- if {[string length $constraint] == 0} then {
- set constraint timing
+ if {[string length $constraint] > 0} then {
+ addConstraint $constraint
+ } else {
+ addConstraint timing
}
- addConstraint $constraint
-
- tputs $channel [appendArgs \
- "yes (0 <= " $difference " <= " $threshold " milliseconds" \
- [expr {$average ? " average" : ""}] ", tried " [expr {$try + 1}] \
- " out of " $tries " " [expr {$tries > 1 ? "times" : "time"}] \
- ", \"" $constraint "\")\n"]
+ tputs $channel [appendArgs "yes (0 <= " $difference " <= " \
+ $threshold " milliseconds, tried " [expr {$try + 1}] \
+ " " [expr {$try + 1 > 1 ? "times" : "time"}] ")\n"]
#
# NOTE: We are done here, return now.
#
return
}
}
- tputs $channel [appendArgs \
- "no (0 <= " $difference " > " $threshold " milliseconds" \
- [expr {$average ? " average" : ""}] ", tried " $try " out of " \
- $tries " " [expr {$tries > 1 ? "times" : "time"}] ")\n"]
+ tputs $channel [appendArgs "no (0 <= " $difference " > " \
+ $threshold " milliseconds, tried " $try " " \
+ [expr {$try > 1 ? "times" : "time"}] ")\n"]
}
proc checkForPerformance { channel } {
tputs $channel "---- checking for performance testing... "
@@ -1384,22 +1355,10 @@
addConstraint certificate
tputs $channel [appendArgs "yes (" \
[object invoke $certificate Subject] ")\n"]
} else {
- tputs $channel no\n
- }
- }
-
- proc checkForCompileCSharp { channel } {
- tputs $channel "---- checking for test use of C# compiler... "
-
- if {![info exists ::no(compileCSharp)]} then {
- addConstraint compileCSharp
-
- tputs $channel yes\n
- } else {
tputs $channel no\n
}
}
proc checkForAdministrator { channel } {
@@ -2084,31 +2043,26 @@
}
}
proc checkForTclShell { channel } {
#
- # HACK: If this returns "error" that normally indicates an error was
- # caught during [exec] (i.e. the native Tcl shell could not be
- # executed).
+ # HACK: We do not care about the machine type returned from this
+ # procedure, we only care if it returns "error" because that
+ # would indicate an error was caught during [exec] (i.e. the
+ # native Tcl shell could not be executed).
#
- set prefix "---- checking for Tcl shell version... "
-
- if {[catch {getTclVersionForTclShell} result] == 0 && \
+ if {[catch {getMachineForTclShell} result] == 0 && \
$result ne "error"} then {
#
# NOTE: Yes, a native Tcl shell appears to be available.
#
addConstraint tclShell
- #
- # NOTE: Now, add the version specific test constraint.
- #
- addConstraint [appendArgs tclShell [string map [list . ""] $result]]
-
- tputs $channel [appendArgs $prefix "yes (" $result ")\n"]
+ tputs $channel [appendArgs "---- checking for Tcl shell... yes (" \
+ $result ")\n"]
} else {
- tputs $channel [appendArgs $prefix no\n]
+ tputs $channel "---- checking for Tcl shell... no\n"
}
}
proc checkForTkPackage { channel } {
#
@@ -2115,22 +2069,21 @@
# HACK: We do not care about the Tk version returned from this
# procedure, we only care if it returns "error" because that
# would indicate an error was caught during [exec] (i.e. the
# native Tcl shell could not be executed).
#
- set prefix "---- checking for Tk package version... "
-
- if {[catch {getTkVersionForTclShell} result] == 0 && \
+ if {[catch {getTkVersion} result] == 0 && \
$result ne "error"} then {
#
# NOTE: Yes, a native Tk package appears to be available.
#
addConstraint tkPackage
- tputs $channel [appendArgs $prefix "yes (" $result ")\n"]
+ tputs $channel [appendArgs "---- checking for Tk package... yes (" \
+ $result ")\n"]
} else {
- tputs $channel [appendArgs $prefix no\n]
+ tputs $channel "---- checking for Tk package... no\n"
}
}
proc checkForPowerShell { channel } {
tputs $channel "---- checking for PowerShell... "
@@ -2612,16 +2565,15 @@
getKnownMonoVersions checkForPlatform checkForWindowsVersion \
checkForScriptLibrary checkForVariable checkForTclOptions \
checkForWindowsCommandProcessor checkForFossil checkForEagle \
checkForSymbols checkForLogFile checkForGaruda checkForShell \
checkForDebug checkForTk checkForVersion checkForCommand \
- checkForTestExec checkForTestMachine checkForTestPlatform \
- checkForTestConfiguration checkForTestSuffix checkForFile \
- checkForPathFile checkForNativeCode checkForTip127 checkForTip194 \
- checkForTip241 checkForTip285 checkForTip405 checkForTip426 \
- checkForTiming checkForPerformance checkForStackIntensive \
- checkForInteractive checkForInteractiveCommand \
+ checkForTestMachine checkForTestPlatform checkForTestConfiguration \
+ checkForTestSuffix checkForFile checkForPathFile checkForNativeCode \
+ checkForTip127 checkForTip194 checkForTip241 checkForTip285 \
+ checkForTip405 checkForTip426 checkForTiming checkForPerformance \
+ checkForStackIntensive checkForInteractive checkForInteractiveCommand \
checkForUserInteraction checkForNetwork checkForCompileOption] false \
false
###########################################################################
############################## END Tcl ONLY ###############################
Index: Externals/Eagle/lib/Test1.0/prologue.eagle
==================================================================
--- Externals/Eagle/lib/Test1.0/prologue.eagle
+++ Externals/Eagle/lib/Test1.0/prologue.eagle
@@ -89,12 +89,11 @@
#
# NOTE: Set the local root directory of the source checkout (i.e. of Eagle
# or whatever project the Eagle binaries are being used by) using a
# Fossil binary in the PATH, if available.
#
- if {![info exists root_path] && \
- ![info exists no(exec)] && ![info exists no(fossil)]} then {
+ if {![info exists root_path] && ![info exists no(fossil)]} then {
set pattern {^local-root:\s+(.*?)\s+$}
if {[catch {set exec [exec -- fossil info]}] || \
[regexp -line -- $pattern $exec dummy directory] == 0} then {
#
@@ -801,12 +800,10 @@
#
# NOTE: Has machine detection support been disabled?
#
if {![info exists no(machine)]} then {
checkForMachine $test_channel 32 intel; # (i.e. x86)
- checkForMachine $test_channel 32 arm; # (i.e. arm)
- checkForMachine $test_channel 64 ia64; # (i.e. ia64)
checkForMachine $test_channel 64 amd64; # (i.e. x64)
}
#
# NOTE: Has culture detection support been disabled?
@@ -953,17 +950,10 @@
# and "object-98.*".
#
checkForReferenceCountTracking $test_channel
}
- #
- # NOTE: Has testing using the C# compiler been disabled?
- #
- if {![info exists no(checkForCompileCSharp)]} then {
- checkForCompileCSharp $test_channel
- }
-
#
# NOTE: Has compile/runtime option testing support been disabled?
#
if {![info exists no(compileOptions)]} then {
#
@@ -1618,25 +1608,10 @@
checkForObjectMember $test_channel Eagle._Tests.Default+Disposable \
*ToString* Eagle._Tests.Default.Disposable.ToString
}
}
- #
- # NOTE: Has MSBuild testing support been disabled?
- #
- if {![info exists no(msBuild)]} then {
- #
- # NOTE: For test "object-4.13".
- #
- checkForAssembly $test_channel Microsoft.Build.Framework
-
- #
- # NOTE: For test "object-6.1".
- #
- checkForAssembly $test_channel Microsoft.Build.Engine
- }
-
#
# NOTE: Has Excel testing support been disabled?
#
if {![info exists no(excel)]} then {
#
@@ -1866,17 +1841,10 @@
#############################################################################
tputs $test_channel [appendArgs \
"---- start of common (Tcl & Eagle) test constraints...\n"]
- #
- # NOTE: Has all use of [exec] for tests been disabled?
- #
- if {![info exists no(checkForTestExec)]} then {
- checkForTestExec $test_channel
- }
-
#
# NOTE: Has checking for the test machine been disabled?
#
if {![info exists no(testMachine)]} then {
checkForTestMachine $test_channel
@@ -2251,22 +2219,19 @@
if {![info exists no(performance)]} then {
checkForPerformance $test_channel
}
#
- # NOTE: Have any timing related constraints been disabled?
- #
- # BUGBUG: In Eagle, these checks for "precision" timing are not overly
- # reliable. This may be due to the semi-random nature of the
- # garbage collection. More research into the precise cause of
- # timing issues is certainly warranted.
- #
+ # NOTE: Have precise timing tests been disabled?
#
if {![info exists no(timing)]} then {
checkForTiming $test_channel 50; # 1/20th second.
}
+ #
+ # NOTE: Have very precise timing tests been disabled?
+ #
if {![info exists no(preciseTiming)]} then {
checkForTiming $test_channel 25 preciseTiming; # 1/40th second.
}
#
@@ -2364,11 +2329,11 @@
#
# NOTE: Get the source checkout and tags (i.e. of Eagle or whatever
# project the Eagle binaries are being used by) using a Fossil
# binary in the PATH, if available.
#
- if {![info exists no(exec)] && ![info exists no(fossil)]} then {
+ if {![info exists no(fossil)]} then {
if {[catch {set exec [exec -- fossil info]}] == 0} then {
set pattern {^checkout:\s+(.*?)\s+$}
if {[regexp -line -- $pattern $exec dummy checkout] == 0} then {
#
DELETED Externals/NDoc3/bin/NDoc3.Documenter.Msdn.dll
Index: Externals/NDoc3/bin/NDoc3.Documenter.Msdn.dll
==================================================================
--- Externals/NDoc3/bin/NDoc3.Documenter.Msdn.dll
+++ /dev/null
cannot compute difference between binary files
DELETED Externals/NDoc3/src/MsdnDocumenter.cs
Index: Externals/NDoc3/src/MsdnDocumenter.cs
==================================================================
--- Externals/NDoc3/src/MsdnDocumenter.cs
+++ /dev/null
@@ -1,1467 +0,0 @@
-// MsdnDocumenter.cs - a MSDN-like documenter
-// Copyright (C) 2001 Kral Ferch, Jason Diamond
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Diagnostics;
-using System.IO;
-using System.Xml;
-using System.Xml.XPath;
-using System.Xml.Xsl;
-using System.Globalization;
-
-using NDoc3.Core;
-using NDoc3.Core.Reflection;
-using NDoc3.Documenter.Msdn.onlinefiles;
-using NDoc3.Documenter.Msdn.onlinetemplates;
-using NDoc3.Xml;
-
-namespace NDoc3.Documenter.Msdn
-{
- /// The MsdnDocumenter class.
- public class MsdnDocumenter : BaseReflectionDocumenter
- {
- private enum WhichType
- {
- Class,
- Interface,
- Structure,
- Enumeration,
- Delegate,
- Unknown
- };
-
- private readonly Dictionary lowerCaseTypeNames;
- private readonly Dictionary mixedCaseTypeNames;
- private List filesToInclude = new List();
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- public MsdnDocumenter(MsdnDocumenterConfig config)
- : base(config)
- {
- lowerCaseTypeNames = new Dictionary();
- lowerCaseTypeNames.Add(WhichType.Class, "class");
- lowerCaseTypeNames.Add(WhichType.Interface, "interface");
- lowerCaseTypeNames.Add(WhichType.Structure, "structure");
- lowerCaseTypeNames.Add(WhichType.Enumeration, "enumeration");
- lowerCaseTypeNames.Add(WhichType.Delegate, "delegate");
-
- mixedCaseTypeNames = new Dictionary();
- mixedCaseTypeNames.Add(WhichType.Class, "Class");
- mixedCaseTypeNames.Add(WhichType.Interface, "Interface");
- mixedCaseTypeNames.Add(WhichType.Structure, "Structure");
- mixedCaseTypeNames.Add(WhichType.Enumeration, "Enumeration");
- mixedCaseTypeNames.Add(WhichType.Delegate, "Delegate");
- }
-
- /// See .
- public override string MainOutputFile
- {
- get
- {
- if ((MyConfig.OutputTarget & OutputType.HtmlHelp) > 0) {
- return Path.Combine(MyConfig.OutputDirectory,
- MyConfig.HtmlHelpName + ".chm");
- }
- return Path.Combine(MyConfig.OutputDirectory, "index.html");
- }
- }
-
- /// See .
- public override string CanBuild(Project project, bool checkInputOnly)
- {
- string result = base.CanBuild(project, checkInputOnly);
- if (result != null) {
- return result;
- }
-
- string AdditionalContentResourceDirectory = MyConfig.AdditionalContentResourceDirectory;
- if (AdditionalContentResourceDirectory.Length != 0 && !Directory.Exists(AdditionalContentResourceDirectory))
- return string.Format("The Additional Content Resource Directory {0} could not be found", AdditionalContentResourceDirectory);
-
- string ExtensibilityStylesheet = MyConfig.ExtensibilityStylesheet;
- if (ExtensibilityStylesheet.Length != 0 && !File.Exists(ExtensibilityStylesheet))
- return string.Format("The Extensibility Stylesheet file {0} could not be found", ExtensibilityStylesheet);
-
- if (checkInputOnly) {
- return null;
- }
-
- string path = Path.Combine(MyConfig.OutputDirectory,
- MyConfig.HtmlHelpName + ".chm");
-
- string temp = Path.Combine(MyConfig.OutputDirectory, "~chm.tmp");
-
- try {
-
- if (File.Exists(path)) {
- //if we can move the file, then it is not open...
- File.Move(path, temp);
- File.Move(temp, path);
- }
- } catch (Exception) {
- result = "The compiled HTML Help file is probably open.\nPlease close it and try again.";
- }
-
- return result;
- }
-
- /// See .
- public override void Build(Project project)
- {
- BuildProjectContext buildContext = new BuildProjectContext(new CultureInfo(MyConfig.LangID),
- new DirectoryInfo(MyConfig.OutputDirectory), MyConfig.CleanIntermediates);
-
- try {
- OnDocBuildingStep(0, "Initializing...");
-
- buildContext.Initialize();
-
- OnDocBuildingStep(10, "Merging XML documentation...");
-
- // Will hold the name of the file name containing the XML doc
- XmlDocument projectXml = CreateNDocXml(project);
- buildContext.SetProjectXml(projectXml, MyConfig.MergeAssemblies);
-
- OnDocBuildingStep(30, "Loading XSLT files...");
-
- buildContext.stylesheets = StyleSheetCollection.LoadStyleSheets(MyConfig.ExtensibilityStylesheet);
-
- OnDocBuildingStep(40, "Generating HTML pages...");
-
- // setup for root page
- string defaultTopic;
- string rootPageFileName = null;
- string rootPageTOCName = null;
-
- if (!String.IsNullOrEmpty(MyConfig.RootPageFileName)) {
- rootPageFileName = MyConfig.RootPageFileName;
- defaultTopic = "default.html";
-
- rootPageTOCName = "Overview";
- // what to call the top page in the table of contents?
- if (!String.IsNullOrEmpty(MyConfig.RootPageTOCName)) {
- rootPageTOCName = MyConfig.RootPageTOCName;
- }
- } else {
- // TODO (EE): check MergeAssemblies and adjust defaultTopic accordingly
- XmlNode defaultNamespace;
- if (MyConfig.MergeAssemblies)
- {
- XmlNodeList namespaceNodes = buildContext.SelectNodes("/ndoc:ndoc/ndoc:assembly/ndoc:module/ndoc:namespace");
- int[] indexes = SortNodesByAttribute(namespaceNodes, "name");
-
- defaultNamespace = namespaceNodes[indexes[0]];
- }
- else
- {
- XmlNodeList assemblyNodes = buildContext.SelectNodes("/ndoc:ndoc/ndoc:assembly");
- int[] assemblyIndexes = SortNodesByAttribute(assemblyNodes, "name");
- XmlNode defaultAssemblyNode = assemblyNodes[assemblyIndexes[0]];
- XmlNodeList namespaceNodes = buildContext.SelectNodes(defaultAssemblyNode, "ndoc:module/ndoc:namespace");
- int[] indexes = SortNodesByAttribute(namespaceNodes, "name");
- defaultNamespace = namespaceNodes[indexes[0]];
- }
- string defaultNamespaceName = GetNodeName(defaultNamespace);
- string assemblyName = GetNodeName(buildContext.SelectSingleNode(defaultNamespace, "ancestor::ndoc:assembly"));
- defaultTopic = buildContext._nameResolver.GetFilenameForNamespace(assemblyName, defaultNamespaceName);
- }
- buildContext.htmlHelp = SetupHtmlHelpBuilder(buildContext.WorkingDirectory, defaultTopic);
-
- using (buildContext.htmlHelp.OpenProjectFile())
- using (buildContext.htmlHelp.OpenContentsFile(string.Empty, true)) {
- // Write the embedded css files to the html output directory
- WriteHtmlContentResources(buildContext);
-
- GenerateHtmlContentFiles(buildContext, rootPageFileName, rootPageTOCName);
- }
-
- HtmlHelp htmlHelp = buildContext.htmlHelp;
- htmlHelp.WriteEmptyIndexFile();
-
- if ((MyConfig.OutputTarget & OutputType.Web) > 0) {
- OnDocBuildingStep(75, "Generating HTML index file...");
-
- // Write the embedded online templates to the html output directory
- GenerateHtmlIndexFile(buildContext, defaultTopic);
- }
-
- if ((MyConfig.OutputTarget & OutputType.HtmlHelp) > 0) {
- OnDocBuildingStep(85, "Compiling HTML Help file...");
- htmlHelp.CompileProject();
- }
-#if !DEBUG
- else
- {
- //remove .hhc file
- File.Delete(htmlHelp.GetPathToContentsFile());
- }
-#endif
-
- // if we're only building a CHM, copy that to the Outpur dir
- if ((MyConfig.OutputTarget & OutputType.HtmlHelp) > 0 && (MyConfig.OutputTarget & OutputType.Web) == 0) {
- buildContext.SaveOutputs("*.chm");
- } else {
- // otherwise copy everything to the output dir (cause the help file is all the html, not just one chm)
- buildContext.SaveOutputs("*.*");
- }
-
- OnDocBuildingStep(100, "Done.");
- } catch(DocumenterException) {
- throw;
- } catch (Exception ex) {
- throw new DocumenterException(ex.Message, ex);
- } finally {
- buildContext.Dispose();
- }
- }
-
- private void GenerateHtmlIndexFile(BuildProjectContext ctx, string defaultTopic)
- {
- EmbeddedResources.WriteEmbeddedResources(typeof(OnlineFilesLocationHint), ctx.WorkingDirectory);
-
- using (TemplateWriter indexWriter = new TemplateWriter(
- Path.Combine(ctx.WorkingDirectory.FullName, "index.html"),
- EmbeddedResources.GetEmbeddedResourceReader(typeof(OnlineTemplatesLocationHint), "index.html", null))) {
- indexWriter.CopyToLine("\t\t<%TITLE%>");
- indexWriter.WriteLine("\t\t" + MyConfig.HtmlHelpName + "");
- indexWriter.CopyToLine("\t\t\" frameborder=\"1\">");
- indexWriter.WriteLine("\t\t");
- indexWriter.CopyToEnd();
- indexWriter.Close();
- }
-
- Trace.WriteLine("transform the HHC contents file into html");
-#if DEBUG
- int start = Environment.TickCount;
-#endif
- //transform the HHC contents file into html
- using (StreamReader contentsFile = new StreamReader(ctx.HtmlHelpContentFilePath.FullName, ctx.CurrentFileEncoding)) {
- XPathDocument xpathDocument = new XPathDocument(contentsFile);
- string contentsFilename = Path.Combine(ctx.WorkingDirectory.FullName, "contents.html");
- using (StreamWriter streamWriter = new StreamWriter(
- File.Open(contentsFilename, FileMode.CreateNew, FileAccess.Write, FileShare.None), ctx.CurrentFileEncoding)) {
- XslTransform(ctx, "htmlcontents", xpathDocument, null, streamWriter, contentsFilename);
- }
- }
-#if DEBUG
- Trace.WriteLine(string.Format("{0} msec.", (Environment.TickCount - start)));
-#endif
- }
-
- private HtmlHelp SetupHtmlHelpBuilder(DirectoryInfo workingDirectory, string defaultTopic)
- {
- HtmlHelp htmlHelp = new HtmlHelp(
- workingDirectory,
- MyConfig.HtmlHelpName,
- defaultTopic,
- ((MyConfig.OutputTarget & OutputType.HtmlHelp) == 0));
- htmlHelp.IncludeFavorites = MyConfig.IncludeFavorites;
- htmlHelp.BinaryTOC = MyConfig.BinaryTOC;
- htmlHelp.LangID = MyConfig.LangID;
- return htmlHelp;
- }
-
- private void GenerateHtmlContentFiles(BuildProjectContext buildContext, string rootPageFileName, string rootPageTOCName)
- {
- if (!String.IsNullOrEmpty(MyConfig.CopyrightHref)) {
- if (!MyConfig.CopyrightHref.StartsWith("http:")) {
- string copyrightFile = Path.Combine(buildContext.WorkingDirectory.FullName, Path.GetFileName(MyConfig.CopyrightHref));
- File.Copy(MyConfig.CopyrightHref, copyrightFile, true);
- File.SetAttributes(copyrightFile, FileAttributes.Archive);
- buildContext.htmlHelp.AddFileToProject(Path.GetFileName(MyConfig.CopyrightHref));
- }
- }
-
- // add root page if requested
- if (rootPageFileName != null) {
- if (!File.Exists(rootPageFileName)) {
- throw new DocumenterException("Cannot find the documentation's root page file:\n"
- + rootPageFileName);
- }
-
- // add the file
- string rootPageOutputName = Path.Combine(buildContext.WorkingDirectory.FullName, "default.html");
- if (Path.GetFullPath(rootPageFileName) != Path.GetFullPath(rootPageOutputName)) {
- File.Copy(rootPageFileName, rootPageOutputName, true);
- File.SetAttributes(rootPageOutputName, FileAttributes.Archive);
- }
- buildContext.htmlHelp.AddFileToProject(Path.GetFileName(rootPageOutputName));
- buildContext.htmlHelp.AddFileToContents(rootPageTOCName,
- Path.GetFileName(rootPageOutputName));
-
- // depending on peer setting, make root page the container
- if (MyConfig.RootPageContainsNamespaces)
- buildContext.htmlHelp.OpenBookInContents();
- }
-
- MakeHtmlForAssemblies(buildContext, MyConfig.MergeAssemblies);
- foreach (string filename in filesToInclude) {
- buildContext.htmlHelp.AddFileToProject(filename);
- }
-
- // close root book if applicable
- if (rootPageFileName != null) {
- if (MyConfig.RootPageContainsNamespaces)
- buildContext.htmlHelp.CloseBookInContents();
- }
- }
-
- private XmlDocument CreateNDocXml(Project project)
- {
- string tempFileName = null;
- try {
- // determine temp file name
- tempFileName = Path.GetTempFileName();
- // Let the Documenter base class do it's thing.
- MakeXmlFile(project, new FileInfo(tempFileName));
-
- // Load the XML documentation into DOM and XPATH doc.
- using (FileStream tempFile = File.Open(tempFileName, FileMode.Open, FileAccess.Read)) {
-
- XmlDocument xml = new XmlDocument();
- xml.Load(tempFile);
- return xml;
- }
- } finally {
- if (tempFileName != null && File.Exists(tempFileName)) {
-#if DEBUG
- File.Copy(tempFileName, MyConfig.OutputDirectory.TrimEnd('\\', '/') + "\\ndoc.xml", true);
-#endif
- File.Delete(tempFileName);
- }
- }
- }
-
- private void WriteHtmlContentResources(BuildProjectContext buildContext)
- {
- EmbeddedResources.WriteEmbeddedResources(
- GetType().Module.Assembly,
- GetType().Namespace + ".css",
- buildContext.WorkingDirectory);
-
- // Write the embedded icons to the html output directory
- EmbeddedResources.WriteEmbeddedResources(
- GetType().Module.Assembly,
- GetType().Namespace + ".images",
- buildContext.WorkingDirectory);
-
- // Write the embedded scripts to the html output directory
- EmbeddedResources.WriteEmbeddedResources(
- GetType().Module.Assembly,
- GetType().Namespace + ".scripts",
- buildContext.WorkingDirectory);
-
- if (((string)MyConfig.AdditionalContentResourceDirectory).Length > 0)
- buildContext.CopyToWorkingDirectory(new DirectoryInfo(MyConfig.AdditionalContentResourceDirectory));
-
- // Write the external files (FilesToInclude) to the html output directory
-
- foreach (string srcFilePattern in MyConfig.FilesToInclude.Split('|')) {
- if (string.IsNullOrEmpty(srcFilePattern))
- continue;
-
- string path = Path.GetDirectoryName(srcFilePattern);
- string pattern = Path.GetFileName(srcFilePattern);
-
- // Path.GetDirectoryName can return null in some cases.
- // Treat this as an empty string.
- if (path == null)
- path = string.Empty;
-
- // Make sure we have a fully-qualified path name
- if (!Path.IsPathRooted(path))
- path = Path.Combine(Environment.CurrentDirectory, path);
-
- // Directory.GetFiles does not accept null or empty string
- // for the searchPattern parameter. When no pattern was
- // specified, assume all files (*) are wanted.
- if (string.IsNullOrEmpty(pattern))
- pattern = "*";
-
- foreach (string srcFile in Directory.GetFiles(path, pattern)) {
- string dstFile = Path.Combine(buildContext.WorkingDirectory.FullName, Path.GetFileName(srcFile));
- File.Copy(srcFile, dstFile, true);
- File.SetAttributes(dstFile, FileAttributes.Archive);
- filesToInclude.Add(dstFile);
- }
- }
- }
-
- private static void XslTransform(BuildProjectContext buildContext, string stylesheetName, IXPathNavigable xpathNavigable, XsltArgumentList arguments, TextWriter writer, string targetFilename)
- {
- StyleSheet stylesheet = buildContext.stylesheets[stylesheetName];
- try {
- stylesheet.Transform(xpathNavigable, arguments, writer);
- } catch (XsltException ex) {
- throw new DocumenterException(string.Format("XSLT error while writing file {0} using stylesheet {1}({2}:{3}) : {4}", targetFilename, stylesheetName, ex.LineNumber, ex.LinePosition, ex.Message));
- }
- }
-
- private MsdnDocumenterConfig MyConfig
- {
- get
- {
- return (MsdnDocumenterConfig)Config;
- }
- }
-
- private static WhichType GetWhichType(XmlNode typeNode)
- {
- WhichType whichType;
-
- switch (typeNode.Name) {
- case "class":
- whichType = WhichType.Class;
- break;
- case "interface":
- whichType = WhichType.Interface;
- break;
- case "structure":
- whichType = WhichType.Structure;
- break;
- case "enumeration":
- whichType = WhichType.Enumeration;
- break;
- case "delegate":
- whichType = WhichType.Delegate;
- break;
- default:
- whichType = WhichType.Unknown;
- break;
- }
-
- return whichType;
- }
-
- private void MakeHtmlForAssemblies(BuildProjectContext ctx, bool mergeAssemblies)
- {
-#if DEBUG
- int start = Environment.TickCount;
-#endif
-
- MakeHtmlForAssembliesSorted(ctx, mergeAssemblies);
-
-#if DEBUG
- Trace.WriteLine("Making Html: " + ((Environment.TickCount - start) / 1000.0) + " sec.");
-#endif
- }
-
- private void MakeHtmlForAssembliesSorted(BuildProjectContext ctx, bool mergeAssemblies)
- {
- const string defaultNamespace = null;
-
- XmlNodeList assemblyNodes = ctx.SelectNodes("/ndoc:ndoc/ndoc:assembly");
-
- List assemblyNames = new List();
- foreach(XmlNode node in assemblyNodes) assemblyNames.Add(GetNodeName(node));
- assemblyNames.Sort();
-
- if (mergeAssemblies)
- {
- // sort namespaces alphabetically except for defaultNamespace, which is always first
- string[] namespaces = SortNamespaces(ctx, assemblyNames, defaultNamespace);
- MakeHtmlForNamespaces(ctx, null, namespaces);
- }
- else
- {
- foreach (string currentAssemblyName in assemblyNames)
- {
- MakeHtmlForAssembly(ctx, currentAssemblyName);
-
- ctx.htmlHelp.OpenBookInContents();
- string[] namespaces = SortNamespaces(ctx, new List( new[] { currentAssemblyName }) , defaultNamespace);
- MakeHtmlForNamespaces(ctx, currentAssemblyName, namespaces);
- ctx.htmlHelp.CloseBookInContents();
- }
- }
- }
-
- private void MakeHtmlForAssembly(BuildProjectContext ctx, string assemblyName)
- {
- BuildAssemblyContext actx = new BuildAssemblyContext(ctx, assemblyName);
- string fileName = ctx._nameResolver.GetFilenameForAssembly(assemblyName);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("assembly-name", String.Empty, assemblyName);
- TransformAndWriteResult(actx, "assembly", arguments, fileName);
-
- ctx.htmlHelp.AddFileToContents(assemblyName + " Assembly", fileName, HtmlHelpIcon.Page);
- }
-
- private void MakeHtmlForNamespaces(BuildProjectContext ctx, string currentAssembly, IList namespaces)
- {
- int nNodes = namespaces.Count;
-
- bool heirTOC = (MyConfig.NamespaceTOCStyle == TOCStyle.Hierarchical);
- int level = 0;
-
- string[] last = new string[0];
-
- BuildAssemblyContext generatorContext = null;
- for (int i = 0; i < nNodes; i++) {
- OnDocBuildingProgress(i * 100 / nNodes); // TODO (EE): fix calc for !MergeAssemblies mode
-
- string currentNamespace = namespaces[i];
- // determine assembly containing this namespace
- XmlNodeList namespaceNodes = (currentAssembly==null)
- ? ctx.SelectNodes(string.Format("/ndoc:ndoc/ndoc:assembly/ndoc:module/ndoc:namespace[@name='{0}']", currentNamespace))
- : ctx.SelectNodes(string.Format("/ndoc:ndoc/ndoc:assembly[@name='{0}']/ndoc:module/ndoc:namespace[@name='{1}']", currentAssembly, currentNamespace));
-
- string assemblyName = GetNodeName(ctx.SelectSingleNode(namespaceNodes[0], "ancestor::ndoc:assembly"));
- generatorContext = new BuildAssemblyContext(ctx, assemblyName);
-
- if (heirTOC) {
- string[] split = currentNamespace.Split('.');
-
- for (level = last.Length; level >= 0 &&
- ArrayEquals(split, 0, last, 0, level) == false; level--) {
- if (level > last.Length)
- continue;
-
- string namespaceName = string.Join(".", last, 0, level);
- XmlNodeList typeNodes = GetTypeNodes(ctx, currentAssembly, namespaceName);
- MakeHtmlForTypes(generatorContext, typeNodes);
- ctx.htmlHelp.CloseBookInContents();
- }
-
- if (level < 0)
- level = 0;
-
- for (; level < split.Length; level++) {
- string namespaceName = string.Join(".", split, 0, level + 1);
-
- if (!namespaces.Contains(namespaceName))
-// if (Array.BinarySearch(namespaces, namespaceName) < 0)
- MakeHtmlForNamespace(generatorContext, split[level], namespaceName, false);
- else
- MakeHtmlForNamespace(generatorContext, split[level], namespaceName, true);
-
- ctx.htmlHelp.OpenBookInContents();
- }
-
- last = split;
- } else {
- MakeHtmlForNamespace(generatorContext, currentNamespace, currentNamespace, true);
- using (ctx.htmlHelp.OpenBookInContents()) {
- XmlNodeList typeNodes = GetTypeNodes(ctx, currentAssembly, currentNamespace);
- MakeHtmlForTypes(generatorContext, typeNodes);
- }
- }
- }
-
-
- if (heirTOC && last.Length > 0) {
- for (; level >= 1; level--) {
- string ns = string.Join(".", last, 0, level);
- XmlNodeList typeNodes = GetTypeNodes(ctx, currentAssembly, ns);
- MakeHtmlForTypes(generatorContext, typeNodes);
- ctx.htmlHelp.CloseBookInContents();
- }
- }
-
- OnDocBuildingProgress(100);
- }
-
- private static XmlNodeList GetTypeNodes(BuildProjectContext ctx, string assembly, string namespaceName)
- {
- string xpath = (assembly == null)
- ? string.Format(
- "/ndoc:ndoc/ndoc:assembly/ndoc:module/ndoc:namespace[@name='{0}']/*[local-name()!='documentation' and local-name()!='typeHierarchy']",
- namespaceName)
- : string.Format(
- "/ndoc:ndoc/ndoc:assembly[@name='{0}']/ndoc:module/ndoc:namespace[@name='{1}']/*[local-name()!='documentation' and local-name()!='typeHierarchy']",
- assembly,
- namespaceName);
- XmlNodeList typeNodes = ctx.SelectNodes(xpath);
- return typeNodes;
- }
-
- private static bool ArrayEquals(string[] array1, int from1, string[] array2, int from2, int count)
- {
- for (int i = 0; i < count; i++) {
- if (array1[from1 + i] != array2[from2 + i])
- return false;
- }
-
- return true;
- }
-
- private static void GetNamespacesFromAssembly(BuildProjectContext buildContext, string assemblyName, NameValueCollection namespaceAssemblies)
- {
- XmlNodeList namespaceNodes = buildContext.SelectNodes(string.Format("/ndoc:ndoc/ndoc:assembly[@name='{0}']/ndoc:module/ndoc:namespace", assemblyName));
- foreach (XmlNode namespaceNode in namespaceNodes) {
- string namespaceName = GetNodeName(namespaceNode);
- namespaceAssemblies.Add(namespaceName, assemblyName);
- }
- }
-
- ///
- /// Add the namespace elements to the output
- ///
- ///
- /// The namespace
- ///
- ///
- /// If nested, the namespace part will be the current
- /// namespace element being documented
- /// The full namespace name being documented
- /// If true, the namespace will be documented, if false
- /// the node in the TOC will not link to a page
- private void MakeHtmlForNamespace(BuildAssemblyContext ctx, string namespacePart, string namespaceName,
- bool addDocumentation)
- {
- // // handle duplicate namespace documentation
- // if (ctx.documentedNamespaces.Contains(namespaceName))
- // return;
- // ctx.documentedNamespaces.Add(namespaceName);
-
- if (addDocumentation) {
- string currentAssemblyName = (ctx.MergeAssemblies) ? string.Empty : ctx.CurrentAssemblyName;
-
- string namespaceFilename = ctx._nameResolver.GetFilenameForNamespace(currentAssemblyName, namespaceName);
-
- ctx.htmlHelp.AddFileToContents(namespacePart, namespaceFilename);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("merge-assemblies", String.Empty, ctx.MergeAssemblies);
- arguments.AddParam("namespace", String.Empty, namespaceName);
- TransformAndWriteResult(ctx, "namespace", arguments, namespaceFilename);
-
- string namespaceHierarchyFilename = ctx._nameResolver.GetFilenameForNamespaceHierarchy(currentAssemblyName, namespaceName);
- arguments = new XsltArgumentList();
- arguments.AddParam("merge-assemblies", String.Empty, ctx.MergeAssemblies);
- arguments.AddParam("namespace", String.Empty, namespaceName);
- TransformAndWriteResult(ctx, "namespacehierarchy", arguments, namespaceHierarchyFilename);
- } else {
- ctx.htmlHelp.AddFileToContents(namespacePart);
- }
- }
-
- private void MakeHtmlForTypes(BuildProjectContext projectCtx, XmlNodeList typeNodes)
- {
- int[] indexes = SortNodesByAttribute(typeNodes, "id");
- int nNodes = typeNodes.Count;
-
- for (int i = 0; i < nNodes; i++) {
- XmlNode typeNode = typeNodes[indexes[i]];
- WhichType whichType = GetWhichType(typeNode);
-
- string assemblyName = XmlUtils.GetNodeName(projectCtx.SelectSingleNode(typeNode, "ancestor::ndoc:assembly"));
- BuildAssemblyContext ctx = new BuildAssemblyContext(projectCtx, assemblyName); // TODO (EE): initialize w/ assembly name
-
- switch (whichType) {
- case WhichType.Class:
- MakeHtmlForInterfaceOrClassOrStructure(ctx, whichType, typeNode);
- break;
- case WhichType.Interface:
- MakeHtmlForInterfaceOrClassOrStructure(ctx, whichType, typeNode);
- break;
- case WhichType.Structure:
- MakeHtmlForInterfaceOrClassOrStructure(ctx, whichType, typeNode);
- break;
- case WhichType.Enumeration:
- MakeHtmlForEnumerationOrDelegate(ctx, whichType, typeNode);
- break;
- case WhichType.Delegate:
- MakeHtmlForEnumerationOrDelegate(ctx, whichType, typeNode);
- break;
- default:
- break;
- }
- }
- }
-
- private void MakeHtmlForEnumerationOrDelegate(BuildAssemblyContext ctx, WhichType whichType, XmlNode typeNode)
- {
- string typeName = whichType == WhichType.Delegate ? GetNodeDisplayName(typeNode) : GetNodeName(typeNode);
- string typeID = GetNodeId(typeNode);
- string fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, typeID);
-
- ctx.htmlHelp.AddFileToContents(typeName + " " + mixedCaseTypeNames[whichType], fileName, HtmlHelpIcon.Page);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- TransformAndWriteResult(ctx, "type", arguments, fileName);
- }
-
- private void MakeHtmlForInterfaceOrClassOrStructure(BuildAssemblyContext ctx,
- WhichType whichType,
- XmlNode typeNode)
- {
- string typeName = GetNodeDisplayName(typeNode);
- string typeID = GetNodeId(typeNode);
- string fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, typeID);
-
- ctx.htmlHelp.AddFileToContents(typeName + " " + mixedCaseTypeNames[whichType], fileName);
-
- bool hasMembers = ctx.SelectNodes(typeNode, "ndoc:constructor|ndoc:field|ndoc:property|ndoc:method|ndoc:operator|ndoc:event").Count > 0;
-
- if (hasMembers) {
- ctx.htmlHelp.OpenBookInContents();
- }
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- TransformAndWriteResult(ctx, "type", arguments, fileName);
-
- if (ctx.SelectNodes(typeNode, "ndoc:derivedBy").Count > 5) {
- fileName = ctx._nameResolver.GetFilenameForTypeHierarchy(ctx.CurrentAssemblyName, typeID);
- arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- TransformAndWriteResult(ctx, "typehierarchy", arguments, fileName);
- }
-
- if (hasMembers) {
- fileName = ctx._nameResolver.GetFilenameForTypeMemberList(ctx.CurrentAssemblyName, typeID);
- ctx.htmlHelp.AddFileToContents(typeName + " Members",
- fileName,
- HtmlHelpIcon.Page);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- TransformAndWriteResult(ctx, "allmembers", arguments, fileName);
-
- MakeHtmlForConstructors(ctx, typeNode);
- MakeHtmlForFields(ctx, typeNode);
- MakeHtmlForProperties(ctx, typeNode);
- MakeHtmlForMethods(ctx, typeNode);
- MakeHtmlForOperators(ctx, typeNode);
- MakeHtmlForEvents(ctx, typeNode);
-
- ctx.htmlHelp.CloseBookInContents();
- }
- }
-
- private void MakeHtmlForConstructors(BuildAssemblyContext ctx, XmlNode typeNode)
- {
- string constructorID;
- string fileName;
-
- string typeName = GetNodeDisplayName(typeNode);
- string typeID = GetNodeId(typeNode);
-
- XmlNodeList constructorNodes = ctx.SelectNodes(typeNode, "ndoc:constructor[@contract!='Static']");
- // If the constructor is overloaded then make an overload page.
- if (constructorNodes.Count > 1) {
- fileName = ctx._nameResolver.GetFilenameForConstructorList(ctx.CurrentAssemblyName, typeID);
- ctx.htmlHelp.AddFileToContents(typeName + " Constructor", fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- constructorID = constructorNodes[0].Attributes["id"].Value;
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, constructorID);
- TransformAndWriteResult(ctx, "memberoverload", arguments, fileName);
- }
-
- foreach (XmlNode constructorNode in constructorNodes) {
- constructorID = constructorNode.Attributes["id"].Value;
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, constructorID);
-
- if (constructorNodes.Count > 1) {
- XmlNodeList parameterNodes = ctx.SelectNodes(constructorNode, "ndoc:parameter");
- ctx.htmlHelp.AddFileToContents(typeName + " Constructor " + GetParamList(parameterNodes), fileName,
- HtmlHelpIcon.Page);
- } else {
- ctx.htmlHelp.AddFileToContents(typeName + " Constructor", fileName, HtmlHelpIcon.Page);
- }
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, constructorID);
- TransformAndWriteResult(ctx, "member", arguments, fileName);
- }
-
- if (constructorNodes.Count > 1) {
- ctx.htmlHelp.CloseBookInContents();
- }
-
- XmlNode staticConstructorNode = ctx.SelectSingleNode(typeNode, "ndoc:constructor[@contract='Static']");
- if (staticConstructorNode != null) {
- constructorID = staticConstructorNode.Attributes["id"].Value;
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, constructorID);
-
- ctx.htmlHelp.AddFileToContents(typeName + " Static Constructor", fileName, HtmlHelpIcon.Page);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, constructorID);
- TransformAndWriteResult(ctx, "member", arguments, fileName);
- }
- }
-
- private void MakeHtmlForFields(BuildAssemblyContext ctx, XmlNode typeNode)
- {
- XmlNodeList fields = ctx.SelectNodes(typeNode, "ndoc:field[not(@declaringType)]");
-
- if (fields.Count > 0) {
- //string typeName = typeNode.Attributes["name"].Value;
- string typeID = GetNodeId(typeNode);
- string fileName = ctx._nameResolver.GetFilenameForFieldList(ctx.CurrentAssemblyName, typeID);
-
- ctx.htmlHelp.AddFileToContents("Fields", fileName);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- arguments.AddParam("member-type", String.Empty, "field");
- TransformAndWriteResult(ctx, "individualmembers", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- int[] indexes = SortNodesByAttribute(fields, "id");
-
- foreach (int index in indexes) {
- XmlNode field = fields[index];
-
- string fieldName = GetNodeName(field);
- string fieldID = GetNodeId(field);
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, fieldID);
- ctx.htmlHelp.AddFileToContents(fieldName + " Field", fileName, HtmlHelpIcon.Page);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("field-id", String.Empty, fieldID);
- TransformAndWriteResult(ctx, "field", arguments, fileName);
- }
-
- ctx.htmlHelp.CloseBookInContents();
- }
- }
-
- private void MakeHtmlForProperties(BuildAssemblyContext ctx, XmlNode typeNode)
- {
- XmlNodeList declaredPropertyNodes = ctx.SelectNodes(typeNode, "ndoc:property[not(@declaringType)]");
-
- if (declaredPropertyNodes.Count > 0) {
- XmlNode propertyNode;
- bool bOverloaded = false;
- int i;
-
- string typeID = GetNodeId(typeNode);
- XmlNodeList propertyNodes = ctx.SelectNodes(typeNode, "ndoc:property[not(@declaringType)]");
- int nNodes = propertyNodes.Count;
-
- int[] indexes = SortNodesByAttribute(propertyNodes, "id");
-
- string fileName = ctx._nameResolver.GetFilenameForPropertyList(ctx.CurrentAssemblyName, typeID);
- ctx.htmlHelp.AddFileToContents("Properties", fileName);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- arguments.AddParam("member-type", String.Empty, "property");
- TransformAndWriteResult(ctx, "individualmembers", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- for (i = 0; i < nNodes; i++) {
- propertyNode = propertyNodes[indexes[i]];
-
- string propertyName = propertyNode.Attributes["name"].Value;
- string propertyID = propertyNode.Attributes["id"].Value;
-
- // If the method is overloaded then make an overload page.
- string previousPropertyName = ((i - 1 < 0) || (propertyNodes[indexes[i - 1]].Attributes.Count == 0))
- ? "" : propertyNodes[indexes[i - 1]].Attributes[0].Value;
- string nextPropertyName = ((i + 1 == nNodes) || (propertyNodes[indexes[i + 1]].Attributes.Count == 0))
- ? "" : propertyNodes[indexes[i + 1]].Attributes[0].Value;
-
- if ((previousPropertyName != propertyName) && (nextPropertyName == propertyName)) {
- fileName = ctx._nameResolver.GetFilenameForPropertyOverloads(ctx.CurrentAssemblyName, typeID, propertyName);
- ctx.htmlHelp.AddFileToContents(propertyName + " Property", fileName);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, propertyID);
- TransformAndWriteResult(ctx, "memberoverload", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- bOverloaded = true;
- }
-
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, propertyID);
-
- string pageTitle;
- if (!bOverloaded) {
- pageTitle = string.Format("{0} Property", propertyName);
- } else {
- XmlNodeList parameterNodes = ctx.SelectNodes(propertyNode, "ns:parameter");
- pageTitle = string.Format("{0} Property {1}", propertyName, GetParamList(parameterNodes));
- }
- ctx.htmlHelp.AddFileToContents(pageTitle, fileName, HtmlHelpIcon.Page);
-
- XsltArgumentList arguments2 = new XsltArgumentList();
- arguments2.AddParam("property-id", String.Empty, propertyID);
- TransformAndWriteResult(ctx, "property", arguments2, fileName);
-
- if ((previousPropertyName == propertyName) && (nextPropertyName != propertyName)) {
- ctx.htmlHelp.CloseBookInContents();
- bOverloaded = false;
- }
- }
-
- ctx.htmlHelp.CloseBookInContents();
- }
- }
-
- private static string GetPreviousMethodName(XmlNodeList methodNodes, int[] indexes, int index)
- {
- while (--index >= 0) {
- if (methodNodes[indexes[index]].Attributes["declaringType"] == null)
- return methodNodes[indexes[index]].Attributes["name"].Value;
- }
- return null;
- }
-
- private static string GetNextMethodName(XmlNodeList methodNodes, int[] indexes, int index)
- {
- while (++index < methodNodes.Count) {
- if (methodNodes[indexes[index]].Attributes["declaringType"] == null)
- return methodNodes[indexes[index]].Attributes["name"].Value;
- }
- return null;
- }
-
- // returns true, if method is neither overload of a method in the same class,
- // nor overload of a method in the base class.
- private static bool IsMethodAlone(XmlNodeList methodNodes, int[] indexes, int index)
- {
- string name = methodNodes[indexes[index]].Attributes["name"].Value;
- int lastIndex = methodNodes.Count - 1;
- if (lastIndex <= 0)
- return true;
- bool previousNameDifferent = (index == 0)
- || (methodNodes[indexes[index - 1]].Attributes["name"].Value != name);
- bool nextNameDifferent = (index == lastIndex)
- || (methodNodes[indexes[index + 1]].Attributes["name"].Value != name);
- return (previousNameDifferent && nextNameDifferent);
- }
-
- private static bool IsMethodFirstOverload(XmlNodeList methodNodes, int[] indexes, int index)
- {
- if ((methodNodes[indexes[index]].Attributes["declaringType"] != null)
- || IsMethodAlone(methodNodes, indexes, index))
- return false;
-
- string name = methodNodes[indexes[index]].Attributes["name"].Value;
- string previousName = GetPreviousMethodName(methodNodes, indexes, index);
- return previousName != name;
- }
-
- private static bool IsMethodLastOverload(XmlNodeList methodNodes, int[] indexes, int index)
- {
- if ((methodNodes[indexes[index]].Attributes["declaringType"] != null)
- || IsMethodAlone(methodNodes, indexes, index))
- return false;
-
- string name = methodNodes[indexes[index]].Attributes["name"].Value;
- string nextName = GetNextMethodName(methodNodes, indexes, index);
- return nextName != name;
- }
-
- private void MakeHtmlForMethods(BuildAssemblyContext ctx, XmlNode typeNode)
- {
- XmlNodeList declaredMethodNodes = ctx.SelectNodes(typeNode, "ndoc:method[not(@declaringType)]");
-
- if (declaredMethodNodes.Count > 0) {
- bool bOverloaded = false;
-
- string typeID = GetNodeId(typeNode);
- XmlNodeList methodNodes = ctx.SelectNodes(typeNode, "ndoc:method");
- int nNodes = methodNodes.Count;
-
- int[] indexes = SortNodesByAttribute(methodNodes, "id");
-
- string fileName = ctx._nameResolver.GetFilenameForMethodList(ctx.CurrentAssemblyName, typeID);
- ctx.htmlHelp.AddFileToContents("Methods", fileName);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- arguments.AddParam("member-type", String.Empty, "method");
- TransformAndWriteResult(ctx, "individualmembers", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- for (int i = 0; i < nNodes; i++) {
- XmlNode methodNode = methodNodes[indexes[i]];
- string methodDisplayName = GetNodeDisplayName(methodNode);
- string methodName = GetNodeName(methodNode);
- string methodID = GetNodeId(methodNode);
-
- if (IsMethodFirstOverload(methodNodes, indexes, i)) {
- bOverloaded = true;
-
- fileName = ctx._nameResolver.GetFilenameForMethodOverloads(ctx.CurrentAssemblyName, typeID, methodName);
- ctx.htmlHelp.AddFileToContents(methodDisplayName + " Method", fileName);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, methodID);
- TransformAndWriteResult(ctx, "memberoverload", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
- }
-
- if (XmlUtils.GetAttributeString(methodNode, "declaringType", false) == null) {
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, methodID);
-
- string pageTitle;
- if (bOverloaded) {
- XmlNodeList parameterNodes = ctx.SelectNodes(methodNode, "ndoc:parameter");
- pageTitle = methodDisplayName + GetParamList(parameterNodes) + " Method ";
- } else {
- pageTitle = methodDisplayName + " Method";
- }
- ctx.htmlHelp.AddFileToContents(pageTitle, fileName,
- HtmlHelpIcon.Page);
-
- XsltArgumentList arguments2 = new XsltArgumentList();
- arguments2.AddParam("member-id", String.Empty, methodID);
- TransformAndWriteResult(ctx, "member", arguments2, fileName);
- }
-
- if (bOverloaded && IsMethodLastOverload(methodNodes, indexes, i)) {
- bOverloaded = false;
- ctx.htmlHelp.CloseBookInContents();
- }
- }
-
- ctx.htmlHelp.CloseBookInContents();
- }
- }
-
- private void MakeHtmlForOperators(BuildAssemblyContext ctx, XmlNode typeNode)
- {
- XmlNodeList opNodes = ctx.SelectNodes(typeNode, "ndoc:operator");
-
- if (opNodes.Count == 0)
- return;
-
- string typeID = GetNodeId(typeNode);
- string fileName = ctx._nameResolver.GetFilenameForOperatorList(ctx.CurrentAssemblyName, typeID);
- bool bOverloaded = false;
-
- bool bHasOperators =
- (ctx.SelectSingleNode(typeNode, "ndoc:operator[@name != 'op_Explicit' and @name != 'op_Implicit']") != null);
- bool bHasConverters =
- (ctx.SelectSingleNode(typeNode, "ndoc:operator[@name = 'op_Explicit' or @name = 'op_Implicit']") != null);
- string pageTitle = "";
-
- if (bHasOperators) {
- pageTitle = bHasConverters ? "Operators and Type Conversions" : "Operators";
- } else {
- if (bHasConverters) {
- pageTitle = "Type Conversions";
- }
- }
-
- ctx.htmlHelp.AddFileToContents(pageTitle, fileName);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- arguments.AddParam("member-type", String.Empty, "operator");
- TransformAndWriteResult(ctx, "individualmembers", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- int[] indexes = SortNodesByAttribute(opNodes, "id");
- int nNodes = opNodes.Count;
-
- //operators first
- for (int i = 0; i < nNodes; i++) {
- XmlNode operatorNode = opNodes[indexes[i]];
-
- string operatorID = GetNodeId(operatorNode);
- string opName = GetNodeName(operatorNode);
- if ((opName != "op_Implicit") && (opName != "op_Explicit")) {
- if (IsMethodFirstOverload(opNodes, indexes, i)) {
- bOverloaded = true;
-
- fileName = ctx._nameResolver.GetFilenameForOperatorOverloads(ctx.CurrentAssemblyName, typeID, opName);
- ctx.htmlHelp.AddFileToContents(GetOperatorDisplayName(ctx, operatorNode), fileName);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, operatorID);
- TransformAndWriteResult(ctx, "memberoverload", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
- }
-
-
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, operatorID);
- string opPageTitle;
- if (bOverloaded) {
- XmlNodeList parameterNodes = ctx.SelectNodes(operatorNode, "ns:parameter");
- opPageTitle = GetOperatorDisplayName(ctx, operatorNode) + GetParamList(parameterNodes);
- } else {
- opPageTitle = GetOperatorDisplayName(ctx, operatorNode);
- }
- ctx.htmlHelp.AddFileToContents(opPageTitle, fileName,
- HtmlHelpIcon.Page);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, operatorID);
- TransformAndWriteResult(ctx, "member", arguments, fileName);
-
- if (bOverloaded && IsMethodLastOverload(opNodes, indexes, i)) {
- bOverloaded = false;
- ctx.htmlHelp.CloseBookInContents();
- }
- }
- }
-
- //type converters
- for (int i = 0; i < nNodes; i++) {
- XmlNode operatorNode = opNodes[indexes[i]];
- string operatorID = GetNodeId(operatorNode);
- string opName = GetNodeName(operatorNode);
-
- if ((opName == "op_Implicit") || (opName == "op_Explicit")) {
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, operatorID);
- ctx.htmlHelp.AddFileToContents(GetOperatorDisplayName(ctx, operatorNode), fileName,
- HtmlHelpIcon.Page);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("member-id", String.Empty, operatorID);
- TransformAndWriteResult(ctx, "member", arguments, fileName);
- }
- }
-
- ctx.htmlHelp.CloseBookInContents();
- }
-
- private static string GetOperatorDisplayName(BuildProjectContext ctx, XmlNode operatorNode)
- {
- string name = GetNodeName(operatorNode);
-
- switch (name) {
- case "op_Decrement":
- return "Decrement Operator";
- case "op_Increment":
- return "Increment Operator";
- case "op_UnaryNegation":
- return "Unary Negation Operator";
- case "op_UnaryPlus":
- return "Unary Plus Operator";
- case "op_LogicalNot":
- return "Logical Not Operator";
- case "op_True":
- return "True Operator";
- case "op_False":
- return "False Operator";
- case "op_AddressOf":
- return "Address Of Operator";
- case "op_OnesComplement":
- return "Ones Complement Operator";
- case "op_PointerDereference":
- return "Pointer Dereference Operator";
- case "op_Addition":
- return "Addition Operator";
- case "op_Subtraction":
- return "Subtraction Operator";
- case "op_Multiply":
- return "Multiplication Operator";
- case "op_Division":
- return "Division Operator";
- case "op_Modulus":
- return "Modulus Operator";
- case "op_ExclusiveOr":
- return "Exclusive Or Operator";
- case "op_BitwiseAnd":
- return "Bitwise And Operator";
- case "op_BitwiseOr":
- return "Bitwise Or Operator";
- case "op_LogicalAnd":
- return "LogicalAnd Operator";
- case "op_LogicalOr":
- return "Logical Or Operator";
- case "op_Assign":
- return "Assignment Operator";
- case "op_LeftShift":
- return "Left Shift Operator";
- case "op_RightShift":
- return "Right Shift Operator";
- case "op_SignedRightShift":
- return "Signed Right Shift Operator";
- case "op_UnsignedRightShift":
- return "Unsigned Right Shift Operator";
- case "op_Equality":
- return "Equality Operator";
- case "op_GreaterThan":
- return "Greater Than Operator";
- case "op_LessThan":
- return "Less Than Operator";
- case "op_Inequality":
- return "Inequality Operator";
- case "op_GreaterThanOrEqual":
- return "Greater Than Or Equal Operator";
- case "op_LessThanOrEqual":
- return "Less Than Or Equal Operator";
- case "op_UnsignedRightShiftAssignment":
- return "Unsigned Right Shift Assignment Operator";
- case "op_MemberSelection":
- return "Member Selection Operator";
- case "op_RightShiftAssignment":
- return "Right Shift Assignment Operator";
- case "op_MultiplicationAssignment":
- return "Multiplication Assignment Operator";
- case "op_PointerToMemberSelection":
- return "Pointer To Member Selection Operator";
- case "op_SubtractionAssignment":
- return "Subtraction Assignment Operator";
- case "op_ExclusiveOrAssignment":
- return "Exclusive Or Assignment Operator";
- case "op_LeftShiftAssignment":
- return "Left Shift Assignment Operator";
- case "op_ModulusAssignment":
- return "Modulus Assignment Operator";
- case "op_AdditionAssignment":
- return "Addition Assignment Operator";
- case "op_BitwiseAndAssignment":
- return "Bitwise And Assignment Operator";
- case "op_BitwiseOrAssignment":
- return "Bitwise Or Assignment Operator";
- case "op_Comma":
- return "Comma Operator";
- case "op_DivisionAssignment":
- return "Division Assignment Operator";
- case "op_Explicit": {
- XmlNode parameterNode = ctx.SelectSingleNode(operatorNode, "ndoc:parameter");
- string from = GetNodeTypeId(parameterNode);
- string to = GetNodeTypeId(ctx.SelectSingleNode(operatorNode, "ndoc:returnType"));
- return "Explicit " + StripNamespace(from) + " to " + StripNamespace(to) + " Conversion";
- }
- case "op_Implicit": {
- XmlNode parameterNode = ctx.SelectSingleNode(operatorNode, "ndoc:parameter");
- string from = GetNodeTypeId(parameterNode);
- string to = GetNodeTypeId(ctx.SelectSingleNode(operatorNode, "ndoc:returnType"));
- return "Implicit " + StripNamespace(from) + " to " + StripNamespace(to) + " Conversion";
- }
- default:
- return "ERROR";
- }
- }
-
- private void MakeHtmlForEvents(BuildAssemblyContext ctx, XmlNode typeNode)
- {
- XmlNodeList declaredEventNodes = ctx.SelectNodes(typeNode, "ndoc:event[not(@declaringType)]");
-
- if (declaredEventNodes.Count > 0) {
- XmlNodeList events = ctx.SelectNodes(typeNode, "ns:event");
-
- if (events.Count > 0) {
- //string typeName = (string)typeNode.Attributes["name"].Value;
- string typeID = GetNodeId(typeNode);
- string fileName = ctx._nameResolver.GetFilenameForEventList(ctx.CurrentAssemblyName, typeID);
-
- ctx.htmlHelp.AddFileToContents("Events", fileName);
-
- XsltArgumentList arguments = new XsltArgumentList();
- arguments.AddParam("type-id", String.Empty, typeID);
- arguments.AddParam("member-type", String.Empty, "event");
- TransformAndWriteResult(ctx, "individualmembers", arguments, fileName);
-
- ctx.htmlHelp.OpenBookInContents();
-
- int[] indexes = SortNodesByAttribute(events, "id");
-
- foreach (int index in indexes) {
- XmlNode eventElement = events[index];
-
- if (XmlUtils.GetAttributeString(eventElement, "declaringType", false) == null) {
- string eventName = GetNodeName(eventElement);
- string eventID = GetNodeId(eventElement);
-
- fileName = ctx._nameResolver.GetFilenameForId(ctx.CurrentAssemblyName, eventID);
- ctx.htmlHelp.AddFileToContents(eventName + " Event",
- fileName,
- HtmlHelpIcon.Page);
-
- arguments = new XsltArgumentList();
- arguments.AddParam("event-id", String.Empty, eventID);
- TransformAndWriteResult(ctx, "event", arguments, fileName);
- }
- }
-
- ctx.htmlHelp.CloseBookInContents();
- }
- }
- }
-
- private static string GetParamList(XmlNodeList parameterNodes)
- {
- ArrayList parameters = new ArrayList();
-
- foreach (XmlNode parameterNode in parameterNodes) {
-
- string parameterTypeName = GetParameterTypeName(parameterNode, "displayName");
-
- parameters.Add(parameterTypeName);
- }
-
- string[] parameterTypeNames = (string[]) parameters.ToArray(typeof (string));
- string paramList = "(" + string.Join(",", parameterTypeNames) + ")";
-
- return paramList;
- }
-
- private static string GetParameterTypeName(XmlNode root, string typeAttributeName)
- {
- XmlAttribute typeAtt = root.Attributes[typeAttributeName];
- return typeAtt.Value;
- }
-
- private static string GetNodeId(XmlNode node)
- {
- return XmlUtils.GetNodeId(node);
- }
-
- private static string GetNodeTypeId(XmlNode node)
- {
- return XmlUtils.GetNodeTypeId(node);
- }
-
- private static string GetNodeName(XmlNode node)
- {
- return XmlUtils.GetNodeName(node);
- }
-
- private static string GetNodeDisplayName(XmlNode node)
- {
- return XmlUtils.GetNodeDisplayName(node);
- }
-
- private static string StripNamespace(string name)
- {
- string result = name;
-
- int lastDot = name.LastIndexOf('.');
-
- if (lastDot != -1) {
- result = name.Substring(lastDot + 1);
- }
-
- return result;
- }
-
- private static int[] SortNodesByAttribute(XmlNodeList nodes, string attributeName)
- {
- int length = nodes.Count;
- string[] names = new string[length];
- int[] indexes = new int[length];
- int i = 0;
-
- foreach (XmlNode node in nodes) {
- names[i] = node.Attributes[attributeName].Value;
- indexes[i] = i++;
- }
-
- Array.Sort(names, indexes);
-
- return indexes;
- }
-
- private static string[] SortNamespaces(BuildProjectContext ctx, IList assemblyNames, string defaultNamespace)
- {
- NameValueCollection namespaceAssemblies = new NameValueCollection();
- int nNodes = assemblyNames.Count;
- for (int i = 0; i < nNodes; i++) {
- string assemblyName = assemblyNames[i];
- GetNamespacesFromAssembly(ctx, assemblyName, namespaceAssemblies);
- }
-
- string[] namespaces = namespaceAssemblies.AllKeys;
- if (string.IsNullOrEmpty(defaultNamespace)) {
- Array.Sort(namespaces);
- } else {
- Array.Sort(namespaces, (x, y) =>
- {
- if (x == y) {
- return 0;
- } else if (x == null || x == defaultNamespace) {
- return -1;
- } else if (y == defaultNamespace) {
- return 1;
- }
- return x.CompareTo(y);
- });
- }
- return namespaces;
- }
-
- private void TransformAndWriteResult(BuildAssemblyContext ctx,
- string transformName,
- XsltArgumentList arguments,
- string filename)
- {
- Trace.WriteLine(filename);
-#if DEBUG
- int start = Environment.TickCount;
-#endif
-
- ExternalHtmlProvider htmlProvider = new ExternalHtmlProvider(MyConfig, filename);
-
- try {
-
- StreamWriter streamWriter;
- string fullPath = Path.Combine(ctx.WorkingDirectory.FullName, filename);
- using (streamWriter = new StreamWriter(
- File.Open(fullPath, FileMode.Create),
- ctx.CurrentFileEncoding)) {
- string DocLangCode = Enum.GetName(typeof(SdkLanguage), MyConfig.SdkDocLanguage).Replace("_", "-");
-
- MsdnXsltUtilities utilities = new MsdnXsltUtilities(ctx._nameResolver, ctx.CurrentAssemblyName, MyConfig.SdkDocVersionString, DocLangCode, MyConfig.SdkLinksOnWeb, ctx.CurrentFileEncoding);
- ctx._nameResolver.utilities = utilities;
-
- if (arguments.GetParam("assembly-name", string.Empty) == null) {
- arguments.AddParam("assembly-name", String.Empty, ctx.CurrentAssemblyName);
- }
- arguments.AddParam("ndoc-title", String.Empty, MyConfig.Title);
- arguments.AddParam("ndoc-vb-syntax", String.Empty, MyConfig.ShowVisualBasic);
- arguments.AddParam("ndoc-omit-object-tags", String.Empty, ((MyConfig.OutputTarget & OutputType.HtmlHelp) == 0));
- arguments.AddParam("ndoc-document-attributes", String.Empty, MyConfig.DocumentAttributes);
- arguments.AddParam("ndoc-documented-attributes", String.Empty, MyConfig.DocumentedAttributes);
-
- arguments.AddParam("ndoc-sdk-doc-base-url", String.Empty, utilities.SdkDocBaseUrl);
- arguments.AddParam("ndoc-sdk-doc-file-ext", String.Empty, utilities.SdkDocExt);
- arguments.AddParam("ndoc-sdk-doc-language", String.Empty, utilities.SdkDocLanguage);
-
- arguments.AddExtensionObject("urn:NDocUtil", utilities);
- arguments.AddExtensionObject("urn:NDocExternalHtml", htmlProvider);
-
- //Use new overload so we don't get obsolete warnings - clean compile :)
-
- XslTransform(ctx, transformName, ctx.GetXPathNavigable(), arguments, streamWriter, fullPath);
- }
- }
- catch(IOException ex)
- {
- throw new DocumenterException(string.Format("IO error while creating file {0}", filename), ex);
- }
-// catch (PathTooLongException e) {
-// throw new PathTooLongException(e.Message + "\nThe file that NDoc3 was trying to create had the following name:\n" + Path.Combine(ctx.WorkingDirectory.FullName, filename));
-// }
-
-#if DEBUG
- Debug.WriteLine((Environment.TickCount - start) + " msec.");
-#endif
- ctx.htmlHelp.AddFileToProject(filename);
- }
- }
-}
DELETED Externals/NDoc3/src/NameResolver.cs
Index: Externals/NDoc3/src/NameResolver.cs
==================================================================
--- Externals/NDoc3/src/NameResolver.cs
+++ /dev/null
@@ -1,553 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Xml;
-using NDoc3.Core;
-using NDoc3.Xml;
-
-namespace NDoc3.Documenter.Msdn {
- ///
- ///
- public class NameResolver {
- public const string EXT = ".html";
-
- public MsdnXsltUtilities utilities;
- private readonly bool mergeAssemblies;
- private readonly StringDictionary fileNames = new StringDictionary();
- private readonly StringDictionary elemNames = new StringDictionary();
-
- private readonly ReferenceTypeDictionary assemblyReferences = new ReferenceTypeDictionary();
-
- ///
- ///
- ///
- ///
- public NameResolver(XmlDocument documentation, bool mergeAssemblies) {
- this.mergeAssemblies = mergeAssemblies;
- BuildNameTables(documentation, mergeAssemblies);
- }
-
- #region Used for Html file generation
-
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForFieldList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Fields");
- }
-
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForOperatorList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Operators");
- }
-
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForMethodList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Methods");
- }
-
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForPropertyList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Properties");
- }
-
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForEventList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Events");
- }
- #endregion
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetDisplayNameForId(string currentAssemblyName, string memberId) {
- string name = elemNames[currentAssemblyName + memberId];
- if (name == null) {
- // search for identifier in referenced assemblies
- string[] assemblyReference = assemblyReferences[currentAssemblyName];
- if (assemblyReference != null) {
- foreach (string assemblyName in assemblyReference) {
- name = elemNames[assemblyName + memberId];
- if (name != null)
- break;
- }
- }
- }
-
- if (name == null) {
- name = elemNames[memberId];
- }
- return name;
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForId(string currentAssemblyName, string memberId) {
- // lookup current assembly
- string filename = GetFilenameForIdInternal(currentAssemblyName, memberId);
- return filename;
- }
-
- ///
- ///
- ///
- ///
- public string GetFilenameForAssembly(string assemblyName) {
- return GetFilenameForId(assemblyName, null);
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForNamespaceHierarchy(string assemblyName, string namespaceName) {
- return GetFilenameForIdSpecial(assemblyName, "N:" + namespaceName, "~Hierarchy");
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForNamespace(string assemblyName, string namespaceName) {
- if (mergeAssemblies)
- assemblyName = string.Empty;
- if (string.IsNullOrEmpty(namespaceName))
- namespaceName = "(global)";
- return GetFilenameForId(assemblyName, "N:" + namespaceName);
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForTypeHierarchy(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Hierarchy");
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForTypeMemberList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Members");
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForConstructorList(string assemblyName, string typeID) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "~Constructors");
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForOperatorOverloads(string assemblyName, string typeID, string operatorName) {
- return GetFilenameForIdSpecial(assemblyName, typeID, "." + operatorName.Replace('`', '$') + "~Overloads");
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForPropertyOverloads(string assemblyName, string typeID, string propertyName) {
- string fileName = GetFilenameForIdSpecial(assemblyName, typeID, "." + propertyName.Replace('`', '$') + "~Overloads");
- return fileName;
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForMethodOverloads(string assemblyName, string typeID, string methodName) {
- string fileName = GetFilenameForIdSpecial(assemblyName, typeID, "." + methodName.Replace('`', '$').Replace("<", "(").Replace(">", ")") + "~Overloads");
- return fileName;
- }
-
- // exposed to XSLT
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForTypename(string currentAssemblyName, string typeName) {
-
- // strip leading type identifier
- if (typeName.Length > 1 && typeName[1] != ':')
- typeName = "T:" + typeName;
- string filename = GetFilenameForId(currentAssemblyName, typeName);
- return filename;
- }
-
- // exposed
- ///
- ///
- ///
- ///
- ///
- ///
- public string GetFilenameForCRefOverload(string currentAssemblyName, string cref, string overload) {
- // lookup current assembly
- string filename = GetFilenameForId(currentAssemblyName, cref);
- return filename;
-
- #region Original XSLT Logic
- /*
-
- */
- #endregion
- }
-
- #region BuildNameTables
-
- private void BuildNameTables(XmlDocument xmlDocumentation, bool mergeNamespaces) {
- XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDocumentation.NameTable);
- nsmgr.AddNamespace("ns", "urn:ndoc-schema");
- XmlNodeList assemblies = xmlDocumentation.SelectNodes("/ns:ndoc/ns:assembly", nsmgr);
- if(assemblies == null) throw new Exception("No assemblies found");
- foreach (XmlElement assemblyNode in assemblies) {
- string assemblyName = GetNodeName(assemblyNode);
- RegisterAssembly(assemblyName);
-
- // build list of assemblyReferences
- XmlNodeList assemblyReferenceNodes = assemblyNode.SelectNodes("ns:assemblyReference", nsmgr);
- if(assemblyReferenceNodes == null) throw new Exception("No assembly reference nodes found");
- List assemblyReferenceNames = new List();
- foreach (XmlNode assemblyReferenceNode in assemblyReferenceNodes) {
- assemblyReferenceNames.Add(GetNodeName(assemblyReferenceNode));
- }
- assemblyReferences.Add(assemblyName, assemblyReferenceNames.ToArray());
-
- // foreach namespace
- XmlNodeList namespaces = assemblyNode.SelectNodes("ns:module/ns:namespace", nsmgr);
- if(namespaces == null) throw new Exception("No namespaces found");
- foreach (XmlElement namespaceNode in namespaces) {
- string namespaceName = GetNodeName(namespaceNode);
- // register namespace
- RegisterNamespace((mergeNamespaces ? string.Empty : assemblyName), namespaceName);
-
- XmlNodeList types = namespaceNode.SelectNodes("*[@id]", nsmgr);
- if(types == null) throw new Exception("No types found");
- foreach (XmlElement typeNode in types) {
- string typeId = GetNodeId(typeNode);
- //TODO The rest should also use displayName ((EE): clarify what above line means - shall we remove 'name' attribute then?)
- string typeDisplayName = GetNodeDisplayName(typeNode);
- RegisterType(assemblyName, typeId, typeDisplayName);
-
- // foreach member
- XmlNodeList members = typeNode.SelectNodes("*[@id]");
- if(members == null) throw new Exception("No type members found");
- foreach (XmlElement memberNode in members) {
- string memberId = GetNodeId(memberNode);
- switch (memberNode.Name) {
- case "constructor": {
- string overload = XmlUtils.GetAttributeString(memberNode, "overload", false);
- RegisterConstructor(assemblyName, typeId, memberId, overload);
- }
- break;
- case "field": {
- bool isEnum = (typeNode.Name == "enumeration");
- string memberName = GetNodeName(memberNode);
- RegisterField(assemblyName, typeId, memberId, isEnum, memberName);
- }
- break;
- case "property": {
- string overload = GetNodeOverload(memberNode);
- string memberName = GetNodeName(memberNode);
- RegisterProperty(assemblyName, memberId, memberName, overload);
- }
- break;
- case "method": {
- string overload = GetNodeOverload(memberNode);
- string memberDisplayName = GetNodeDisplayName(memberNode);
- RegisterMethod(assemblyName, memberId, memberDisplayName, overload);
- }
- break;
- case "operator": {
- string overload = GetNodeOverload(memberNode);
- string memberName = GetNodeName(memberNode);
- RegisterOperator(assemblyName, memberId, memberName, overload);
- }
- break;
- case "event": {
- string memberName = GetNodeName(memberNode);
- RegisterEvent(assemblyName, memberId, memberName);
- }
- break;
- }
- }
- }
- }
- }
- }
-
- private void RegisterAssembly(string assemblyName) {
- Register(assemblyName, null, assemblyName, CalculateFilenameForId(assemblyName, null, null));
- }
-
- private void RegisterNamespace(string assemblyName, string namespaceName) {
- if (string.IsNullOrEmpty(namespaceName)) {
- namespaceName = "(global)";
- }
- string namespaceId = "N:" + namespaceName;
- Register(assemblyName, namespaceId, namespaceName, CalculateFilenameForId(assemblyName, namespaceId, null));
- }
-
- private void RegisterType(string assemblyName, string typeId, string displayName) {
- Register(assemblyName, typeId, displayName, CalculateFilenameForId(assemblyName, typeId, null));
- }
-
- private void RegisterConstructor(string assemblyName, string typeId, string id, string overload) {
- Register(assemblyName, id, GetDisplayNameForId(assemblyName, typeId), CalculateFilenameForId(assemblyName, id, overload));
- }
-
- private void RegisterOperator(string assemblyName, string memberId, string memberName, string overload) {
- Register(assemblyName, memberId, memberName, CalculateFilenameForId(assemblyName, memberId, overload));
- }
-
- private void RegisterMethod(string assemblyName, string memberId, string memberDisplayName, string overload) {
- Register(assemblyName, memberId, memberDisplayName, CalculateFilenameForId(assemblyName, memberId, overload));
- }
-
- private void RegisterProperty(string assemblyName, string memberId, string memberName, string overload) {
- Register(assemblyName, memberId, memberName, CalculateFilenameForId(assemblyName, memberId, overload));
- }
-
- private void RegisterField(string assemblyName, string typeId, string memberId, bool isEnum, string memberName) {
- if (isEnum) {
- Register(assemblyName, memberId, memberName, GetFilenameForId(assemblyName, typeId));
- } else {
- Register(assemblyName, memberId, memberName, CalculateFilenameForId(assemblyName, memberId, null));
- }
- }
-
- private void RegisterEvent(string assemblyName, string memberId, string memberName) {
- Register(assemblyName, memberId, memberName, CalculateFilenameForId(assemblyName, memberId, null));
- }
-
-
- #endregion
-
- #region Registration & Lookup Logic
-
- private string GetFilenameForIdInternal(string currentAssemblyName, string memberId) {
- string filename = fileNames[currentAssemblyName + memberId];
- if (filename == null) {
- // search for identifier in referenced assemblies
- string[] assemblyReference = assemblyReferences[currentAssemblyName];
- if (assemblyReference != null) {
- foreach (string assemblyName in assemblyReference) {
- filename = fileNames[assemblyName + memberId];
- if (filename != null)
- break;
- }
- }
- }
-
- if (filename == null && memberId != null) {
- filename = fileNames[memberId];
- }
-
- // Debug.Assert(filename != null, string.Format("Filename for assembly:memberId [{0}:{1}] not found", currentAssemblyName, memberId));
- // Debug.WriteLine(string.Format("GetFilenameForIdInternal('{0}','{1}') => {2}", currentAssemblyName, memberId, filename));
- if (filename != null)
- return filename;
-
- if (utilities != null)
- {
- if (memberId.Length > 2 && memberId[1] == ':')
- memberId = memberId.Substring(2);
-
- filename = utilities.FormatOnlineSDKLink(memberId);
-
- if (filename != null)
- return filename;
- }
-
- return String.Empty;
- }
-
- private string GetFilenameForIdSpecial(string assemblyName, string memberId, string postfix) {
- string fn = GetFilenameForIdInternal(assemblyName, memberId);
- if (fn != null && fn.Length > EXT.Length) {
- fn = fn.Insert(fn.Length - EXT.Length, postfix);
- }
- // Debug.WriteLine(string.Format("GetFilenameForIdSpecial('{0}','{1}') => {2}", assemblyName, memberId, fn));
- return fn;
- }
-
- private void Register(string assemblyName, string id, string displayName, string fileName) {
- // Debug.WriteLine(string.Format("Registering [{0},{1}]=[{2},{3}]", assemblyName, id, displayName, fileName));
- fileNames[assemblyName + id] = fileName;
- elemNames[assemblyName + id] = displayName;
- }
-
- ///
- /// of the form "T:XXX", "F:XXX" etc
- ///
- private static string CalculateFilenameForId(string assemblyName, string id, string overload) {
- if (id == null) {
- return assemblyName + EXT;
- }
-
- // char idType = '\0';
- int ix = id.IndexOf(':');
- // if (ix > -1) {
- // idType = id[0];
- // }
- id = id.Substring(ix + 1);
-
- // constructors could be #ctor or #cctor
- // int ixDotHash = id.IndexOf(".#c");
- // if (ixDotHash > -1)
- // id = id.Substring(0, ixDotHash);
-
- // methods could have "("
- int ixLBrace = id.IndexOf("(");
- if (ixLBrace > -1)
- id = id.Substring(0, ixLBrace);
-
- if (overload != null) {
- id += overload;
- }
-
- id = id.Replace('#', '~');
- // generic methods have the form "methodname"
- id = id.Replace('<', '{');
- id = id.Replace('>', '}');
-
- id = id.Replace('`', '$');
- return assemblyName + "~" + id + EXT;
- }
-
- #endregion
-
- #region Xml Utility Methods
-
- private static string GetNodeOverload(XmlNode memberNode) {
- return XmlUtils.GetAttributeString(memberNode, "overload", false);
- }
-
- private static string GetNodeId(XmlNode node) {
- return XmlUtils.GetNodeId(node);
- }
-
- private static string GetNodeName(XmlNode node) {
- return XmlUtils.GetNodeName(node);
- }
-
- private static string GetNodeDisplayName(XmlNode node) {
- return XmlUtils.GetNodeDisplayName(node);
- }
-
- #endregion
- }
-}
Index: SQLite.Interop/src/win/SQLite.Interop.rc
==================================================================
--- SQLite.Interop/src/win/SQLite.Interop.rc
+++ SQLite.Interop/src/win/SQLite.Interop.rc
@@ -7,44 +7,40 @@
#if !defined(_WIN32_WCE)
#include "winresrc.h"
#else
#include "windows.h"
-#endif /* !defined(_WIN32_WCE) */
-
-#if !defined(VS_FF_NONE)
-# define VS_FF_NONE 0x00000000L
-#endif /* !defined(VS_FF_NONE) */
+#endif
#include "..\core\sqlite3.h"
#include "interop.h"
/*
** English (U.S.) resources
*/
-#if defined(_WIN32)
+#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif /* defined(_WIN32) */
+#endif //_WIN32
/*
** Version
*/
VS_VERSION_INFO VERSIONINFO
FILEVERSION INTEROP_RC_VERSION
PRODUCTVERSION INTEROP_RC_VERSION
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#if defined(_DEBUG)
- FILEFLAGS VS_FF_DEBUG
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
#else
- FILEFLAGS VS_FF_NONE
-#endif /* defined(_DEBUG) */
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE VFT2_UNKNOWN
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
@@ -54,18 +50,17 @@
VALUE "InternalName", "SQLite.Interop"
VALUE "LegalCopyright", "Public Domain"
VALUE "OriginalFilename", "SQLite.Interop.dll"
VALUE "ProductName", "System.Data.SQLite"
VALUE "ProductVersion", INTEROP_VERSION
- VALUE "SourceId", INTEROP_SOURCE_ID " " INTEROP_SOURCE_TIMESTAMP
VALUE "SQLiteCompanyName", "D. Richard Hipp, et al."
VALUE "SQLiteDescription", "SQLite Database Engine"
VALUE "SQLiteCopyright", "http://www.sqlite.org/copyright.html"
VALUE "SQLiteVersion", SQLITE_VERSION
VALUE "SQLiteSourceId", SQLITE_SOURCE_ID
END
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", 0x409, 0x4b0
+ VALUE "Translation", 0x409, 1200
END
END
Index: SQLite.Interop/src/win/interop.c
==================================================================
--- SQLite.Interop/src/win/interop.c
+++ SQLite.Interop/src/win/interop.c
@@ -21,12 +21,10 @@
#ifdef SQLITE_OS_WIN
#if defined(INTEROP_CODEC)
#include "crypt.c"
#endif
-#include "interop.h"
-
#define INTEROP_DEBUG_NONE (0x0000)
#define INTEROP_DEBUG_CLOSE (0x0001)
#define INTEROP_DEBUG_FINALIZE (0x0002)
#define INTEROP_DEBUG_BACKUP_FINISH (0x0004)
#define INTEROP_DEBUG_OPEN (0x0008)
@@ -217,20 +215,10 @@
}
return ret;
}
#endif
-SQLITE_API const char *sqlite3_libversion_interop(void)
-{
- return INTEROP_VERSION;
-}
-
-SQLITE_API const char *sqlite3_sourceid_interop(void)
-{
- return INTEROP_SOURCE_ID " " INTEROP_SOURCE_TIMESTAMP;
-}
-
SQLITE_API int WINAPI sqlite3_open_interop(const char *filename, int flags, sqlite3 **ppdb)
{
int ret;
#if defined(INTEROP_DEBUG) && (INTEROP_DEBUG & INTEROP_DEBUG_OPEN)
Index: SQLite.Interop/src/win/interop.h
==================================================================
--- SQLite.Interop/src/win/interop.h
+++ SQLite.Interop/src/win/interop.h
@@ -4,15 +4,7 @@
* Written by Joe Mistachkin.
* Released to the public domain, use at your own risk!
*/
#ifndef INTEROP_VERSION
-#define INTEROP_VERSION "1.0.89.0"
-#endif
-
-#ifndef INTEROP_SOURCE_ID
-#define INTEROP_SOURCE_ID "0000000000000000000000000000000000000000"
-#endif
-
-#ifndef INTEROP_SOURCE_TIMESTAMP
-#define INTEROP_SOURCE_TIMESTAMP "0000-00-00 00:00:00 UTC"
+#define INTEROP_VERSION "1.0.89.0"
#endif
Index: Setup/build.bat
==================================================================
--- Setup/build.bat
+++ Setup/build.bat
@@ -246,32 +246,10 @@
SET LOGGING="/logger:FileLogger,Microsoft.Build.Engine;Logfile=%LOGDIR%\%LOGPREFIX%_%CONFIGURATION%_%PLATFORM%_%YEAR%_%LOGSUFFIX%.log;Verbosity=diagnostic"
:skip_setLogging
-IF NOT DEFINED NOTAG (
- IF EXIST Externals\Eagle\bin\EagleShell.exe (
- %__ECHO% Externals\Eagle\bin\EagleShell.exe -file Setup\sourceTag.eagle SourceIdMode SQLite.Interop\src\win\interop.h
-
- IF ERRORLEVEL 1 (
- ECHO Source tagging of "SQLite.Interop\src\win\interop.h" failed.
- GOTO errors
- )
-
- %__ECHO% Externals\Eagle\bin\EagleShell.exe -file Setup\sourceTag.eagle SourceIdMode System.Data.SQLite\SQLitePatchLevel.cs
-
- IF ERRORLEVEL 1 (
- ECHO Source tagging of "System.Data.SQLite\SQLitePatchLevel.cs" failed.
- GOTO errors
- )
- ) ELSE (
- ECHO WARNING: Source tagging skipped, Eagle binaries are not available.
- )
-) ELSE (
- ECHO WARNING: Source tagging skipped, disabled via NOTAG environment variable.
-)
-
%_VECHO% Logging = '%LOGGING%'
%_VECHO% MsBuildArgs = '%MSBUILD_ARGS%'
%__ECHO% MSBuild.exe "%SOLUTION%" "/target:%TARGET%" "/property:Configuration=%CONFIGURATION%" "/property:Platform=%PLATFORM%" %LOGGING% %MSBUILD_ARGS%
DELETED Setup/sourceTag.eagle
Index: Setup/sourceTag.eagle
==================================================================
--- Setup/sourceTag.eagle
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-#
-# sourceTag.eagle -- Source Version Tag Tool
-#
-# Written by Joe Mistachkin.
-# Released to the public domain, use at your own risk!
-#
-###############################################################################
-
-package require Eagle
-
-proc usage { error } {
- if {[string length $error] > 0} then {puts stdout $error}
-
- puts stdout "usage:\
-[file tail [info nameofexecutable]]\
-[file tail [info script]] "
-
- #
- # NOTE: Indicate to the caller, if any, that we have failed.
- #
- exit 1
-}
-
-set modes [list \"SourceIdMode\"]
-set argc [llength $argv]
-
-if {$argc == 2} then {
- #
- # NOTE: Are we updating the "PatchLevel.cs" file?
- #
- set mode [lindex $argv 0]
-
- if {[string length $mode] > 0} then {
- #
- # NOTE: Get the file name to read/update/write.
- #
- set fileName [lindex $argv 1]
-
- #
- # NOTE: Make sure the file name provided is not obviously
- # invalid.
- #
- if {[string length $fileName] > 0} then {
- #
- # NOTE: Read all the data out of the text file.
- #
- set data [readFile $fileName]
-
- #
- # NOTE: Normalize to Unix line-endings.
- #
- set data [string map [list \r\n \n] $data]; # Unix.
-
- #
- # NOTE: Figure out what mode we are in.
- #
- switch -exact -nocase -- $mode {
- SourceIdMode {
- #
- # NOTE: Query the source identifier from Fossil, if available.
- # If we are not within an active checkout, this will fail.
- #
- set pattern {^checkout:\s+([^\s]+)\s+(.*)\s+$}
-
- if {[catch {set exec [exec -success Success -directory \
- [file dirname $fileName] -- fossil info]}] || \
- [regexp -line -- $pattern $exec dummy id timeStamp] == 0} then {
- #
- # NOTE: We could not query the source identifier(s); therefore,
- # use obviously invalid ones. We would also be able to
- # use null values here except that these values end up in
- # native C header files as well (i.e. not just managed
- # assembly attribute values).
- #
- set id 0000000000000000000000000000000000000000
- set timeStamp "0000-00-00 00:00:00 UTC"
- }
-
- #
- # NOTE: Match against this pattern in the "PatchLevel.cs"
- # file (this pattern is fairly strict to prevent
- # false-positives).
- #
- set pattern1 {AssemblySourceId\(.*?\)}
- set pattern2 {AssemblySourceTimeStamp\(.*?\)}
- set pattern3 {INTEROP_SOURCE_ID\s+".*?"}
- set pattern4 {INTEROP_SOURCE_TIMESTAMP\s+".*?"}
-
- #
- # NOTE: Build the final replacement specification string.
- #
- set subSpec1 [appendArgs AssemblySourceId(\" $id \" )]
- set subSpec2 [appendArgs AssemblySourceTimeStamp(\" $timeStamp \" )]
- set subSpec3 [appendArgs INTEROP_SOURCE_ID " \"" $id \"]
- set subSpec4 [appendArgs INTEROP_SOURCE_TIMESTAMP " \"" $timeStamp \"]
-
- #
- # NOTE: Perform the replacements in the original data
- # (first match only).
- #
- set count 0
-
- incr count [regsub -nocase -- $pattern1 $data $subSpec1 data]
- incr count [regsub -nocase -- $pattern2 $data $subSpec2 data]
- incr count [regsub -nocase -- $pattern3 $data $subSpec3 data]
- incr count [regsub -nocase -- $pattern4 $data $subSpec4 data]
-
- #
- # NOTE: If we actually replaced anything, we need to write back
- # to the original file; otherwise, leave it alone.
- #
- if {$count > 0} then {
- #
- # NOTE: Show how we tagged it.
- #
- puts stdout [appendArgs "tagged \"" $fileName "\" " $mode \
- " " $id " " $timeStamp]
-
- #
- # NOTE: Re-write the original file with the modified data.
- #
- writeFile $fileName [string map [list \n \r\n] $data]; # DOS.
- } else {
- #
- # NOTE: We could not replace the string. This is considered
- # an overall failure.
- #
- usage [appendArgs "pattern \"" $pattern "\" not found in \"" \
- $fileName \"]
- }
- }
- default {
- usage [appendArgs "unknown mode, must be " [join $modes " "]]
- }
- }
- } else {
- usage "invalid file name"
- }
- } else {
- usage [appendArgs "invalid mode, must be " [join $modes " "]]
- }
-} else {
- usage ""
-}
Index: Setup/verify.lst
==================================================================
--- Setup/verify.lst
+++ Setup/verify.lst
@@ -127,11 +127,10 @@
Setup/set_x64_2012.bat
Setup/set_x86_2005.bat
Setup/set_x86_2008.bat
Setup/set_x86_2010.bat
Setup/set_x86_2012.bat
- Setup/sourceTag.eagle
Setup/SQLite.iss
Setup/test_all.bat
Setup/test_ce.bat
Setup/updateFileInfo.tcl
Setup/verify.eagle
@@ -260,12 +259,10 @@
SQLite.nuspec
SQLite.x64.nuspec
SQLite.x86.nuspec
System.Data.SQLite/
System.Data.SQLite/AssemblyInfo.cs
- System.Data.SQLite/AssemblySourceIdAttribute.cs
- System.Data.SQLite/AssemblySourceTimeStampAttribute.cs
System.Data.SQLite/DataTypes.xml
System.Data.SQLite/LINQ/
System.Data.SQLite/LINQ/SQLiteConnection_Linq.cs
System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs
System.Data.SQLite/MetaDataCollections.xml
@@ -296,11 +293,10 @@
System.Data.SQLite/SQLiteModule.cs
System.Data.SQLite/SQLiteModuleEnumerable.cs
System.Data.SQLite/SQLiteModuleNoop.cs
System.Data.SQLite/SQLiteParameter.cs
System.Data.SQLite/SQLiteParameterCollection.cs
- System.Data.SQLite/SQLitePatchLevel.cs
System.Data.SQLite/SQLiteStatement.cs
System.Data.SQLite/SQLiteTransaction.cs
System.Data.SQLite/SR.Designer.cs
System.Data.SQLite/SR.resx
System.Data.SQLite/System.Data.SQLite.2005.csproj
@@ -405,11 +401,10 @@
testlinq/testlinq.2008.csproj
testlinq/testlinq.2010.csproj
testlinq/testlinq.2012.csproj
Tests/
Tests/all.eagle
- Tests/authorizer.eagle
Tests/backup.eagle
Tests/basic.eagle
Tests/common.eagle
Tests/empty.eagle
Tests/installer.eagle
@@ -427,11 +422,10 @@
Tests/tkt-17045010df.eagle
Tests/tkt-1c456ae75f.eagle
Tests/tkt-201128cc88.eagle
Tests/tkt-2c630bffa7.eagle
Tests/tkt-2ce0870fad.eagle
- Tests/tkt-3113734605.eagle
Tests/tkt-343d392b51.eagle
Tests/tkt-3567020edf.eagle
Tests/tkt-393d954be0.eagle
Tests/tkt-3aa50d8413.eagle
Tests/tkt-448d663d11.eagle
@@ -447,11 +441,10 @@
Tests/tkt-84718e79fa.eagle
Tests/tkt-8554170e09.eagle
Tests/tkt-8b7d179c3c.eagle
Tests/tkt-8c3bee31c8.eagle
Tests/tkt-996d13cd87.eagle
- Tests/tkt-aba4549801.eagle
Tests/tkt-ac47dd230a.eagle
Tests/tkt-ae5267b863.eagle
Tests/tkt-b4a7ddc83f.eagle
Tests/tkt-bb4b04d457.eagle
Tests/tkt-c010fa6584.eagle
@@ -459,11 +452,10 @@
Tests/tkt-e06c4caff3.eagle
Tests/tkt-e1b2e0f769.eagle
Tests/tkt-e30b820248.eagle
Tests/tkt-e47b3d8346.eagle
Tests/tkt-f2c47a01eb.eagle
- Tests/tkt-f8dbab8baf.eagle
Tests/tkt-fe50b8c2e8.eagle
Tests/Uninstaller_Test_Vs2005.log
Tests/Uninstaller_Test_Vs2008.log
Tests/Uninstaller_Test_Vs2010.log
Tests/Uninstaller_Test_Vs2012.log
DELETED System.Data.SQLite/AssemblySourceIdAttribute.cs
Index: System.Data.SQLite/AssemblySourceIdAttribute.cs
==================================================================
--- System.Data.SQLite/AssemblySourceIdAttribute.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************
- * ADO.NET 2.0 Data Provider for SQLite Version 3.X
- * Written by Joe Mistachkin (joe@mistachkin.com)
- *
- * Released to the public domain, use at your own risk!
- ********************************************************/
-
-using System;
-
-namespace System.Data.SQLite
-{
- ///
- /// Defines a source code identifier custom attribute for an assembly
- /// manifest.
- ///
- [AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
- public sealed class AssemblySourceIdAttribute : Attribute
- {
- ///
- /// Constructs an instance of this attribute class using the specified
- /// source code identifier value.
- ///
- ///
- /// The source code identifier value to use.
- ///
- public AssemblySourceIdAttribute(string value)
- {
- sourceId = value;
- }
-
- ///////////////////////////////////////////////////////////////////////
-
- private string sourceId;
- ///
- /// Gets the source code identifier value.
- ///
- public string SourceId
- {
- get { return sourceId; }
- }
- }
-}
DELETED System.Data.SQLite/AssemblySourceTimeStampAttribute.cs
Index: System.Data.SQLite/AssemblySourceTimeStampAttribute.cs
==================================================================
--- System.Data.SQLite/AssemblySourceTimeStampAttribute.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************
- * ADO.NET 2.0 Data Provider for SQLite Version 3.X
- * Written by Joe Mistachkin (joe@mistachkin.com)
- *
- * Released to the public domain, use at your own risk!
- ********************************************************/
-
-using System;
-
-namespace System.Data.SQLite
-{
- ///
- /// Defines a source code time-stamp custom attribute for an assembly
- /// manifest.
- ///
- [AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
- public sealed class AssemblySourceTimeStampAttribute : Attribute
- {
- ///
- /// Constructs an instance of this attribute class using the specified
- /// source code time-stamp value.
- ///
- ///
- /// The source code time-stamp value to use.
- ///
- public AssemblySourceTimeStampAttribute(string value)
- {
- sourceTimeStamp = value;
- }
-
- ///////////////////////////////////////////////////////////////////////
-
- private string sourceTimeStamp;
- ///
- /// Gets the source code time-stamp value.
- ///
- public string SourceTimeStamp
- {
- get { return sourceTimeStamp; }
- }
- }
-}
Index: System.Data.SQLite/SQLite3.cs
==================================================================
--- System.Data.SQLite/SQLite3.cs
+++ System.Data.SQLite/SQLite3.cs
@@ -363,34 +363,10 @@
{
return UTF8ToString(UnsafeNativeMethods.sqlite3_sourceid(), -1);
}
}
- internal static string InteropVersion
- {
- get
- {
-#if !SQLITE_STANDARD
- return UTF8ToString(UnsafeNativeMethods.sqlite3_libversion_interop(), -1);
-#else
- return null;
-#endif
- }
- }
-
- internal static string InteropSourceId
- {
- get
- {
-#if !SQLITE_STANDARD
- return UTF8ToString(UnsafeNativeMethods.sqlite3_sourceid_interop(), -1);
-#else
- return null;
-#endif
- }
- }
-
internal override bool AutoCommit
{
get
{
return IsAutocommit(_sql, _sql);
@@ -2044,15 +2020,10 @@
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_rekey(_sql, newPasswordBytes, (newPasswordBytes == null) ? 0 : newPasswordBytes.Length);
if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
}
#endif
- internal override void SetAuthorizerHook(SQLiteAuthorizerCallback func)
- {
- UnsafeNativeMethods.sqlite3_set_authorizer(_sql, func, IntPtr.Zero);
- }
-
internal override void SetUpdateHook(SQLiteUpdateCallback func)
{
UnsafeNativeMethods.sqlite3_update_hook(_sql, func, IntPtr.Zero);
}
Index: System.Data.SQLite/SQLiteBase.cs
==================================================================
--- System.Data.SQLite/SQLiteBase.cs
+++ System.Data.SQLite/SQLiteBase.cs
@@ -361,11 +361,10 @@
#if INTEROP_CODEC
internal abstract void SetPassword(byte[] passwordBytes);
internal abstract void ChangePassword(byte[] newPasswordBytes);
#endif
- internal abstract void SetAuthorizerHook(SQLiteAuthorizerCallback func);
internal abstract void SetUpdateHook(SQLiteUpdateCallback func);
internal abstract void SetCommitHook(SQLiteCommitCallback func);
internal abstract void SetTraceCallback(SQLiteTraceCallback func);
internal abstract void SetRollbackHook(SQLiteRollbackCallback func);
internal abstract SQLiteErrorCode SetLogCallback(SQLiteLogCallback func);
Index: System.Data.SQLite/SQLiteCommand.cs
==================================================================
--- System.Data.SQLite/SQLiteCommand.cs
+++ System.Data.SQLite/SQLiteCommand.cs
@@ -22,14 +22,12 @@
#endif
public sealed class SQLiteCommand : DbCommand, ICloneable
{
///
/// The default connection string to be used when creating a temporary
- /// connection to execute a command via the static
- /// or
- ///
- /// methods.
+ /// connection to execute a command via the static
+ /// method.
///
private static readonly string DefaultConnectionString = "Data Source=:memory:;";
///
/// The command text this command is based on
@@ -693,52 +691,10 @@
SQLiteExecuteType executeType,
string connectionString,
params object[] args
)
{
- return Execute(
- commandText, executeType, CommandBehavior.Default,
- connectionString, args);
- }
-
- ///
- /// This method creates a new connection, executes the query using the given
- /// execution type and command behavior, closes the connection, and returns
- /// the results. If the connection string is null, a temporary in-memory
- /// database connection will be used.
- ///
- ///
- /// The text of the command to be executed.
- ///
- ///
- /// The execution type for the command. This is used to determine which method
- /// of the command object to call, which then determines the type of results
- /// returned, if any.
- ///
- ///
- /// The command behavior flags for the command.
- ///
- ///
- /// The connection string to the database to be opened, used, and closed. If
- /// this parameter is null, a temporary in-memory databse will be used.
- ///
- ///
- /// The SQL parameter values to be used when building the command object to be
- /// executed, if any.
- ///
- ///
- /// The results of the query -OR- null if no results were produced from the
- /// given execution type.
- ///
- public static object Execute(
- string commandText,
- SQLiteExecuteType executeType,
- CommandBehavior commandBehavior,
- string connectionString,
- params object[] args
- )
- {
if (connectionString == null)
connectionString = DefaultConnectionString;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
@@ -768,19 +724,19 @@
//
break;
}
case SQLiteExecuteType.NonQuery:
{
- return command.ExecuteNonQuery(commandBehavior);
+ return command.ExecuteNonQuery();
}
case SQLiteExecuteType.Scalar:
{
- return command.ExecuteScalar(commandBehavior);
+ return command.ExecuteScalar();
}
case SQLiteExecuteType.Reader:
{
- return command.ExecuteReader(commandBehavior);
+ return command.ExecuteReader();
}
}
}
}
@@ -788,11 +744,11 @@
}
///
/// Overrides the default behavior to return a SQLiteDataReader specialization class
///
- /// The flags to be associated with the reader.
+ /// The flags to be associated with the reader
/// A SQLiteDataReader
public new SQLiteDataReader ExecuteReader(CommandBehavior behavior)
{
CheckDisposed();
SQLiteConnection.Check(_cnn);
@@ -824,32 +780,17 @@
}
///
/// Execute the command and return the number of rows inserted/updated affected by it.
///
- /// The number of rows inserted/updated affected by it.
+ ///
public override int ExecuteNonQuery()
{
- CheckDisposed();
- SQLiteConnection.Check(_cnn);
- return ExecuteNonQuery(CommandBehavior.Default);
- }
-
- ///
- /// Execute the command and return the number of rows inserted/updated affected by it.
- ///
- /// The flags to be associated with the reader.
- /// The number of rows inserted/updated affected by it.
- public int ExecuteNonQuery(
- CommandBehavior behavior
- )
- {
CheckDisposed();
SQLiteConnection.Check(_cnn);
- using (SQLiteDataReader reader = ExecuteReader(behavior |
- CommandBehavior.SingleRow | CommandBehavior.SingleResult))
+ using (SQLiteDataReader reader = ExecuteReader(CommandBehavior.SingleRow | CommandBehavior.SingleResult))
{
while (reader.NextResult()) ;
return reader.RecordsAffected;
}
}
@@ -856,33 +797,17 @@
///
/// Execute the command and return the first column of the first row of the resultset
/// (if present), or null if no resultset was returned.
///
- /// The first column of the first row of the first resultset from the query.
+ /// The first column of the first row of the first resultset from the query
public override object ExecuteScalar()
{
CheckDisposed();
SQLiteConnection.Check(_cnn);
- return ExecuteScalar(CommandBehavior.Default);
- }
-
- ///
- /// Execute the command and return the first column of the first row of the resultset
- /// (if present), or null if no resultset was returned.
- ///
- /// The flags to be associated with the reader.
- /// The first column of the first row of the first resultset from the query.
- public object ExecuteScalar(
- CommandBehavior behavior
- )
- {
- CheckDisposed();
- SQLiteConnection.Check(_cnn);
-
- using (SQLiteDataReader reader = ExecuteReader(behavior |
- CommandBehavior.SingleRow | CommandBehavior.SingleResult))
+
+ using (SQLiteDataReader reader = ExecuteReader(CommandBehavior.SingleRow | CommandBehavior.SingleResult))
{
if (reader.Read())
return reader[0];
}
return null;
Index: System.Data.SQLite/SQLiteConnection.cs
==================================================================
--- System.Data.SQLite/SQLiteConnection.cs
+++ System.Data.SQLite/SQLiteConnection.cs
@@ -12,11 +12,10 @@
using System.Data.Common;
using System.Diagnostics;
using System.Collections.Generic;
using System.Globalization;
using System.ComponentModel;
- using System.Reflection;
using System.Runtime.InteropServices;
using System.IO;
using System.Text;
/////////////////////////////////////////////////////////////////////////////////////////////////
@@ -52,15 +51,11 @@
public readonly IDataReader DataReader;
///
/// The critical handle associated with this event, if any.
///
-#if !PLATFORM_COMPACTFRAMEWORK
public readonly CriticalHandle CriticalHandle;
-#else
- public readonly object CriticalHandle;
-#endif
///
/// Command or message text associated with this event, if any.
///
public readonly string Text;
@@ -86,15 +81,11 @@
SQLiteConnectionEventType eventType,
StateChangeEventArgs eventArgs,
IDbTransaction transaction,
IDbCommand command,
IDataReader dataReader,
-#if !PLATFORM_COMPACTFRAMEWORK
CriticalHandle criticalHandle,
-#else
- object criticalHandle,
-#endif
string text,
object data
)
{
EventType = eventType;
@@ -375,20 +366,15 @@
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////
#region Private Static Data
- ///
- /// The managed assembly containing this type.
- ///
- private static readonly Assembly _assembly = typeof(SQLiteConnection).Assembly;
-
///
/// Object used to synchronize access to the static instance data
/// for this class.
///
- private static readonly object _syncRoot = new object();
+ private static object _syncRoot = new object();
///
/// Static variable to store the connection event handlers to call.
///
private static event SQLiteConnectionEventHandler _handlers;
@@ -476,17 +462,15 @@
internal bool _binaryGuid;
internal long _version;
- private event SQLiteAuthorizerEventHandler _authorizerHandler;
private event SQLiteUpdateEventHandler _updateHandler;
private event SQLiteCommitHandler _commitHandler;
private event SQLiteTraceEventHandler _traceHandler;
private event EventHandler _rollbackHandler;
- private SQLiteAuthorizerCallback _authorizerCallback;
private SQLiteUpdateCallback _updateCallback;
private SQLiteCommitCallback _commitCallback;
private SQLiteTraceCallback _traceCallback;
private SQLiteRollbackCallback _rollbackCallback;
#endregion
@@ -2224,13 +2208,10 @@
cmd.ExecuteNonQuery();
}
}
}
- if (_authorizerHandler != null)
- _sql.SetAuthorizerHook(_authorizerCallback);
-
if (_commitHandler != null)
_sql.SetCommitHook(_commitCallback);
if (_updateHandler != null)
_sql.SetUpdateHook(_updateCallback);
@@ -2464,11 +2445,11 @@
{
get { return SQLite3.DefineConstants; }
}
///
- /// Returns the version of the underlying SQLite core library.
+ /// Returns the version of the underlying SQLite database engine
///
public static string SQLiteVersion
{
get { return SQLite3.SQLiteVersion; }
}
@@ -2481,100 +2462,10 @@
public static string SQLiteSourceId
{
get { return SQLite3.SQLiteSourceId; }
}
- ///
- /// This method returns the version of the interop SQLite assembly
- /// used. If the SQLite interop assembly is not in use or the
- /// necessary information cannot be obtained for any reason, a null
- /// value may be returned.
- ///
- public static string InteropVersion
- {
- get { return SQLite3.InteropVersion; }
- }
-
- ///
- /// This method returns the string whose value contains the unique
- /// identifier for the source checkout used to build the interop
- /// assembly. If the SQLite interop assembly is not in use or the
- /// necessary information cannot be obtained for any reason, a null
- /// value may be returned.
- ///
- public static string InteropSourceId
- {
- get { return SQLite3.InteropSourceId; }
- }
-
- ///
- /// This method returns the version of the managed components used
- /// to interact with the SQLite core library. If the necessary
- /// information cannot be obtained for any reason, a null value may
- /// be returned.
- ///
- public static string ProviderVersion
- {
- get
- {
- return (_assembly != null) ?
- _assembly.GetName().Version.ToString() : null;
- }
- }
-
- ///
- /// This method returns the string whose value contains the unique
- /// identifier for the source checkout used to build the managed
- /// components currently executing. If the necessary information
- /// cannot be obtained for any reason, a null value may be returned.
- ///
- public static string ProviderSourceId
- {
- get
- {
- if (_assembly == null)
- return null;
-
- string sourceId = null;
-
- if (_assembly.IsDefined(typeof(AssemblySourceIdAttribute), false))
- {
- AssemblySourceIdAttribute attribute =
- (AssemblySourceIdAttribute)_assembly.GetCustomAttributes(
- typeof(AssemblySourceIdAttribute), false)[0];
-
- sourceId = attribute.SourceId;
- }
-
- string sourceTimeStamp = null;
-
- if (_assembly.IsDefined(typeof(AssemblySourceTimeStampAttribute), false))
- {
- AssemblySourceTimeStampAttribute attribute =
- (AssemblySourceTimeStampAttribute)_assembly.GetCustomAttributes(
- typeof(AssemblySourceTimeStampAttribute), false)[0];
-
- sourceTimeStamp = attribute.SourceTimeStamp;
- }
-
- if ((sourceId != null) || (sourceTimeStamp != null))
- {
- if (sourceId == null)
- sourceId = "0000000000000000000000000000000000000000";
-
- if (sourceTimeStamp == null)
- sourceTimeStamp = "0000-00-00 00:00:00 UTC";
-
- return String.Format("{0} {1}", sourceId, sourceTimeStamp);
- }
- else
- {
- return null;
- }
- }
- }
-
///
/// Returns the state of the connection.
///
#if !PLATFORM_COMPACTFRAMEWORK
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -2952,11 +2843,11 @@
throw new NotSupportedException();
}
private static DataTable Schema_ReservedWords()
{
- DataTable tbl = new DataTable("ReservedWords");
+ DataTable tbl = new DataTable("MetaDataCollections");
tbl.Locale = CultureInfo.InvariantCulture;
tbl.Columns.Add("ReservedWord", typeof(string));
tbl.Columns.Add("MaximumVersion", typeof(string));
tbl.Columns.Add("MinimumVersion", typeof(string));
@@ -3941,44 +3832,10 @@
tbl.AcceptChanges();
return tbl;
}
- ///
- /// This event is raised whenever SQLite encounters an action covered by the
- /// authorizer during query preparation. Changing the value of the
- /// property will determine if
- /// the specific action will be allowed, ignored, or denied. For the entire
- /// duration of the event, the associated connection and statement objects
- /// must not be modified, either directly or indirectly, by the called code.
- ///
- public event SQLiteAuthorizerEventHandler Authorize
- {
- add
- {
- CheckDisposed();
-
- if (_authorizerHandler == null)
- {
- _authorizerCallback = new SQLiteAuthorizerCallback(AuthorizerCallback);
- if (_sql != null) _sql.SetAuthorizerHook(_authorizerCallback);
- }
- _authorizerHandler += value;
- }
- remove
- {
- CheckDisposed();
-
- _authorizerHandler -= value;
- if (_authorizerHandler == null)
- {
- if (_sql != null) _sql.SetAuthorizerHook(null);
- _authorizerCallback = null;
- }
- }
- }
-
///
/// This event is raised whenever SQLite makes an update/delete/insert into the database on
/// this connection. It only applies to the given connection.
///
public event SQLiteUpdateEventHandler Update
@@ -4005,29 +3862,10 @@
_updateCallback = null;
}
}
}
- private SQLiteAuthorizerReturnCode AuthorizerCallback(
- IntPtr pUserData,
- SQLiteAuthorizerActionCode actionCode,
- IntPtr pArgument1,
- IntPtr pArgument2,
- IntPtr pDatabase,
- IntPtr pAuthContext)
- {
- AuthorizerEventArgs eventArgs = new AuthorizerEventArgs(pUserData, actionCode,
- SQLiteBase.UTF8ToString(pArgument1, -1), SQLiteBase.UTF8ToString(pArgument2, -1),
- SQLiteBase.UTF8ToString(pDatabase, -1), SQLiteBase.UTF8ToString(pAuthContext, -1),
- SQLiteAuthorizerReturnCode.Ok);
-
- if (_authorizerHandler != null)
- _authorizerHandler(this, eventArgs);
-
- return eventArgs.ReturnCode;
- }
-
private void UpdateCallback(IntPtr puser, int type, IntPtr database, IntPtr table, Int64 rowid)
{
_updateHandler(this, new UpdateEventArgs(
SQLiteBase.UTF8ToString(database, -1),
SQLiteBase.UTF8ToString(table, -1),
@@ -4165,22 +4003,10 @@
}
#if !PLATFORM_COMPACTFRAMEWORK
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
#endif
- internal delegate SQLiteAuthorizerReturnCode SQLiteAuthorizerCallback(
- IntPtr pUserData,
- SQLiteAuthorizerActionCode actionCode,
- IntPtr pArgument1,
- IntPtr pArgument2,
- IntPtr pDatabase,
- IntPtr pAuthContext
- );
-
-#if !PLATFORM_COMPACTFRAMEWORK
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-#endif
internal delegate void SQLiteUpdateCallback(IntPtr puser, int type, IntPtr database, IntPtr table, Int64 rowid);
#if !PLATFORM_COMPACTFRAMEWORK
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
#endif
@@ -4194,19 +4020,10 @@
#if !PLATFORM_COMPACTFRAMEWORK
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
#endif
internal delegate void SQLiteRollbackCallback(IntPtr puser);
- ///
- /// Raised when authorization is required to perform an action contained
- /// within a SQL query.
- ///
- /// The connection performing the action.
- /// A that contains the
- /// event data.
- public delegate void SQLiteAuthorizerEventHandler(object sender, AuthorizerEventArgs e);
-
///
/// Raised when a transaction is about to be committed. To roll back a transaction, set the
/// rollbackTrans boolean value to true.
///
/// The connection committing the transaction
@@ -4272,127 +4089,10 @@
int totalPages,
bool retry
);
#endregion
- ///////////////////////////////////////////////////////////////////////////////////////////////
-
- ///
- /// The data associated with a call into the authorizer.
- ///
- public class AuthorizerEventArgs : EventArgs
- {
- ///
- /// The user-defined native data associated with this event. Currently,
- /// this will always contain the value of .
- ///
- public readonly IntPtr UserData;
-
- ///
- /// The action code responsible for the current call into the authorizer.
- ///
- public readonly SQLiteAuthorizerActionCode ActionCode;
-
- ///
- /// The first string argument for the current call into the authorizer.
- /// The exact value will vary based on the action code, see the
- /// enumeration for possible
- /// values.
- ///
- public readonly string Argument1;
-
- ///
- /// The second string argument for the current call into the authorizer.
- /// The exact value will vary based on the action code, see the
- /// enumeration for possible
- /// values.
- ///
- public readonly string Argument2;
-
- ///
- /// The database name for the current call into the authorizer, if
- /// applicable.
- ///
- public readonly string Database;
-
- ///
- /// The name of the inner-most trigger or view that is responsible for
- /// the access attempt or a null value if this access attempt is directly
- /// from top-level SQL code.
- ///
- public readonly string Context;
-
- ///
- /// The return code for the current call into the authorizer.
- ///
- public SQLiteAuthorizerReturnCode ReturnCode;
-
- ///////////////////////////////////////////////////////////////////////////////////////////
-
- ///
- /// Constructs an instance of this class with default property values.
- ///
- private AuthorizerEventArgs()
- {
- this.UserData = IntPtr.Zero;
- this.ActionCode = SQLiteAuthorizerActionCode.None;
- this.Argument1 = null;
- this.Argument2 = null;
- this.Database = null;
- this.Context = null;
- this.ReturnCode = SQLiteAuthorizerReturnCode.Ok;
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////
-
- ///
- /// Constructs an instance of this class with specific property values.
- ///
- ///
- /// The user-defined native data associated with this event.
- ///
- ///
- /// The authorizer action code.
- ///
- ///
- /// The first authorizer argument.
- ///
- ///
- /// The second authorizer argument.
- ///
- ///
- /// The database name, if applicable.
- ///
- ///
- /// The name of the inner-most trigger or view that is responsible for
- /// the access attempt or a null value if this access attempt is directly
- /// from top-level SQL code.
- ///
- ///
- /// The authorizer return code.
- ///
- internal AuthorizerEventArgs(
- IntPtr pUserData,
- SQLiteAuthorizerActionCode actionCode,
- string argument1,
- string argument2,
- string database,
- string context,
- SQLiteAuthorizerReturnCode returnCode
- )
- : this()
- {
- this.UserData = pUserData;
- this.ActionCode = actionCode;
- this.Argument1 = argument1;
- this.Argument2 = argument2;
- this.Database = database;
- this.Context = context;
- this.ReturnCode = returnCode;
- }
- }
-
///////////////////////////////////////////////////////////////////////////////////////////////
///
/// Whenever an update event is triggered on a connection, this enum will indicate
/// exactly what type of operation is being performed.
Index: System.Data.SQLite/SQLiteConvert.cs
==================================================================
--- System.Data.SQLite/SQLiteConvert.cs
+++ System.Data.SQLite/SQLiteConvert.cs
@@ -1472,29 +1472,25 @@
///
None = 0,
///
/// The command is not expected to return a result -OR- the result is not
- /// needed. The or
- /// method
- /// will be called.
+ /// needed. The method will
+ /// be called.
///
NonQuery = 1,
///
/// The command is expected to return a scalar result -OR- the result should
- /// be limited to a scalar result. The
- /// or method will
- /// be called.
+ /// be limited to a scalar result. The
+ /// method will be called.
///
Scalar = 2,
///
/// The command is expected to return result.
- /// The or
- /// method will
- /// be called.
+ /// The method will be called.
///
Reader = 3,
///
/// Use the default command execution type. Using this value is the same
@@ -1501,247 +1497,10 @@
/// as using the value.
///
Default = NonQuery /* TODO: Good default? */
}
- ///
- /// The action code responsible for the current call into the authorizer.
- ///
- public enum SQLiteAuthorizerActionCode
- {
- ///
- /// No action is being performed. This value should not be used from
- /// external code.
- ///
- None = -1,
-
- ///
- /// No longer used.
- ///
- Copy = 0,
-
- ///
- /// An index will be created. The action-specific arguments are the
- /// index name and the table name.
- ///
- ///
- CreateIndex = 1,
-
- ///
- /// A table will be created. The action-specific arguments are the
- /// table name and a null value.
- ///
- CreateTable = 2,
-
- ///
- /// A temporary index will be created. The action-specific arguments
- /// are the index name and the table name.
- ///
- CreateTempIndex = 3,
-
- ///
- /// A temporary table will be created. The action-specific arguments
- /// are the table name and a null value.
- ///
- CreateTempTable = 4,
-
- ///
- /// A temporary trigger will be created. The action-specific arguments
- /// are the trigger name and the table name.
- ///
- CreateTempTrigger = 5,
-
- ///
- /// A temporary view will be created. The action-specific arguments are
- /// the view name and a null value.
- ///
- CreateTempView = 6,
-
- ///
- /// A trigger will be created. The action-specific arguments are the
- /// trigger name and the table name.
- ///
- CreateTrigger = 7,
-
- ///
- /// A view will be created. The action-specific arguments are the view
- /// name and a null value.
- ///
- CreateView = 8,
-
- ///
- /// A DELETE statement will be executed. The action-specific arguments
- /// are the table name and a null value.
- ///
- Delete = 9,
-
- ///
- /// An index will be dropped. The action-specific arguments are the
- /// index name and the table name.
- ///
- DropIndex = 10,
-
- ///
- /// A table will be dropped. The action-specific arguments are the tables
- /// name and a null value.
- ///
- DropTable = 11,
-
- ///
- /// A temporary index will be dropped. The action-specific arguments are
- /// the index name and the table name.
- ///
- DropTempIndex = 12,
-
- ///
- /// A temporary table will be dropped. The action-specific arguments are
- /// the table name and a null value.
- ///
- DropTempTable = 13,
-
- ///
- /// A temporary trigger will be dropped. The action-specific arguments
- /// are the trigger name and the table name.
- ///
- DropTempTrigger = 14,
-
- ///
- /// A temporary view will be dropped. The action-specific arguments are
- /// the view name and a null value.
- ///
- DropTempView = 15,
-
- ///
- /// A trigger will be dropped. The action-specific arguments are the
- /// trigger name and the table name.
- ///
- DropTrigger = 16,
-
- ///
- /// A view will be dropped. The action-specific arguments are the view
- /// name and a null value.
- ///
- DropView = 17,
-
- ///
- /// An INSERT statement will be executed. The action-specific arguments
- /// are the table name and a null value.
- ///
- Insert = 18,
-
- ///
- /// A PRAGMA statement will be executed. The action-specific arguments
- /// are the name of the PRAGMA and the new value or a null value.
- ///
- Pragma = 19,
-
- ///
- /// A table column will be read. The action-specific arguments are the
- /// table name and the column name.
- ///
- Read = 20,
-
- ///
- /// A SELECT statement will be executed. The action-specific arguments
- /// are both null values.
- ///
- Select = 21,
-
- ///
- /// A transaction will be started, committed, or rolled back. The
- /// action-specific arguments are the name of the operation (BEGIN,
- /// COMMIT, or ROLLBACK) and a null value.
- ///
- Transaction = 22,
-
- ///
- /// An UPDATE statement will be executed. The action-specific arguments
- /// are the table name and the column name.
- ///
- Update = 23,
-
- ///
- /// A database will be attached to the connection. The action-specific
- /// arguments are the database file name and a null value.
- ///
- Attach = 24,
-
- ///
- /// A database will be detached from the connection. The action-specific
- /// arguments are the database name and a null value.
- ///
- Detach = 25,
-
- ///
- /// The schema of a table will be altered. The action-specific arguments
- /// are the database name and the table name.
- ///
- AlterTable = 26,
-
- ///
- /// An index will be deleted and then recreated. The action-specific
- /// arguments are the index name and a null value.
- ///
- Reindex = 27,
-
- ///
- /// A table will be analyzed to gathers statistics about it. The
- /// action-specific arguments are the table name and a null value.
- ///
- Analyze = 28,
-
- ///
- /// A virtual table will be created. The action-specific arguments are
- /// the table name and the module name.
- ///
- CreateVtable = 29,
-
- ///
- /// A virtual table will be dropped. The action-specific arguments are
- /// the table name and the module name.
- ///
- DropVtable = 30,
-
- ///
- /// A SQL function will be called. The action-specific arguments are a
- /// null value and the function name.
- ///
- Function = 31,
-
- ///
- /// A savepoint will be created, released, or rolled back. The
- /// action-specific arguments are the name of the operation (BEGIN,
- /// RELEASE, or ROLLBACK) and the savepoint name.
- ///
- Savepoint = 32
- }
-
- ///
- /// The return code for the current call into the authorizer.
- ///
- public enum SQLiteAuthorizerReturnCode
- {
- ///
- /// The action will be allowed.
- ///
- Ok = 0,
-
- ///
- /// The overall action will be disallowed and an error message will be
- /// returned from the query preparation method.
- ///
- Deny = 1,
-
- ///
- /// The specific action will be disallowed; however, the overall action
- /// will continue. The exact effects of this return code vary depending
- /// on the specific action, please refer to the SQLite core library
- /// documentation for futher details.
- ///
- Ignore = 2
- }
-
///
/// Class used internally to determine the datatype of a column in a resultset
///
internal sealed class SQLiteType
{
Index: System.Data.SQLite/SQLiteDataReader.cs
==================================================================
--- System.Data.SQLite/SQLiteDataReader.cs
+++ System.Data.SQLite/SQLiteDataReader.cs
@@ -1237,41 +1237,40 @@
CheckDisposed();
CheckClosed();
if (_throwOnDisposed) SQLiteCommand.Check(_command);
SQLiteStatement stmt = null;
- int fieldCount;
- bool schemaOnly = ((_commandBehavior & CommandBehavior.SchemaOnly) != 0);
+ int fieldCount;
while (true)
{
if (stmt == null && _activeStatement != null && _activeStatement._sql != null && _activeStatement._sql.IsOpen())
{
- // Reset the previously-executed statement
- if (!schemaOnly) _activeStatement._sql.Reset(_activeStatement);
+ // Reset the previously-executed statement
+ _activeStatement._sql.Reset(_activeStatement);
// If we're only supposed to return a single rowset, step through all remaining statements once until
// they are all done and return false to indicate no more resultsets exist.
if ((_commandBehavior & CommandBehavior.SingleResult) != 0)
{
for (; ; )
{
stmt = _command.GetStatement(_activeStatementIndex + 1);
if (stmt == null) break;
- _activeStatementIndex++;
-
- if (!schemaOnly) stmt._sql.Step(stmt);
+ _activeStatementIndex++;
+
+ stmt._sql.Step(stmt);
if (stmt._sql.ColumnCount(stmt) == 0)
{
if (_rowsAffected == -1) _rowsAffected = 0;
int changes = 0;
if (stmt.TryGetChanges(ref changes))
_rowsAffected += changes;
else
return false;
- }
- if (!schemaOnly) stmt._sql.Reset(stmt); // Gotta reset after every step to release any locks and such!
+ }
+ stmt._sql.Reset(stmt); // Gotta reset after every step to release any locks and such!
}
return false;
}
}
@@ -1286,34 +1285,34 @@
if (_readingState < 1)
_readingState = 1;
_activeStatementIndex++;
- fieldCount = stmt._sql.ColumnCount(stmt);
-
+ fieldCount = stmt._sql.ColumnCount(stmt);
+
// If the statement is not a select statement or we're not retrieving schema only, then perform the initial step
- if (!schemaOnly || (fieldCount == 0))
- {
- if (!schemaOnly && stmt._sql.Step(stmt))
- {
- _readingState = -1;
- }
- else if (fieldCount == 0) // No rows returned, if fieldCount is zero, skip to the next statement
- {
- if (_rowsAffected == -1) _rowsAffected = 0;
- int changes = 0;
- if (stmt.TryGetChanges(ref changes))
- _rowsAffected += changes;
- else
- return false;
- if (!schemaOnly) stmt._sql.Reset(stmt);
- continue; // Skip this command and move to the next, it was not a row-returning resultset
- }
- else // No rows, fieldCount is non-zero so stop here
- {
- _readingState = 1; // This command returned columns but no rows, so return true, but HasRows = false and Read() returns false
- }
+ if ((_commandBehavior & CommandBehavior.SchemaOnly) == 0 || fieldCount == 0)
+ {
+ if (stmt._sql.Step(stmt))
+ {
+ _readingState = -1;
+ }
+ else if (fieldCount == 0) // No rows returned, if fieldCount is zero, skip to the next statement
+ {
+ if (_rowsAffected == -1) _rowsAffected = 0;
+ int changes = 0;
+ if (stmt.TryGetChanges(ref changes))
+ _rowsAffected += changes;
+ else
+ return false;
+ stmt._sql.Reset(stmt);
+ continue; // Skip this command and move to the next, it was not a row-returning resultset
+ }
+ else // No rows, fieldCount is non-zero so stop here
+ {
+ _readingState = 1; // This command returned columns but no rows, so return true, but HasRows = false and Read() returns false
+ }
}
// Ahh, we found a row-returning resultset eligible to be returned!
_activeStatement = stmt;
_fieldCount = fieldCount;
@@ -1361,14 +1360,11 @@
/// True if a new row was successfully loaded and is ready for processing
public override bool Read()
{
CheckDisposed();
CheckClosed();
- if (_throwOnDisposed) SQLiteCommand.Check(_command);
-
- if ((_commandBehavior & CommandBehavior.SchemaOnly) != 0)
- return false;
+ if (_throwOnDisposed) SQLiteCommand.Check(_command);
if (_readingState == -1) // First step was already done at the NextResult() level, so don't step again, just return true.
{
_readingState = 0;
return true;
DELETED System.Data.SQLite/SQLitePatchLevel.cs
Index: System.Data.SQLite/SQLitePatchLevel.cs
==================================================================
--- System.Data.SQLite/SQLitePatchLevel.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-/********************************************************
- * ADO.NET 2.0 Data Provider for SQLite Version 3.X
- * Written by Joe Mistachkin (joe@mistachkin.com)
- *
- * Released to the public domain, use at your own risk!
- ********************************************************/
-
-using System.Data.SQLite;
-
-///////////////////////////////////////////////////////////////////////////////
-
-[assembly: AssemblySourceId(null)]
-
-///////////////////////////////////////////////////////////////////////////////
-
-[assembly: AssemblySourceTimeStamp(null)]
Index: System.Data.SQLite/System.Data.SQLite.Files.targets
==================================================================
--- System.Data.SQLite/System.Data.SQLite.Files.targets
+++ System.Data.SQLite/System.Data.SQLite.Files.targets
@@ -13,12 +13,10 @@
******************************************************************************
-->
-
-
@@ -45,11 +43,10 @@
-
SR.resx
True
Index: System.Data.SQLite/UnsafeNativeMethods.cs
==================================================================
--- System.Data.SQLite/UnsafeNativeMethods.cs
+++ System.Data.SQLite/UnsafeNativeMethods.cs
@@ -769,16 +769,10 @@
// get working when using the standard SQLite library.
#region interop added functionality
#if !SQLITE_STANDARD
- [DllImport(SQLITE_DLL)]
- internal static extern IntPtr sqlite3_libversion_interop();
-
- [DllImport(SQLITE_DLL)]
- internal static extern IntPtr sqlite3_sourceid_interop();
-
[DllImport(SQLITE_DLL)]
internal static extern SQLiteErrorCode sqlite3_close_interop(IntPtr db);
[DllImport(SQLITE_DLL)]
internal static extern SQLiteErrorCode sqlite3_create_function_interop(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal, int needCollSeq);
@@ -1467,17 +1461,10 @@
[DllImport(SQLITE_DLL)]
#endif
internal static extern SQLiteErrorCode sqlite3_rekey(IntPtr db, byte[] key, int keylen);
#endif
-#if !PLATFORM_COMPACTFRAMEWORK
- [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]
-#else
- [DllImport(SQLITE_DLL)]
-#endif
- internal static extern IntPtr sqlite3_set_authorizer(IntPtr db, SQLiteAuthorizerCallback func, IntPtr pvUser);
-
#if !PLATFORM_COMPACTFRAMEWORK
[DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]
#else
[DllImport(SQLITE_DLL)]
#endif
DELETED Tests/authorizer.eagle
Index: Tests/authorizer.eagle
==================================================================
--- Tests/authorizer.eagle
+++ /dev/null
@@ -1,163 +0,0 @@
-###############################################################################
-#
-# authorizer.eagle --
-#
-# Written by Joe Mistachkin.
-# Released to the public domain, use at your own risk!
-#
-###############################################################################
-
-package require Eagle
-package require Eagle.Library
-package require Eagle.Test
-
-runTestPrologue
-
-###############################################################################
-
-package require System.Data.SQLite.Test
-runSQLiteTestPrologue
-
-###############################################################################
-
-runTest {test authorizer-1.1 {SQLiteConnection Authorize event} -setup {
- proc onAuthorize { sender e } {
- #
- # NOTE: Filter out the "noise" by allowing all standard
- # events on the "sqlite_*" tables.
- #
- set noiseActionCodes [list \
- CreateTable CreateIndex Read Insert Update Delete]
-
- if {[$e ActionCode] in $noiseActionCodes && \
- [string match "sqlite_*" [$e Argument1]]} then {
- return
- }
-
- #
- # NOTE: Filter out all "non-primary" events to make the test
- # results more deterministic in the face of different
- # query plans.
- #
- if {[$e ActionCode] ne $::filter} then {
- return
- }
-
- #
- # NOTE: Record the authorizer arguments exactly as we received
- # them.
- #
- lappend ::data [list \
- [$e UserData] [$e ActionCode] [$e Argument1] \
- [$e Argument2] [$e Database] [$e Context]]
-
- #
- # NOTE: Deny all attempts to create a table named "tDeny".
- #
- if {[$e ActionCode] eq "CreateTable" && \
- [$e Argument1] eq "tDeny"} then {
- $e ReturnCode Deny
- }
- }
-
- setupDb [set fileName authorizer-1.1.db]
-} -body {
- set connection [getDbConnection]
-
- set callback onAuthorize
- object invoke $connection add_Authorize $callback
-
- set results [list]
-
- set sql [list \
- CreateTable {CREATE TABLE t1(x);} \
- CreateIndex {CREATE INDEX i1 ON t1(x);} \
- CreateTrigger {CREATE TRIGGER tr1 BEFORE INSERT ON t1
- BEGIN
- SELECT RAISE(IGNORE);
- END;} \
- CreateView {CREATE VIEW v1 AS SELECT * FROM t1;} \
- CreateTempTable {CREATE TEMPORARY TABLE t2(x);} \
- CreateTempIndex {CREATE INDEX i2 ON t2(x);} \
- CreateTempTrigger {CREATE TEMPORARY TRIGGER tr2 BEFORE INSERT ON t2
- BEGIN
- SELECT RAISE(IGNORE);
- END;} \
- CreateTempView {CREATE TEMPORARY VIEW v2 AS SELECT * FROM t2;} \
- Pragma {PRAGMA journal_mode=WAL;} \
- Function {SELECT julianday('now');} \
- Read {SELECT x FROM t1;} \
- Select {SELECT * FROM t1;} \
- Insert {INSERT INTO t1(x) VALUES(1);} \
- Update {UPDATE t1 SET x = x - 1;} \
- Delete {DELETE FROM t1;} \
- AlterTable {ALTER TABLE t1 ADD COLUMN y;} \
- Reindex {REINDEX t1;} \
- Analyze {ANALYZE t1;} \
- DropTempView {DROP VIEW v2;} \
- DropTempTrigger {DROP TRIGGER tr2;} \
- DropTempIndex {DROP INDEX i2;} \
- DropTempTable {DROP TABLE t2;} \
- DropView {DROP VIEW v1;} \
- DropTrigger {DROP TRIGGER tr1;} \
- DropIndex {DROP INDEX i1;} \
- DropTable {DROP TABLE t1;} \
- Transaction {BEGIN; SELECT 0; COMMIT;} \
- Savepoint {SAVEPOINT s1; RELEASE SAVEPOINT s1;} \
- Attach {ATTACH DATABASE ':memory:' AS d1;} \
- Detach {DETACH DATABASE d1;} \
- CreateVtable {CREATE VIRTUAL TABLE t3 USING fts4(x TEXT);} \
- DropVtable {DROP TABLE t3;} \
- CreateTable {CREATE TABLE tDeny(x);}]
-
- foreach {name value} $sql {
- set filter $name; set data [list]
- set code [catch {sql execute $db $value} result]
- set result [lindex [split [string map [list \r\n \n] $result] \n] 0]
- lappend results [list $name $data $code $result]
- }
- lappend results [isTableInDb tDeny]
-
- set results
-} -cleanup {
- catch {object invoke $connection remove_Authorize $callback}
- catch {object removecallback $callback}
-
- cleanupDb $fileName
-
- freeDbConnection
-
- unset -nocomplain result code data filter value name sql results callback \
- connection db fileName
-
- rename onAuthorize ""
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
-{{CreateTable {{0 CreateTable t1 {} main {}}} 0 0} {CreateIndex {{0 CreateIndex\
-i1 t1 main {}}} 0 0} {CreateTrigger {{0 CreateTrigger tr1 t1 main {}}} 0 0}\
-{CreateView {{0 CreateView v1 {} main {}}} 0 0} {CreateTempTable {{0\
-CreateTempTable t2 {} temp {}}} 0 0} {CreateTempIndex {{0 CreateTempIndex i2 t2\
-temp {}}} 0 0} {CreateTempTrigger {{0 CreateTempTrigger tr2 t2 temp {}}} 0 0}\
-{CreateTempView {{0 CreateTempView v2 {} temp {}}} 0 0} {Pragma {{0 Pragma\
-journal_mode WAL {} {}}} 0 0} {Function {{0 Function {} julianday {} {}}} 0 0}\
-{Read {{0 Read t1 x main {}}} 0 0} {Select {{0 Select {} {} {} {}}} 0 0}\
-{Insert {{0 Insert t1 {} main {}}} 0 0} {Update {{0 Update t1 x main {}}} 0 0}\
-{Delete {{0 Delete t1 {} main {}}} 0 0} {AlterTable {{0 AlterTable main t1 {}\
-{}}} 0 0} {Reindex {{0 Reindex i1 {} main {}}} 0 0} {Analyze {{0 Analyze t1 {}\
-main {}}} 0 0} {DropTempView {{0 DropTempView v2 {} temp {}}} 0 0}\
-{DropTempTrigger {{0 DropTempTrigger tr2 t2 temp {}}} 0 0} {DropTempIndex {{0\
-DropTempIndex i2 t2 temp {}}} 0 0} {DropTempTable {{0 DropTempTable t2 {} temp\
-{}}} 0 0} {DropView {{0 DropView v1 {} main {}}} 0 0} {DropTrigger {{0\
-DropTrigger tr1 t1 main {}}} 0 0} {DropIndex {{0 DropIndex i1 t1 main {}}} 0 0}\
-{DropTable {{0 DropTable t1 {} main {}}} 0 0} {Transaction {{0 Transaction\
-BEGIN {} {} {}} {0 Transaction COMMIT {} {} {}}} 0 0} {Savepoint {{0 Savepoint\
-BEGIN s1 {} {}} {0 Savepoint RELEASE s1 {} {}}} 0 0} {Attach {{0 Attach\
-:memory: {} {} {}}} 0 0} {Detach {{0 Detach d1 {} {} {}}} 0 0} {CreateVtable\
-{{0 CreateVtable t3 fts4 main {}}} 0 0} {DropVtable {{0 DropVtable t3 fts4 main\
-{}}} 0 0} {CreateTable {{0 CreateTable tDeny {} main {}}} 1\
-{System.Data.SQLite.SQLiteException (0x80004005): authorization denied}} False}}
-
-###############################################################################
-
-runSQLiteTestEpilogue
-runTestEpilogue
Index: Tests/backup.eagle
==================================================================
--- Tests/backup.eagle
+++ Tests/backup.eagle
@@ -220,12 +220,13 @@
freeDbConnection memSource
unset -nocomplain result results errors code index memSource dataSource \
id memDb db fileName callbackResults
- } -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result [appendArgs \
+ } -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result [appendArgs \
"^Ok System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} " \
[lindex $params(results) $i]]}
}
###############################################################################
Index: Tests/basic.eagle
==================================================================
--- Tests/basic.eagle
+++ Tests/basic.eagle
@@ -96,12 +96,12 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain totalCount failureCount successCount code output \
error fileName
-} -constraints {eagle SQLite file_System.Data.SQLite.dll file_test.exe\
-testExec} -result {0 {}}}
+} -constraints {eagle SQLite file_System.Data.SQLite.dll file_test.exe} \
+-result {0 {}}}
###############################################################################
runTest {test data-1.2 {unit tests from the 'testlinq' project} -setup {
#
@@ -138,11 +138,11 @@
unset -nocomplain code output error savedEncoding encoding
} -constraints \
{eagle monoToDo SQLite file_System.Data.SQLite.dll\
file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db\
-file_testlinq.out testExec} -result {0 True {}}}
+file_testlinq.out} -result {0 True {}}}
###############################################################################
runTest {test data-1.3 {SELECT scalar/reader, CREATE, INSERT} -setup {
setupDb [set fileName data-1.3.db]
@@ -217,13 +217,14 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 System#Data#DataTable#\d+$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+System#Data#DataTable#\d+$}}
###############################################################################
runTest {test data-1.5 {GetSchema with ForeignKeys} -setup {
setupDb [set fileName data-1.5.db]
@@ -303,16 +304,16 @@
} -cleanup {
cleanupDb $fileName
unset -nocomplain result rows foreignKey foreignKeys results errors code \
dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\{main FK_t1_0_0 main t1\
-\{FOREIGN KEY\} False False 0 x main t2 \{\} 0 \{SET DEFAULT\} CASCADE NONE\}\
-\{main FK_t2_0_0 main t2 \{FOREIGN KEY\} False False 0 x main t3 \{\} 0 \{NO\
-ACTION\} \{NO ACTION\} NONE\}\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+\{\{main FK_t1_0_0 main t1 \{FOREIGN KEY\} False False 0 x main t2 \{\} 0 \{SET\
+DEFAULT\} CASCADE NONE\} \{main FK_t2_0_0 main t2 \{FOREIGN KEY\} False False 0\
+x main t3 \{\} 0 \{NO ACTION\} \{NO ACTION\} NONE\}\}$}}
###############################################################################
runTest {test data-1.6 {SQLITE_FCNTL_WIN32_AV_RETRY} -setup {
setupDb [set fileName data-1.6.db]
@@ -406,13 +407,14 @@
cleanupDb $fileName
unset -nocomplain result count interval savedCount savedInterval results \
errors code dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 True$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+True$}}
###############################################################################
runTest {test data-1.7 {properly closed database file (non-query)} -setup {
set fileName data-1.7.db
@@ -462,13 +464,14 @@
[close [open $dataSource RDONLY 0 "" -share None]]
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+\{\} \{\}$}}
###############################################################################
runTest {test data-1.8 {properly closed database file (reader #1)} -setup {
set fileName data-1.8.db
@@ -521,13 +524,14 @@
[close [open $dataSource RDONLY 0 "" -share None]]
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+\{\} \{\}$}}
###############################################################################
runTest {test data-1.9 {properly closed database file (reader #2)} -setup {
set fileName data-1.9.db
@@ -582,13 +586,14 @@
[close [open $dataSource RDONLY 0 "" -share None]]
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+\{\} \{\}$}}
###############################################################################
runTest {test data-1.10 {Changes property} -setup {
setupDb [set fileName data-1.10.db]
@@ -883,11 +888,11 @@
)
{
SQLiteConnectionStringBuilder builder =
new SQLiteConnectionStringBuilder();
- builder.Add("Data Source", "test.db");
+ builder.Add("Date Source", "test.db");
builder.Add("DateTimeFormat", format);
builder.Add("DateTimeKind", kind);
builder.Add("DateTimeFormatString", formatString);
return builder.ToString();
@@ -925,16 +930,16 @@
object invoke _Dynamic${id}.Test${id} GetConnectionString \
Ticks Local yyyy-MM-dd
} result] : [set result ""]}] $result
} -cleanup {
unset -nocomplain result results errors code id
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{Data Source=test\.db\} 0\
-\{Data Source=test\.db;DateTimeFormat=(?:Default|ISO8601)\} 0 \{Data\
-Source=test\.db;DateTimeKind=Unspecified\} 0 \{Data\
-Source=test\.db;DateTimeFormat=(?:Default|ISO8601);DateTimeKind=Utc\} 0 \{Data\
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{Date\
+Source=test\.db\} 0 \{Date Source=test\.db;DateTimeFormat=(?:Default|ISO8601)\}\
+0 \{Date Source=test\.db;DateTimeKind=Unspecified\} 0 \{Date\
+Source=test\.db;DateTimeFormat=(?:Default|ISO8601);DateTimeKind=Utc\} 0 \{Date\
Source=test\.db;DateTimeFormat=Ticks;DateTimeKind=Local;DateTimeFormatString=yyyy-MM-dd\}$}}
###############################################################################
runTest {test data-1.16 {SQLiteConnectionStringBuilder properties} -body {
@@ -1046,22 +1051,22 @@
set results
} -cleanup {
unset -nocomplain propertyName propertyNames value key values keys result \
results errors code id
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result \
-{^System#CodeDom#Compiler#CompilerResults#\d+ Ok \{\} 0 \{, \} 0 \{3,\
-Version=3\} 0 \{Normal, Synchronous=Normal\} 0 \{True, UseUTF16Encoding=True\}\
-0 \{False, Pooling=False\} 0 \{True, BinaryGUID=True\} 0 \{test\.db, Data\
-Source=test\.db\} 0 \{test\.db, Uri=test\.db\} 0 \{file:test.db,\
-FullUri=file:test\.db\} 0 \{60, Default Timeout=60\} 0 \{False, Enlist=False\}\
-0 \{True, FailIfMissing=True\} 0 \{False, Legacy Format=False\} 0 \{True, Read\
-Only=True\} 0 \{secret, Password=secret\} 0 \{4096, Page Size=4096\} 0 \{1024,\
-Max Page Count=1024\} 0 \{8192, Cache Size=8192\} 0 \{UnixEpoch,\
-DateTimeFormat=UnixEpoch\} 0 \{Utc, DateTimeKind=Utc\} 0 \{yyyy-MM-dd,\
-DateTimeFormatString=yyyy-MM-dd\} 0 \{sqlite_schema,\
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^System#CodeDom#Compiler#CompilerResults#\d+ Ok \{\} 0 \{, \} 0\
+\{3, Version=3\} 0 \{Normal, Synchronous=Normal\} 0 \{True,\
+UseUTF16Encoding=True\} 0 \{False, Pooling=False\} 0 \{True, BinaryGUID=True\}\
+0 \{test\.db, Data Source=test\.db\} 0 \{test\.db, Uri=test\.db\} 0\
+\{file:test.db, FullUri=file:test\.db\} 0 \{60, Default Timeout=60\} 0 \{False,\
+Enlist=False\} 0 \{True, FailIfMissing=True\} 0 \{False, Legacy Format=False\}\
+0 \{True, Read Only=True\} 0 \{secret, Password=secret\} 0 \{4096, Page\
+Size=4096\} 0 \{1024, Max Page Count=1024\} 0 \{8192, Cache Size=8192\} 0\
+\{UnixEpoch, DateTimeFormat=UnixEpoch\} 0 \{Utc, DateTimeKind=Utc\} 0\
+\{yyyy-MM-dd, DateTimeFormatString=yyyy-MM-dd\} 0 \{sqlite_schema,\
BaseSchemaName=sqlite_schema\} 0 \{Memory, Journal Mode=Memory\} 0\
\{Serializable, Default IsolationLevel=Serializable\} 0 \{False, Foreign\
Keys=False\} 0 \{(?:Default|LogCallbackException),\
Flags=(?:Default|LogCallbackException)\} 0 \{False, SetDefaults=False\} 0\
\{False, ToFullPath=False\} 0 {736563726574, HexPassword=736563726574}$}}
@@ -1204,13 +1209,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runTest {test data-1.22 {SQLiteFunction collation exception} -setup {
setupDb [set fileName data-1.22.db]
@@ -1288,13 +1293,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 1\
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 1\
\{System\.Reflection\.TargetInvocationException: Exception has been thrown by\
the target of an invocation\. ---> System\.Data\.SQLite\.SQLiteException:\
interrupted.*$}}
###############################################################################
@@ -2471,16 +2476,17 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result \
-[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
-\{\} 1 \{System\.Reflection\.TargetInvocationException: Exception has been\
-thrown by the target of an invocation\. --->\
-System\.Data\.SQLite\.SQLiteException: SQL logic error or missing database
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result [string map [list \n \r\n] {^Ok\
+System#CodeDom#Compiler#CompilerResults#\d+ \{\} 1\
+\{System\.Reflection\.TargetInvocationException: Exception has been thrown by\
+the target of an invocation\. ---> System\.Data\.SQLite\.SQLiteException: SQL\
+logic error or missing database
no such function: MyRandom.*\} 0 (?:-)?\d+ 1\
\{System\.Reflection\.TargetInvocationException: Exception has been thrown by\
the target of an invocation\. ---> System\.Data\.SQLite\.SQLiteException: SQL\
logic error or missing database
no such function: MyRandom.*\}$}]}
Index: Tests/common.eagle
==================================================================
--- Tests/common.eagle
+++ Tests/common.eagle
@@ -740,24 +740,16 @@
}
}
}
}
- proc checkForSQLiteLibrary { channel } {
- tputs $channel "---- checking for SQLite core library... "
+ proc checkForSQLite { channel } {
+ tputs $channel "---- checking for core SQLite library... "
if {[catch {
object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
SQLiteVersion} version] == 0} then {
- #
- # NOTE: Check if the returned version was null. If so, make it easy
- # to spot.
- #
- if {[string length $version] == 0} then {
- set version null
- }
-
#
# NOTE: Attempt to query the Fossil source identifier for the SQLite
# core library.
#
if {[catch {
@@ -767,69 +759,15 @@
# NOTE: We failed to query the Fossil source identifier.
#
set sourceId unknown
}
- #
- # NOTE: Check if the returned Fossil source identifier was null. If
- # so, make it easy to spot.
- #
- if {[string length $sourceId] == 0} then {
- set sourceId null
- }
-
#
# NOTE: Yes, the SQLite core library appears to be available.
#
addConstraint SQLite
- tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"]
- } else {
- tputs $channel no\n
- }
- }
-
- proc checkForSQLiteInterop { channel } {
- tputs $channel "---- checking for SQLite interop assembly... "
-
- if {[catch {
- object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
- InteropVersion} version] == 0} then {
- #
- # NOTE: Check if the returned version was null. If so, make it easy
- # to spot.
- #
- if {[string length $version] == 0} then {
- set version null
- }
-
- #
- # NOTE: Attempt to query the Fossil source identifier for the SQLite
- # core library.
- #
- if {[catch {
- object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
- InteropSourceId} sourceId]} then {
- #
- # NOTE: We failed to query the Fossil source identifier.
- #
- set sourceId unknown
- }
-
- #
- # NOTE: Check if the returned Fossil source identifier was null. If
- # so, make it easy to spot.
- #
- if {[string length $sourceId] == 0} then {
- set sourceId null
- }
-
- #
- # NOTE: Yes, the SQLite interop assembly appears to be available.
- #
- addConstraint SQLiteInterop
-
tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"]
} else {
tputs $channel no\n
}
}
@@ -980,32 +918,10 @@
#
return [expr {$fileName eq ":memory:" || \
[string range $fileName 0 12] eq "file::memory:"}]
}
- proc isTableInDb { name {varName db} } {
- #
- # NOTE: Refer to the specified variable (e.g. "db") in the context of our
- # caller. It contains the database connection handle that will be
- # used to execute the query used to determine if the named table is
- # present in that database.
- #
- upvar 1 $varName db
-
- #
- # NOTE: Execute the SQL query against the sqlite_master table to check if
- # the named table is present and return non-zero if it is.
- #
- return [expr {[sql execute -execute scalar $db \
- "SELECT COUNT(*) FROM sqlite_master WHERE type = 'table' AND name = ?;" \
- [list param1 String $name]] > 0}]
- }
-
- proc trimSql { sql } {
- return [regsub -all -- {\s+} [string trim $sql] " "]
- }
-
proc executeSql { sql {execute none} {fileName ""} } {
if {[string length $fileName] == 0} then {set fileName :memory:}
setupDb $fileName "" "" "" "" "" false false false false memDb
try {
@@ -1999,43 +1915,11 @@
if {[catch {object invoke -flags +NonPublic \
System.Data.SQLite.SQLite3 DefineConstants} \
defineConstants] == 0} then {
tputs $::test_channel [appendArgs [formatList [lsort \
- $defineConstants] ] \n]
- } else {
- tputs $::test_channel unknown\n
- }
- }
-
- catch {
- tputs $::test_channel \
- "---- source version of \"System.Data.SQLite.dll\"... "
-
- if {[catch {object invoke -flags +NonPublic \
- System.Data.SQLite.SQLiteConnection ProviderVersion} \
- version] == 0} then {
- if {[string length $version] == 0} then {
- set version null
- }
- tputs $::test_channel [appendArgs $version \n]
- } else {
- tputs $::test_channel unknown\n
- }
- }
-
- catch {
- tputs $::test_channel \
- "---- source checkout of \"System.Data.SQLite.dll\"... "
-
- if {[catch {object invoke -flags +NonPublic \
- System.Data.SQLite.SQLiteConnection ProviderSourceId} \
- sourceId] == 0} then {
- if {[string length $sourceId] == 0} then {
- set sourceId null
- }
- tputs $::test_channel [appendArgs $sourceId \n]
+ $defineConstants]] \n]
} else {
tputs $::test_channel unknown\n
}
}
@@ -2049,16 +1933,11 @@
# (i.e. because the managed-only System.Data.SQLite assembly can
# load without it; however, it cannot do anything useful without
# it). If we are using the mixed-mode assembly and we already
# found it (above), this should always succeed.
#
- checkForSQLiteLibrary $::test_channel
-
- #
- # NOTE: Check if the SQLite interop assembly is available.
- #
- checkForSQLiteInterop $::test_channel
+ checkForSQLite $::test_channel
#
# NOTE: Check the SQLite database and temporary directories.
#
checkForSQLiteDirectories $::test_channel
@@ -2144,11 +2023,11 @@
#
# NOTE: Show the active test constraints.
#
tputs $::test_channel [appendArgs "---- constraints: " \
- [formatList [lsort [getConstraints]] ] \n]
+ [formatList [lsort [getConstraints]]] \n]
#
# NOTE: Save the test constraints for use by threads created in this
# application domain. This is necessary because all the Eagle
# "test context" information is per-thread.
Index: Tests/installer.eagle
==================================================================
--- Tests/installer.eagle
+++ Tests/installer.eagle
@@ -152,11 +152,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2005 visualStudio2005\
-System.Data.SQLite.dll_v2.0.50727 file_Installer.exe testExec\
+System.Data.SQLite.dll_v2.0.50727 file_Installer.exe\
file_System.Data.SQLite.dll file_Installer_Test_Vs2005.log} -result {0 True}}
###############################################################################
runTest {test installer-1.2 {uninstaller tool / Visual Studio 2005} -setup {
@@ -189,11 +189,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2005 visualStudio2005\
-System.Data.SQLite.dll_v2.0.50727 file_Installer.exe testExec\
+System.Data.SQLite.dll_v2.0.50727 file_Installer.exe\
file_System.Data.SQLite.dll file_Uninstaller_Test_Vs2005.log} -result {0 True}}
###############################################################################
runTest {test installer-1.3 {installer tool / Visual Studio 2008} -setup {
@@ -226,11 +226,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2008 visualStudio2008\
-System.Data.SQLite.dll_v2.0.50727 file_Installer.exe testExec\
+System.Data.SQLite.dll_v2.0.50727 file_Installer.exe\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\
file_Installer_Test_Vs2008.log} -result {0 True}}
###############################################################################
@@ -264,11 +264,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2008 visualStudio2008\
-System.Data.SQLite.dll_v2.0.50727 file_Installer.exe testExec\
+System.Data.SQLite.dll_v2.0.50727 file_Installer.exe\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\
file_Uninstaller_Test_Vs2008.log} -result {0 True}}
###############################################################################
@@ -302,11 +302,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2010 visualStudio2010\
-System.Data.SQLite.dll_v4.0.30319 file_Installer.exe testExec\
+System.Data.SQLite.dll_v4.0.30319 file_Installer.exe\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\
file_Installer_Test_Vs2010.log} -result {0 True}}
###############################################################################
@@ -340,11 +340,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2010 visualStudio2010\
-System.Data.SQLite.dll_v4.0.30319 file_Installer.exe testExec\
+System.Data.SQLite.dll_v4.0.30319 file_Installer.exe\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\
file_Uninstaller_Test_Vs2010.log} -result {0 True}}
###############################################################################
@@ -378,11 +378,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2012 visualStudio2012\
-System.Data.SQLite.dll_v4.0.30319 file_Installer.exe testExec\
+System.Data.SQLite.dll_v4.0.30319 file_Installer.exe\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\
file_Installer_Test_Vs2012.log} -result {0 True}}
###############################################################################
@@ -416,11 +416,11 @@
} -cleanup {
cleanupFile $fileName
unset -nocomplain wow64 is64 code output error fileName
} -constraints {eagle administrator buildYear.2012 visualStudio2012\
-System.Data.SQLite.dll_v4.0.30319 file_Installer.exe testExec\
+System.Data.SQLite.dll_v4.0.30319 file_Installer.exe\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll\
file_Uninstaller_Test_Vs2012.log} -result {0 True}}
###############################################################################
Index: Tests/stress.eagle
==================================================================
--- Tests/stress.eagle
+++ Tests/stress.eagle
@@ -1426,11 +1426,11 @@
unset -nocomplain result thread index workload priority noWorkload \
priorities srcDb db fileName compiled options count times logFileName \
logListener event timeout connection indicators iterations exitOnFail \
coTaskMem noTrace failures status
} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -result {0}}
+System.Data.SQLite} -result {0}}
###############################################################################
#
# NOTE: Report after test.
Index: Tests/thread.eagle
==================================================================
--- Tests/thread.eagle
+++ Tests/thread.eagle
@@ -456,11 +456,11 @@
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id db fileName
} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result [appendArgs "^Ok\
+System.Data.SQLite} -match regexp -result [appendArgs "^Ok\
System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{\\d+ \\d+ " $count(1) \
"\\} \\{\\} \\{" $handle_counts "\\} " $memory_used \$]}
###############################################################################
Index: Tests/tkt-00f86f9739.eagle
==================================================================
--- Tests/tkt-00f86f9739.eagle
+++ Tests/tkt-00f86f9739.eagle
@@ -81,11 +81,11 @@
set result
} -cleanup {
unset -nocomplain code output error result value
} -constraints \
{eagle monoToDo defineConstant.System.Data.SQLite.USE_INTEROP_DLL\
-defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS SQLite testExec\
+defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS SQLite\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll file_testlinq.exe\
file_northwindEF.db} -result {0 {} 0 {DRACD OLDWO RATTC} 0 {ALFKI CACTU CHOPS\
FOLKO GALED KOENE LILAS MAGAA MAISD OCEAN RANCH SAVEA THECR} 0 {} 0 {} 0 {} 0\
{}}}
Index: Tests/tkt-201128cc88.eagle
==================================================================
--- Tests/tkt-201128cc88.eagle
+++ Tests/tkt-201128cc88.eagle
@@ -92,13 +92,13 @@
[sql execute -execute scalar $db "SELECT Base64(CAST('foo' AS BLOB));"]
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}\
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}\
System#Data#SQLite#SQLiteConnection#\d+ \{\} \{\} Zm9v$}}
###############################################################################
runSQLiteTestEpilogue
Index: Tests/tkt-343d392b51.eagle
==================================================================
--- Tests/tkt-343d392b51.eagle
+++ Tests/tkt-343d392b51.eagle
@@ -188,13 +188,13 @@
cleanupDb $fileName; unset -nocomplain db fileName
cleanupDb $otherFileName
unset -nocomplain result code results errors i sql otherTable otherDbName \
otherDataSource dataSource id otherFileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match glob -result {*\
-System.Data.DBConcurrencyException: *}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+glob -result {* System.Data.DBConcurrencyException: *}}
###############################################################################
runTest {test tkt-343d392b51-2.2 {SQLiteDataAdapter update success} -setup {
setupDb [set fileName tkt-343d392b51-2.2.db] "" JulianDay
@@ -294,13 +294,13 @@
cleanupDb $fileName; unset -nocomplain db fileName
cleanupDb $otherFileName
unset -nocomplain result code results errors i sql otherTable otherDbName \
otherDataSource dataSource id otherFileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runTest {test tkt-343d392b51-3.1 {attached database, same table name} -setup {
setupDb [set fileName tkt-343d392b51-3.1.db]
@@ -430,13 +430,13 @@
cleanupDb $fileName; unset -nocomplain db fileName
cleanupDb $otherFileName
unset -nocomplain result code results errors i sql otherTable otherDbName \
otherDataSource dataSource id otherFileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-3aa50d8413.eagle
==================================================================
--- Tests/tkt-3aa50d8413.eagle
+++ Tests/tkt-3aa50d8413.eagle
@@ -74,13 +74,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-48a6b8e4ca.eagle
==================================================================
--- Tests/tkt-48a6b8e4ca.eagle
+++ Tests/tkt-48a6b8e4ca.eagle
@@ -76,13 +76,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-4a791e70ab.eagle
==================================================================
--- Tests/tkt-4a791e70ab.eagle
+++ Tests/tkt-4a791e70ab.eagle
@@ -69,13 +69,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-59edc1018b.eagle
==================================================================
--- Tests/tkt-59edc1018b.eagle
+++ Tests/tkt-59edc1018b.eagle
@@ -81,11 +81,11 @@
set result
} -cleanup {
unset -nocomplain code output error result value
} -constraints \
{eagle monoToDo defineConstant.System.Data.SQLite.USE_INTEROP_DLL\
-defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS SQLite testExec\
+defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS SQLite\
file_System.Data.SQLite.dll file_System.Data.SQLite.Linq.dll file_testlinq.exe\
file_northwindEF.db} -result {0 {} 0 {FURIB GALED GODOS LAZYK LINOD PRINI REGGC\
WOLZA} 0 {} 0 ERNSH 0 {} 0 {AROUT BSBEV CONSH EASTC NORTS SEVES} 0 {}}}
###############################################################################
Index: Tests/tkt-6434e23a0f.eagle
==================================================================
--- Tests/tkt-6434e23a0f.eagle
+++ Tests/tkt-6434e23a0f.eagle
@@ -74,13 +74,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-6c6ecccc5f.eagle
==================================================================
--- Tests/tkt-6c6ecccc5f.eagle
+++ Tests/tkt-6c6ecccc5f.eagle
@@ -69,13 +69,14 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result results errors code sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\
+\{\}$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-72905c9a77.eagle
==================================================================
--- Tests/tkt-72905c9a77.eagle
+++ Tests/tkt-72905c9a77.eagle
@@ -272,12 +272,12 @@
cleanupDb $fileName
unset -nocomplain result code results errors dataSource fileName
} -constraints [fixConstraints {eagle monoBug28 configuration.Release\
!defineConstant.System.Data.SQLite.INTEROP_LOG command.sql compile.DATA\
-SQLite System.Data.SQLite compileCSharp}] -match regexp -result [appendArgs \
-"^Ok System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{" [string repeat \
+SQLite System.Data.SQLite}] -match regexp -result [appendArgs "^Ok\
+System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{" [string repeat \
"SQLite message \\(0\\): TEST $id
" [expr {4 * [info processors]}]] "\\}\$"]}
###############################################################################
Index: Tests/tkt-7e3fa93744.eagle
==================================================================
--- Tests/tkt-7e3fa93744.eagle
+++ Tests/tkt-7e3fa93744.eagle
@@ -126,13 +126,13 @@
} result] : [set result ""]}] $result
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id db fileName
-} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 8$}}
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 8$}}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: Tests/tkt-8b7d179c3c.eagle
==================================================================
--- Tests/tkt-8b7d179c3c.eagle
+++ Tests/tkt-8b7d179c3c.eagle
@@ -79,11 +79,11 @@
}
set result
} -cleanup {
unset -nocomplain code output error result pageSize
-} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll testExec\
+} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll\
file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} \
-result {0 {} 0 {DRACD RATTC OLDWO GALED LILAS MAGAA ALFKI CHOPS SAVEA KOENE\
MAISD FOLKO CACTU OCEAN RANCH THECR GOURL GROSR SUPRD HUNGO ISLAT QUICK HUNGC\
GREAL LEHMS RICSU ERNSH WILMK LINOD TRAIH SIMOB OTTIK SPLIR MORGK FOLIG FURIB\
PRINI AROUT BSBEV CONSH EASTC NORTS SEVES BERGS VICTE BOLID FISSA ROMEY BLAUS\
Index: Tests/tkt-996d13cd87.eagle
==================================================================
--- Tests/tkt-996d13cd87.eagle
+++ Tests/tkt-996d13cd87.eagle
@@ -285,11 +285,11 @@
unset -nocomplain result results errors code sql dataSource id \
poolCounts havePoolCounts fileName
rename getPoolCounts ""
} -constraints {eagle monoBug28 command.sql compile.DATA\
-SQLite System.Data.SQLite compileCSharp} -match regexp -result {^Ok\
+SQLite System.Data.SQLite} -match regexp -result {^Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \d+ \{\} True True$}}
}
###############################################################################
Index: Tests/tkt-ae5267b863.eagle
==================================================================
--- Tests/tkt-ae5267b863.eagle
+++ Tests/tkt-ae5267b863.eagle
@@ -145,11 +145,11 @@
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id db fileName
} -constraints [fixConstraints {eagle monoBug28 command.sql compile.DATA\
-SQLite System.Data.SQLite !mda compileCSharp\
+SQLite System.Data.SQLite !mda\
!defineConstant.System.Data.SQLite.INTEROP_LEGACY_CLOSE}] -match regexp \
-result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
Index: Tests/tkt-ccfa69fc32.eagle
==================================================================
--- Tests/tkt-ccfa69fc32.eagle
+++ Tests/tkt-ccfa69fc32.eagle
@@ -79,11 +79,11 @@
}
set result
} -cleanup {
unset -nocomplain code output error result add
-} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll testExec\
+} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll\
file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} -match \
glob -result {0 {1581 1730 1833 2116 2139} 0 {System.Data.UpdateException: *\
---> System.Data.SQLite.SQLiteException: constraint failed
PRIMARY KEY must be unique
*} 0 {1 2 3 4 5 6 7 8 9 10 1576 1577 1578 1579 1580 1581 1730 1833 2116 2139}}}
Index: Tests/tkt-e06c4caff3.eagle
==================================================================
--- Tests/tkt-e06c4caff3.eagle
+++ Tests/tkt-e06c4caff3.eagle
@@ -31,11 +31,11 @@
cleanupDb $fileName
unset -nocomplain NaN db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
--returnCodes 1 -match regexp -result [string map [list \n \r\n] \
+-returnCodes 1 -match regexp -result [string map [list \n \r\n]\
{^System\.Data\.SQLite\.SQLiteException \(0x80004005\): constraint failed
t1\.x may not be NULL
.*$}]}
###############################################################################
Index: Tests/tkt-e1b2e0f769.eagle
==================================================================
--- Tests/tkt-e1b2e0f769.eagle
+++ Tests/tkt-e1b2e0f769.eagle
@@ -121,14 +121,14 @@
} -cleanup {
cleanupDb $fileName
unset -nocomplain result2 result1 code results errors sql table dataSource \
id x db fileName
-} -constraints [fixConstraints {eagle monoBug28 command.sql compile.DATA SQLite\
-!defineConstant.System.Data.SQLite.CHECK_STATE System.Data.SQLite\
-compileCSharp}] -match regexp -result {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 3 Ok\
+} -constraints \
+[fixConstraints {eagle monoBug28 command.sql compile.DATA SQLite\
+!defineConstant.System.Data.SQLite.CHECK_STATE System.Data.SQLite}] -match \
+regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 3 Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 0$}}
###############################################################################
runSQLiteTestEpilogue
Index: Tests/tkt-e30b820248.eagle
==================================================================
--- Tests/tkt-e30b820248.eagle
+++ Tests/tkt-e30b820248.eagle
@@ -106,12 +106,13 @@
[reportSQLiteResources $test_channel true]
} -cleanup {
cleanupDb $fileName
unset -nocomplain result code results errors sql name dataSource id fileName
-} -constraints {eagle logFile monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result [appendArgs "^Ok\
+} -constraints \
+{eagle logFile monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-match regexp -result [appendArgs "^Ok\
System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{\\} " $memory_used \$]}
###############################################################################
for {set i 2} {$i < 5} {incr i} {
@@ -260,11 +261,11 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql name dataSource id \
fileName
} -constraints {eagle logFile monoBug28 command.sql compile.DATA SQLite\
-System.Data.SQLite compileCSharp} -match regexp -result [appendArgs "^Ok\
+System.Data.SQLite} -match regexp -result [appendArgs "^Ok\
System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{\\} " $memory_used \$]}
}
###############################################################################
DELETED Tests/tkt-f8dbab8baf.eagle
Index: Tests/tkt-f8dbab8baf.eagle
==================================================================
--- Tests/tkt-f8dbab8baf.eagle
+++ /dev/null
@@ -1,143 +0,0 @@
-###############################################################################
-#
-# tkt-f8dbab8baf.eagle --
-#
-# Written by Joe Mistachkin.
-# Released to the public domain, use at your own risk!
-#
-###############################################################################
-
-package require Eagle
-package require Eagle.Library
-package require Eagle.Test
-
-runTestPrologue
-
-###############################################################################
-
-package require System.Data.SQLite.Test
-runSQLiteTestPrologue
-
-###############################################################################
-
-runTest {test tkt-f8dbab8baf-1.1 {SchemaOnly with CREATE TABLE} -setup {
- setupDb [set fileName tkt-f8dbab8baf-1.1.db]
-} -body {
- sql execute -execute reader -format none -behavior SchemaOnly $db \
- "CREATE TABLE t1(x);"
-
- isTableInDb t1
-} -cleanup {
- cleanupDb $fileName
-
- unset -nocomplain db fileName
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
-{False}}
-
-###############################################################################
-
-runTest {test tkt-f8dbab8baf-1.2 {SchemaOnly with ALTER TABLE} -setup {
- setupDb [set fileName tkt-f8dbab8baf-1.2.db]
-} -body {
- sql execute $db "CREATE TABLE t1(x);"
-
- sql execute -execute reader -format none -behavior SchemaOnly $db \
- "ALTER TABLE t1 RENAME TO t2;"
-
- list [isTableInDb t1] [isTableInDb t2]
-} -cleanup {
- cleanupDb $fileName
-
- unset -nocomplain db fileName
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
-{True False}}
-
-###############################################################################
-
-runTest {test tkt-f8dbab8baf-1.3 {SchemaOnly with DROP TABLE} -setup {
- setupDb [set fileName tkt-f8dbab8baf-1.3.db]
-} -body {
- sql execute $db "CREATE TABLE t1(x);"
-
- sql execute -execute reader -format none -behavior SchemaOnly $db \
- "DROP TABLE t1;"
-
- isTableInDb t1
-} -cleanup {
- cleanupDb $fileName
-
- unset -nocomplain db fileName
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
-{True}}
-
-###############################################################################
-
-runTest {test tkt-f8dbab8baf-1.4 {CREATE/SELECT success} -setup {
- setupDb [set fileName tkt-f8dbab8baf-1.4.db]
-} -body {
- sql execute -execute reader $db {
- CREATE TABLE t1(x);
- INSERT INTO t1 (x) VALUEs(1);
- SELECT x FROM t1;
- }
-
- list [isTableInDb t1] \
- [expr {[info exists rows(count)] ? $rows(count) : -1}] \
- [expr {[info exists rows(names)] ? $rows(names) : ""}]
-} -cleanup {
- cleanupDb $fileName
-
- unset -nocomplain rows db fileName
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
-{True 1 x}}
-
-###############################################################################
-
-runTest {test tkt-f8dbab8baf-1.5 {SchemaOnly CREATE/SELECT success} -setup {
- setupDb [set fileName tkt-f8dbab8baf-1.5.db]
-} -body {
- sql execute $db "CREATE TABLE t1(x);"
- sql execute $db "INSERT INTO t1 (x) VALUEs(1);"
- sql execute -execute reader -behavior SchemaOnly $db "SELECT x FROM t1;"
-
- list [isTableInDb t1] \
- [expr {[info exists rows(count)] ? $rows(count) : -1}] \
- [expr {[info exists rows(names)] ? $rows(names) : ""}]
-} -cleanup {
- cleanupDb $fileName
-
- unset -nocomplain rows db fileName
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
-{True 0 x}}
-
-###############################################################################
-
-runTest {test tkt-f8dbab8baf-1.6 {SchemaOnly CREATE/SELECT failure} -setup {
- setupDb [set fileName tkt-f8dbab8baf-1.6.db]
-} -body {
- sql execute -execute reader -format none -behavior SchemaOnly $db \
- "CREATE TABLE t1(x); SELECT x FROM t1;"
-
- list [isTableInDb t1] \
- [expr {[info exists rows(count)] ? $rows(count) : -1}] \
- [expr {[info exists rows(names)] ? $rows(names) : ""}]
-} -cleanup {
- cleanupDb $fileName
-
- unset -nocomplain rows db fileName
-} -constraints \
-{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
--returnCodes 1 -match regexp -result [string map [list \n \r\n] \
-{^System\.Data\.SQLite\.SQLiteException \(0x80004005\): SQL logic error or\
-missing database
-no such table: t1.*$}]}
-
-###############################################################################
-
-runSQLiteTestEpilogue
-runTestEpilogue
Index: Tests/version.eagle
==================================================================
--- Tests/version.eagle
+++ Tests/version.eagle
@@ -166,50 +166,10 @@
unset -nocomplain assemblyName
} -constraints {eagle file_testlinq.exe} -result $version(full)}
###############################################################################
-runTest {test version-1.11 {SQLiteVersion} -body {
- object invoke System.Data.SQLite.SQLiteConnection SQLiteVersion
-} -constraints {eagle SQLite System.Data.SQLite} -match regexp -result \
-{^\d+\.\d+\.\d+(?:\.\d+)?$}}
-
-###############################################################################
-
-runTest {test version-1.12 {SQLiteSourceId} -body {
- object invoke System.Data.SQLite.SQLiteConnection SQLiteSourceId
-} -constraints {eagle SQLite System.Data.SQLite} -match regexp -result \
-{^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}$}}
-
-###############################################################################
-
-runTest {test version-1.13 {InteropVersion} -body {
- object invoke System.Data.SQLite.SQLiteConnection InteropVersion
-} -constraints {eagle SQLiteInterop System.Data.SQLite} -result $version(full)}
-
-###############################################################################
-
-runTest {test version-1.14 {InteropSourceId} -body {
- object invoke System.Data.SQLite.SQLiteConnection InteropSourceId
-} -constraints {eagle SQLiteInterop System.Data.SQLite} -match regexp -result \
-{^[0-9a-f]{40} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC$}}
-
-###############################################################################
-
-runTest {test version-1.15 {ProviderVersion} -body {
- object invoke System.Data.SQLite.SQLiteConnection ProviderVersion
-} -constraints {eagle System.Data.SQLite} -result $version(full)}
-
-###############################################################################
-
-runTest {test version-1.16 {ProviderSourceId} -body {
- object invoke System.Data.SQLite.SQLiteConnection ProviderSourceId
-} -constraints {eagle System.Data.SQLite} -match regexp -result \
-{^[0-9a-f]{40} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC$}}
-
-###############################################################################
-
set patterns [list \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs [string map [list . \\.] $version(full)] \
] \
[appendArgs [string map [list . \\.] $version(full)] \
@@ -330,11 +290,11 @@
if {![haveConstraint [appendArgs file_ $constraint]]} then {
checkForFile $test_channel $fileName $constraint
}
- runTest {test [appendArgs version-1.17. $i] \
+ runTest {test [appendArgs version-1.11. $i] \
[appendArgs "pattern {" $pattern "} in file \"" $fileName \"] -body {
regexp -- $pattern [readFile $fileName]
} -constraints [list eagle [appendArgs file_ $constraint]] -result {1}}
}
Index: Tests/vtab.eagle
==================================================================
--- Tests/vtab.eagle
+++ Tests/vtab.eagle
@@ -101,12 +101,12 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+{^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}
###############################################################################
runTest {test vtab-1.2.1 {IEnumerable virtual table} -setup {
set fileName vtab-1.2.1.db
@@ -206,14 +206,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{one two three 4 5\.0 Error\
-\{SQL logic error or missing database
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{one two three 4 5\.0 Error \{SQL logic error or missing database
virtual table "t\d+" is read-only\}\}$}]}
###############################################################################
runTest {test vtab-1.2.2 {IEnumerable virtual table} -setup {
@@ -317,14 +316,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{one two three 4 5\.0 Error\
-\{SQL logic error or missing database
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{one two three 4 5\.0 Error \{SQL logic error or missing database
virtual table "t\d+" is read-only\}\}$}]}
###############################################################################
runTest {test vtab-1.3.1 {IEnumerable virtual table} -setup {
@@ -426,14 +424,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{1 2 3 4 5 Error \{SQL\
-logic error or missing database
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{1 2 3 4 5 Error \{SQL logic error or missing database
virtual table "t\d+" is read-only\}\}$}]}
###############################################################################
runTest {test vtab-1.3.2 {IEnumerable virtual table} -setup {
@@ -538,14 +535,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{1 2 3 4 5 Error \{SQL\
-logic error or missing database
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{1 2 3 4 5 Error \{SQL logic error or missing database
virtual table "t\d+" is read-only\}\}$}]}
###############################################################################
runTest {test vtab-1.4 {virtual table function support} -setup {
@@ -790,14 +786,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\{\} b25l \{SQL logic\
-error or missing database
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{\{\} b25l \{SQL logic error or missing database
unable to use function Base64 in the requested context\} \{SQL logic error or\
missing database
no such function: Base65\}\}$}]}
###############################################################################
@@ -1044,14 +1039,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\{\} b25l \{SQL logic\
-error or missing database
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{\{\} b25l \{SQL logic error or missing database
(?:unable to use function Base64 in the requested context|need exactly one\
argument, got 3)\} \{SQL logic error or missing database
no such function: Base65\}\}$}]}
###############################################################################
@@ -1224,13 +1218,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\{\} t\d+ \{\} x\d+\}$}]}
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{\{\} t\d+ \{\} x\d+\}$}]}
###############################################################################
runTest {test vtab-1.7 {virtual table xBestIndex marshalling (1)} -setup {
set fileName vtab-1.7.db
@@ -1324,14 +1318,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{0 5 two three one 5\.0\
-4\}$}]}
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{0 5 two three one 5\.0 4\}$}]}
###############################################################################
runTest {test vtab-1.8 {virtual table xBestIndex marshalling (2)} -setup {
set fileName vtab-1.8.db
@@ -1426,13 +1419,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{0 5 one three\}$}]}
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{0 5 one three\}$}]}
###############################################################################
runTest {test vtab-1.9 {IEnumerable virtual table w/large byte array} -setup {
set fileName vtab-1.9.db
@@ -1504,13 +1497,13 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -time true -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 (?:-)?\d+$}]}
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 (?:-)?\d+$}]}
###############################################################################
runTest {test vtab-1.10 {virtual table xRowId uniqueness} -setup {
set fileName vtab-1.10.db
@@ -1601,15 +1594,14 @@
cleanupDb $fileName
unset -nocomplain result code results errors sql dataSource id fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
-defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE compileCSharp} -match \
-regexp -result [string map [list \n \r\n] {^Ok\
-System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{0 4294967296 4294967296\
-8589934592 8589934592 12884901888 12884901888 17179869184 17179869184\
-21474836480 21474836480 25769803776 25769803776\}$}]}
+defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \
+[string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\
+\{\} 0 \{0 4294967296 4294967296 8589934592 8589934592 12884901888 12884901888\
+17179869184 17179869184 21474836480 21474836480 25769803776 25769803776\}$}]}
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue
Index: exclude_src.txt
==================================================================
--- exclude_src.txt
+++ exclude_src.txt
@@ -16,20 +16,17 @@
Externals/Eagle/bin/Eagle.dll
Externals/Eagle/bin/EagleShell.exe
Externals/Eagle/bin/SQLite.Interop.*
Externals/Eagle/bin/sqlite3.*
Externals/Eagle/bin/System.*
-Externals/Eagle/bin/x64/*
-Externals/Eagle/bin/x86/*
Externals/Eagle/lib/Eagle1.0/embed.eagle
Externals/Eagle/lib/Eagle1.0/init.eagle
Externals/Eagle/lib/Eagle1.0/pkgIndex.eagle
Externals/Eagle/lib/Eagle1.0/pkgIndex.tcl
Externals/Eagle/lib/Eagle1.0/safe.eagle
Externals/Eagle/lib/Eagle1.0/shell.eagle
Externals/Eagle/lib/Eagle1.0/test.eagle
-Externals/Eagle/lib/Eagle1.0/word.tcl
Externals/Eagle/lib/Test1.0/constraints.eagle
Externals/Eagle/lib/Test1.0/epilogue.eagle
Externals/Eagle/lib/Test1.0/pkgIndex.eagle
Externals/Eagle/lib/Test1.0/pkgIndex.tcl
Externals/Eagle/lib/Test1.0/prologue.eagle
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -193,16 +193,12 @@
- Updated to SQLite 3.8.1.
- Use declared column sizes for the AnsiStringFixedLength and StringFixedLength mapped database types. Fix for [3113734605].
- Check the result of sqlite3_column_name function against NULL.
- Return false for the SQLiteParameterCollection.IsSynchronized property because it is not thread-safe.
- Raise the static SQLiteConnection.Changed event when any SQLiteCommand, SQLiteDataReader, or CriticalHandle derived object instance is created. Fix for [aba4549801].
- - Add SQLiteCommand.Execute, SQLiteCommand.ExecuteNonQuery, and SQLiteCommand.ExecuteScalar method overloads that take a CommandBehavior parameter.
- Revise how the extra object data is passed to the static SQLiteConnection.Changed event. ** Potentially Incompatible Change **
- - Make sure the database cannot be changed by a query when the CommandBehavior.SchemaOnly flag is used. Fix for [f8dbab8baf]. ** Potentially Incompatible Change **
- Include the XML documentation files in the NuGet packages. Fix for [5970d5b0a6].
- - Add InteropVersion, InteropSourceId, ProviderVersion, and ProviderSourceId properties to the SQLiteConnection class.
- - Add experimental support for interfacing with the authorizer callback in the SQLite core library.
1.0.88.0 - August 7, 2013
Index: www/news.wiki
==================================================================
--- www/news.wiki
+++ www/news.wiki
@@ -9,16 +9,12 @@
- Updated to [http://www.sqlite.org/src/info/trunk|SQLite 3.8.1].
- Use declared column sizes for the AnsiStringFixedLength and StringFixedLength mapped database types. Fix for [3113734605].
- Check the result of sqlite3_column_name function against NULL.
- Return false for the SQLiteParameterCollection.IsSynchronized property because it is not thread-safe.
- Raise the static SQLiteConnection.Changed event when any SQLiteCommand, SQLiteDataReader, or CriticalHandle derived object instance is created. Fix for [aba4549801].
- - Add SQLiteCommand.Execute, SQLiteCommand.ExecuteNonQuery, and SQLiteCommand.ExecuteScalar method overloads that take a CommandBehavior parameter.
- Revise how the extra object data is passed to the static SQLiteConnection.Changed event. ** Potentially Incompatible Change **
- - Make sure the database cannot be changed by a query when the CommandBehavior.SchemaOnly flag is used. Fix for [f8dbab8baf]. ** Potentially Incompatible Change **
- Include the XML documentation files in the NuGet packages. Fix for [5970d5b0a6].
- - Add InteropVersion, InteropSourceId, ProviderVersion, and ProviderSourceId properties to the SQLiteConnection class.
- - Add experimental support for interfacing with the authorizer callback in the SQLite core library.
1.0.88.0 - August 7, 2013