mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4d7c3d9ef | ||
|
|
8c0cd7c8bc | ||
|
|
4f056fd1c0 | ||
|
|
f58722a26e | ||
|
|
73cab5d584 | ||
|
|
6a0fb29045 | ||
|
|
8433f6ba46 | ||
|
|
da2c60f5b8 | ||
|
|
9ae50db590 | ||
|
|
d7e625fc8f | ||
|
|
8b65ff0319 | ||
|
|
f64332a418 | ||
|
|
8381e73ac4 | ||
|
|
fc50e037ad | ||
|
|
5f9d7602b5 | ||
|
|
ac6d4cbb65 | ||
|
|
3346309151 | ||
|
|
cd75d407a5 | ||
|
|
b31cffbf1f | ||
|
|
97a1dd514f | ||
|
|
aa46a5386a | ||
|
|
4d45418b34 | ||
|
|
186273f3ed | ||
|
|
42a2078151 | ||
|
|
41e28d2465 | ||
|
|
05843aee0c | ||
|
|
96aceda235 | ||
|
|
10ae2b144f | ||
|
|
ab47d60645 | ||
|
|
c015d3a3d7 | ||
|
|
a32e55fb66 | ||
|
|
b056e2889a | ||
|
|
dcdb15a41e | ||
|
|
ba9aa7713a | ||
|
|
d05bf9fbc2 | ||
|
|
961235859c | ||
|
|
03935d4b06 | ||
|
|
e038afb2a6 | ||
|
|
bd05db97e6 | ||
|
|
4aad18b2f3 | ||
|
|
1d65971a97 | ||
|
|
c81cda6e5c | ||
|
|
8e7f1191fb | ||
|
|
c4c3d949e9 | ||
|
|
0b7e7031c5 | ||
|
|
4b6f996569 | ||
|
|
5b604db708 | ||
|
|
d484fcef9b | ||
|
|
d9f8cc931d | ||
|
|
5884cfe9e6 | ||
|
|
c2fc4ec6c3 | ||
|
|
e63234c20f | ||
|
|
a525556b38 | ||
|
|
eeb6dc142d | ||
|
|
4022942513 | ||
|
|
677ca39c5b | ||
|
|
d4d4e18a45 | ||
|
|
fb6b37aaa6 | ||
|
|
aaaac0ba68 | ||
|
|
91f02c5320 | ||
|
|
e1eaf58f4b | ||
|
|
842cca7222 | ||
|
|
9aa0e78f63 | ||
|
|
524bab53fa | ||
|
|
027fda3a99 | ||
|
|
8cbfe36eab | ||
|
|
ba3d71a09e | ||
|
|
24d300a580 | ||
|
|
b309a721a2 | ||
|
|
f172b9782a | ||
|
|
852c8a4c09 | ||
|
|
b4d16bcbae | ||
|
|
cf02ffd0b0 | ||
|
|
311cbb1af3 | ||
|
|
476a6daeab | ||
|
|
b52cdf8dfa | ||
|
|
6a5eb47932 | ||
|
|
94a679522d | ||
|
|
28e6515ea5 | ||
|
|
24ec98a874 | ||
|
|
a3f2cdadc7 | ||
|
|
0b62244267 | ||
|
|
8267161d5e | ||
|
|
e1f80efa82 | ||
|
|
aab8ac62b5 | ||
|
|
9411f86182 | ||
|
|
5c113d5c22 | ||
|
|
353a8c5442 | ||
|
|
ad5dfadf0c | ||
|
|
8476e0b206 | ||
|
|
77dd78f6a2 | ||
|
|
0f06dfdd00 | ||
|
|
a30e285862 | ||
|
|
38efc26107 | ||
|
|
74a87fcfc7 | ||
|
|
e357665885 | ||
|
|
355327100c | ||
|
|
7738b02267 | ||
|
|
bbf13e603c | ||
|
|
277c94c8c3 | ||
|
|
ffd5f68616 | ||
|
|
6822d1d620 | ||
|
|
3f904f5033 | ||
|
|
81f0febea2 | ||
|
|
8b51478ae5 | ||
|
|
4a1fb62925 | ||
|
|
d89a7fb835 | ||
|
|
a9d3913a6c | ||
|
|
a405284d0e | ||
|
|
f0e7f36bad | ||
|
|
92dfad552e | ||
|
|
8a93fa7496 | ||
|
|
610816668b | ||
|
|
b65f8ff197 | ||
|
|
5c132ca21d | ||
|
|
f929ec50c4 | ||
|
|
c99ad0afa1 | ||
|
|
9304566e82 | ||
|
|
367bc2553f | ||
|
|
1d01e9761b | ||
|
|
65225813d4 | ||
|
|
7aa6feb8b4 | ||
|
|
06d6192295 | ||
|
|
20a2b89c9a | ||
|
|
e80a798592 | ||
|
|
2dc8d4a396 | ||
|
|
56cacad31a | ||
|
|
2e29242d2f | ||
|
|
45585130de | ||
|
|
a2815032ab | ||
|
|
20e4eb747e | ||
|
|
e9fe7d0fd2 | ||
|
|
4de81b55de | ||
|
|
6f09056d0d | ||
|
|
3e5a13b411 | ||
|
|
78c15f1e87 | ||
|
|
9ae5293e0f | ||
|
|
cbb31f44a7 | ||
|
|
cfbeb5ad01 | ||
|
|
c36260bab4 | ||
|
|
29657db467 | ||
|
|
fd621002ea | ||
|
|
a9e1f121ad | ||
|
|
5f7d8d9976 | ||
|
|
3035378a39 | ||
|
|
e3d6141747 | ||
|
|
3ef3b0d330 | ||
|
|
594b7c1434 | ||
|
|
4cc45d2981 | ||
|
|
dc7291f347 | ||
|
|
d735ab1a60 | ||
|
|
6a75e837b8 | ||
|
|
a3aee1c872 | ||
|
|
376031a3fd | ||
|
|
c6d5150769 | ||
|
|
b4aff94ab6 | ||
|
|
c945e6ce62 | ||
|
|
c5fd5f9344 | ||
|
|
032fcf581e | ||
|
|
a7a4e09ae6 | ||
|
|
9c96dc9de2 | ||
|
|
ca9e6be887 | ||
|
|
06533c0a67 | ||
|
|
5005bcfc48 | ||
|
|
45a8d661be | ||
|
|
729a1d22ba | ||
|
|
94fdd07e5d | ||
|
|
f7aaa744e4 | ||
|
|
dcd2278d3f | ||
|
|
186fc816f7 | ||
|
|
b64f5b2c6c | ||
|
|
192ac46f0a | ||
|
|
f369737334 | ||
|
|
d6c9704a79 | ||
|
|
85be35cf99 | ||
|
|
259fd130e0 | ||
|
|
91bb988c97 | ||
|
|
97879b91b7 | ||
|
|
f16558ea6d | ||
|
|
b96a55870b | ||
|
|
1a696d51e1 | ||
|
|
58ac3c61d1 | ||
|
|
022abadb2e | ||
|
|
41c0bf5de4 | ||
|
|
c1c8601025 | ||
|
|
0fb926e9ed | ||
|
|
db73cf5f48 | ||
|
|
4af8156695 | ||
|
|
494777747a | ||
|
|
beb936e904 | ||
|
|
16bc71e8f1 | ||
|
|
642da61401 | ||
|
|
1408deaa7d | ||
|
|
1f7a01ccfb | ||
|
|
d1ad4ea6b6 | ||
|
|
73e7d1d111 | ||
|
|
1d31585645 | ||
|
|
7a00fc77a5 | ||
|
|
cc86dade12 | ||
|
|
615abae8f1 | ||
|
|
81bfc0a71a | ||
|
|
6e13a2b089 | ||
|
|
88769b1c21 | ||
|
|
2c3354b5f5 | ||
|
|
53d588843b | ||
|
|
7378a8a117 | ||
|
|
4bf7143482 | ||
|
|
997acc630c | ||
|
|
6eccd57679 | ||
|
|
d723c925d2 | ||
|
|
f0991210c0 | ||
|
|
42357eaf9b | ||
|
|
27f43d377a | ||
|
|
10f6a0130b | ||
|
|
35dde25470 | ||
|
|
2bcd3194b5 | ||
|
|
10ddb8a2b3 | ||
|
|
dd0a3203e7 | ||
|
|
196c705599 | ||
|
|
c4866cde97 | ||
|
|
4655a0eea1 | ||
|
|
05d003c788 | ||
|
|
2aac73c7b6 | ||
|
|
3463119aa2 | ||
|
|
1256a14783 | ||
|
|
9d920cdfb1 | ||
|
|
20dbf7a0d0 | ||
|
|
860d92e3f0 | ||
|
|
844e5e95d4 | ||
|
|
e0e8de2d7d | ||
|
|
4b22b3f1f1 | ||
|
|
5befaff2da | ||
|
|
606a0ec287 | ||
|
|
d38aa4c0d6 | ||
|
|
30be3866c8 | ||
|
|
a6407800bb | ||
|
|
5873ac9570 | ||
|
|
72b6bb613d | ||
|
|
02c3f7b1cd | ||
|
|
077dfc02e2 | ||
|
|
e640c9f54b | ||
|
|
12b4209f80 | ||
|
|
dd7ba172ce | ||
|
|
3536718334 | ||
|
|
4cd75e5715 | ||
|
|
c559a7bf4d | ||
|
|
7b8690a93c | ||
|
|
dbb885b9a1 | ||
|
|
b44fb5e4e5 | ||
|
|
b56489551b | ||
|
|
a90a9d9f94 | ||
|
|
e419439f92 | ||
|
|
c84ac4051f | ||
|
|
c938c00ae6 | ||
|
|
940153a2d2 | ||
|
|
844c910324 | ||
|
|
d992488c00 | ||
|
|
c4d22ba10c | ||
|
|
3e1c65ce14 | ||
|
|
b85f0f2772 | ||
|
|
57718c3451 | ||
|
|
9b098982cf | ||
|
|
96f82806c5 | ||
|
|
fc0bd945c4 | ||
|
|
5ca8a55ee5 | ||
|
|
cb871c7c6d | ||
|
|
941d9a15f9 | ||
|
|
acf348e623 | ||
|
|
89e3f2a012 | ||
|
|
2168336c44 | ||
|
|
aeeeabdf24 | ||
|
|
70895c6935 | ||
|
|
0473fb6f61 | ||
|
|
1259587222 | ||
|
|
bc2ec9054b | ||
|
|
1db7027fe6 | ||
|
|
ebcbf2b2fc | ||
|
|
8702850b3f | ||
|
|
a81f50b5fe | ||
|
|
caf229d10d | ||
|
|
fd6ded786c | ||
|
|
2b55f54b9c | ||
|
|
c90b57ea8c | ||
|
|
0ec4055f30 | ||
|
|
9ccd53016b | ||
|
|
57af9803b7 | ||
|
|
980ac054de | ||
|
|
10e11ee302 | ||
|
|
97eba89dcb | ||
|
|
19bd9945fb | ||
|
|
216bec00c9 | ||
|
|
0dc11cea68 | ||
|
|
a7170ffd21 | ||
|
|
570d39cfa1 | ||
|
|
97a15c7691 | ||
|
|
f9a00324d8 | ||
|
|
1aa729a130 | ||
|
|
05ec8fde09 | ||
|
|
0b75828378 | ||
|
|
0a0e24256b | ||
|
|
fffbdd3bc4 | ||
|
|
9008b734ea | ||
|
|
be2288ded6 | ||
|
|
43ce1d515f | ||
|
|
70dfcc7dd8 | ||
|
|
1026d46505 | ||
|
|
97c1a96048 | ||
|
|
f77ae165ac | ||
|
|
cf36ecd09d | ||
|
|
6a3337c201 | ||
|
|
bc6b91f88c | ||
|
|
ea30af9f57 | ||
|
|
527221e06e | ||
|
|
0adef9c4cf | ||
|
|
d64fcfd51a | ||
|
|
3e9a3556fa | ||
|
|
8390bcaedd | ||
|
|
9bc3cff12a | ||
|
|
2a62fc4766 | ||
|
|
938050e712 | ||
|
|
8e4a2a5a2b | ||
|
|
bef12dc160 | ||
|
|
5214f2e39f | ||
|
|
12e57c40bc | ||
|
|
06c897e1b0 | ||
|
|
870fcd6bf8 | ||
|
|
12573167b7 | ||
|
|
5cc90d6524 | ||
|
|
9d1953a5b3 | ||
|
|
aa59cf428b | ||
|
|
240a8d1ee0 | ||
|
|
1ae4e1bd76 | ||
|
|
157b960076 | ||
|
|
6f8b5d6fd8 | ||
|
|
b40f0a5f2a | ||
|
|
eb7680eb5b | ||
|
|
3e51097a97 | ||
|
|
fb2ea3f479 | ||
|
|
6f5a39d6d8 | ||
|
|
6a35737bdb | ||
|
|
44f03173d5 | ||
|
|
b596330b38 | ||
|
|
237d5155be | ||
|
|
211962f587 | ||
|
|
79166a08c3 | ||
|
|
3d4938068e | ||
|
|
dfe7259c93 | ||
|
|
73e208ce0e | ||
|
|
1e4a818de7 | ||
|
|
9199a29155 | ||
|
|
84939c2ed6 | ||
|
|
f07ac8f82a | ||
|
|
86aa4c7948 | ||
|
|
f8f8ae2375 | ||
|
|
105cf53662 | ||
|
|
cfe745701c | ||
|
|
a98c2a96ae | ||
|
|
7d2d49e0bd | ||
|
|
eb94276bcf | ||
|
|
2c83a37602 | ||
|
|
eb4cea017d | ||
|
|
8088be6ff0 | ||
|
|
69ffe8cefc | ||
|
|
fef73a42b0 | ||
|
|
a948f85ee4 | ||
|
|
2224d09834 | ||
|
|
0acb6d0cdd | ||
|
|
008af337d4 | ||
|
|
4126638853 | ||
|
|
ffbcd0365b | ||
|
|
49f4b61e8b | ||
|
|
68fa8de87a | ||
|
|
a9b126bce5 | ||
|
|
e41b1cb367 | ||
|
|
322bd32b87 | ||
|
|
2d3c3404d4 | ||
|
|
de14fed65e | ||
|
|
66e393eccc | ||
|
|
77c0bce859 | ||
|
|
c992524d56 | ||
|
|
5c7845e91b | ||
|
|
4e6194346f | ||
|
|
5cd2a34764 | ||
|
|
5e535232a9 | ||
|
|
695fc75d04 | ||
|
|
e6cdf26e7f | ||
|
|
7f0fc6738e | ||
|
|
b2b47a6f96 | ||
|
|
0c2bd9442a | ||
|
|
af6ea1ed3b | ||
|
|
317c988f05 | ||
|
|
cbdaa40bed | ||
|
|
219db36825 | ||
|
|
1295049706 | ||
|
|
c22ccc6dd3 | ||
|
|
484f8bf14a | ||
|
|
14edfc4786 | ||
|
|
198b6ed56d | ||
|
|
21b28272b2 | ||
|
|
40697f117f | ||
|
|
95600d6b38 | ||
|
|
55abeb083e | ||
|
|
9c32c4e70a | ||
|
|
ca00eff4e6 | ||
|
|
761d18aaec | ||
|
|
98bebaf7c7 | ||
|
|
9552f4e872 | ||
|
|
701cbd7aa2 | ||
|
|
bd252fb987 | ||
|
|
3bdd57dd9d | ||
|
|
0da3eff54a | ||
|
|
e7da10fc99 | ||
|
|
641e7690af | ||
|
|
8b0ec138b9 | ||
|
|
5d2fb1e870 | ||
|
|
3097649a23 | ||
|
|
2763585afc | ||
|
|
d573355379 | ||
|
|
8776008885 | ||
|
|
ad00cf6570 | ||
|
|
36b567c8c9 | ||
|
|
92b40c85a4 | ||
|
|
13999b6e73 | ||
|
|
82aa8b04de | ||
|
|
509c971225 | ||
|
|
1fce1de9da | ||
|
|
bfae0b67e3 | ||
|
|
16151faef0 | ||
|
|
1fd1729bbd | ||
|
|
a386153efc | ||
|
|
40fd4c2e1b | ||
|
|
304a621cd5 | ||
|
|
98ef547a55 | ||
|
|
12d8f1b7c1 | ||
|
|
e19a2f4016 | ||
|
|
afdfb23005 | ||
|
|
fcc320c9f0 | ||
|
|
dbc3cd7b36 | ||
|
|
437c186e60 | ||
|
|
78f6ef1cce | ||
|
|
bd02468d72 | ||
|
|
40ab00b063 | ||
|
|
13103b826e | ||
|
|
0261aa4196 | ||
|
|
8b4eb21ba2 | ||
|
|
968326449f | ||
|
|
a02b43a1e8 | ||
|
|
47e29c2de0 | ||
|
|
84b1abff2e | ||
|
|
7d71cacbf6 | ||
|
|
9019e3ef4c | ||
|
|
1a9671a17d | ||
|
|
fe14fa4e67 | ||
|
|
8471f1a9c4 | ||
|
|
1a7bf72ecc | ||
|
|
543db8aa8b | ||
|
|
bb511d6f99 | ||
|
|
b611714b1a | ||
|
|
d3bb75b952 | ||
|
|
44a75306a6 | ||
|
|
79ed95c592 | ||
|
|
f13f62ef20 | ||
|
|
c60f8a4cd8 | ||
|
|
9d2fdc34b7 | ||
|
|
d68037daf4 | ||
|
|
14c8194db3 | ||
|
|
3f3317a3fa | ||
|
|
5d2b8cb11f | ||
|
|
f367581fc6 | ||
|
|
3a7c87f7ec | ||
|
|
fdc039e905 | ||
|
|
602b47f906 | ||
|
|
572fe3eb74 | ||
|
|
3f9d0cab18 | ||
|
|
7bbf9b93bf | ||
|
|
8f4c2fff01 | ||
|
|
1104e5742c | ||
|
|
adc6f48f54 | ||
|
|
7dd3e6254e | ||
|
|
e1a95712c4 | ||
|
|
53653fa9f7 | ||
|
|
fbba486d1b | ||
|
|
751a50cc8f | ||
|
|
b7312b9149 | ||
|
|
6980211f12 | ||
|
|
f423cb7491 | ||
|
|
f023ea9bdd | ||
|
|
a95e5d1b25 | ||
|
|
ca26c4d1e9 | ||
|
|
a5a0060d0a | ||
|
|
c835b2ebb3 | ||
|
|
5ef5d397e8 | ||
|
|
04a0ff9629 | ||
|
|
29039ab97c | ||
|
|
28045640e4 | ||
|
|
b8a42023ba | ||
|
|
94b77d4c86 | ||
|
|
de2c88c52b | ||
|
|
733b2baac6 | ||
|
|
1a0f25be2f | ||
|
|
a07c9658be | ||
|
|
afe496c9cd | ||
|
|
1a2726468d | ||
|
|
92f56eacf1 | ||
|
|
4ae27e4746 | ||
|
|
381cb28ed9 | ||
|
|
143f8f0b56 | ||
|
|
291693e4c2 | ||
|
|
28c52a2734 | ||
|
|
977debae0a | ||
|
|
ea5fdf9b78 | ||
|
|
f79cea3342 | ||
|
|
a910c16579 | ||
|
|
26b9f436da | ||
|
|
41d6cb2429 | ||
|
|
dc68c49234 | ||
|
|
7c9544a066 | ||
|
|
0aa568cbf4 | ||
|
|
83ece2d548 | ||
|
|
ecfe611a06 | ||
|
|
3d026cf5f0 | ||
|
|
96fb9d17c7 | ||
|
|
14994a5e46 | ||
|
|
ca8a4053d8 | ||
|
|
732cf985ac | ||
|
|
c373391049 | ||
|
|
740b00069e | ||
|
|
920df63be7 | ||
|
|
f69d6386e1 | ||
|
|
a48c6975d2 | ||
|
|
7da3e9a1bf | ||
|
|
d83b90fc3a | ||
|
|
da7de19756 | ||
|
|
dc6eea68df | ||
|
|
6ba0618bd1 | ||
|
|
8d034a2489 | ||
|
|
d0f3e118b6 | ||
|
|
da2c3a6148 | ||
|
|
a1f3ff1b3c | ||
|
|
4477135bd8 | ||
|
|
96e4a7df36 | ||
|
|
9119c83a15 | ||
|
|
3444afed80 | ||
|
|
56b1967181 | ||
|
|
0d9f92981e | ||
|
|
397438b8a3 | ||
|
|
b23544072e | ||
|
|
2edd8bd986 | ||
|
|
33ebce22dd | ||
|
|
fd98e6bc3a | ||
|
|
2addf865bd | ||
|
|
498b451aaa | ||
|
|
1316af00ea | ||
|
|
9e0c7f5d4a | ||
|
|
29f2c53ff9 | ||
|
|
09dfd131ee | ||
|
|
b2a88c3d96 | ||
|
|
f41b9f3b0d | ||
|
|
aac3846615 | ||
|
|
5d67a8951c | ||
|
|
a2adff0968 | ||
|
|
db2ea89c64 | ||
|
|
dc6a01e022 | ||
|
|
e6d2ec934b | ||
|
|
5923d0b7e2 | ||
|
|
41a116c1aa | ||
|
|
70f5e65794 | ||
|
|
439f02a687 | ||
|
|
51388d30b5 | ||
|
|
a439987511 | ||
|
|
c7a7abbd69 | ||
|
|
6b0ad0d55c | ||
|
|
1a82e8962d | ||
|
|
f9f4c98f73 | ||
|
|
85303f3dbe | ||
|
|
6f586f97a4 | ||
|
|
4db261914c | ||
|
|
13a1207724 | ||
|
|
f9e42fda70 | ||
|
|
31409415b5 | ||
|
|
873bdef67f | ||
|
|
0be5e85d0c | ||
|
|
1c316f3ee4 | ||
|
|
ba97f32797 | ||
|
|
9a8769f38a | ||
|
|
4629b55cc5 | ||
|
|
4a445db052 | ||
|
|
25e5ba719d | ||
|
|
bacc6ee527 | ||
|
|
68824329d4 | ||
|
|
a28e80290f | ||
|
|
7b788c2964 | ||
|
|
c2a5683b86 | ||
|
|
d26b7fb705 | ||
|
|
897df1464f | ||
|
|
06ca8bb8d6 | ||
|
|
cfb922eacc | ||
|
|
e00ab844ac | ||
|
|
a7684f9aaa | ||
|
|
bc532b2897 | ||
|
|
2b30798947 | ||
|
|
6a7d01ec61 | ||
|
|
aa92bc6044 | ||
|
|
febc5e8dfc | ||
|
|
7aed5ead71 | ||
|
|
151739af64 | ||
|
|
1add88c582 | ||
|
|
dca075e463 | ||
|
|
2f52562d4f | ||
|
|
0edc507181 | ||
|
|
cb03ca33c0 | ||
|
|
50b945fca5 | ||
|
|
2e8b8c7700 | ||
|
|
e2eb08af71 | ||
|
|
483cc1a41f | ||
|
|
adab27e955 | ||
|
|
6c3765168b | ||
|
|
e2ed296e94 | ||
|
|
43e5ee938a | ||
|
|
e69e98877a | ||
|
|
1cb652450e | ||
|
|
b88bea2774 | ||
|
|
f814e25cd8 | ||
|
|
d68cc2b8cd | ||
|
|
df3a04ff65 | ||
|
|
a6a6697c13 | ||
|
|
d2f39c830f | ||
|
|
34e032e567 | ||
|
|
af653b483b | ||
|
|
b621d08f4a | ||
|
|
91de9c3719 | ||
|
|
266a33fbe7 | ||
|
|
c0ea39b2d6 | ||
|
|
d7c5179cb2 | ||
|
|
dbe0577640 | ||
|
|
af70c73dcf | ||
|
|
5d77c9903f | ||
|
|
59af8f7ea8 | ||
|
|
be149e5918 | ||
|
|
fedbec797e | ||
|
|
9e3a398571 | ||
|
|
170f6075a1 | ||
|
|
f265becc38 | ||
|
|
ccc7255252 | ||
|
|
cd8981fa4b | ||
|
|
c1cf0c392a | ||
|
|
a8426777d4 | ||
|
|
4f3228c1cc | ||
|
|
2c425e442f | ||
|
|
2c09768a7c | ||
|
|
1efc648ec1 | ||
|
|
8599efdc84 | ||
|
|
8171eef6ce | ||
|
|
714d056936 | ||
|
|
b415a5dc91 | ||
|
|
f3138e4011 | ||
|
|
2962d0c78a | ||
|
|
500abbf531 | ||
|
|
9deca5ed3b | ||
|
|
28a0061cbf | ||
|
|
244f8f450a | ||
|
|
b7c320ab07 | ||
|
|
7d3b0290b8 | ||
|
|
6aca35f5ef | ||
|
|
2d337c0b86 | ||
|
|
ad3903d69f | ||
|
|
0fd2755b2d | ||
|
|
192e07c742 | ||
|
|
6195eddf66 | ||
|
|
400cc93483 | ||
|
|
d3db0f7d01 | ||
|
|
6958993879 | ||
|
|
f907e73a74 | ||
|
|
81918784ee | ||
|
|
05afe78770 | ||
|
|
6de48fe73b | ||
|
|
10b45d730e | ||
|
|
c472ce8fe7 | ||
|
|
e44e3d645e | ||
|
|
203a062db9 | ||
|
|
e9b60cc8ef | ||
|
|
67402210bd | ||
|
|
85ca6f7891 | ||
|
|
7cd4a73e4a | ||
|
|
c79a25d626 | ||
|
|
46fa64be6e | ||
|
|
c9866ad0aa | ||
|
|
bda714c5f4 | ||
|
|
866abd70e2 | ||
|
|
3921d48ab8 | ||
|
|
5aaa18a3ba | ||
|
|
856d3d578e | ||
|
|
ed204851f7 | ||
|
|
4b3e1fe6bf | ||
|
|
60976a8a9d | ||
|
|
77165fb514 | ||
|
|
c720502ac9 | ||
|
|
5c6fb36c72 | ||
|
|
c0c6bae9c8 | ||
|
|
09ee06aead | ||
|
|
ffb0cad5a6 | ||
|
|
4cda6b53b4 | ||
|
|
9c9225173b | ||
|
|
e36affda3a | ||
|
|
913fe3e70b | ||
|
|
28783cbcd0 | ||
|
|
44d2993bc3 | ||
|
|
6bcf280a36 | ||
|
|
726fef391c | ||
|
|
004900840b | ||
|
|
91ed885051 | ||
|
|
84b02c1a8f | ||
|
|
72ebbb608f | ||
|
|
6594be4e6d | ||
|
|
4e426ccecd | ||
|
|
2a6da5d6f1 | ||
|
|
339e5c416c | ||
|
|
a93abb929c | ||
|
|
b2ba55ae18 | ||
|
|
4adba32a0d | ||
|
|
bb95b6dced | ||
|
|
10b3252091 | ||
|
|
11c71516de | ||
|
|
fcccc24e23 | ||
|
|
876b85a756 | ||
|
|
8c6910d366 | ||
|
|
9e41b7ec74 | ||
|
|
aa7ae681b0 | ||
|
|
1dc5cb17b9 | ||
|
|
fb551ca201 | ||
|
|
b2cc52a35e | ||
|
|
33792aae6e | ||
|
|
e9a71ceeb4 | ||
|
|
2eb361050d | ||
|
|
98833b0ff9 | ||
|
|
93537be4a8 | ||
|
|
1b239ee0eb | ||
|
|
cdbd5a9c22 | ||
|
|
e8014227ca | ||
|
|
5195d4cfc0 | ||
|
|
72e6c4348f | ||
|
|
5ef88c7ac5 | ||
|
|
5c538ee58e | ||
|
|
75416f91c2 | ||
|
|
a26ebb5aa7 | ||
|
|
d04a876547 | ||
|
|
cf13915eb7 | ||
|
|
1915761fde | ||
|
|
65a2ace011 | ||
|
|
3cc7f9d629 | ||
|
|
9c1a912c8a | ||
|
|
981441bd4f | ||
|
|
c842bdee36 | ||
|
|
1018fa070e | ||
|
|
9b5c149aec | ||
|
|
7f33ba9dd9 | ||
|
|
b2810b60d6 | ||
|
|
68016bf599 | ||
|
|
e8df4f6375 | ||
|
|
77581d9878 | ||
|
|
39dffe4aa0 | ||
|
|
85de469f3d | ||
|
|
78bfcc7744 | ||
|
|
e796ecc0a2 | ||
|
|
43ab67e8a3 | ||
|
|
352db0d1d5 | ||
|
|
82d15cacb4 | ||
|
|
eaf6f3104e | ||
|
|
cad2588a50 | ||
|
|
b2794569ee | ||
|
|
b71d3cacdc | ||
|
|
3064d4052d | ||
|
|
bca39d3b1e | ||
|
|
6297dcd141 | ||
|
|
34a6a36d40 | ||
|
|
60a8df88d7 | ||
|
|
14367a46dd | ||
|
|
e396af4615 | ||
|
|
38910ee49d | ||
|
|
e212862a20 | ||
|
|
5ad2fa6d9c | ||
|
|
6d6fe4d6fe | ||
|
|
df12c40dca | ||
|
|
e802a9c910 | ||
|
|
5367deb9e7 | ||
|
|
e1309ef9d6 | ||
|
|
c8fafc3e01 | ||
|
|
a625dc3965 | ||
|
|
b74156c766 | ||
|
|
d127318010 | ||
|
|
45982eab2c | ||
|
|
2007e3095d | ||
|
|
aa40261df4 | ||
|
|
8b540999cf | ||
|
|
3eb0642aba | ||
|
|
c069366220 | ||
|
|
70292a398b | ||
|
|
5671e092b3 | ||
|
|
33b1f7ac3a | ||
|
|
daa30f4735 | ||
|
|
1b431c9b78 | ||
|
|
33bc8c4d79 | ||
|
|
8f1f6f47ba | ||
|
|
9a06c42fc4 | ||
|
|
28fdafd85b | ||
|
|
2c25334dab | ||
|
|
a387d1d5f6 | ||
|
|
8302a4cdf2 | ||
|
|
e2f8e143d5 | ||
|
|
0e5ece6919 | ||
|
|
57045a4722 | ||
|
|
0243e76a79 | ||
|
|
2930bfc0c1 | ||
|
|
ccac5f0c5a | ||
|
|
83cd9cde53 | ||
|
|
a02e1fed0c | ||
|
|
950c405b0f | ||
|
|
794b145a19 | ||
|
|
265528cc6c | ||
|
|
cb96c08125 | ||
|
|
210cff6e1f | ||
|
|
1cc6caed3e | ||
|
|
fe75e1b8d3 | ||
|
|
81f764072e | ||
|
|
341c7420f0 | ||
|
|
26bab89059 | ||
|
|
b741b03a5a | ||
|
|
c79b907d10 | ||
|
|
65c55cae96 | ||
|
|
93512315cf | ||
|
|
a3a8c702a3 | ||
|
|
c1c4fa1ec2 | ||
|
|
6d58b9ec58 | ||
|
|
819f5a345f | ||
|
|
c40860f8f6 | ||
|
|
f8369d1fa5 | ||
|
|
91ce9a2e72 | ||
|
|
e62e81ba8c | ||
|
|
b8c9c45df8 | ||
|
|
51911d4ec6 | ||
|
|
dadd38c671 | ||
|
|
198a9c8cb5 | ||
|
|
da054d8c15 | ||
|
|
eb38dedfbc | ||
|
|
17afb2ed9b | ||
|
|
c4e80b0dd1 | ||
|
|
3d0215ea34 | ||
|
|
1487ef693e | ||
|
|
0262f45d79 | ||
|
|
77ed335185 | ||
|
|
be7cc439dd | ||
|
|
28f2d4e814 | ||
|
|
9f1f45ea46 | ||
|
|
c2c1f1eb56 | ||
|
|
c116a126b9 | ||
|
|
06095010a1 | ||
|
|
a5d23fa8b3 | ||
|
|
2d7a230c66 | ||
|
|
346f3b40cf | ||
|
|
952aca77a6 | ||
|
|
fa79dd6751 | ||
|
|
096e9b19f9 | ||
|
|
381b6f1ebb | ||
|
|
b2a92a5345 | ||
|
|
6b3d5687da | ||
|
|
17531924e3 | ||
|
|
85042b357c | ||
|
|
6b1339c66f | ||
|
|
a408c4a9d1 | ||
|
|
cdc917879e | ||
|
|
5177a232f1 | ||
|
|
268e4491ad | ||
|
|
0745874cc4 | ||
|
|
6c35614385 | ||
|
|
3a1f655546 | ||
|
|
72e4a89785 | ||
|
|
e3a727ab22 | ||
|
|
4d9bb76591 | ||
|
|
810b4b2318 | ||
|
|
bd742a07d0 | ||
|
|
23cb51f860 | ||
|
|
a0b778a04f | ||
|
|
c3b1984cf2 | ||
|
|
66103dd4cf | ||
|
|
15796a43be | ||
|
|
b453e49a64 | ||
|
|
bdde5eb6c0 | ||
|
|
821b52ec63 | ||
|
|
64444c3470 | ||
|
|
15821ea1f0 | ||
|
|
4da2ade4ab | ||
|
|
e58f09a3a2 | ||
|
|
0c20455042 | ||
|
|
128dd6e5b6 | ||
|
|
2df0a310e8 | ||
|
|
854a1cf640 | ||
|
|
cbd0a13cc2 | ||
|
|
6be6743775 | ||
|
|
440e3d7fe4 | ||
|
|
718092ace9 | ||
|
|
b04f04c2d5 | ||
|
|
f0f16e38a5 | ||
|
|
3f4feeb0f7 | ||
|
|
63278cc96d | ||
|
|
72bfd2bba1 | ||
|
|
dfa7dcd7d1 | ||
|
|
63fae5d61b | ||
|
|
b28a8ab0d9 | ||
|
|
f398aabf4f | ||
|
|
f066941cc3 | ||
|
|
9dcc700e9b | ||
|
|
ea7591ceb7 | ||
|
|
1da581452c | ||
|
|
b8d82a392c | ||
|
|
b34b315b1e | ||
|
|
1b8d03bcec | ||
|
|
30df230ca0 | ||
|
|
2bdac9ff23 | ||
|
|
c2a8895543 | ||
|
|
1aa25005bd | ||
|
|
9d4528e27a | ||
|
|
f18ce1d48f | ||
|
|
2f30892999 | ||
|
|
e8db8da7ba | ||
|
|
a06259edc8 | ||
|
|
781b70e8f6 | ||
|
|
72a70777eb | ||
|
|
a69df82208 | ||
|
|
aa99c2edcc | ||
|
|
5cad9df360 | ||
|
|
6d2d918871 | ||
|
|
efbe2a31c0 | ||
|
|
c087cba6d5 | ||
|
|
547d561ec0 | ||
|
|
04909358f2 | ||
|
|
5f0dc4802f | ||
|
|
3349f59a56 | ||
|
|
bc2f767e74 | ||
|
|
012d8753ea | ||
|
|
acb1ad4b9e | ||
|
|
d813976707 | ||
|
|
4fe82568f8 | ||
|
|
4e0359d11f | ||
|
|
52b60d37b1 | ||
|
|
cc5a32b8f2 | ||
|
|
2dd4763647 | ||
|
|
eb83e65c9e | ||
|
|
f998415be5 | ||
|
|
5bf8673afe | ||
|
|
4838dd1e7d | ||
|
|
f7708e260d | ||
|
|
8a2f7c2b73 | ||
|
|
51646007b4 | ||
|
|
cf7a3205de | ||
|
|
bb854a1d37 | ||
|
|
b975015b12 | ||
|
|
a4e1c42dcd | ||
|
|
8c2eea0b3d | ||
|
|
f7f37fe584 | ||
|
|
44577e9e47 | ||
|
|
c34180e2df | ||
|
|
a42443d9ff | ||
|
|
5250b2df7d | ||
|
|
0b1b0d1e17 | ||
|
|
fa79519688 | ||
|
|
8c51f5404f | ||
|
|
d58225f757 | ||
|
|
413b04d360 | ||
|
|
db1f8f193e | ||
|
|
2a1ea43f4f | ||
|
|
4e4824afab | ||
|
|
7f0542b133 | ||
|
|
9f187b5dd0 |
No files matched your search
@@ -1,3 +1,146 @@
|
||||
2003-02-17 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/provider-factory: add new web page
|
||||
about Mono.Data's ProviderFactory
|
||||
|
||||
* doc/web/commands
|
||||
* doc/web/makefile: add provider-factory web page to build
|
||||
|
||||
* doc/ado-net
|
||||
* doc/ibmdb2
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/tdsclient
|
||||
* doc/sybase
|
||||
* doc/mysql
|
||||
* doc/firebird
|
||||
* doc/oracle
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/sqlite: updated web pages
|
||||
|
||||
2003-02-16 Martin Baulig <[email protected]>
|
||||
|
||||
* doc/jit-debug-sample
|
||||
* doc/jit-debug-sample2: Removed.
|
||||
|
||||
* doc/jit-debug: Updated.
|
||||
|
||||
2003-02-13 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/screenshots
|
||||
* doc/ado-net
|
||||
* doc/oracle
|
||||
* doc/gtk-sharp: update web pages
|
||||
|
||||
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added sample globalization section.
|
||||
|
||||
2003-02-12 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added UrlAuthorizationModule and
|
||||
AuthenticationConfigHandler.
|
||||
|
||||
2003-02-11 Tim Coleman <[email protected]>
|
||||
* data/config.in: Add mapping for Oracle call interface
|
||||
(OCI) native libraries.
|
||||
|
||||
2003-02-04 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: added check for sys/un.h.
|
||||
|
||||
2003-01-29 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/postgresql
|
||||
* doc/mysql
|
||||
* doc/ado-net: updates to web pages
|
||||
|
||||
* man/sqlsharp.1: update to man page
|
||||
|
||||
2003-01-28 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: added WIN32_THREADS flag when building under windows.
|
||||
It seems that the header files of the gc do not always define it when
|
||||
GC_WIN32_THREADS is defined.
|
||||
|
||||
2003-01-26 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/index
|
||||
* doc/ado-net
|
||||
* doc/firebird
|
||||
* doc/ibmdb2
|
||||
* doc/mysql
|
||||
* doc/odbc
|
||||
* doc/oledb
|
||||
* doc/oracle
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/sqlite
|
||||
* doc/sybase
|
||||
* doc/tdsclient: corrections
|
||||
|
||||
2003-01-26 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/jit-debug: Update the links. Thanks for Andy Oliver for the report.
|
||||
|
||||
2003-01-22 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Set version number to 0.19.1.
|
||||
|
||||
Heads up: I'm going to commit some changes to the debugger
|
||||
which'll require you to use this new runtime, so if you update the
|
||||
debugger from CVS, you also need this new runtime.
|
||||
|
||||
2003-01-20 Duncan Mak <[email protected]>
|
||||
|
||||
* configure.in: Bump the release number to 0.19.
|
||||
|
||||
2003-01-19 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/ibmdb2: added file which is new web page
|
||||
about IBM DB2 data provider at Mono.Data.DB2Client
|
||||
|
||||
* makefile
|
||||
* commands: added ibmdb2 web page to go-mono web site
|
||||
|
||||
* doc/ado-net: added a couple more developers email, plus made the
|
||||
email spam resistant, added Mono's DB2 data provider to list,
|
||||
added more info about the ProviderFactory and retrieving data using
|
||||
ADO.NET from ASP.NET, add notes about testing, misc cleanup
|
||||
|
||||
* doc/mysql
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/oracle
|
||||
* doc/tdsclient
|
||||
* doc/firebird
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/sybase
|
||||
* doc/sqlite: added testing notes and C# examples
|
||||
|
||||
* doc/gtk-sharp: added links for GTK# for Windows
|
||||
|
||||
* man/sqlsharp.1: added providers Npgsql and MySQLNet
|
||||
|
||||
2003-01-17 Duncan Mak <[email protected]>
|
||||
|
||||
* runtime/Makefile.am: Add the new Mono.Data.DB2Client.dll.
|
||||
|
||||
2003-01-16 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Removed the gthread
|
||||
check again, we're now using the mono/io-layer for this.
|
||||
|
||||
Wed Jan 15 16:20:54 CET 2003 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: allow MacOSX (from various people).
|
||||
|
||||
2003-01-14 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Added check for gthread.
|
||||
|
||||
2002-12-27 Jeroen Janssen <[email protected]>
|
||||
* fixed url for System.Windows.Forms in the class status
|
||||
|
||||
|
||||
@@ -1,3 +1,193 @@
|
||||
Hello everyone!
|
||||
|
||||
We have made a new release of Mono available. Despite the fact
|
||||
that we just did Mono 0.18, this release is packed with new features.
|
||||
|
||||
* Availability.
|
||||
|
||||
Mono 0.19 is available in package format from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
We released packages for SuSE 8.0, Mandrake 8.2, Debian and various
|
||||
Red Hat releases. It is also available from Red Carpet on the Mono
|
||||
channel.
|
||||
|
||||
Source code for Mono, MCS, the Mono Debugger, XSP is available as
|
||||
well from that web page.
|
||||
|
||||
* New in this release
|
||||
|
||||
* Remoting news:
|
||||
|
||||
Lluis has implemented and documented the Binary formatter
|
||||
Woohoo! He has done a lot of work as well to support
|
||||
remoting.
|
||||
|
||||
Patrik has also been working heavily on fixing a
|
||||
number of remoting related bugs and missing features.
|
||||
|
||||
Ajay also implemented 1-d array serialization in System.Xml
|
||||
|
||||
* New database provider: IBM DB2
|
||||
|
||||
Christopher Bockner has contributed a DB2 data
|
||||
provider for System.Data. We have a very complete
|
||||
range of data providers.
|
||||
|
||||
* System.Web.Mobile
|
||||
|
||||
Gaurav has started work on this assembly, this will
|
||||
allow us to run the unmodified reference ASP.NET
|
||||
applications that were designed to support Mobile
|
||||
browsing.
|
||||
|
||||
* System.Data and System.XML:
|
||||
|
||||
More implementation work on XmlDataDocument from Ville
|
||||
and plenty of fixes from Atsushi.
|
||||
|
||||
* MacOS patches:
|
||||
|
||||
Paolo integrated John Duncan's and Benjamin Reed
|
||||
patches to make Mono run on MacOS X out of the box.
|
||||
|
||||
* IsolatedStorage
|
||||
|
||||
The initial implementation of it was done by Jonathan
|
||||
Pryor and included in this release.
|
||||
|
||||
* Compilers:
|
||||
|
||||
More work on the Mono Visual Basic compiler (it is now
|
||||
included in the packages).
|
||||
|
||||
Plenty of bug fixes from Jackson, Miguel to the C#
|
||||
compiler.
|
||||
|
||||
Patches from Francesco and Daniel to the VB.NET
|
||||
support runtime.
|
||||
|
||||
* Debugger support
|
||||
|
||||
Plenty of updates to run the new Mono Debugger from Martin.
|
||||
|
||||
* Main missing bits:
|
||||
|
||||
Some of everyone's favorite patches or code chunks have not yet
|
||||
been integrated, hopefully Mono 0.20 will have them:
|
||||
|
||||
* Zoltan's patch to run IKVM is not yet on this release
|
||||
|
||||
* Some parts of Patrik's remoting code did not make it to the
|
||||
release either.
|
||||
|
||||
* Reggie's MySQL native provider is also missing.
|
||||
|
||||
Enjoy!
|
||||
Miguel.
|
||||
------------------------------------------------------------------------------
|
||||
Happy new year!
|
||||
|
||||
The Mono team is proud to release Mono 0.18, with plenty of bug
|
||||
fixes and improvements. If you are a happy 0.17 user, this
|
||||
release is a happiness extension release. Many bugs in the
|
||||
runtime, class libraries and C# compiler have been fixed.
|
||||
|
||||
Also, our special envoy in Japan has reported that there is
|
||||
some naming confussion about the naming of Mono, as can be
|
||||
seen in the following documentary material:
|
||||
|
||||
Atsushi Enomoto shows the source of confussion:
|
||||
|
||||
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0702
|
||||
|
||||
Nick and Duncan echo it:
|
||||
|
||||
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0703
|
||||
|
||||
* Availability
|
||||
|
||||
Mono 0.18 packages and source code is available for download from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
Those using Red Carpet on Linux can install Mono 0.18 from
|
||||
the Mono channel. The packages have already been pushed for
|
||||
you.
|
||||
|
||||
At release time we have packages for Red Hat 8.0, 7.3,
|
||||
7.2 and 7.1 and Mandrake 8.2.
|
||||
|
||||
* Contributors to this release
|
||||
|
||||
This release is brought to you by:
|
||||
|
||||
Alejandro Sanchez, Alp Toker, Atsushi Enomoto, Cesar Octavio
|
||||
Lopez Netaren, Daniel Lopez (mod_mono), Daniel Morgan, Dennis
|
||||
Hayes, Dick Porter, Dietmar Maurer, Duncan Mak, Eduardo
|
||||
Garcia, Gaurav Vaish, Gonzalo Paniagua, Jackson Harper, Jaime
|
||||
Anguiano, Jeroen Janssen, Johannes Roith, Jonathan Pryor, Juli
|
||||
Mallett, Lluis Sanchez, Marco Ridoni, Martin Baulig, Miguel de
|
||||
Icaza, Nick Drochak, Paolo Molaro, Patrik Torstensson, Piers
|
||||
Haken, Rachel Hestilow, Rafael Teixeira, Ravi Pratap,
|
||||
Sebastian Pouliot, Tim Coleman, Tim Hayes, Ville Palo, Zoltan
|
||||
Varga.
|
||||
|
||||
* New in this release
|
||||
|
||||
VB.NET compiler:
|
||||
|
||||
Many improvements to the Mono VB.NET compiler.
|
||||
|
||||
ASP.NET:
|
||||
|
||||
Plenty of bug fixes in ASP.NET. Larger applications
|
||||
can now be run with it. The authentication system has
|
||||
been deployed, most changes are from Gonzalo.
|
||||
|
||||
We have a modified IBuySpy running (without Xslt)
|
||||
|
||||
If you want to run ASP.NET you can run it with either
|
||||
our XSP proof-of-concept server, or with Daniel's
|
||||
Apache module that can be fetched from CVS (module
|
||||
name: mod_apache)
|
||||
|
||||
Type Reflector:
|
||||
|
||||
A Console, Gtk# and Windows.Forms tool to browse
|
||||
compiled assemblies and examine the types on it, from
|
||||
Jonathan Pryor.
|
||||
|
||||
Moving to NUnit 2.0
|
||||
|
||||
Nick continues the work on moving our test suite to NUnit 2.0
|
||||
|
||||
Mobile.Controls:
|
||||
|
||||
Gaurav has started work on the Mobile controls, which
|
||||
are required to run some of the reference applications
|
||||
in full-mode like IBuySpy.
|
||||
|
||||
Remoting:
|
||||
|
||||
The remoting infrastructure has got a big boost from
|
||||
Lluis in this release.
|
||||
|
||||
System.Data/XML
|
||||
|
||||
Ville has been working on improving our System.Data
|
||||
classes in the XML assembly.
|
||||
|
||||
Crypto:
|
||||
|
||||
Plenty of new crypto from Sebastien as well. A new
|
||||
web page in our site can be used to track this.
|
||||
|
||||
http://www.go-mono.com/crypto.html
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Hello!
|
||||
|
||||
Version 0.17 of Mono has been released.
|
||||
@@ -106,7 +296,13 @@ Hello!
|
||||
Many regression tests have been added as well (Ville has been
|
||||
doing a great job here).
|
||||
|
||||
Brian also created a DB provider multiplexor (The ProviderFactory)
|
||||
|
||||
Stuart Caborn contributed Writing XML from a DataSet.
|
||||
Luis Fernandez contributed constraint handling code.
|
||||
|
||||
Also there is new a Gtk# GUI tool from Dan that can be used to
|
||||
try out various providers.
|
||||
|
||||
* System.XML:
|
||||
|
||||
|
||||
+20
-4
@@ -1,7 +1,7 @@
|
||||
AC_INIT(README)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono, 0.17)
|
||||
AM_INIT_AUTOMAKE(mono, 0.20)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
#
|
||||
@@ -9,7 +9,9 @@ AM_MAINTAINER_MODE
|
||||
# compiling code that will embed Mono
|
||||
#
|
||||
libmono_cflags=""
|
||||
libmono_ldflags=""
|
||||
AC_SUBST(libmono_cflags)
|
||||
AC_SUBST(libmono_ldflags)
|
||||
|
||||
# Thread configuration inspired by sleepycat's db
|
||||
AC_MSG_CHECKING([host platform characteristics])
|
||||
@@ -19,7 +21,7 @@ case "$host" in
|
||||
AC_DEFINE(PLATFORM_WIN32)
|
||||
CC="gcc -mno-cygwin"
|
||||
HOST_CC="gcc"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
|
||||
libdl=
|
||||
;;
|
||||
*-*-*bsd*)
|
||||
@@ -27,6 +29,7 @@ case "$host" in
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
@@ -35,6 +38,7 @@ case "$host" in
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
|
||||
libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
|
||||
libmono_ldflags="-lpthread"
|
||||
libdl="-ldl"
|
||||
;;
|
||||
*-*-solaris*)
|
||||
@@ -43,6 +47,16 @@ case "$host" in
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([*** Please add $host to configure.in checks!])
|
||||
platform_win32=no
|
||||
@@ -81,7 +95,7 @@ AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h)
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
|
||||
|
||||
# for mono/metadata/debug-symfile.c
|
||||
AC_CHECK_HEADERS(elf.h)
|
||||
@@ -487,7 +501,7 @@ i*86-*-*) TARGET=X86; arch_target=x86;;
|
||||
sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
|
||||
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
|
||||
#m68k-*-linux*) TARGET=M68K;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv* | powerpc-*-darwin*) TARGET=POWERPC; arch_target=ppc;;
|
||||
arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
|
||||
s390-*-linux*) TARGET=S390; arch_target=s390; ACCESS_UNALIGNED="no";;
|
||||
esac
|
||||
@@ -517,6 +531,7 @@ AC_SUBST(LIBC)
|
||||
AC_SUBST(arch_target)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
@@ -535,6 +550,7 @@ mono/arch/ppc/Makefile
|
||||
mono/arch/sparc/Makefile
|
||||
mono/arch/s390/Makefile
|
||||
mono/arch/arm/Makefile
|
||||
mono/arch/alpha/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/benchmark/Makefile
|
||||
|
||||
+3
-1
@@ -9,6 +9,8 @@
|
||||
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0.so" />
|
||||
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so" />
|
||||
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so" />
|
||||
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk-pixbuf-2.0.so" />
|
||||
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so" />
|
||||
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
|
||||
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
|
||||
<dllmap dll="oci" target="clntsh" />
|
||||
</configuration>
|
||||
+27
-11
@@ -7,23 +7,32 @@
|
||||
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System" />
|
||||
<sectionGroup name="system.web">
|
||||
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
|
||||
<section name="httpModules" type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
|
||||
<section name="machineKey" type="System.Web.Configuration.MachineKeyConfigHandler, System.Web" />
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationConfigHandler, System.Web" />
|
||||
<section name="httpHandlers"
|
||||
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
|
||||
<section name="httpModules"
|
||||
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
|
||||
<section name="machineKey"
|
||||
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web" />
|
||||
<section name="authentication"
|
||||
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web" />
|
||||
<section name="authorization"
|
||||
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web" />
|
||||
<section name="globalization"
|
||||
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler" />
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web" />
|
||||
</httpHandlers>
|
||||
<httpModules>
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web" />
|
||||
</httpModules>
|
||||
<authentication mode="Forms">
|
||||
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
|
||||
@@ -33,6 +42,13 @@
|
||||
</forms>
|
||||
</authentication>
|
||||
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
|
||||
<!-- Sample globalization settings
|
||||
<globalization requestEncoding="iso-8859-1"
|
||||
responseEncoding="iso-8859-1"
|
||||
fileEncoding="iso-8859-1"
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
</system.web>
|
||||
|
||||
<appSettings>
|
||||
|
||||
+30
@@ -15,3 +15,33 @@ To publish changes:
|
||||
|
||||
cd web
|
||||
make push
|
||||
|
||||
############## Samples
|
||||
|
||||
|
||||
If you want to add a new item in the left menu
|
||||
you have to edit mono/doc/web/commands and add
|
||||
the entry there.
|
||||
|
||||
For new files you can add something as:
|
||||
level,entry,path_to_the_file,file.src
|
||||
|
||||
ex: 1,COBOL#,cobol.html,cobol.src
|
||||
|
||||
If you just want to add a link to the menu:
|
||||
1,MyEntry,URL
|
||||
|
||||
ex: 1,About Linux,http://www.linux.org
|
||||
|
||||
To test the results under Linux:
|
||||
1. Edit mono/doc/web/makefile
|
||||
|
||||
Delete all the references to class status
|
||||
and the deploy/index.rss as well as the
|
||||
mono.exe commands.
|
||||
|
||||
2. make
|
||||
3. Open your browser and point to the
|
||||
file:///(YOUR PATH HERE)mono/doc/web/deploy/index.html
|
||||
|
||||
|
||||
+356
-106
@@ -1,81 +1,235 @@
|
||||
* ADO.NET
|
||||
|
||||
The coordinator for the ADO.NET implementation is
|
||||
<a href="mailto:[email protected]">Rodrigo Moya</a>,
|
||||
with the collaboration of:
|
||||
<a href="mailto:[email protected]">Daniel Morgan</a>,
|
||||
<a href="mailto:[email protected]">Tim Coleman</a>,
|
||||
<a href="mailto:[email protected]">Brian Ritchie</a>, and
|
||||
<a href="mailto:[email protected]">Vladimir Vukicevic</a>.
|
||||
<p>Mono's ADO.NET Developers:
|
||||
|
||||
<table border=1>
|
||||
|
||||
<tr>
|
||||
<td><b>Developer</b></td>
|
||||
<td><b>Email</b></td>
|
||||
<td><b>Contribution</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Rodrigo Moya</td>
|
||||
<td>rodrigo -AT-<br> ximian.comNOSPAM</td>
|
||||
<td>ADO.NET coordinator,<br> OLE DB provider,<br> and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Daniel Morgan</td>
|
||||
<td>danmorg -AT-<br> sc.rr.comNOSPAM</td>
|
||||
<td>MySQL, PostgreSQL, <br>Oracle providers,<br> and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tim Coleman</td>
|
||||
<td>tim -AT- <br>timcoleman.comNOSPAM</td>
|
||||
<td>Microsoft SQL Server, <br>Sybase, <br>TDS providers,<br> Oracle,
|
||||
<br>and tests.<br>
|
||||
He has
|
||||
contributed <br>to other parts <br>of Mono too, <br>such as,
|
||||
<br>EnterpriseServices,
|
||||
XML, <br>and WebServices.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Brian Ritchie</td>
|
||||
<td>brianlritchie -AT-<br> hotmail.comNOSPAM</td>
|
||||
<td>ODBC provider <br>and the ProviderFactory <br>in Mono.Data</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Vladimir Vukicevic</td>
|
||||
<td>vladimir -AT-<br> pobox.comNOSPAM</td>
|
||||
<td>SQL Lite provider. <br> He has contributed to GTK# <br>and mPhoto too.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Christopher Bockner</td>
|
||||
<td>cleared -AT-<br> rogers.comNOSPAM</td>
|
||||
<td>IBM DB2 Universal <br>Database provider</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Ville Palo</td>
|
||||
<td>vi64pa -AT-<br> koti.soon.fiNOSPAM</td>
|
||||
<td>XML stuff <br>in System.Data <br>including DataSet <br>
|
||||
and XmlDataDocument, <br>and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Gonzalo Paniagua Javier</td>
|
||||
<td>gonzalo -AT-<br> ximian.comNOSPAM</td>
|
||||
<td>Integration between <br>System.Web and <br>System.Data</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Gaurav Vaish</td>
|
||||
<td>gvaish -AT-<br> iitk.ac.inNOSPAM</td>
|
||||
<td>Web controls</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Phillip Jerkins</td>
|
||||
<td>Phillip.Jerkins -AT-<br> morgankeegan.comNOSPAM</td>
|
||||
<td>Named Instance support <br>in System.Data.SqlClient</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
** Bugs and Feature Requests
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Bugs with Mono or any data provider in Mono should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have a Bugzilla user account, it is free
|
||||
and easy to create
|
||||
one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
<li>Any RFE (Request For Enhancement) for features missing or new functionality
|
||||
should be entered as a bug in Bugzilla too</li>
|
||||
|
||||
* Action plan
|
||||
</ul>
|
||||
|
||||
** ADO.NET Data Providers
|
||||
|
||||
<p>List of ADO.NET Data Providers working in Mono:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/ibmdb2.html">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a></li>
|
||||
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a></li>
|
||||
<li><a href="http://www.go-mono.com/oracle.html">Oracle</a></li>
|
||||
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a></li>
|
||||
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a></li>
|
||||
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a></li>
|
||||
<li><a href="http://www.go-mono.com/sqlite.html">SQL Lite</a></li>
|
||||
<li><a href="http://www.go-mono.com/sybase.html">Sybase</a></li>
|
||||
<li><a href="http://www.go-mono.com/tdsclient.html">TDS Generic</a></li>
|
||||
</ul>
|
||||
|
||||
<p>The current plan to implement ADO.NET is as follows:
|
||||
<p>Providers which we do not have, but we would like to have. Currently,
|
||||
some of these databases are supported via the ODBC or OLE DB providers.
|
||||
|
||||
<ul>
|
||||
<li>Either create ADO.NET providers or modify pre-exiting ADO.NET providers to
|
||||
work with Mono
|
||||
|
||||
<ul>
|
||||
<li>Create ADO.NET Providers
|
||||
<ul>
|
||||
<li><a href="http://msdn.microsoft.com/library/en-us/dnsql2k/html/sqlxml_intromanagedclasses.asp?frame=true">Managed Classes for SqlXml</a> which is
|
||||
a .NET data provider for retrieving XML data from a Microsoft SQL Server 2000 database. The System.Data.SqlClient provider
|
||||
in Mono can be used as a starting point at mcs/class/System.Data/System.Data.SqlClient.</li>
|
||||
<li><a href="http://www.hughes.com.au/">miniSQL</a></li>
|
||||
<li><a href="http://www.sleepycat.com/">BerkeleyDB (Sleepycat)</a></li>
|
||||
<li><a href="http://www.sapdb.org/">SapDB</a></li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/informix/">Informix</a></li>
|
||||
<li><a href="http://msdn.microsoft.com/vfoxpro/">Foxpro</a></li>
|
||||
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a></li>
|
||||
<li>dbase or xbase type database files</li>
|
||||
<li>Others are welcome</li>
|
||||
</ul>
|
||||
|
||||
<p>External Projects that have created ADO.NET Providers that work on Mono:
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a></li> is a
|
||||
Firebird SQL Managed data provider. It can be used with Interbase databases too. It
|
||||
is written in 100%C# and does not require a client library. Works on .NET and Mono.</a>
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> is a
|
||||
PostgreSQL Managed data provider written
|
||||
in 100% C#, does not require a client library, and works on .NET and Mono</li>
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a
|
||||
MySQL Managed data provider written in 100% C#, does not
|
||||
require a client library, and works on .NET and Mono</li>
|
||||
</ul>
|
||||
|
||||
** Tools
|
||||
|
||||
<p>Some tools that can be used for ADO.NET and other technologies (ASP.NET, XML, etc).
|
||||
|
||||
<ul>
|
||||
<li><b>SQL# CLI</b> - a SQL query tool with a command-line interface.
|
||||
It can be used to enter and execute SQL statements or
|
||||
execute a batch of SQL commands from a file. It can
|
||||
be used to test connection strings, connect to various ADO.NET
|
||||
providers, save output to text, html, or xml. It is a work-in-progress.
|
||||
The SQL# CLI is distributed with the
|
||||
Mono runtime and class libraries as an executable assembly sqlsharp.exe.
|
||||
The source to SQL# CLI can be found in the mcs source at
|
||||
mcs/tools/SqlSharp/SqlSharpCli.cs
|
||||
</li>
|
||||
|
||||
<li><p><b>SQL# GUI - a graphical SQL query tool</b> allows a user
|
||||
to enter SQL commands in a top panel which is a text editor. It
|
||||
has a toolbar and menu for various tasks, such as, executing
|
||||
SQL commands one-at-a-time or in a batch. The results would appear
|
||||
in a bottom panel in a grid or could be saved to a file (xml, html, csv).
|
||||
Also, the bottom panel would allow logging of SQL command executed.
|
||||
Currently, there is a <a href="http://go-mono.com/images/sqlsharp.png">SQL# For GTK#</a> which
|
||||
provides a GUI interface using the <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> toolkit. SQL# For GTK#
|
||||
is a work-in-progress and can be found in the mcs source at
|
||||
mcs/tools/SqlSharp/gui/gtk-sharp</li>
|
||||
</ul>
|
||||
|
||||
<p>Tools we would like to have, but they have not been created yet:
|
||||
|
||||
<ul>
|
||||
<li><b>XML Schema Definition tool</b> <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpconxmlschemadefinitiontoolxsdexe.asp">xsd.exe</a> needs
|
||||
to be created. Maybe this TODO item should be at the System.XML web page instead.
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a>
|
||||
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a>
|
||||
<li><a href="http://www.go-mono.com/oracle.html">Oracle</a>
|
||||
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a>
|
||||
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a>
|
||||
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a>
|
||||
<li><a href="http://www.go-mono.com/sqlite.html">SQL Lite</a>
|
||||
<li><a href="http://www.go-mono.com/sybase.html">Sybase</a>
|
||||
<li><a href="http://www.go-mono.com/tdsclient.html">TDS Generic</a>
|
||||
<li>Providers which we do not have, but we would like to have. Currently,
|
||||
some of these databases are supported via the ODBC or OLEDB providers.
|
||||
<ul>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
|
||||
<li><a href="http://www.hughes.com.au/">miniSQL</a></li>
|
||||
<li><a href="http://www.sleepycat.com/">BerkeleyDB (Sleepycat)</a></li>
|
||||
<li><a href="http://www.sapdb.org/">SapDB</a></li>
|
||||
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a></li>
|
||||
<li>dbase or xbase type database files</li>
|
||||
<li>Others are welcome</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Modify Pre-existing ADO.NET Providers to work with Mono. This may
|
||||
require fixing or implementing areas of Mono too.
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a></li>
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> is a PostgreSQL Managed data provider written
|
||||
in 100% C# and does not require a client library </li>
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager data provider written in 100% C# and does not
|
||||
require a client library</li>
|
||||
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL data provider written in C#</li>
|
||||
|
||||
</ul>
|
||||
<li>This tool
|
||||
would work like the xsd.exe tool included with
|
||||
the .NET Framework. The Xsd.exe tools has the
|
||||
following uses:
|
||||
<ul>
|
||||
<li><b>XDR to XSD</b> - used to generate an XML schema from an XDR (XML Data Reduced schema) file.
|
||||
XDR was used by Microsoft prior to XSD becoming a W3C recommendation. So, this needs
|
||||
to be supported for legacy reasons</li>
|
||||
<li><b>XML to XSD</b> - used to generate an XML schema from an XML file</li>
|
||||
<li><b>XSD to DataSet</b> - used to generate DataSet classes from an XSD schema file. The
|
||||
DataSet classes created can then be used with XML data</li>
|
||||
<li><b>XSD to Classes</b> - used to generate classes from an XSD schema file. The
|
||||
classes created can be used with System.XML.Serialization.XMLSerializer
|
||||
to read and write XML code that follows the schema</li>
|
||||
<li><b>Classes to XSD</b> - used to generate an XML schema
|
||||
from type(s) in a assembly file. The
|
||||
XML schema created by the tool defines the XML format used
|
||||
by System.XML.Serialization.XMLSerializer</li>
|
||||
</ul>
|
||||
<li>Xsd.exe is used to manipulate XML schemas that
|
||||
follow the http://www.w3.org/XML/Schema">XML Schema Definition (XSD)</a> language
|
||||
recommended by the <a href="http://w3.org/">World Wide Web Consortium (W3C)</a></li>
|
||||
|
||||
<li>How this tool could be created:
|
||||
<ul>
|
||||
<li>Write xsd.exe in C# and run on Mono</li>
|
||||
<li>Make sure we have XML Schema support in System.Xml.Schema. Currently,
|
||||
it is wrapped around libxlst</li>
|
||||
<li>XML serialization support in System.Data classes</li>
|
||||
<li>Create the TypedDataSetGenerator class in System.Data</li>
|
||||
<li>Using CodeDOM or Reflection.Emit to create code</li>
|
||||
<li>Make sure DataSet, XmlDataDocument, and related classes
|
||||
are implemented fully</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Create Tools for Configuration, Testing, and Entering SQL Queries
|
||||
<ul>
|
||||
<li><b>SQL# CLI - a command-line tool</b> written in C# to
|
||||
execute SQL commands,
|
||||
test connection strings, and connect to various ADO.NET
|
||||
providers in Mono. The SQL# CLI can be found in
|
||||
mcs/tools/SqlSharp/SqlSharpCli.cs</li>
|
||||
<li><p><b>SQL# GUI - a GUI tool</b> written in C# to
|
||||
execute SQL commands.
|
||||
Currently, there is SQL# For GTK# which
|
||||
can be found at
|
||||
mcs/tools/SqlSharp/gui/gtk-sharp
|
||||
It has a SQL editor with
|
||||
syntax hi lighting of SQL keywords</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><b>Application XML Configuration File Editor</b> - a tool
|
||||
to create and edit an application configuration file, such as,
|
||||
we have a .net application named Accouting.exe, the tool could edit
|
||||
the application configuration file Accounting.exe.config so a user could
|
||||
connect to the database used by the program. This tool has not
|
||||
been created.</li>
|
||||
|
||||
<li><b>Configuration Command-Line and GUI Tools for ADO.NET</b>.
|
||||
These tools have not been started. The tools would be written in
|
||||
C# and run on Mono. The
|
||||
configuration tool can be used to do the following:
|
||||
<ul>
|
||||
<li>bebased on the Application XML Configuration File Editor</li>
|
||||
<li>setup DSNs for the ODBC and OLE-DB
|
||||
providers and configurations for
|
||||
their underlying libraries (unixODBC and libgda)</li>
|
||||
@@ -85,36 +239,85 @@
|
||||
freetds.conf for Microsoft SQL Server and Sybase</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
|
||||
<p>Variouls ADO.NET Providers have been created: PostgreSQL, MySQL, Sybase, SQL Lite,
|
||||
Microsoft SQL Server, OLE DB, ODBC, and TDS Generic. See their respective web page for
|
||||
more information.
|
||||
</ul>
|
||||
|
||||
** Extra Classes in Mono ADO.NET
|
||||
|
||||
<p>An ADO.NET <a href="http://www.go-mono.com/provider-factory.html">Provider Factory</a>
|
||||
was created by Brian Ritchie. The
|
||||
Provider Factory is a way to dynamically create
|
||||
connections, commands, parameters, and data adapters based on configuration
|
||||
information.
|
||||
|
||||
** Current Status
|
||||
|
||||
<p>Various ADO.NET Providers have been created at various stages of
|
||||
development including:
|
||||
Firebird/Interbase, IBM DB2 Universal Database, MySQL, ODBC, OLE DB, Oracle,
|
||||
PostgreSQL, SQL Lite, Sybase, Microsoft SQL Server, and TDS Generic.
|
||||
See their respective web page for more information.
|
||||
|
||||
<p><b>Data Relations</b> via DataRelation, DataRelationCollection, and
|
||||
other classes have not been implemented
|
||||
|
||||
<p><b>Constraints</b> need lots of work
|
||||
|
||||
<p><b>XML Schema Definition tool</b> xsd.exe that is included
|
||||
in the .NET Framework has not been created for Mono
|
||||
|
||||
<p><b>TypeDataSetGenerator</b> needs to be stubbed and implemented.
|
||||
|
||||
<p><b>DataSet, DataAdaptor, DataTable, DataRelation, DataRow, DataColumn,
|
||||
DataColumnCollection, DataRowCollection, and others</b> need more work. There are
|
||||
many classes that are just stubs and need to be implemented.
|
||||
many classes that are just stubs and need to be implemented. Ville Palo has been
|
||||
doing much testing here.
|
||||
|
||||
<p><b>XML support in System.Data</b> needs work. This involves working on
|
||||
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
|
||||
exists in a provider's class that implements IDbCommand, and others.
|
||||
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
|
||||
XML support in the ExecuteXmlReader() in a SqlCommand.
|
||||
|
||||
<p><b>ADO.NET Provider Factory</b> has been started by Brian Ritchie. The
|
||||
Provider Factory is used to dynamically create
|
||||
connections, commands, parameters, and data adapters based on configuration information. This
|
||||
provider factory can also provide utility functions needed by a lot of
|
||||
providers but are not exposed via the provider.
|
||||
XML support in the ExecuteXmlReader() in a SqlCommand. Ville Palo has been
|
||||
heavily modifying DataSet, XmlDataDocument, and other classes for reading
|
||||
and writing XML. XML Serialization support in DataSet needs to be implemented.
|
||||
|
||||
<p><b>Integration with ASP.NET</b> has not been started, such as, data binding
|
||||
to a System.Web.UI.WebControls.DataGrid. This may involve implementing many classes
|
||||
in System.Web and System.Data. Gonzalo, Gaurav, Leen, Patrik, Duncan, and others are
|
||||
working very hard on the ASP.NET support. If you want to help,
|
||||
contact <a href="mailto:[email protected]">Gonzalo Paniagua Javier</a>
|
||||
<p><b>Integration with ASP.NET</b> has been created. Data binding of
|
||||
a DataTable in a DataSet to a System.Web.UI.WebControls.DataGrid works. Data binding
|
||||
of other types works too.
|
||||
|
||||
<p><b>Database Access from ASP.NET</b>:
|
||||
<ul>
|
||||
<li>Take a look at xsp in cvs and look at the examples in test: dbpage1.aspx
|
||||
and dbpage2.aspx:
|
||||
<ul>
|
||||
<li>Notice that the namespace System.Data is imported via <b>import</b></li>
|
||||
<li>A NameValueCollection is gotten using ConfigurationSettings.AppSetings. These
|
||||
settings are gotten from the file server.exe.config which is a XML file. The XML
|
||||
file has a section appSettings. In the appSettings section, you have keys
|
||||
for DBProviderAssembly, DBConnectionType, and DBConnectionString.
|
||||
<ul>
|
||||
<li><b>DBProviderAssembly</b> is the assembly of the ADO.NET provider.
|
||||
For example:
|
||||
"Mono.Data.PostgreSqlClient"</li>
|
||||
<li><b>DBConnectionType</b> is the System.Type of the class that
|
||||
implements System.Data.IDbConnection that is found
|
||||
in the DBProviderAssembly.
|
||||
For example:
|
||||
"Mono.Data.PostgreSqlClient.PgConnection"</li>
|
||||
<li><b>DBConnectionString</b> is the ConnectionString to set to the
|
||||
IDbConnection object to use in opening a connection to a data source.
|
||||
For Example:
|
||||
"hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"</li>
|
||||
</ul>
|
||||
<li>The function GetConnectionData() gets the database provider assembly, connection type,
|
||||
and connection string parameters if they exist; otherwise, it uses default values. This is
|
||||
done during the loading of the web page.</li>
|
||||
<li>With the connection parameters, the assembly is loaded, the connection type is verified that
|
||||
it implements IDbConnection and an instance of the class can be created, creates a instance
|
||||
of the class, sets the connection string, and opens the connection.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><b>Integration with Windows.Forms</b> has not been started, such as, data binding
|
||||
to a System.Windows.Forms.DataGrid. This may involve implementing many classes
|
||||
@@ -124,33 +327,12 @@
|
||||
has not been started, such as, data binding
|
||||
to a GtkTreeView. This may involve creating new classes
|
||||
to go between the glist data model and the ADO.NET data model.
|
||||
Mike Kestner would be the best person to ask for help on GTK#.
|
||||
Mike Kestner or Rachel Hestilov would be the best people to ask for help on GTK#.
|
||||
|
||||
<p><b>Integration with QT#</b> has not been started. Any information on
|
||||
how this can be done is appreciated. Adam Treat would be the best
|
||||
person to ask about QT#.
|
||||
|
||||
<p><b>Integration with GDA#</b> has not been started. It is
|
||||
included in the GTK# project, GDA#
|
||||
does not require GTK+ nor GNOME. GDA# is C# bindings
|
||||
to <a href="http://www.gnome-db.org/">GDA</a> which
|
||||
is an ADO/OLE-DB like layer for Linux provided as a C library. Classes
|
||||
that would bind data between the ADO.NET data model and the GDA data model will
|
||||
need to be created. Rodrigo Moya is the best person to contact about this.
|
||||
|
||||
<p><b>Integration with GnomeDb#</b> has not been started. It is
|
||||
included in the GTK# project and uses GDA# for its data access model.
|
||||
Creating classes to bind data between the data model in ADO.NET
|
||||
and the data model that exists in GDA# and GnomeDb# will
|
||||
need to be started. GnomeDb# is C# bindings to
|
||||
<a href="http://www.gnome-db.org/">GnomeDb</a> which uses
|
||||
<a href="http://www.gnome-db.org/">GDA</a> as its data access layer. GnomeDb
|
||||
is a C API in a library that contains
|
||||
gtk+ widgets (GUI controls) for data access. There are some nifty widgets
|
||||
(GUI controls) that can be used, such as, GnomeDbGrid, GnomeDbBrowswer,
|
||||
GnomeDbSqlEditor, GnomeDbList, GnomeDbLogin, GnomeDbReportEditor, GnomeDbTableEditor,
|
||||
GnomeDbCombo, and GnomeDbForm. Rodrigo Moya is the best person to contact.
|
||||
|
||||
<p><b>Building System.Data</b>
|
||||
|
||||
<p>The System.Data.dll gets built with the rest of the class library.
|
||||
@@ -194,3 +376,71 @@
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Testing connection-oriented classes are done
|
||||
via the provider specific tests
|
||||
found in the mcs source at mcs/class</br>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Name</b></td>
|
||||
<td><b>Assembly /</br> Namespace</b></td>
|
||||
<td><b>Test</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Microsoft</br> SQL</br> Server</br></td>
|
||||
<td>System.Data /</br> System.Data.SqlClient</td>
|
||||
<td>SqlTest.cs at</br> System.Data/Test</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>PostgreSQL</br> (Mono)</td>
|
||||
<td>Mono.Data.PostgreSqlClient /</br> Mono.Data.PostgreSqlClient</td>
|
||||
<td>PostgresTest.cs at</br> System.Data/Test</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>MySQL</br> (Mono)</td>
|
||||
<td>Mono.Data.MySql /</br> Mono.Data.MySql</td>
|
||||
<td>MySqlTest.cs at</br> Mono.Data.MySql/Test</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Oracle</br> (Mono)</td>
|
||||
<td>System.Data.OracleClient /</br> System.Data.OracleClient</td>
|
||||
<td>TestOracleClient.cs at</br> System.Data.OracleClient</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>ODBC</br> (Mono)</td>
|
||||
<td>System.Data.OracleClient /</br> System.Data.OracleClient</td>
|
||||
<td>TestOracleClient.cs at</br> System.Data.OracleClient</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<li><a href="http://www.go-mono.com/testing.html">Testing non-connection classes</a> are
|
||||
done via mono's modified version of NUnit.
|
||||
<ul>
|
||||
<li>To run all the NUnit tests for Mono, you need the mcs source. cd to the root
|
||||
of the mcs source. To run it:
|
||||
<ul>
|
||||
<li>On Linux: make -f makefile test</li>
|
||||
<li>On Windows: make test</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If you just want to run the NUnit tests for System.Data, you would cd into
|
||||
the mcs source at class/System.Data/Test and run it:
|
||||
<ul>
|
||||
<li>On Linux: make -f makefile test</li>
|
||||
<li>On Windows: make test</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+33
-56
@@ -9,8 +9,8 @@
|
||||
|
||||
There is work underway for both systems. The Web Forms
|
||||
support is more advanced at this point, and various ".aspx"
|
||||
programs can be run using the Mono runtime and the XSP page
|
||||
parser.
|
||||
programs can be run using the Mono runtime (embedded into
|
||||
either the XSP server or the mod_mono Apache module).
|
||||
|
||||
We are now working bug fixing and adding missing features
|
||||
after making the whole pipeline compatible with MS.
|
||||
@@ -21,41 +21,6 @@
|
||||
Web Services support. Work for the supporting class libraries
|
||||
just started recently.
|
||||
|
||||
* Web Forms: The pieces
|
||||
|
||||
There are a couple of components to the puzzle:
|
||||
|
||||
<ul>
|
||||
* .aspx page parser (converts .aspx to C# code).
|
||||
|
||||
* System.Web.HttpRuntime support.
|
||||
|
||||
* Web controls (System.Web.UI.HtmlControls and
|
||||
System.Web.UI.WebControls).
|
||||
|
||||
* Underlying infrastructure for the controls (System.Web.UI).
|
||||
|
||||
* HttpRuntime.ProcessRequest is the core of the ASP.NET
|
||||
implementation.
|
||||
</ul>
|
||||
|
||||
|
||||
Gonzalo has been working on an ASP.NET parser that takes .aspx
|
||||
files and generated the code required to run them (the code lives in
|
||||
module `xsp' along with a little web server for testing).
|
||||
|
||||
Most of the runtime support was written by Patrik Torstensson
|
||||
(now at Intel). This was interesting, because in order to implement
|
||||
some of its features, Patrik had to go into the runtime/JIT engine and
|
||||
he spent a few weeks doing work there.
|
||||
|
||||
The classes for running ASP.NET are being actively written.
|
||||
Gaurav, Leen and Patrik worked in the core of the classes
|
||||
required to run ASP.NET web application as well as a small
|
||||
embeddable web server.
|
||||
|
||||
Duncan got our System.Web assembly to compile.
|
||||
|
||||
** HttpRuntime
|
||||
|
||||
Patrik has authored most of the HttpRuntime support (both on
|
||||
@@ -104,29 +69,41 @@
|
||||
over the web probably do not want to use direct ASP.NET but a
|
||||
wrapper around it.
|
||||
|
||||
** Roadmap
|
||||
* Web Forms: The pieces (historical)
|
||||
|
||||
1. The Parser.
|
||||
There are a couple of components to the puzzle:
|
||||
|
||||
2. Get the parser to generate output compatible with ASP.NET.
|
||||
|
||||
3. Run the sample output with the real Microsoft runtime
|
||||
but using our generated page.
|
||||
|
||||
4. Run the sample with our classes with the .NET runtime.
|
||||
|
||||
5. Run the samples with our classes with the our runtime (without
|
||||
using HttpRuntime).
|
||||
|
||||
6. Finish HttpRuntime.
|
||||
<ul>
|
||||
* .aspx page parser (converts .aspx to C# code).
|
||||
|
||||
7. Running our sample code with our classes with our runtime.
|
||||
|
||||
8. Debug and add missing features.
|
||||
|
||||
We are in step 8. Among the missing features: server side includes,
|
||||
better caching, some configuration stuff, more validators...
|
||||
* System.Web.HttpRuntime support.
|
||||
|
||||
* Web controls (System.Web.UI.HtmlControls and
|
||||
System.Web.UI.WebControls).
|
||||
|
||||
* Underlying infrastructure for the controls (System.Web.UI).
|
||||
|
||||
* HttpRuntime.ProcessRequest is the core of the ASP.NET
|
||||
implementation.
|
||||
</ul>
|
||||
|
||||
|
||||
Gonzalo has been working on an ASP.NET parser that takes .aspx
|
||||
files and generated the code required to run them (the code lives in
|
||||
module `xsp' along with a little web server for testing).
|
||||
|
||||
Most of the runtime support was written by Patrik Torstensson
|
||||
(now at Intel). This was interesting, because in order to implement
|
||||
some of its features, Patrik had to go into the runtime/JIT engine and
|
||||
he spent a few weeks doing work there.
|
||||
|
||||
The classes for running ASP.NET are being actively written.
|
||||
Gaurav, Leen and Patrik worked in the core of the classes
|
||||
required to run ASP.NET web application as well as a small
|
||||
embeddable web server.
|
||||
|
||||
Duncan got our System.Web assembly to compile.
|
||||
|
||||
** How to Help
|
||||
|
||||
Testing and fixing HtmlControls, WebControls and validators is an
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
A Retargetable C Compiler - Design and Implementation: C. Fraser, David
|
||||
Hanson
|
||||
|
||||
* Threading
|
||||
|
||||
.NET Multithreading: Alan L. Dennis (ISBN 1-930110-54-5)
|
||||
|
||||
* Reference Manuals
|
||||
|
||||
<a
|
||||
@@ -34,4 +38,4 @@
|
||||
MIPS Processor supplement</a>
|
||||
|
||||
<a href="http://www.sparc.org/standards/V8.pdf">The SPARC Architecture
|
||||
Manual Version 8</a>
|
||||
Manual Version 8</a>
|
||||
@@ -35,6 +35,9 @@
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Runtime.Serialization.Formatters.Soap.html">System.Runtime.Serialization.Formatters.Soap</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Security.html">System.Security</a>:
|
||||
Xml Signature Security classes, also check the <a href="crypto.html">Cryptography status pages</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
+11
-33
@@ -8,53 +8,31 @@
|
||||
multilingual documentation makes for significant additional text.
|
||||
|
||||
With these considerations in mind, Mono will use external XML files
|
||||
for type documentation, rather than documenting the source inline.
|
||||
|
||||
for type documentation, rather than documenting the source
|
||||
inline. The XML file format used is inspired by the XML format used
|
||||
to document the ECMA APIs.
|
||||
|
||||
Several tools will be created for managing, verifying, generating,
|
||||
and updating class library documentation, including:
|
||||
|
||||
<ul>
|
||||
<li><a href="#monodoc">MonoDoc - A graphical documentation editor and viewer.</a></li>
|
||||
<li><a href="#mkmaster">MkMaster - A command line tool to feed stub information to MonoDoc.</a></li>
|
||||
<li><a href="#aspnet">An ASP.NET documentation editor.</a></li>
|
||||
<li><a href="#xsltool">An xsl tool to convert monodoc xml to html documentation.</a></li>
|
||||
<li><a href="#monodoc">monodoc - A graphical documentation viewer.</a></li>
|
||||
<li>xmllint: a tool used to validate a proper XML document.
|
||||
</ul>
|
||||
|
||||
** XML Documentation Files and Formats
|
||||
You can download the tools to document Mono from the CVS
|
||||
repository from module `monodoc'.
|
||||
|
||||
|
||||
*** Monodoc XML
|
||||
This XML is Mono's documentation format. Documentation and a DTD/Schema
|
||||
for Monodoc XML is located in cvs and can be found <a href="http://go-mono.org/monodoc.dtd">here</a>.
|
||||
|
||||
This XML could be generated by MonoDoc or the ASP.NET client.
|
||||
|
||||
More about the XML format <a href="http://go-mono.org/monodoc-xml.html">here</a>.
|
||||
** Documentation Tools
|
||||
|
||||
*** <a name="monodoc">MonoDoc</a>
|
||||
A graphical documentation editor and viewer. Currently, MonoDoc
|
||||
consists of a Qt# application and is in heavy development.
|
||||
|
||||
*** <a name="mkmaster">MkMaster</a>
|
||||
This tool creates the Master.xml file that MonoDoc uses as a reference
|
||||
for documentation generation. This is a reflection engine that is used
|
||||
to gather metadata from assemblies and create an xml representation.
|
||||
|
||||
*** <a name="aspnet">ASP.NET</a>
|
||||
This tool is planned.
|
||||
|
||||
*** <a name="xsltool">An XSL converter</a>
|
||||
This tool is planned. If someone wants to step forward and adopt this
|
||||
project, it would be very helpful ;)
|
||||
A graphical documentation viewer written in Gtk#. In the
|
||||
future we will have an ASP.NET front-end to present the
|
||||
documentation on the web as well.
|
||||
|
||||
** Status and Roadmap
|
||||
|
||||
*** 16, September 2002
|
||||
|
||||
A preliminary version of MonoDoc is in Mono's cvs. It is under heavy development.
|
||||
Once this is complete we will start documenting the API!
|
||||
|
||||
** Get Involved
|
||||
|
||||
Help us develop Mono's documentation tools! Subscribe to
|
||||
|
||||
+67
-57
@@ -13,28 +13,32 @@
|
||||
<ul>
|
||||
* Every classes are present.
|
||||
|
||||
* Most classes have their unit tests.
|
||||
* Most classes have their unit tests. Some tests like <code>
|
||||
SymmetricAlgorithmTest</code> are generated by an external
|
||||
tool.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Support for adding/modifying algorithms and OID using the
|
||||
<code>machine.config</code> configuration file (in progress).
|
||||
* Support for adding/modifying OID using the
|
||||
<code>machine.config</code> configuration file (algorithms
|
||||
are done).
|
||||
|
||||
* RNGCryptoServiceProvider is currently only working on Linux.
|
||||
The current implementation reside in Mono's runtime and use
|
||||
the <code>/dev/[u]random</code> device (which do not exists
|
||||
under Windows). A Windows alternative is in the work...
|
||||
under Windows). A Windows alternative is in the work (see
|
||||
Mono.Security.Win32 assembly section).
|
||||
|
||||
* Keypair persistance for RSA and DSA. This persistance must
|
||||
somehow be linked with X509 certificate stores (in planning).
|
||||
|
||||
* <code>PasswordDeriveBytes</code> is currently limited to
|
||||
generating keys with the maximum length equals to the hash
|
||||
output (as specified in PKCS #5). However the framework
|
||||
implementation allows for longer keys to be generated. Also
|
||||
the algorithms used by CryptDeriveKey (used by Windows
|
||||
applications) are unknown.
|
||||
* <code>PasswordDeriveBytes.CryptDeriveKey</code> is included
|
||||
in the BCL to provide compatibility with existing Windows
|
||||
applications. The main problem is that the key derivation
|
||||
algorithm can be different for every CSP (Crypto Service
|
||||
Provider). However for compatibility we should provide an
|
||||
implementation compatible with the MS CSP (most likely used).
|
||||
|
||||
* Analyse the current coverage of the unit tests on the
|
||||
cryptographic classes and complete the unit tests.
|
||||
@@ -57,7 +61,8 @@
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* X.509 certificates are parsed using 100% managed code.
|
||||
* X.509 certificates are parsed using 100% managed code
|
||||
(using an internal ASN.1 class).
|
||||
|
||||
* Software Publisher Certificates (SPC) used by Authenticode
|
||||
(tm) to sign assemblies are supported (extraction from PE
|
||||
@@ -75,26 +80,28 @@
|
||||
* Authenticode(tm) support is incomplete. We can extract the
|
||||
certificates from PE files but cannot validate the signature
|
||||
nor the certificate chain (and we're still missing some trust
|
||||
anchors).
|
||||
anchors). See Tools section for more information.
|
||||
|
||||
* Integration with CryptoAPI isn't possible as long as the
|
||||
<code>X509Certificate(IntPtr)</code> constructor isn't
|
||||
completed.
|
||||
* Integration with CryptoAPI (on Windows) isn't possible as
|
||||
long as the <code>X509Certificate(IntPtr)</code> constructor
|
||||
isn't completed.
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* <b>There's no validation of the certificates</b> done in this
|
||||
class (this isn't a restriction of Mono!). This means that
|
||||
certificate signatures and validity dates are never checked!
|
||||
certificate signatures and validity dates are <b>never</b>
|
||||
checked (except when used for Authenticode, i.e.
|
||||
<code>CreateFromSignedFile</code>).
|
||||
|
||||
* The newer X509Certificate class included in Microsoft's Web
|
||||
Service Enhancement (WSE) is a little better (as it includes
|
||||
validation).
|
||||
CryptoAPI's validation) when <code>IsCurrent</code> is called.
|
||||
|
||||
* Microsoft implementation of <code>X509Certificate</code> is
|
||||
done by using CryptoAPI. From the exceptions thrown
|
||||
Authenticode(tm) support is done via COM.
|
||||
done by using CryptoAPI (unmanaged). From the exceptions
|
||||
thrown Authenticode(tm) support is done via COM.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
@@ -102,47 +109,38 @@
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography.Xml</b>
|
||||
|
||||
This namespace implements the XML Digital Signature specification from
|
||||
W3C.
|
||||
This namespace implements the <a href="http://www.w3.org/TR/xmldsig-core/">
|
||||
XML Digital Signature</a> specification from
|
||||
<a href="http://www.w3.org/">W3C</a>.
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* All classes are present but some are only stubbed.
|
||||
* All classes are present but some (Transforms) are only
|
||||
stubbed.
|
||||
|
||||
* Most classes have their unit tests.
|
||||
|
||||
* This assembly is present in CVS but isn't (yet) part of the
|
||||
build.
|
||||
* This assembly is present in CVS but only available when
|
||||
building using NAnt (i.e. makefile are missing).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* All the transforms needs to be done. But this requires far
|
||||
more XML knowledge than crypto.
|
||||
more XML knowledge than crypto. Note: Most tests runs because
|
||||
the feeded XML is pre-c14n (by hand in the code) before
|
||||
signing (not because the transforms works). In the short
|
||||
term <code>libxml2</code> could be used to provide C14N, but
|
||||
in the long term a fully managed class would be much better.
|
||||
|
||||
* Fix the tests (see notes) then include the assembly into the
|
||||
build process.
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* Many current tests fails because the XML generated by Mono
|
||||
isn't exactly the same as the one produced by the Microsoft
|
||||
implementation (but 100% equivalent). We'll either have to
|
||||
change the XML code or the tests.
|
||||
|
||||
* Testing is difficult because the classes use CryptoConfig
|
||||
to create the required cryptographic objects. When running
|
||||
the unit tests the CryptoConfig executing is the one in
|
||||
mscorlib (not Mono's one) so it doesn't return the expected
|
||||
objects. This results in InvalidCastException.
|
||||
* Makefile for building under non-Windows operating systems.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: Mono.Security.Win32
|
||||
|
||||
This assembly is to provide maximum compatibility with CryptoAPI to
|
||||
application running with Mono's runtime on the Windows operating
|
||||
This assembly goal is to provide maximum compatibility with CryptoAPI
|
||||
to application running with Mono's runtime on the Windows operating
|
||||
system.
|
||||
|
||||
<b>This assembly should NEVER be used directly by any application</b>.
|
||||
@@ -156,16 +154,22 @@
|
||||
<ul>
|
||||
* A RNGCryptoServiceProvider built on top of CryptoAPI.
|
||||
|
||||
* Not (yet) commited in CVS.
|
||||
* Wrapper classes for unmanaged versions of hash algorithms:
|
||||
MD2, MD4, MD5 and SHA1 are supported. <b>note</b>: some
|
||||
algorithms shouldn't be used in new design (MD4 is broken and
|
||||
MD2 isn't considered safe). They are included to preserve
|
||||
interoperability with older applications (e.g. some old, but
|
||||
still valid, X.509 certificates use MD2).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Unmanaged versions of hash algorithms (SHA1 and MD5).
|
||||
* Unmanaged versions of symmetric encryption algorithms
|
||||
(like DES, TripleDES, RC2 and others present in CryptoAPI).
|
||||
* Unmanaged versions of asymmetric algorithms (like DSA and
|
||||
RSA) which persist their keypair into the specified CSP.
|
||||
* Wrapper classes for unmanaged versions of symmetric
|
||||
encryption algorithms (like DES, TripleDES, RC2 and others
|
||||
present in default CSP).
|
||||
* Wrapper classes for unmanaged versions of asymmetric
|
||||
algorithms (like DSA and RSA) which persist their keypair
|
||||
into the specified CSP.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
@@ -179,7 +183,8 @@
|
||||
certificates.
|
||||
|
||||
Note: WSE is distributed as an add-on because the WS-Security
|
||||
specification isn't yet completed by OASIS.
|
||||
specification isn't yet completed by
|
||||
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a>.
|
||||
|
||||
<b>There are some licensing issues to consider before stating to
|
||||
implement WS-Security. All contributors must sign an agreement with
|
||||
@@ -226,6 +231,8 @@
|
||||
|
||||
There are many tools in the .NET framework that indirectly interacts
|
||||
with some cryptographic classes. Mono will eventually need these tools.
|
||||
Unless noted the tools should work on any CLR (tested with both Mono
|
||||
and Microsoft).
|
||||
|
||||
**** Status
|
||||
|
||||
@@ -236,8 +243,8 @@
|
||||
re-used in source code (C# or VB.NET syntax).
|
||||
|
||||
* <code>cert2spc</code> is a tool to transform multiple X.509
|
||||
certificates (a chain) into a Software Publisher Certificate
|
||||
(SPC) - which is a long name for a simple PKCS#7 file.
|
||||
certificates and CRLs into a Software Publisher Certificate
|
||||
(SPC) file - which is a long name for a simple PKCS#7 file.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
@@ -245,10 +252,11 @@
|
||||
<ul>
|
||||
* <code>monosn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. This tools is part of the runtime (not the class
|
||||
library) and as such is written in C.
|
||||
library) and as such is written in C and won't run without Mono.
|
||||
|
||||
* <code>signcode</code> and <code>chktrust</code> for signing
|
||||
and validating Authenticode(tm) signatures on assemblies.
|
||||
* <code>signcode</code> and <code>chktrust</code> (in progress)
|
||||
for signing and validating Authenticode(tm) signatures on
|
||||
assemblies (or any PE file).
|
||||
|
||||
* <code>makecert</code> to create X.509 test certificates that
|
||||
can be used (once transformed in SPC) to sign assemblies.
|
||||
@@ -267,8 +275,8 @@
|
||||
Add missing unit tests to classes or methods.
|
||||
|
||||
Write some documentation on the cryptographic classes for MonkeyGuide
|
||||
(as I'm not a good writer - but you must be a good reader if you got to
|
||||
this part).
|
||||
(as I'm not a good writer, at least in English, but you must be a good
|
||||
reader if you got to this part).
|
||||
|
||||
Optimization can also be done on algorithms as crypto is never fast
|
||||
enough. Just be sure to test every optimization (using the unit test)
|
||||
@@ -278,3 +286,5 @@
|
||||
, <a href="mailto:[email protected]">work</a>) if you need additional
|
||||
informations about the status of the cryptographic classes.
|
||||
|
||||
<hr>
|
||||
Last reviewed: February 5, 2003 (post mono 0.19)
|
||||
+192
-3
@@ -14,13 +14,16 @@
|
||||
<ul>
|
||||
|
||||
* The development tools (compilers, assembler tools,
|
||||
language reference, design time features).
|
||||
language reference, design time features): these
|
||||
live in the `monodoc' CVS module.
|
||||
|
||||
* Frequently Asked Question compilations.
|
||||
|
||||
* HOWTO documents.
|
||||
|
||||
* The Class Libraries
|
||||
* The Class Libraries (Both the original .NET class
|
||||
libraries as well as the class libraries produced by
|
||||
the project).
|
||||
|
||||
* Tutorials on Mono and the specifics of running it.
|
||||
|
||||
@@ -29,11 +32,197 @@
|
||||
|
||||
</ul>
|
||||
|
||||
** Class Library documentation
|
||||
* Class Library documentation
|
||||
|
||||
We are moving to a new setup for documenting the class libraries,
|
||||
and you can read about it <a href="classlib-doc.html">here</a>.
|
||||
|
||||
There are two classes of documentation: free documentation for
|
||||
existing .NET classes and documentation for the classes that
|
||||
we have developed on top of .NET.
|
||||
|
||||
There is a large body of documentation that came from the ECMA
|
||||
standarization effort that has been checked into CVS. It does
|
||||
not contain everything Mono and .NET have, so they need to be
|
||||
updated and augmented.
|
||||
|
||||
** Gtk# documentation
|
||||
|
||||
We also have a large body of class libraries that are specific
|
||||
to Mono, for example the documentation for Gtk#.
|
||||
|
||||
We have checked in stub documentation for Gtk# into the CVS
|
||||
repository (on gtk-sharp/doc) and we need volunteers to help
|
||||
populate the documentation for it. Since Gtk# is a wrapper
|
||||
for Gtk, plenty of documentation exists in the <a
|
||||
href="http://developer.gnome.org/doc/API">Gnome developer
|
||||
site</a>.
|
||||
|
||||
To get started:
|
||||
|
||||
You need to download Gtk# from the CVS repository. The module
|
||||
name is `gtk-sharp'. You can obtain a copy from both the CVS
|
||||
repository or the anonymous CVS repository.
|
||||
|
||||
To pull your copy type:
|
||||
|
||||
<pre>
|
||||
cvs co gtk-sharp
|
||||
</pre>
|
||||
Documentation lives in gtk-sharp/doc/en. The "en" indicates the
|
||||
English language, the first one we are targeting. We can later
|
||||
do translations, but for now we are focusing on a single
|
||||
language.
|
||||
|
||||
In that directory you will find the documentation organized by
|
||||
namespaces. One directory per namespace. In the directories
|
||||
you will find one XML file per class that needs to be
|
||||
documented. The mission is to fill in the data with useful
|
||||
information. Feel free to grab liberally information from the
|
||||
Gtk documentation from:
|
||||
|
||||
<a href="http://developer.gnome.org/doc/API/">http://developer.gnome.org/doc/API/</a>
|
||||
|
||||
Of course, the API does not apply directly. It only applies at
|
||||
a foundational level, so you can not really just copy and
|
||||
paste. Summaries, and remarks sections can probably be lifted
|
||||
with little or no effort.
|
||||
|
||||
Gtk# uses properties to represent get/set operations in the C
|
||||
API, so you can also use some bits from there.
|
||||
|
||||
Most of the documentation contains already place holders for
|
||||
text, we use the internationally approved phrase for this
|
||||
purpose, `To be added'. So the quest is to remove all of the
|
||||
"To be added" strings with information with resembles as closely
|
||||
as possible the toolkit reality.
|
||||
|
||||
*** The pieces to be filled.
|
||||
|
||||
Summaries are one or two line descriptions of the element
|
||||
(class, struct, interface, method, field, event, delegate), and
|
||||
its used to render summary pages. So it has to be short.
|
||||
|
||||
The "remarks" section is used to describe in detail the element.
|
||||
|
||||
**** Tags.
|
||||
|
||||
As you document Gtk# you will have a number of tags that you can
|
||||
use inside the summary and remarks sections, these are:
|
||||
|
||||
<pre>
|
||||
<para> </para>
|
||||
</pre>
|
||||
Used to separate paragraphs.
|
||||
|
||||
<pre>
|
||||
<paramref name="param_name"/>
|
||||
</pre>
|
||||
Used to reference a formal parameter to a function.
|
||||
|
||||
<pre>
|
||||
<see cref="T:SomeTypeName"/>
|
||||
</pre>
|
||||
Use this to reference a type, this will include an hyper
|
||||
link to the page for type SomeTypeName.
|
||||
|
||||
For example, to reference "System.Enum", do:
|
||||
|
||||
<pre>
|
||||
<see cref="T:System.Enum"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see cref="P:SomeTypeName.Property"/>
|
||||
</pre>
|
||||
Use this to reference a property, this will include an hyper
|
||||
link to the page for the property `Property' of type `SomeTypeName'.
|
||||
|
||||
For example, to reference the BaseType property in System.Type, do:
|
||||
|
||||
<pre>
|
||||
<see cref="P:System.Type.BaseType"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see cref="M:SomeTypeName.Method(type,type)"/>
|
||||
</pre>
|
||||
Use this to reference a method, this will include an hyper
|
||||
link to the page for the method `Method' of type `SomeTypeName'.
|
||||
|
||||
For example, to reference the ToString method in System.Object, do:
|
||||
|
||||
<pre>
|
||||
<see cref="M:System.Object.ToString()"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see langword="keyword"/>
|
||||
</pre>
|
||||
Use this to link to a keyword in the C# language, for
|
||||
example to link to `true', do:
|
||||
|
||||
<pre>
|
||||
<see langword="true"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<example> ... </example>
|
||||
</pre>
|
||||
Use example to insert an example. The example can
|
||||
contain explanatory text and code.
|
||||
|
||||
<pre>
|
||||
<code lang="C#">.. </code>
|
||||
</pre>
|
||||
|
||||
Use this to provide a sample C# program, typically used
|
||||
within the <example> tags.
|
||||
|
||||
When providing examples, try to provide a full example,
|
||||
we would like to be able to have a button to compile and
|
||||
run samples embedded into the documentation, or pop up
|
||||
an editor to let the user play with the sample.
|
||||
|
||||
You can link to an example like this:
|
||||
|
||||
<pre>
|
||||
<code lang="C#" source="file.cs"> </code>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<item>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<list type="bullet"> </list>
|
||||
</pre>
|
||||
|
||||
Use this to create lists. Lists contains <item>
|
||||
elements
|
||||
|
||||
<pre>
|
||||
<list type="table"> </lits>
|
||||
<listheader>
|
||||
<term>YOUR FIRST COLUMN</term>
|
||||
<description>YOUR DESCRIPTION</description>
|
||||
</listheader>
|
||||
</pre>
|
||||
For two-column tables. Inside use:
|
||||
|
||||
<pre>
|
||||
<item>
|
||||
<term>First</term>
|
||||
<description>First descritpion</description>
|
||||
</item>
|
||||
<item>
|
||||
<term>Second</term>
|
||||
<description>Second descirption</description>
|
||||
</item>
|
||||
</pre>
|
||||
|
||||
** Words of warning.
|
||||
|
||||
A few words of warning and advice for class documentors:
|
||||
|
||||
A well-documented API can ease hours of frustration; as Mono
|
||||
|
||||
+181
-89
@@ -13,6 +13,186 @@
|
||||
section</a>, the <a
|
||||
href="http://www.go-mono.org/faq.html">FAQ</a>.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
<td>
|
||||
<b>Release 0.19</b><br>
|
||||
<a href="archive/mono-0.19">Release notes</a><br>
|
||||
Jan 20th, 2003
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="1" cellpadding="3">
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source Code</b>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/mcs-0.19.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.19.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
|
||||
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
|
||||
<li><a href="archive/mono-debugger-0.2.0.tar.gz">Mono Debugger 0.2.0</a> <b><font color="#dd0000">New!</font></b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source RPMs</b><br>
|
||||
(No RPMS for XSP).
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
|
||||
<li><a href="archive/mono-0.19-1.src.rpm">mono-0.19-1.src.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.3/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.1/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Mandrake 8.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-0.19-1.i586.rpm">mono-0.19-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-devel-0.19-1.i586.rpm">mono-devel-0.19-1.i586.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>SuSE 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<!-- <b>Windows Setup Wizard (NT/2000/XP)</b>␍ -->
|
||||
<!-- <ul>␍ -->
|
||||
<!-- <li><a href="archive/mono-0.19-stable.exe">Mono-Setup</a>␍ -->
|
||||
<!-- </ul>␍ -->
|
||||
<!-- </td>␍ -->
|
||||
<td bgcolor="#999999">
|
||||
<b>Debian packages</b>
|
||||
<ul>
|
||||
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr bgcolor="#CCCCC">
|
||||
<td>
|
||||
<b>Regression Tests</b><br>
|
||||
</td>
|
||||
<td>
|
||||
You can get binaries for the Mono Regression Test
|
||||
Suite <a href="archive/mono-tests.tar.gz">here</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<br>
|
||||
* Older Releases:
|
||||
|
||||
We provide binaries for older releases until we have packages for the new release.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
<td>
|
||||
<b>Release 0.18</b><br>
|
||||
<a href="archive/mono-0.18">Release notes</a><br>
|
||||
Jan 12th, 2003
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="1" cellpadding="3">
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source Code</b>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/mcs-0.18.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.18.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
|
||||
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source RPMs</b><br>
|
||||
(No RPMS for XSP).
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
|
||||
<li><a href="archive/mono-0.18-1.src.rpm">mono-0.18-1.src.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
@@ -32,7 +212,6 @@
|
||||
<li><a href="archive/mcs-0.17.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.17.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
|
||||
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -48,69 +227,6 @@
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.3/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.1/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Mandrake 8.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-0.17-2.i586.rpm">mono-0.17-2.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-devel-0.17-2.i586.rpm">mono-devel-0.17-2.i586.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>SuSE 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-0.17-1.i386.rpm">mono-0.17-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-devel-0.17-1.i386.rpm">mono-devel-0.17-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Windows Setup Wizard (NT/2000/XP)</b>
|
||||
@@ -128,26 +244,10 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr bgcolor="#CCCCC">
|
||||
<td>
|
||||
<b>Regression Tests</b><br>
|
||||
</td>
|
||||
<td>
|
||||
You can get binaries for the Mono Regression Test
|
||||
Suite <a href="archive/mono-tests.tar.gz">here</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
* Older Releases:
|
||||
|
||||
We provide binaries for older releases until we have packages for the new release.
|
||||
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
@@ -201,14 +301,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr bgcolor="#CCCCC">
|
||||
<td>
|
||||
<b>Regression Tests</b><br>
|
||||
</td>
|
||||
<td>
|
||||
You can get binaries for the Mono Regression Test
|
||||
Suite <a href="archive/mono-tests.tar.gz">here</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -547,4 +639,4 @@ make install
|
||||
|
||||
Notice that following the above procedure does not require you
|
||||
to manually install the software in the `mcs' directory, as
|
||||
the relevant files will be copied by the `mono' makefiles.
|
||||
the relevant files will be copied by the `mono' makefiles.
|
||||
+103
-7
@@ -1,22 +1,30 @@
|
||||
* Firebird and Interbase Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for Firebird and Interbase databases</li>
|
||||
|
||||
<li>Does not exist in Mono, but is a separate project</li>
|
||||
|
||||
<li><a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
|
||||
an independent project which uses source code based on the Interbase source code released
|
||||
<li>The <a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
|
||||
is an independent project which uses source code based on the Interbase source code released
|
||||
by Borland under the Interbase Public License</li>
|
||||
|
||||
<li>Both the Firebird Relational Database and the Firebird .NET Data Provider can be
|
||||
downloaded from <a href="http://sourceforge.net/projects/firebird/firebird">here</a></li>
|
||||
downloaded from <a href="http://sourceforge.net/projects/firebird/">here</a></li>
|
||||
|
||||
<li>The Firebird .NET Data provider has been made
|
||||
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
|
||||
number of contributions to the OdbcJdbc code</li>
|
||||
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
|
||||
number of contributions to the OdbcJdbc code</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Currently, it is able to connect to Firebird and Interbase databases
|
||||
@@ -56,7 +64,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
* Action Plan
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Bug fixing</li>
|
||||
@@ -98,3 +106,91 @@
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Need a working mono and mcs</li>
|
||||
|
||||
<li>Need access to a Firebird Relational Database or you can download
|
||||
it from <a href="http://firebird.sourceforge.net">here</a></li>
|
||||
|
||||
<li>Get the Firebird .NET data provider from here as
|
||||
<a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>. Make
|
||||
sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
|
||||
installed in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
|
||||
</pre>
|
||||
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using FirebirdSql.Data.Firebird;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
|
||||
"User=SYSDBA;" +
|
||||
"Password=masterkey;" +
|
||||
"Dialect=3;" +
|
||||
"Server=localhost";
|
||||
IDbConnection dbcon = new FbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql = "SELECT * FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
object dataValue = myReader.GetValue(0);
|
||||
string sValue = dataValue.ToString();
|
||||
Console.WriteLine("Value: " + sValue);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r FirebirdSql.Data.Firebird.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r FirebirdSql.Data.Firebird.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+4
-6
@@ -1,9 +1,7 @@
|
||||
* The GCC front-end
|
||||
|
||||
The GCC front-end will accept input in a binary file with
|
||||
codes in the Common Intermediate Language (CIL), and generate
|
||||
native code.
|
||||
|
||||
This will allow pre-compilation and full optimization to take
|
||||
place before a program is executed.
|
||||
Jeremy Singer has developed a .NET backend for GCC, his
|
||||
research work is available <a
|
||||
href="http://www.cl.cam.ac.uk/~jds31/research/gccnet/">here</a>.
|
||||
|
||||
|
||||
+139
-6
@@ -3,19 +3,152 @@
|
||||
<a href="http://gtk-sharp.sourceforge.net">Gtk#</a> (Gtk
|
||||
sharp) is a set of C# language bindings for the
|
||||
<a href="http://www.gtk.org">Gtk+</a> toolkit and other
|
||||
libraries that are part of the <a
|
||||
href="http://www.gnome.org">GNOME</a> platform .
|
||||
libraries that are part of the
|
||||
<a href="http://www.gnome.org">GNOME</a> platform .
|
||||
|
||||
** API of Gtk#
|
||||
|
||||
The API is browsable
|
||||
<a
|
||||
href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">here</a>
|
||||
<a href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">here</a>
|
||||
|
||||
** Where to learn more.
|
||||
|
||||
Visit the official site for the <a
|
||||
href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
|
||||
Visit the official site for the <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
|
||||
The <a href="http://www.go-mono.org/faq">Mono FAQ</a> has some useful
|
||||
information too.
|
||||
|
||||
** GTK# On Linux
|
||||
|
||||
<p>Where to get distributions of GTK# for Linux:
|
||||
<ul>
|
||||
<li><a href="http://gtk-sharp.sourceforge.net">RPMs</a></li>
|
||||
<li><a href="http://www.debianplanet.org/mono/">Debs</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Buidling on Linux:
|
||||
|
||||
<ul>
|
||||
<li>Get GTK# source from <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.</li>
|
||||
<li>run ./autogen.sh --prefix=my_mono_installation_prefix</li>
|
||||
<li>make</li>
|
||||
<li>make install</li>
|
||||
</ul>
|
||||
|
||||
** GTK# On Windows
|
||||
|
||||
<p>There is a Windows Installer for GTK# <a href="http://www.sport-huettn.de/mono/gtk-sharp-0.6-stable-2.exe">here</a>.
|
||||
|
||||
<p>If you want to build GTK# yourself on Windows:
|
||||
|
||||
<p>To build gtk# under windows, you will need the following:
|
||||
|
||||
<ul>
|
||||
<li>cygwin from <a href="http://www.cygwin.com/">here</a> When installing Cygwin via setup.exe,
|
||||
by default binutils and other tools do not get installed; you have to make
|
||||
sure to select these items. Just make
|
||||
sure Base and Development are set to Install.</li>
|
||||
<li>Mono 0.17 or later from <a href="http://www.go-mono.com/download.html">here</a>
|
||||
You can use Windows Setup Wizard (NT/2000/XP).</li>
|
||||
<li>GTK+ 2.0 (and dependencies). You can obtain gtk+ 2.0 by either of the
|
||||
following:
|
||||
<ul>
|
||||
<li>You can get a Windows Installer at:
|
||||
<a href="http://www.dropline.net/jade/download.html">here</a> </li>
|
||||
<li>or get the separate binary and dev/lib packages at
|
||||
at <a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a> </li>
|
||||
<li>or binary package from Dev-C++ site <a href="http://www.bloodshed.net/dev/packages/gtk.html">here</a> </li>
|
||||
<li>or get Gtk4Win <a href="http://wingtk.sourceforge.net/index.html">here</a> </li>
|
||||
<li>or the source at <a href="http://www.gtk.org/">here</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>binary distriubtion of a current web browser
|
||||
like Internet Explorer 4.0, Mozilla 1.0, or Netscape 7.0 which
|
||||
includes things like msvcrt.dll.</li>
|
||||
<li>Microsoft .NET Framework at
|
||||
<a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a> </li>
|
||||
|
||||
<p>If you are running Windows 95/98/ME, then you will need Unicode support.
|
||||
Look in
|
||||
mono-list archives for information about how to get
|
||||
Mono to work on Windows 9x.
|
||||
<a href="http://lists.ximian.com/archives/public/mono-list/2002-December/004158.html">here</a>
|
||||
|
||||
<p>Environment Variables to set:
|
||||
<ul>
|
||||
<li>PATH - set to your mono installation bin and lib path.
|
||||
For example, my mono installation prefix is:
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install
|
||||
</pre>
|
||||
<p>So, I would set my PATH in the Windows Control Panel as:
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/bin;F:/cygwin/home/DanielMorgan/mono/install/lib</li>
|
||||
</pre>
|
||||
</li>
|
||||
<li>LD_LIBRARY_PATH - set to your mono installation lib path</li>
|
||||
<li>PKG_CONFIG_PATH - set to your mono installation lib/pkgconfig path, such
|
||||
as,
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig</li>
|
||||
</pre>
|
||||
|
||||
<p>If you got the gtk-sharp source, cd to the gtk-sharp directory, type:
|
||||
<pre>
|
||||
./autogen.sh --prefix=~/mono/install
|
||||
</pre>
|
||||
|
||||
<p>Set your --prefix= to whatever your mono installation prefix is located.
|
||||
This will take awhile to go through the ./autogen.sh and ./configure...
|
||||
|
||||
<p>After that it finishes succesfully, you run make with the makefile.win32
|
||||
like:
|
||||
<pre>
|
||||
make -f makefile.win32
|
||||
</pre>
|
||||
|
||||
<p>After that finishes succesfully, you can copy to your mono installation lib
|
||||
path like:
|
||||
<pre>
|
||||
cp */*.dll ~/mono/install/lib
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
<p>The pkg-config files for
|
||||
gtk+ 2.0 and dependencies will need to be set correctly if they haven't
|
||||
already been.
|
||||
|
||||
<p>Look in your mono installation/lib/pkgconfig, such as,
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig
|
||||
</pre>
|
||||
|
||||
<p>You will find files like: gtk+-2.0.pc
|
||||
|
||||
<p>Edit the line that says
|
||||
|
||||
<pre>
|
||||
prefix=something
|
||||
</pre>
|
||||
|
||||
<p>And set it to your mono installation prefix, such as,
|
||||
|
||||
<pre>
|
||||
prefix=F:/cygwin/home/DanielMorgan/mono/install
|
||||
</pre>
|
||||
|
||||
<p>Do this for all the .pc files in that directory. If there are not any, then
|
||||
you will need to create them. Or get them from somewhere like the dev
|
||||
packages at
|
||||
<a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a>
|
||||
|
||||
** GTK# On FreeBSD
|
||||
|
||||
TODO. Any volunteers?
|
||||
|
||||
** GTK# On Solaris
|
||||
|
||||
TODO. Any volunteers?
|
||||
|
||||
** GTK# On AIX
|
||||
|
||||
TODO. Any volunteers?
|
||||
Executable
+157
@@ -0,0 +1,157 @@
|
||||
* IBM DB2 Data Provider
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
|
||||
<li>Exists in namespace DB2ClientCS and assembly Mono.Data.DB2Client</li>
|
||||
|
||||
<li>The source code exists at mcs/class/Mono.Data.DB2Client</li>
|
||||
|
||||
<li>Requires the Call Level Interface to IBM DB2 shared library. This
|
||||
is db2cli.dll on Windows. The IBM DB2 CLI API is very similar to the ODBC API. If
|
||||
you take a look at Mono's <a href="http://www.go-mono.com/odbc.html">System.Data.Odbc</a> ODBC provider, you will see the
|
||||
DllImport's have similiar function names.</li>
|
||||
|
||||
<li>IBM DB2 Provider created by Christopher Bockner.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Compiles on Windows and Linux. Works on Windows. Still needs to be tested on Linux.</li>
|
||||
|
||||
<li>Able to connect to IBM DB2</li>
|
||||
|
||||
<li>Able to execute DML, such as, CREATE TABLE via ExecuteNonQuery()</li>
|
||||
|
||||
<li>Christopher says it can retrieve data via the DB2ClientDataReader</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Still needs work to get it to retrieve data via ExecuteReader() and
|
||||
use the data reader to read data.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
In order to test.
|
||||
<ul>
|
||||
<li>Have working mono and mcs setup</li>
|
||||
|
||||
<li>Have access to an IBM DB2 database. If you do not have access, download the
|
||||
<a href="http://www-3.ibm.com/software/data/db2/">IBM DB2</a> software. There
|
||||
are versions for Windows, Linux, AIX, and Sun Solaris.</li>
|
||||
|
||||
<li>Make sure the assembly Mono.Data.DB2Client.dll was built and installed
|
||||
where the other class libraries are installed.</li>
|
||||
|
||||
<li>If you do not have the source to mcs, get the source from
|
||||
<a href="http://www.go-mono.com/download">here</a></li>
|
||||
|
||||
<li>Has a ConnectionString format like ODBC</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you have a DSN setup:
|
||||
<pre>
|
||||
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you do not have a DSN (have not
|
||||
gotten this to work though, so, I am open to suggestions):
|
||||
<pre>
|
||||
"DRIVER={DB2 Driver};SERVER=localhost;DATABASE=test;UID=myuserid;PASSWORD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>In mcs/class/Mono.Data.DB2Client/Test/DBConnTest, you will find
|
||||
a DBConnTest.cs.</li>
|
||||
|
||||
<li>To build DBConnTest:
|
||||
<ul>
|
||||
<li>On Unix:</li>
|
||||
<pre>
|
||||
mcs DBConnTest.cs -r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>On Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe DBConnTest.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>To run it on mono:
|
||||
<pre>
|
||||
mono DBConnTest.exe database userid password
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.DB2Client;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"DSN=sample;UID=db2admin;PWD=mypass";
|
||||
IDbConnection dbcon = new DB2ClientConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"CREATE TABLE mono_db2_test1 ( " +
|
||||
" testid varchar(2), " +
|
||||
" testdesc varchar(16) " +
|
||||
")";
|
||||
dbcmd.CommandText = sql;
|
||||
dbcmd.ExecuteNonQuery();
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -56,11 +56,6 @@ TODO=multimedia
|
||||
<a name="projects">
|
||||
** Projects
|
||||
|
||||
<ul>
|
||||
TODO=xmlStorage,
|
||||
* Implement an xmlStorageSystem for the CLI:
|
||||
<a href="http://www.soapware.org/xmlStorageSystem">
|
||||
http://www.soapware.org/xmlStorageSystem</a>
|
||||
|
||||
TODO=guavac,Java compiler for .NET
|
||||
* You could take one of the existing Java compilers
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
You might also want to <a href="download.html">Download the
|
||||
source</a> for our work so far. Grab a <a
|
||||
href="snapshots">snapshot</a> of our current work, or <a
|
||||
href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&sortby=file&hideattic=1&cvsroot=Mono">browse
|
||||
href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&sortby=file&hideattic=1&cvsroot=mono">browse
|
||||
the sources</a>
|
||||
|
||||
You might want to <a
|
||||
@@ -34,6 +34,12 @@
|
||||
|
||||
You can contact the team at: <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
In order to follow the process of the project and to learn more
|
||||
about the team members we have created the <a
|
||||
href="http://monoevo.sf.net/mwn/index.html">Mono Weekly News letter</a>.
|
||||
Which archives can be found <a
|
||||
href="http://monoevo.sf.net/mwn/archives.html">here</a>.
|
||||
</td>
|
||||
<td>
|
||||
<table border=1>
|
||||
@@ -86,11 +92,155 @@
|
||||
<a href="index.rss"><img src="images/xml.gif"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="screenshots.html">Screenshots</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<b>Upcoming presentations</b>
|
||||
|
||||
Paolo Molaro, core Mono architect and developer will be
|
||||
talking about Mono on Florence on Saturday 22nd, February at
|
||||
the the Italian <a
|
||||
href="http://http://www.it.gnome.org/GUADIC">Guadic</a> Conference.
|
||||
|
||||
Gonzalo Paniagua, core Mono developer (responsible for ASP.NET
|
||||
in Mono) is doing a talk on Thursday in Badajoz, Spain.
|
||||
Details are <a href="http://www.gulex.org/actividades.htm">here</a>
|
||||
|
||||
@item Feb 18th, 2003: Volunteers to document Gtk#
|
||||
|
||||
With the availability of a documentation browser, we are
|
||||
looking for volunteers to help us complete the documentation
|
||||
of the Gtk# binding for Mono.
|
||||
|
||||
Experience with Gtk is useful, but not mandatory. We have
|
||||
checked in stubs, and we have instructions, and resources to
|
||||
how to complete this process <a
|
||||
href="documentation.html">here</a>. Mail the <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
for further discussion.
|
||||
|
||||
@item Feb 14th, 2003: OpenGL# bindings for Mono; Mono Basic updates.
|
||||
|
||||
Mark Crichton has completed his OpenGL/GLUT bindings for
|
||||
Gnome. A screenshot can be seen <a
|
||||
href="sshots/oglcs.png">here</a>. The bindings are available
|
||||
on the Mono CVS repository on the module `glgen'. This is a
|
||||
straight binding to the C API.
|
||||
|
||||
Marco has <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-February/011752.html">posted
|
||||
an update</a> on the current state of the free VB.NET compiler
|
||||
for Mono.
|
||||
|
||||
We are looking for contributors and maintainers to the
|
||||
JavaScript compiler as well (Janet)
|
||||
|
||||
@item Feb 12th, 2003: New assemblies, Gtk# stub documentation, Authenticode, Polish site
|
||||
|
||||
Mono now distributes a few new assemblies: Mono.Security.Win32
|
||||
as a layer to use the crypto functionality on Win32. The
|
||||
Mono.Posix assembly which contains functionality for taking
|
||||
advantage of Unix facilities.
|
||||
|
||||
A <a href="http://www.go-mono.pl/">Mono site in Poland</a>.
|
||||
|
||||
Stubs for the Gtk# documentation have been checked into CVS.
|
||||
If you want to contribute please read <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-February/012108.html">this
|
||||
message</a>
|
||||
|
||||
Mono development is moving quickly: Tim and Daniel have been
|
||||
improving the Oracle database provider and Sebastien Pouliot
|
||||
has got code signing to work using Authenticode with pure open
|
||||
source and managed code. Plenty of new VB.NET work from Marco
|
||||
(compiler) and Daniel (runtime). Also Jackson has resumed
|
||||
work on the IL assembler and the fully managed library to
|
||||
generate CIL images (Sergey wrote the first Mono.PEToolkit).
|
||||
|
||||
@item Feb 11th, 2003: Mono Weekly News, New assemblies.
|
||||
|
||||
<a href="http://monoevo.sourceforge.net/mwn/index.html">Mono
|
||||
Weekly News</a>: Includes a new interview, software
|
||||
announcements and the PHP/Mono integration.
|
||||
|
||||
@item Feb 5th, 2003: MonoDoc 0.1
|
||||
|
||||
A <a
|
||||
href="http://www.go-mono.com/archive/monodoc-0.1.tar.gz">preliminary
|
||||
release</a> of the Mono Documentation Browser is now availble.
|
||||
Release <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-February/011935.html">notes</a>
|
||||
|
||||
@item Jan, 22th, 2003: Mono wins award, OpenLink releases Virtuoso.
|
||||
|
||||
Mono won the `Best Open Source Project' award at the Linux
|
||||
World Expo. A description is <a
|
||||
href="http://linuxtoday.com/news_story.php3?ltsn=2003-01-23-024-26-OP-EV">here</a>
|
||||
|
||||
Open Link has a <a
|
||||
href="http://biz.yahoo.com/prnews/030123/neth013_1.html">press
|
||||
release</a> about Virtuoso 3.0: the first commercial product
|
||||
shipping that uses Mono.
|
||||
|
||||
@item Jan, 20th, 2003: Mono 0.19 released; Screenshots page; Gtk# 0.7
|
||||
|
||||
Mono 0.19 has been released. Check out the <a
|
||||
href="archive/mono-0.19">release notes</a> for an overview of
|
||||
the changes. You can get it <a href="download.html">here</a>.
|
||||
There are no major features in this release, mostly bug fixes
|
||||
and performance improvements.
|
||||
|
||||
We have now a new section <a href="screenshots.html">with
|
||||
screenshots</a> of various Mono applications. You can see
|
||||
there the new released Debugger, as well as the work in
|
||||
progress on the documentation browser.
|
||||
|
||||
<a href="http://gtk-sharp.sf.net">Gtk# 0.7</a> has been <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/005222.html">released</a>
|
||||
|
||||
@item Jan, 19th, 2003: Mono Debugger released.
|
||||
|
||||
After six month of extensive development, Martin Baulig has
|
||||
released the first version of the Mono debugger. The Mono
|
||||
debugger is written in C# and can debug both managed and
|
||||
unmanaged applications, support for multiple-threaded
|
||||
applications and should be relatively easy to port to new
|
||||
platforms.
|
||||
|
||||
Details of the release are available in <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/005192.html">post</a>.
|
||||
|
||||
The debugger contains both Gtk# and command line interfaces.
|
||||
The debugging file format used in Dwarf (its already supported
|
||||
by our class libraries and the Mono C# compiler; To debug C
|
||||
applications, you need a recent GCC, or to pass the -gdwarf-2
|
||||
flag to gcc).
|
||||
|
||||
@item Jan, 17th, 2003: DB2 provider, MacOS X
|
||||
|
||||
Christopher Bockner has contributed a DB2 System.Data client.
|
||||
|
||||
MacOS X support on the runtime has been integrated into the
|
||||
distribution, and MCS works with it.
|
||||
|
||||
Zoltan has managed to get <a
|
||||
href="http://radio.weblogs.com/0109845/">IKVM</a> (a Java VM
|
||||
for .NET) to run with Mono. The HelloWorld.class runs with
|
||||
the Mono runtime.
|
||||
|
||||
@item Jan, 13th, 2003: Mono 0.18 released
|
||||
|
||||
Mono 0.18 has been released. Check out the <a
|
||||
href="archive/mono-0.18">release notes</a> for an overview of
|
||||
the changes. You can get it <a href="download.html">here</a>.
|
||||
|
||||
@item Jan 10th, 2003: Mono Weekly News.
|
||||
|
||||
A new issue of the <a
|
||||
|
||||
+23
-5
@@ -1,7 +1,7 @@
|
||||
* Debugging information
|
||||
|
||||
Compile your programs using the `-g' flag in MCS, that will generate a file
|
||||
with the extension .dbg containing the dwarf symbols for your executable.
|
||||
Compile your programs using the `-g' flag in MCS, that will all a special
|
||||
resource containing debugging information to your executable.
|
||||
|
||||
To get stack traces with line number information, you need to run your
|
||||
program like this:
|
||||
@@ -15,9 +15,27 @@
|
||||
|
||||
* Mono Debugger
|
||||
|
||||
A new debugger has been created in C# and using Gtk# for its
|
||||
user interface, this will simplify the debugging of CLI applications.
|
||||
The Mono debugger is written in C# and can debug both managed
|
||||
and unmanaged applications, support for multiple-threaded
|
||||
applications and should be relatively easy to port to new
|
||||
platforms.
|
||||
|
||||
Stay turned for its first public release.
|
||||
Details of the release are available in <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/011415.html">post</a>.
|
||||
|
||||
The debugger contains both Gtk# and command line interfaces.
|
||||
The debugging file format used in Dwarf (its already supported
|
||||
by our class libraries and the Mono C# compiler; To debug C
|
||||
applications, you need a recent GCC, or to pass the -gdwarf-2
|
||||
flag to gcc).
|
||||
|
||||
The debugger is available now, you can get it from <a
|
||||
href="http://primates.ximian.com/~martin/debugger/mono-debugger-0.2.0.tar.gz">here</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
* A debugging session using a dynamically generated symbol file.
|
||||
|
||||
Let's assume we have the following C# application which we want to debug:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
|
||||
public class Foo
|
||||
{
|
||||
public struct MyStruct {
|
||||
int a;
|
||||
long b;
|
||||
double c;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Int32 value = 5;
|
||||
long test = 512;
|
||||
|
||||
MyStruct my_struct;
|
||||
my_struct.a = 5;
|
||||
my_struct.b = test;
|
||||
my_struct.c = 23323.5235;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
First of all, we need to compile it and create the .il files:
|
||||
|
||||
<pre>
|
||||
$ mcs ./Foo.cs
|
||||
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
|
||||
$ monodis Foo.exe > Foo.il
|
||||
</pre>
|
||||
|
||||
Now we can start the JIT in the debugger:
|
||||
|
||||
<pre>
|
||||
$ gdb ~/monocvs/mono/mono/jit/mono
|
||||
(gdb) r --debug=dwarf --break Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf --break Foo:Main ./Foo.exe
|
||||
0x081e8911 in ?? ()
|
||||
(gdb) call mono_debug_make_symbols ()
|
||||
(gdb) add-symbol-file /tmp/Foo.o
|
||||
Reading symbols from /tmp/Foo.o...done.
|
||||
Current language: auto; currently c++
|
||||
(gdb) frame
|
||||
#0 Foo.Main () at Foo.il:26
|
||||
26 // method line 2
|
||||
(gdb) n
|
||||
Foo.Main () at Foo.il:38
|
||||
38 IL_0000: ldc.i4.5
|
||||
(gdb) list
|
||||
33 .maxstack 2
|
||||
34 .locals (
|
||||
35 int32 V_0,
|
||||
36 int64 V_1,
|
||||
37 valuetype MyStruct V_2)
|
||||
38 IL_0000: ldc.i4.5
|
||||
39 IL_0001: stloc.0
|
||||
40 IL_0002: ldc.i4 512
|
||||
41 IL_0007: conv.i8
|
||||
42 IL_0008: stloc.1
|
||||
43 IL_0009: ldloca.s 2
|
||||
44 IL_000b: ldc.i4.5
|
||||
45 IL_000c: stfld int32 .MyStruct::a
|
||||
46 IL_0011: ldloca.s 2
|
||||
47 IL_0013: ldloc.1
|
||||
48 IL_0014: stfld int64 .MyStruct::b
|
||||
49 IL_0019: ldloca.s 2
|
||||
50 IL_001b: ldc.r8 23323.5
|
||||
51 IL_0024: stfld float64 .MyStruct::c
|
||||
52 IL_0029: ret
|
||||
(gdb) until 52
|
||||
Foo.Main () at Foo.il:53
|
||||
53 }
|
||||
(gdb) info locals
|
||||
V_0 = 5
|
||||
V_1 = 512
|
||||
V_2 = {a = 5, b = 512, c = 23323.523499999999}
|
||||
</pre>
|
||||
|
||||
As you see in this example, you need to know IL code to use this debugging method - but
|
||||
it may be the only way to debug a library.
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
* A debugging session using a symbol file which has been created by MCS.
|
||||
|
||||
Let's assume we have the following C# application which we want to debug:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
|
||||
public class Foo
|
||||
{
|
||||
public struct MyStruct {
|
||||
int a;
|
||||
long b;
|
||||
double c;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Int32 value = 5;
|
||||
long test = 512;
|
||||
|
||||
MyStruct my_struct;
|
||||
my_struct.a = 5;
|
||||
my_struct.b = test;
|
||||
my_struct.c = 23323.5235;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
First of all, we need to compile it with MCS, assemble the generated .s file and
|
||||
create the .il files for all referenced assemblies which were not compiled with MCS:
|
||||
|
||||
<pre>
|
||||
$ mcs -g ./Foo.cs
|
||||
$ as -o Foo-debug.o Foo-debug.s
|
||||
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
|
||||
</pre>
|
||||
|
||||
Now we can start the JIT in the debugger:
|
||||
|
||||
<pre>
|
||||
$ gdb ~/monocvs/mono/mono/jit/mono
|
||||
(gdb) r --debug=dwarf-plus --break Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf-plus --break Foo:Main ./Foo.exe
|
||||
Program received signal SIGTRAP, Trace/breakpoint trap.
|
||||
0x081e8681 in ?? ()
|
||||
(gdb) call mono_debug_make_symbols ()
|
||||
(gdb) add-symbol-file Foo-debug.o
|
||||
(gdb) add-symbol-file /tmp/corlib.o
|
||||
` (gdb) frame
|
||||
#0 Main () at ./Foo.cs:11
|
||||
11 public static void Main ()
|
||||
(gdb) n
|
||||
Main () at ./Foo.cs:13
|
||||
13 Int32 value = 5;
|
||||
(gdb)
|
||||
14 long test = 512;
|
||||
(gdb)
|
||||
17 my_struct.a = 5;
|
||||
(gdb)
|
||||
18 my_struct.b = test;
|
||||
(gdb)
|
||||
19 my_struct.c = 23323.5235;
|
||||
(gdb)
|
||||
20 }
|
||||
(gdb) info locals
|
||||
value = 5
|
||||
test = 512
|
||||
my_struct = { a = 5, b = 512, c = 23323.5235 }
|
||||
</pre>
|
||||
|
||||
+7
-3
@@ -37,10 +37,14 @@
|
||||
|
||||
There is a very interesting project to make a JavaVM for .NET
|
||||
<a href="http://radio.weblogs.com/0109845/">here</a>.
|
||||
Currently this will not work with Mono, as they use some
|
||||
pieces of Managed C++ to implement the JNI interface.
|
||||
|
||||
A workaround has been discussed, contact the author if you want to contribute.
|
||||
Zoltan has got IKVM to work with Mono.
|
||||
|
||||
<a name="PHP">
|
||||
** PHP
|
||||
|
||||
Sterling has code to allow PHP developers to use Mono code, in
|
||||
his <a href="http://www.php.net/~sterling/mono/">site</a>
|
||||
|
||||
<a name="MonoLogo">
|
||||
** MonoLogo
|
||||
|
||||
@@ -92,6 +92,11 @@
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
* Alternative archive site
|
||||
|
||||
An alternate site that archives Mono List is available <a
|
||||
href="http://archive.neotonic.com/archive/mono-list">http://archive.neotonic.com/archive/mono-list</a>
|
||||
|
||||
* Google search of the archives
|
||||
|
||||
<!-- Google Search with mods -->
|
||||
|
||||
+14
-2
@@ -155,8 +155,20 @@ export PKG_CONFIG_PATH
|
||||
# /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS. We could
|
||||
# skip this if it would add /usr/include and /usr/lib, but leaving it
|
||||
# shouldnt break anything.
|
||||
iconvh=`locate include/iconv.h`
|
||||
iconvh_dir=`dirname $iconvh`
|
||||
iconvdirs="/usr/include /usr/local/include"
|
||||
for i in $iconvdirs
|
||||
do
|
||||
if [ -f $i/iconv.h ]; then
|
||||
iconvh_dir=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$iconvh_dir" ]; then
|
||||
echo "Can't find iconv headers (looked in $iconvdirs)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'`
|
||||
|
||||
echo "Adding $iconvh_dir to CPPFLAGS"
|
||||
|
||||
@@ -1,66 +1,329 @@
|
||||
* MySQL Data Provider
|
||||
|
||||
<ul>
|
||||
<li>MySQL Data Provider for
|
||||
<a href="http://www.mysql.com/">MySQL</a> databases. It is written in C# and uses
|
||||
the MySQL C Client Library
|
||||
<p>There are two ADO.NET providers in Mono
|
||||
for a <a href="http://www.mysql.com/">MySQL</a> database:
|
||||
|
||||
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql
|
||||
|
||||
<li>Works on Windows and Linux via the MySQL client shared library
|
||||
(libmySQL.dll on Windows and libmysqlclient.so on Linux).
|
||||
|
||||
<li>Started by Daniel Morgan using C# Bindings to MySQL from Brad Meril.
|
||||
|
||||
<li><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL in the Microsoft .NET Environment</a> is an article
|
||||
by Mr. Venu who is a MySQL AB developer.
|
||||
|
||||
<li>Other projects which have created a .NET Data provider for MySQL in C#
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">ByteFX.Data.MySQLClient</a>
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL provider written in C#
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager provider written in C#
|
||||
|
||||
<li>Written in 100% C#</li>
|
||||
<li>Does not require a client library</li>
|
||||
<li>Works on Mono and Microsoft .NET</li>
|
||||
<li>Requires at least Mono 0.18 and MySQLNet 0.65 for it to work on Mono</li>
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Deprecated in favor of ByteFX.Data.MySQLClient
|
||||
|
||||
<li>Written in C# and uses
|
||||
the MySQL C Client Library</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql</li>
|
||||
|
||||
<li>Works on Windows and Linux via the MySQL client shared library
|
||||
(libmySQL.dll on Windows and libmysqlclient.so on Linux).</li>
|
||||
|
||||
<li>Started by Daniel Morgan using
|
||||
<a href="http://www.cybercom.net/~zbrad/DotNet/MySql/">C# Bindings to MySQL</a> from <a href="mailto:[email protected]">Brad Merill</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL
|
||||
in the Microsoft .NET Environment</a> is an article
|
||||
by Mr. Venu who is a MySQL AB developer.</li>
|
||||
|
||||
<p>Testing for Mono's Mono.Data.MySql and ByteFX's ByteFX.Data.MySQLClient is below.
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
Current Status of the MySQL providers:
|
||||
|
||||
<ul>
|
||||
<li>can connect
|
||||
|
||||
<li>ByteFX.Data.MySQLClient
|
||||
<ul>
|
||||
<li>Build and Runs on Microsoft .NET and Mono</li>
|
||||
<li>Works with SQL# (command-line and GTK# GUI versions)</li>
|
||||
<li>MySQLCommandBuilder now implemented</li>
|
||||
<li>Transaction support now implemented (not all table types support this)</li>
|
||||
<li>GetSchemaTable fixed to not use xsd (for Mono)</li>
|
||||
<li>Driver is now Mono-compatible</li>
|
||||
<li>TIME data type now supported</li>
|
||||
<li>More work to improve Timestamp data type handling</li>
|
||||
<li>Changed signatures of all classes to match corresponding SqlClient classes</li>
|
||||
<li>Protocol compression using <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a></li>
|
||||
<li>Named pipes on Windows now working properly</li>
|
||||
<li>Work done to improve Timestamp data type handling</li>
|
||||
<li>Implemented IEnumerable on DataReader so DataGrid would work</li>
|
||||
<li>Speed increased dramatically by removing bugging network sync code</li>
|
||||
<li>Driver no longer buffers rows of data (more ADO.Net compliant)</li>
|
||||
<li>Conversion bugs related to TIMESTAMP and DATETIME fields fixed</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>can execute non-queries via ExecuteNonQuery()
|
||||
|
||||
<li>can execute aggregates via ExecuteScalar() and retrieve the
|
||||
single row/single column result
|
||||
|
||||
<li>can execute queries and retrieve results using a data reader.
|
||||
|
||||
<li>a schema DataTable has been partially
|
||||
implemented which is returned from GetSchemaTable() in MySqlDataReader.
|
||||
|
||||
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Currently, only works with version 3.23.x of MySQL</li>
|
||||
|
||||
<li>The shared client libraries
|
||||
between windows version and linux are different: windows has libmySQL.dll
|
||||
while linux has libmysqlclient.so. This is handled by the
|
||||
file etc/mono/config which is mapped by the mono runtime in knowing
|
||||
which native shared library to load. In cvs, this file is mono/config.in and
|
||||
can be modified with a text editor.
|
||||
<li>can connect</li>
|
||||
|
||||
<li>can execute non-queries via ExecuteNonQuery()</li>
|
||||
|
||||
<li>can execute aggregates via ExecuteScalar() and retrieve the
|
||||
single row/single column result</li>
|
||||
|
||||
<li>can execute queries and retrieve results using a data reader.</li>
|
||||
|
||||
<li>a schema DataTable has been partially
|
||||
implemented which is returned from GetSchemaTable() in MySqlDataReader.</li>
|
||||
|
||||
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter</li>
|
||||
|
||||
<li>The shared client libraries
|
||||
between windows version and linux are different: windows has libmySQL.dll
|
||||
while linux has libmysqlclient.so. This is handled by the
|
||||
file etc/mono/config which is mapped by the mono runtime in knowing
|
||||
which native shared library to load. In cvs, this file is mono/config.in and
|
||||
can be modified with a text editor.</li>
|
||||
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Action plan
|
||||
** Action plan
|
||||
|
||||
The current plan to work on the MySQL data provider:
|
||||
The current plan for the MySQL data providers:
|
||||
|
||||
<ul>
|
||||
<li>ByteFX.Data.MySQLClient
|
||||
<ul>
|
||||
<li>Testing and fixes</li>
|
||||
<li>Implement missing features</li>
|
||||
<li>Only fixes for bugs to build and run MySQLClient on Mono
|
||||
will be accepted in mono-cvs. Most bugs and any new features will
|
||||
go into sourceforge cvs. Anytime there is a release of MySQLClient,
|
||||
the source code will be copied from sourceforge cvs to mono-cvs</li>
|
||||
<li>Releases of MySQLClient are determined by Reggie Burnett and releases
|
||||
of Mono are determined by Miguel de Icaza</li>
|
||||
<li>Implement any missing features or fix any bugs in Mono to get new
|
||||
features all of MySQLClient to work on Mono</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Testing and bug fixes</li>
|
||||
<li>Mono.Data.MySql is deprecated and therefore maybe removed
|
||||
at a later date. It will stay in Mono for now because other
|
||||
programs maybe using it now.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
** Testing for MySQLNet provider (ByteFX.Data.MySQLClient)
|
||||
|
||||
<ul>
|
||||
<li>Have access to a MySQL database or download it from
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>MySQLNet can be gotten from <a href="http://sourceforge.net/projects/mysqlnet/">here</a> and the
|
||||
binary assembly ByteFX.Data.dll needs to be installed
|
||||
in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>MySQLNet requires <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a> which is
|
||||
a Zip Library written in 100% C#. This is used for compression/decompression of data
|
||||
sent/received over the network. The SharpZipLib binary assembly SharpZipLib.dll should
|
||||
be installed in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Server=hostname;" +
|
||||
"Database=database;" +
|
||||
"User ID=username;" +
|
||||
"Password=password"
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using ByteFX.Data.MySQLClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Parameters support via MySqlParameter and MySqlParameterCollection
|
||||
|
||||
<li>Support LOBs (Large Object)
|
||||
|
||||
<li>Change the MySQL provider to not be dependent on a client library and
|
||||
be written in 100% C#
|
||||
|
||||
<li>Connection pooling
|
||||
|
||||
<li>Get the provider to work like other data providers
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r ByteFX.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r ByteFX.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing for Mono's MySQL provider (Mono.Data.MySql)
|
||||
|
||||
<ul>
|
||||
<li>Have access to a MySQL database or download it from
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Take a look at MySqlTest.cs in mcs/class/Mono.Data.MySql/Test</li>
|
||||
<li>On Linux, you may need to make a symbolic link from libmySQL.dll to libmysqlclient.dll</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Server=hostname;Database=database;User ID=username;Password=password"
|
||||
(or)
|
||||
"Host=hostname;Dbname=database;User=username;Passwd=password"
|
||||
</pre>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.MySql;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySqlConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.MySql.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.MySql.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1,52 +1,218 @@
|
||||
* ODBC Data Provider
|
||||
<ul>
|
||||
<li>Exists in namespace System.Data.Odbc and assembly System.Data
|
||||
|
||||
<li>Works on Windows and Linux
|
||||
|
||||
<li>Works on Windows via the native Windows odbc32.dll
|
||||
|
||||
<li>Works on Linux via <a href="http://www.unixodbc.org/">unixODBC</a>
|
||||
|
||||
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a> and
|
||||
an alternative list
|
||||
|
||||
<li>An alternative to unixODBC, but not tested with this
|
||||
provider is <a href="http://www.iodbc.org">iODBC</a>
|
||||
|
||||
<li>Another alternative to unixODBC, but not tested this provider is
|
||||
<a href="http://oplweb.openlinksw.com:8080/download/">OpenLink's</a>.
|
||||
<ul>
|
||||
|
||||
<li>ADO.NET Data Provider for Data Sources
|
||||
that have <a href="http://www.microsoft.com/data/odbc/">ODBC</a> support.</li>
|
||||
|
||||
<li>Exists in namespace System.Data.Odbc and assembly System.Data</li>
|
||||
|
||||
<li>Works on Windows and Linux. Should have no problems working on UNIX too.</li>
|
||||
|
||||
<li>Works on Windows via the native Windows odbc32.dll</li>
|
||||
|
||||
<li>Works on Linux via:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.unixodbc.org/">unixODBC</a> which has
|
||||
commercial support
|
||||
from <a href="http://www.easysoft.com/">Easysoft</a></li>
|
||||
|
||||
<li><a href="http://www.iodbc.org/">iODBC</a> which has
|
||||
commercial support
|
||||
from <a href="http://oplweb.openlinksw.com:8080/download/">OpenLink Software</a></li>
|
||||
</ul>
|
||||
|
||||
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a>
|
||||
|
||||
<li>List of <a href="http://ourworld.compuserve.com/homepages/Ken_North/odbcvend.htm">ODBC Vendors</a>
|
||||
|
||||
<li>ODBC can connect to various databases which has an ODBC driver installed:
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a></li>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
|
||||
<li><a href="http://www.oracle.com/">Oracle</a></li>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a> on UNIX)</li>
|
||||
</ul>
|
||||
|
||||
<li>ODBC Provider created by Brian Ritchie.
|
||||
<li>ODBC Provider created by Brian Ritchie.</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Connect on Windows via native Windows odbc32.dll
|
||||
|
||||
<li>Connect on Linux via unixODBC's libodbc.so
|
||||
<li>Can Connect on:
|
||||
<ul>
|
||||
<li>Windows via native Windows odbc32.dll</a></li>
|
||||
<li>Linux via:
|
||||
<ul>
|
||||
<li>unixODBC's libodbc.so</li>
|
||||
<li>iODBC's libiodbc.so</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Various databases have been tested using their
|
||||
ODBC drivers: MySQL, Oracle, IBM DB2, and Microsoft SQL Server
|
||||
ODBC drivers: MySQL, PostgreSQL, Oracle, IBM DB2, and Microsoft SQL Server</li>
|
||||
|
||||
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand
|
||||
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand</li>
|
||||
|
||||
<li>Can execute aggreates and retrieve a single row single column result via
|
||||
ExecuteScalar of a OdbcCommand
|
||||
ExecuteScalar of a OdbcCommand</li>
|
||||
|
||||
<li>Can execute queries via ExecuteReader of a OdbcCommand and
|
||||
retrieve results using an OdbcDataReader.
|
||||
retrieve results using an OdbcDataReader</li>
|
||||
|
||||
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader</li>
|
||||
|
||||
<li>Can Fill a DataTable in a DataSet via an OdbcDataAdapter</li>
|
||||
|
||||
<li>Works in SQL#, but Column names don't show up correctly.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader
|
||||
</ul>
|
||||
|
||||
* Action Plan
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Create a Data Adapter to Fill data into a DataTable in a DataSet
|
||||
|
||||
<li>TODO
|
||||
<li>Fixing bugs
|
||||
|
||||
<li>Testing with other setups
|
||||
</ul>
|
||||
|
||||
** Testing ODBC provider with IBM DB2 Universal Database
|
||||
|
||||
<ul>
|
||||
<li>You need a working mono and mcs</li>
|
||||
|
||||
<li>For Unix, you will need unixODBC or iODBC installed</li>
|
||||
|
||||
<li>Have acess to a <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a> or
|
||||
you can download from IBM</li>
|
||||
|
||||
<li>Read these web pages about Unix, ODBC, and IBM DB2
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.unixodbc.com/doc/db2.html">unixODBC web page about IBM DB2</a></li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/udb/ad/v8/cli/t0010406">IBM web page about unixODBC and DB2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>The ODBC provider is similar to the <a href="http://www.go-mono.com/ibmdb2.html">IBM DB2</a> provider.</li>
|
||||
</ul>
|
||||
|
||||
** Testing ODBC provider with MySQL
|
||||
|
||||
<p>You can test Mono's ODBC provider System.Data.Odbc with the MySQL ODBC driver MyODBC
|
||||
|
||||
<p><ul>
|
||||
<li>Take a look at OdbcTest.cs in mcs/class/System.Data/Test</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you have a DSN setup:
|
||||
<pre>
|
||||
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
<li>Here is a ConnectionString format if you do not have a DSN (have not
|
||||
gotten this to work though):
|
||||
<pre>
|
||||
"DRIVER={MySQL ODBC 3.51 Driver};" +
|
||||
"SERVER=localhost;DATABASE=test;" +
|
||||
"UID=myuserid;PASSWORD=mypassword;" +
|
||||
"OPTION=3";
|
||||
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Odbc;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// have an ODBC DSN setup named MYSQLDSN
|
||||
// that accesses a MySQL database via
|
||||
// MyODBC driver for ODBC with a
|
||||
// hostname of localhost and database test
|
||||
string connectionString =
|
||||
"DSN=MYSQLDSN;" +
|
||||
"UID=myuserid;" +
|
||||
"PWD=mypassword";
|
||||
IDbConnection dbcon;
|
||||
dbcon.Open();
|
||||
dbcon = new OdbcConnection(connectionString);
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1,53 +1,153 @@
|
||||
* OLE DB Provider
|
||||
|
||||
<ul>
|
||||
<li> Provides a OleDb-like provider for Mono
|
||||
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.
|
||||
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.</li>
|
||||
|
||||
<li> Exists in namespace System.Data.OleDb and assembly System.Data
|
||||
<li> Exists in namespace System.Data.OleDb and assembly System.Data</li>
|
||||
|
||||
<li>Created by Rodrigo Moya
|
||||
<li>Created by Rodrigo Moya</li>
|
||||
|
||||
<li>LibGDA has providers for:
|
||||
<li>LibGDA has providers for:</li>
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
<li>XML
|
||||
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)
|
||||
<li><a href="http://www.oracle.com/">Oracle</a>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a></li>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
|
||||
<li>XML</li>
|
||||
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)</li>
|
||||
<li><a href="http://www.oracle.com/">Oracle</a></li>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a> and
|
||||
<a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a>)
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
|
||||
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a>)</li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a></li>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a></li>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
<ul>
|
||||
<li>The OleDb provider is working with libgda (an OLE-DB/ADO data access for Unix).
|
||||
The C-Sharp bindings to libgda currently work - meaning they can compile, run,
|
||||
and you can connect to a
|
||||
PostgreSQL database via libgda via the C-Sharp bindings to libgda.
|
||||
PostgreSQL database via libgda via the C-Sharp bindings to libgda.</li>
|
||||
|
||||
<li>Basic
|
||||
functionality (execution of commands, data retrieval, transactions, etc) are
|
||||
now working.
|
||||
now working.</li>
|
||||
|
||||
<li>An inital implementation of GetSchemaTable() for
|
||||
the OleDbDataReader has been checked into cvs. GetSchemaTable() isn't correct for OleDb,
|
||||
but the foundation is there.
|
||||
but the foundation is there.</li>
|
||||
</ul>
|
||||
|
||||
* Action Plan
|
||||
** Action Plan
|
||||
<ul>
|
||||
<li>Current focus is on filling up the missing pieces (Data adapters
|
||||
mainly) and schema support.
|
||||
mainly) and schema support.</li>
|
||||
|
||||
<li>We need help building libgda on Windows though. libgda
|
||||
builds find on linux though.
|
||||
builds find on linux though.</li>
|
||||
|
||||
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET
|
||||
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET</li>
|
||||
</ul>
|
||||
|
||||
** Testing OleDb with libgda's PostgreSQL provider
|
||||
|
||||
<ul>
|
||||
<li>Requires a working mono and mcs</li>
|
||||
<li>Requires Linux because the OleDb provider uses libgda and libgda only
|
||||
works on Linux.</li>
|
||||
<li>Connection String format: "Provider=providerName;...". providerName is the
|
||||
name of the Provider you use, such as, PostgreSQL, MySQL, etc. The elipsis ...
|
||||
means that the connection parameters are dependent upon the provider being used and
|
||||
are passed to libgda for connecting. Such paramters, can be: Database, User ID, Password,
|
||||
Server, etc...</li>
|
||||
<li>See the test TestOleDb.cs found at mcs/class/System.Data/System.Data.OleDb</li>
|
||||
<li>C# Example for Mono's System.Data.OleDb:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// there is a libgda PostgreSQL provider
|
||||
string connectionString =
|
||||
"Provider=PostgreSQL;" +
|
||||
"Addr=127.0.0.1;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OleDbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+161
-29
@@ -1,52 +1,184 @@
|
||||
* Oracle Data Provider
|
||||
|
||||
<ul>
|
||||
|
||||
<li>ADO.NET Data Provider for <a href="http://www.oracle.com/">Oracle</a> databases</li>
|
||||
|
||||
<li>Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient</li>
|
||||
|
||||
<li>Works on Windows</li>
|
||||
|
||||
<li>Works with Oracle 8i</li>
|
||||
|
||||
<li>More information about Oracle can be found at <a href="http://www.oracle.com/"/>here</a></li>
|
||||
<li>Works on Windows and Linux</li>
|
||||
|
||||
<li>Works with Oracle 8i</li>
|
||||
|
||||
<li>Untested, but should work with Oracle 9i</li>
|
||||
|
||||
<li>Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
|
||||
software</li>
|
||||
|
||||
<li>Internally, the OracleClient provider has OCI abstracted to an object-oriented programming model</li>
|
||||
|
||||
<li>Created by Daniel Morgan and Tim Coleman</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>OracleConnection can connect to an Oracle 8i database on
|
||||
Windows via oci.dll</li>
|
||||
<li>OracleConnection can connect and disconnect to an Oracle 8i database on
|
||||
Windows and Linux via OCI (Oracle Call-level Interface)</li>
|
||||
|
||||
<li>The native glue library only has makefiles for Borland C++ and
|
||||
Microsoft Visual C++ command line compilers. Only the makefile for
|
||||
Microsoft Visual C++ command-line compiler has been tested.</li>
|
||||
<li>No longer uses a glue library (a library between the System.Data.OracleClient.dll
|
||||
assembly and the oci library). In Current Mono cvs, System.Data.OracleClient
|
||||
directly platform invokes into the oci library thanks to Tim Coleman.</li>
|
||||
|
||||
<li>Can have multiple connections with different transactions where each transaction is
|
||||
separated from the others, so a rollback or commit in one transaction
|
||||
does not affect the other.</li>
|
||||
|
||||
<li>Can execute simple DML SQL statements, such as,
|
||||
INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method</li>
|
||||
|
||||
|
||||
<li>The System.Data.OracleClient.dll assembly can be built with mcs/mono via
|
||||
the makefile.gnu for System.Data.OracleClient or csc/.net via the
|
||||
System.Data.OracleClient.build nant build file. There is also a Visual Studio.NET
|
||||
solution it too.
|
||||
System.Data.OracleClient.build nant build file.</li>
|
||||
|
||||
<li>Can retrieve data via ExecuteReader and OracleDataReader. Currently,
|
||||
supports character, numeric, some date data types. ExecuteScalar
|
||||
also works.</li>
|
||||
|
||||
<li>Simple input parameters (character and numeric data) can now
|
||||
be used in SQL queries. Output parameters do not yet work.</li>
|
||||
|
||||
<li>OracleException and Error handling exists now.</li>
|
||||
|
||||
<li>Message handling needs to be added for non-critical messages
|
||||
received from Oracle</li>
|
||||
|
||||
<li>Handling of various data types need to be added.</li>
|
||||
|
||||
<li>Data Adapter exists, and a DataSet can be filled using it. The
|
||||
Data Adapter is abstract enough that it should work as expected.</li>
|
||||
|
||||
<li>Lots of missing functionality and bugs.</li>
|
||||
|
||||
<li>Works with SQL# command-line and GTK# versions in cvs. Only works with
|
||||
simple character data though. SQL# For GTK# can only show the results to
|
||||
the TextView because the Data Adapter is not yet available</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Action Plan
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Get the makefile for the Borland C++ compiler to work
|
||||
since the <a href="http://www.borland.com/">Borland</a> C++ compiler is
|
||||
a free download</li>
|
||||
<li>Get the native glue lib System.Data.OracleClient.ocigule.dll to be built
|
||||
using gcc on Linux. This would require that Oracle 8i client software be installed
|
||||
on Linux with the oci headers and shared libraries</li>
|
||||
<li>Be able to retrieve results via a data reader</li>
|
||||
<li>Parameters support</li>
|
||||
<li>Be able to retrieve results via a data reader (WORKING)</li>
|
||||
<li>Parameters support (IN PROGRESS)</li>
|
||||
<li>transactions (WORKING)</li>
|
||||
<li>Stored Procedures, Functions, and Packages support</li>
|
||||
<li>Be able to fill a DataTable in a DataSet via a data adapter</li>
|
||||
<li>Support for Oracle 9i</li>
|
||||
<li>Figure out how to move the unmanaged OCI handling code in
|
||||
the oci glue C library to the managed C# assembly. I have been unable
|
||||
to successfully connect to an Oracle 8i database by using Platform Invoke and
|
||||
Marshalling in C# to the oci shared library (oci.dll on Windows)</li>
|
||||
<li>Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)</li>
|
||||
<li>Support for Oracle 8i and 9i (UNKNOWN)</li>
|
||||
<li>Support LOBs</li>
|
||||
<li>Support all the data types</li>
|
||||
<li>Implement Connection pooling</li>
|
||||
<li>Security</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing System.Data.OracleClient
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Have access to an Oracle 8i database or download it from
|
||||
<a href="http://www.oracle.com/">Oracle</a>. If you are connecting
|
||||
remotely to an Oracle database, you need the Oracle client software.
|
||||
Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
|
||||
I suggest you do a lot of searching to see how others installed Oracle on Linux.</li>
|
||||
|
||||
<li>Make sure System.Data.OracleClient.dll assembly is built, if not, go
|
||||
into System.Data.OracleClient and do a make -f makefile.gnu (on Linux) or
|
||||
../../nant/NAnt.exe (on Windows using Cygwin).</li>
|
||||
|
||||
<li>Take a look at TestOracleClient.cs found at mcs/class/System.Data.OracleClient/Test</li>
|
||||
|
||||
<li>The Data Source is an Oracle TNSNAME</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
"Data Source=tnsname;User ID=userid;Password=password"
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OracleClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Data Source=testdb;" +
|
||||
"User ID=scott;" +
|
||||
"Password=tiger;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OracleConnection (connectionString);
|
||||
dbcon.Open ();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand ();
|
||||
string sql = "SELECT ename, job FROM scott.emp";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader ();
|
||||
while (reader.Read ()) {
|
||||
string employeeName = reader["ename"];
|
||||
string job = reader["job"];
|
||||
Console.WriteLine ("Employee Name: {0} Job: {1}",
|
||||
employeeName, job);
|
||||
}
|
||||
// clean up
|
||||
reader.Close ();
|
||||
reader = null;
|
||||
dbcmd.CommandText = sql;
|
||||
dbcmd.ExecuteNonQuery ();
|
||||
dbcmd.Dispose ();
|
||||
dbcmd = null;
|
||||
dbcon.Close ();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r System.Data.OracleClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r System.Data.OracleClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
* International sites
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://mono.es.gnome.org">Mono
|
||||
Hispano</a>: The spanish-speaking community of Mono
|
||||
developers and users. They have quite a number of
|
||||
unique documents and tutorials.
|
||||
|
||||
<li><a href="http://www.go-mono.pl">Mono Poland</a>:
|
||||
Mono site for polish users.
|
||||
|
||||
</ul>
|
||||
|
||||
* User sites
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Alp Toker's <a
|
||||
href="http://www.atoker.com/mono/">site</a>: He is an
|
||||
active Mono developer (gsirc, platano) and produces
|
||||
very nice Debian packages of Mono.
|
||||
|
||||
<li>Brian Ritchie's <a
|
||||
href="http://www12.brinkster.com/brianr/">site</a>:
|
||||
Brian is a contributor to Mono's class library (ODBC
|
||||
provider and the database multiplexing assembly), and
|
||||
has built an application server for .NET and Mono.
|
||||
His site contains news, software, as well as his
|
||||
weblog.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
+297
-231
@@ -1,81 +1,187 @@
|
||||
* PostgreSQL Data Provider
|
||||
|
||||
There are two ADO.NET data providers for <a href="http://www.postgresql.org/">PostgreSQL</a> in Mono:
|
||||
|
||||
<ul>
|
||||
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql
|
||||
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
<ul>
|
||||
<li>a .NET Managed Data Provider for PostgreSQL
|
||||
|
||||
<li>Written in 100% C#</li>
|
||||
|
||||
<li>does not require a client library</li>
|
||||
|
||||
<li>works on Mono and Microsoft .NET</li>
|
||||
|
||||
<li>created by Francisco Figueiredo jr. and has many developers working on it
|
||||
|
||||
<li>works in the SQL# (command-line and GTK# GUI versions)</li>
|
||||
|
||||
<li>in namespace Npgsql and assembly Npgsql and is found in mcs
|
||||
at mcs/class/Npgsql</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
client/server database management system.
|
||||
<li>Mono.Data.PostgreSQL (deprecated)
|
||||
<ul>
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql</li>
|
||||
|
||||
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
|
||||
and libpq.so on Linux.
|
||||
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
client/server database management system.</li>
|
||||
|
||||
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
|
||||
and libpq.so on Linux.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
Below, see separate Testing sections for Npgsql and Mono.Data.PostgreSqlClient.
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Npgsql
|
||||
<ul>
|
||||
<li>Builds and Runs on both Microsoft .NET and Mono.</li>
|
||||
<li>Works using SQL# (command-line and GTK# versions)</li>
|
||||
<li>You can send insert, update, delete queries
|
||||
through NpgsqlCommand.ExecuteNonQuery() method.</li>
|
||||
<li>You can send queries like, select count(*) from table, select version()
|
||||
with NpgsqlCommand.ExecuteScalar() method.</li>
|
||||
<li>There is logging support. (Thanks Dave Page)
|
||||
To use it, place code like that in your program:</li>
|
||||
|
||||
<pre>
|
||||
// Enable logging.
|
||||
NpgsqlEventLog.Level = LogLevel.Debug; // LogLevel.
|
||||
NpgsqlEventLog.LogName = "NpgsqlTests.LogFile"; // LogFile.
|
||||
</pre>
|
||||
|
||||
<li>You can use Npgsql with Mono (Thanks Kristis Makris). It is not working perfectly.</li>
|
||||
<li>There is a winforms test suite (Thanks Dave Page).</li>
|
||||
<li>Clearer code in NpgsqlConnection removing *magic* numbers and constants. (Thanks Kristis Makris)</li>
|
||||
<li>Better support of ODBC-like ConnectionString in NpgsqlConnection (Thanks Dave Page)</li>
|
||||
<li>Thanks Ulrich Sprick for all discussion and ideas.</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mono.Data.PostgreSQL status
|
||||
<ul>
|
||||
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>We are able to do simple CREATE TABLE, DROP TABLE, UPDATE, INSERT, and
|
||||
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.
|
||||
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.</li>
|
||||
|
||||
<li>We can execute multiple queries and do a NextResult() in PgSqlDataReader()
|
||||
to get the next result set.
|
||||
to get the next result set.</li>
|
||||
|
||||
<li>We are also able to do simple aggregate functions,
|
||||
ie, count(), sum(), min(), and max()
|
||||
in a simple SELECT SQL query using the ExecuteScalar() now.
|
||||
in a simple SELECT SQL query using the ExecuteScalar() now.</li>
|
||||
|
||||
<li>We are also able to retrieve data with a simple SELECT SQL query
|
||||
using ExecuteReader() which returns a PgSqlDataReader. We are able to
|
||||
use GetSchemaTable() to get the meta data about the table columns.
|
||||
We are able to Read() to get each row from the result set.
|
||||
We are able to Read() to get each row from the result set.</li>
|
||||
|
||||
<li>We are able to get
|
||||
String data (char, character, text, varchar), Int16 (smallint),
|
||||
Int32 (integer), Int64 (bigint), DateTime (time, date, timestamp),
|
||||
Boolean (boolean), Single (float), and Double (double).
|
||||
More data types will come later. Note, the types that do work still
|
||||
need thorough testing.
|
||||
need thorough testing.</li>
|
||||
|
||||
<li>Rows that are returned which contain columns that are NULL are handled now.
|
||||
The PgSqlDataReader method IsDBNull() needs to be called to determine
|
||||
if a field IS NULL before trying to read data from that field.
|
||||
if a field IS NULL before trying to read data from that field.</li>
|
||||
|
||||
<li>Calling PostgreSQL stored procedures works. It does not work perfectly.
|
||||
It may not
|
||||
even work to specification - yet. If you want to test it yourself, look at
|
||||
TestSqlDataReader.cs or PostgresTest.cs in
|
||||
mcs/class/System.Data/Test.
|
||||
mcs/class/System.Data/Test.</li>
|
||||
|
||||
<li>Below, I have some sample code you can
|
||||
use to call a PostgreSQL stored procedure named "version". This stored
|
||||
procedure returns a string containing the PostgreSQL server version. Notice
|
||||
the CommandType is StoredProcedure and the method ExecuteScalar() is called.
|
||||
the CommandType is StoredProcedure and the method ExecuteScalar() is called.</li>
|
||||
|
||||
<li>ExecuteScalar() is a lightweight method in class PgSqlCommand that only returns
|
||||
one row and one column as one object - even if there is more than row or column.
|
||||
one row and one column as one object - even if there is more than row or column.</li>
|
||||
|
||||
<li>We have the beginnings of Parameters support PostgreSQL. Only
|
||||
Input Parameters are currently supported. Output, Input/Output,
|
||||
and Return parameters still need to be done.
|
||||
|
||||
<li>A lot of functionality in System.Data is missing, but the
|
||||
infrastructure is starting to come together.
|
||||
and Return parameters still need to be done.</li>
|
||||
|
||||
<li>A lot of Exceptions need to be thrown for various exceptions. However,
|
||||
PgSqlException, PgSqlErrorCollection, and PgSqlError have been partially
|
||||
implemented.
|
||||
implemented.</li>
|
||||
|
||||
<li>Tim Coleman and Rodrigo Moya got the beginnings of the
|
||||
PgSqlDataAdapter/DataSet/DataTable/DataRow to work. Currently,
|
||||
the PgSqlDataAdapter can Fill() relational data into a DataTable in a DataSet.
|
||||
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.
|
||||
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.</li>
|
||||
|
||||
<li>Works in the SQL# command-line version
|
||||
and the GTK# version on Linux. It only works in SQL# command-line version
|
||||
on Windows.</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Testing the PostgreSQL Provider
|
||||
** Action Plan
|
||||
<ul>
|
||||
<li>More testing and fixing bugs</li>
|
||||
|
||||
<li>Better error handling</li>
|
||||
|
||||
<li>More Data Types to use</li>
|
||||
|
||||
<li>Any features for Npgsql should be implemented in Npgsql's main cvs repository at
|
||||
gborg.postgresql.org. Most bugs should be fixed in gborg.postgresql.org's cvs.
|
||||
Only bugs neccessary for building and running of Npgsql on Mono can be done in Mono cvs,
|
||||
but once applied they should be sent to Npgsql's mailing list
|
||||
at gborg.postgresql.org for inclusion into cvs there. Whenever there is
|
||||
a release of Npgsql (determined by Francisco Figueiredo jr. or a release
|
||||
of Mono (determined by Miguel de Icaza), then the Npgsql source
|
||||
in gborg.postgresql.org's cvs will be used to update the Npgsql source in
|
||||
Mono's cvs.
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.PostgreSqlClient even though deprecated can still
|
||||
accept bug fixes. This is because other areas, such as, ASP.NET examples
|
||||
may still use this provider.</li>
|
||||
|
||||
<li>Add any missing functionality to Npgsql. If this funtionality works on
|
||||
.NET but not on Mono, implement the missing features or fix the bugs in Mono</li>
|
||||
|
||||
<li>Npgsql has replaced Mono.Data.PostgreSqlClient as the provider of
|
||||
choice to use. However, Mono.Data.PostgreSqlClient will remain in a
|
||||
deprecated state until nobody uses it anymore - then it can be removed</li>
|
||||
|
||||
<li>Implement more of PostgreSQL 7.3 features in Npgsql</li>
|
||||
</ul>
|
||||
|
||||
** Testing Mono.Data.PostgreSqlClient
|
||||
|
||||
<ul>
|
||||
* <p>In order to test Mono.Data.PostgreSqlClient, you will need to have
|
||||
access to a remote PostgreSQL DBMS, or you will have to install
|
||||
one locally. PostgreSQL was first ADO.NET provider created in Mono.
|
||||
one locally. PostgreSQL was the first ADO.NET provider created in Mono.
|
||||
|
||||
<p>Why use PostgreSQL? Because it is free software, has a client
|
||||
library that is easy to use, PostgreSQL is easy to install on
|
||||
@@ -94,7 +200,9 @@
|
||||
user "postgres".
|
||||
|
||||
<pre>
|
||||
"host=localhost;dbname=test;user=postgres"
|
||||
"Server=localhost;Database=test;User ID=postgres;Password=fun2db"
|
||||
(or)
|
||||
"host=localhost;dbname=test;user=postgres;password=fun2db"
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
@@ -179,9 +287,15 @@ create user postgres with password 'fun2db';
|
||||
* <p>Important notes from this file are:
|
||||
|
||||
<ul>
|
||||
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/OBSOLETE/V1.1/cygipc/index.html">CygIPC</a> package.
|
||||
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html">CygIPC</a> package.
|
||||
Cygwin includes a utility bunzip2 which can be used to unzip it. Now, change to
|
||||
the root directory by
|
||||
typing "cd /" then
|
||||
you can use "tar xvf cygipc.xxx.tar" to untar it
|
||||
in the root directory in cygwin.
|
||||
|
||||
<p>The cygipc package contains the ipc-daemon you will need
|
||||
<p>The cygipc package contains the support to run ipc-daemon
|
||||
that you will need
|
||||
to run before you can
|
||||
run the PostgreSQL DBMS Server daemon (postmaster) or run
|
||||
initdb which initializes the PostgreSQL database.
|
||||
@@ -267,34 +381,9 @@ create user postgres with password 'fun2db';
|
||||
</ul>
|
||||
|
||||
<p>In the path mcs/class/System.Data/Test
|
||||
there is a PostgreSQL test program named
|
||||
there is a test for Mono.Data.PostgreSqlClient named
|
||||
PostgreTest.cs. Thanks goes to Gonzalo for creating the original
|
||||
PostgreSQL test.
|
||||
|
||||
<p>To use it to test System.Data, you
|
||||
modify the file to your PostgreSQL database
|
||||
connection requirements:
|
||||
|
||||
<p>
|
||||
<ul>
|
||||
<li><b>dbname</b> database, ie., test</li>
|
||||
<li><b>host</b> hostname of the PostgreSQL DBMS Server, ie., localhost</li>
|
||||
<li><b>user</b> username, ie., someuser</li>
|
||||
<li><b>password</b> password, ie., mypass1234</li>
|
||||
</ul>
|
||||
|
||||
<p>The connection string is in OLE-DB connection string format. Internally,
|
||||
SqlConnection converts this to the PostgreSQL connection string format.
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
OLE-DB: "host=localhost;dbname=test;user=joe;password=smoe"
|
||||
PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Note that OLE-DB includes the semicolons while PostgreSQL's connection
|
||||
string does not.
|
||||
|
||||
<p>
|
||||
To compile the PostgresTest.cs program, do:
|
||||
@@ -310,7 +399,7 @@ PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
|
||||
to PgSqlConnection, then you need to run mcs like:
|
||||
|
||||
<pre>
|
||||
mono f:/cygwin/home/DanielMorgan/mono/install/bin/mcs.exe \
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
PostgresTest.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
@@ -328,185 +417,162 @@ mint PostgresTest.exe
|
||||
To run using mono, do:
|
||||
<pre>
|
||||
mono PostgresTest.exe
|
||||
</pre>
|
||||
|
||||
<p>C# Example for Mono.Data.PostgreSqlClient:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.PostgreSqlClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new PgConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname" +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>Below, I show how the output from PostgresTest. I have omitted a lot
|
||||
of the meta data for the columns except two columns. The classes
|
||||
used were from Mono.Data.PostgreSqlClient and were used to connect to a
|
||||
PostgreSQL database and retrieve data.
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
|
||||
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
|
||||
$ mcs PostgresTest.cs -r System.Data.dll
|
||||
|
||||
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
|
||||
$ mono PostgresTest.exe
|
||||
Postgres provider specific tests...
|
||||
|
||||
Drop table:
|
||||
Error (don't worry about this one)SqlError:PGRES_FATAL_ERROR ERROR:
|
||||
table "mono_postgres_test" does not exist
|
||||
<Stack Trace>
|
||||
|
||||
Create table with all supported types:
|
||||
OK
|
||||
Insert values for all known types:
|
||||
OK
|
||||
Update values:
|
||||
OK
|
||||
Insert values for all known types:
|
||||
OK
|
||||
Aggregate: count(*)
|
||||
Agg Result: 2
|
||||
Aggregate: min(text_value)
|
||||
Agg Result: This is a text
|
||||
Aggregate: max(int4_value)
|
||||
Agg Result: 1048000
|
||||
Aggregate: sum(int4_value)
|
||||
Agg Result: 1048003
|
||||
Select values from the database:
|
||||
Result is from a SELECT SQL Query. Records Affected: -1
|
||||
Result Set 1...
|
||||
Total Columns: 28
|
||||
ColumnName = boolean_value
|
||||
ColumnOrdinal = 1
|
||||
ColumnSize = 1
|
||||
NumericPrecision = 0
|
||||
NumericScale = 0
|
||||
IsUnique = False
|
||||
IsKey =
|
||||
BaseCatalogName =
|
||||
BaseColumnName = boolean_value
|
||||
BaseSchemaName =
|
||||
BaseTableName =
|
||||
DataType = System.Boolean
|
||||
AllowDBNull = False
|
||||
ProviderType = 16
|
||||
IsAliased = False
|
||||
IsExpression = False
|
||||
IsIdentity = False
|
||||
IsAutoIncrement = False
|
||||
IsRowVersion = False
|
||||
IsHidden = False
|
||||
IsLong = False
|
||||
IsReadOnly = False
|
||||
|
||||
...
|
||||
|
||||
ColumnName = null_timestamp_value
|
||||
ColumnOrdinal = 28
|
||||
ColumnSize = 8
|
||||
NumericPrecision = 0
|
||||
NumericScale = 0
|
||||
IsUnique = False
|
||||
IsKey =
|
||||
BaseCatalogName =
|
||||
BaseColumnName = null_timestamp_value
|
||||
BaseSchemaName =
|
||||
BaseTableName =
|
||||
DataType = System.DateTime
|
||||
AllowDBNull = False
|
||||
ProviderType = 1184
|
||||
IsAliased = False
|
||||
IsExpression = False
|
||||
IsIdentity = False
|
||||
IsAutoIncrement = False
|
||||
IsRowVersion = False
|
||||
IsHidden = False
|
||||
IsLong = False
|
||||
IsReadOnly = False
|
||||
|
||||
Gonna do a Read() now...
|
||||
Row 0:
|
||||
Col 0: boolean_value: False
|
||||
Col 1: int2_value: 5
|
||||
Col 2: int4_value: 3
|
||||
Col 3: bigint_value: 9
|
||||
Col 4: float_value: 3.141590
|
||||
Col 5: double_value: 3.14159
|
||||
Col 6: numeric_value: 123456789012.345
|
||||
Col 7: char_value: Mono.Data!
|
||||
Col 8: varchar_value: It was not me!
|
||||
Col 9: text_value: We got data!
|
||||
Col 10: point_value: (1,0)
|
||||
Col 11: time_value: 01/01/1 21:13:14
|
||||
Col 12: date_value: 02/29/2000 00:00:00
|
||||
Col 13: timestamp_value: 02/29/2004 14:00:11
|
||||
Col 14: null_boolean_value is NULL
|
||||
Col 15: null_int2_value is NULL
|
||||
Col 16: null_int4_value is NULL
|
||||
Col 17: null_bigint_value is NULL
|
||||
Col 18: null_float_value is NULL
|
||||
Col 19: null_double_value is NULL
|
||||
Col 20: null_numeric_value is NULL
|
||||
Col 21: null_char_value is NULL
|
||||
Col 22: null_varchar_value is NULL
|
||||
Col 23: null_text_value is NULL
|
||||
Col 24: null_point_value is NULL
|
||||
Col 25: null_time_value is NULL
|
||||
Col 26: null_date_value is NULL
|
||||
Col 27: null_timestamp_value is NULL
|
||||
Row 1:
|
||||
Col 0: boolean_value: True
|
||||
Col 1: int2_value: -22
|
||||
Col 2: int4_value: 1048000
|
||||
Col 3: bigint_value: 123456789012345
|
||||
Col 4: float_value: 3.141590
|
||||
Col 5: double_value: 3.14159
|
||||
Col 6: numeric_value: 123456789012.345
|
||||
Col 7: char_value: This is a char
|
||||
Col 8: varchar_value: This is a varchar
|
||||
Col 9: text_value: This is a text
|
||||
Col 10: point_value: (1,0)
|
||||
Col 11: time_value: 01/01/1 21:13:14
|
||||
Col 12: date_value: 02/29/2000 00:00:00
|
||||
Col 13: timestamp_value: 02/29/2004 14:00:11
|
||||
Col 14: null_boolean_value is NULL
|
||||
Col 15: null_int2_value is NULL
|
||||
Col 16: null_int4_value is NULL
|
||||
Col 17: null_bigint_value is NULL
|
||||
Col 18: null_float_value is NULL
|
||||
Col 19: null_double_value is NULL
|
||||
Col 20: null_numeric_value is NULL
|
||||
Col 21: null_char_value is NULL
|
||||
Col 22: null_varchar_value is NULL
|
||||
Col 23: null_text_value is NULL
|
||||
Col 24: null_point_value is NULL
|
||||
Col 25: null_time_value is NULL
|
||||
Col 26: null_date_value is NULL
|
||||
Col 27: null_timestamp_value is NULL
|
||||
Total Rows Retrieved: 2
|
||||
Total Result sets: 1
|
||||
Call ExecuteReader with a SQL Command.
|
||||
(Not INSERT,UPDATE,DELETE
|
||||
).
|
||||
Result is from a SQL Command not (INSERT,UPDATE,DELETE).
|
||||
Records Affected: -1
|
||||
Total Result sets: 0
|
||||
Call ExecuteReader with a SQL Command.
|
||||
(Is INSERT,UPDATE,DELETE)
|
||||
.
|
||||
Result is from a SQL Command (INSERT,UPDATE,DELETE). Records Affected: 1
|
||||
Total Result sets: 0
|
||||
Calling stored procedure version()
|
||||
Result: PostgreSQL 7.2.1 on i686-pc-cygwin, compiled by GCC 2.95.3-5
|
||||
Database Server Version: PostgreSQL 7.2.1 on i686-pc-cygwin,
|
||||
compiled by GCC 2.9
|
||||
5.3-5
|
||||
Clean up...
|
||||
Drop table...
|
||||
OK
|
||||
RESULT: 0
|
||||
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
* Action Plan
|
||||
** Testing Npgsql
|
||||
|
||||
<p>Eventually replace the PostgreSQL data provider in Mono
|
||||
with <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>.
|
||||
Npgsql is a .Net Data Provider for PostgreSQL which implements
|
||||
the <a href="http://developer.postgresql.org/docs/postgres/protocol.html">PostgreSQL Frontend/Backend Protocol</a>.
|
||||
Npgsql is implemented in 100% C#. This provider was created by Francisco Figueiredo jr.
|
||||
and has many programmers developing the provider.
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Get <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
and make sure the binary assembly Npgsql.dll is installed in the same place that the
|
||||
mono class libraries are located.
|
||||
|
||||
<li>Read the Testing notes for Mono.Data.PostgreSqlClient too
|
||||
|
||||
<li>C# Example for Npgsql:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Npgsql;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db;";
|
||||
IDbConnection dbcon;
|
||||
dbcon.Open();
|
||||
dbcon = new NpgsqlConnection(connectionString);
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Npgsql.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Npgsql.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Executable
+156
@@ -0,0 +1,156 @@
|
||||
* Provider Factory
|
||||
|
||||
<p>Brian Ritchie contributed a Provider Factory and Data Tools for Mono ADO.NET<br>
|
||||
which gives us a foundation for abstract data provider access within Mono
|
||||
|
||||
** Here are the deails:
|
||||
|
||||
<ul>
|
||||
<li>The Provider information is seperate from the connection string information.<br>
|
||||
This allows the list of providers to be stored in the machine.config file.</li>
|
||||
<li>Provider and ProviderCollection objects are available to access <br>
|
||||
the list of providers and modify them at runtime.</li>
|
||||
<li>The ProviderFactory object is used to create new connections, commands,<br>
|
||||
dataadapters, parameters, etc.</li>
|
||||
</ul>
|
||||
|
||||
** Overview of the ProviderFactory object model:
|
||||
|
||||
<ul>
|
||||
<li><b>ProviderFactory</b>: used to create new Connections, Commands,<br>
|
||||
DataAdapters, or Commands. All objects are returned using <br>
|
||||
the provider interfaces such as IDbConnection, IDbCommand,<br>
|
||||
IDbDataAdapter, or IDataParamter</li>
|
||||
|
||||
<li><b>DataTools</b>: static methods for doing <br>
|
||||
common tasks like filling a DataSet <br>
|
||||
with the contents of a select statement.</li>
|
||||
|
||||
<li><b>ProviderCollection</b>: list of providers configured <br>
|
||||
in the system. Initially loaded from app.config, but can <br>
|
||||
be modified at run-time.</li>
|
||||
|
||||
<li><b>Provider</b>: represents a given provider (factory) <br>
|
||||
and holds information needed to <br>
|
||||
create the types.</li>
|
||||
|
||||
<li><b>ProviderSectionHandler</b>: works behind the <br>
|
||||
scenes to load the list of <br>
|
||||
providers from the app.config into a ProviderCollection.</li>
|
||||
</ul>
|
||||
|
||||
** C# source code samples for creating a connection:
|
||||
|
||||
<pre>
|
||||
// Create connection using enhanced connection string
|
||||
// The factory attribute specifies which provider
|
||||
// to use. The factory attribute is parsed out, the
|
||||
// object is created, and then the rest of the
|
||||
// connection string is passed into the provider. The
|
||||
// providers are defined in
|
||||
// the app.config (or machine.config).
|
||||
IDbConnection conn;
|
||||
string connectionString =
|
||||
"factory=System.Data.SqlClient;" +
|
||||
"server=speedy;database=pubs;uid=sa";
|
||||
conn = ProviderFactory.CreateConnection(connectionString);
|
||||
|
||||
// Create connection specifying provider
|
||||
// and standard connection string
|
||||
IDbConnection conn;
|
||||
string provider = "System.Data.SqlClient";
|
||||
string connectionString = "server=speedy;database=pubs;uid=sa";
|
||||
conn = ProviderFactory.CreateConnection(provider,connectionString);
|
||||
|
||||
// Create connection using connection string stored
|
||||
// in app.config under <appSettings>
|
||||
IDbConnection conn;
|
||||
string appSetting = "PubsConnStr";
|
||||
conn = ProviderFactory.CreateConnectionFromConfig(appSetting);
|
||||
</pre>
|
||||
|
||||
|
||||
<p>C# Sample for Creating a DataAdapter and filling a DataSet.
|
||||
|
||||
<pre>
|
||||
// Create Connection
|
||||
IDbConnection conn =
|
||||
ProviderFactory.CreateConnectionFromConfig("PubsConnStr");
|
||||
|
||||
// Select command
|
||||
IDbCommand cmd=conn.CreateCommand();
|
||||
cmd.Text="select * from author";
|
||||
|
||||
// Data Adapter
|
||||
DataSet ds=new DataSet();
|
||||
IDbDataAdapter adapter=ProviderFactory.CreateDataAdapter(cmd);
|
||||
adapter.Fill(ds, "Table1");
|
||||
</pre>
|
||||
|
||||
<p>Creating a DataAdapter and filling a DataSet. <br>
|
||||
The super lazy method for people like me.
|
||||
<pre>
|
||||
// Create Connection
|
||||
IDbConnection conn =
|
||||
ProviderFactory.CreateConnectionFromConfig("TdsPubsConnStr");
|
||||
|
||||
// Data Adapter
|
||||
DataSet ds=DataTools.FillDataSet(conn, "select * from author");
|
||||
</pre>
|
||||
|
||||
|
||||
<p>Here's some sample code on displaying a list <br>
|
||||
of configured ADO.NET providers:
|
||||
<pre>
|
||||
Console.WriteLine("Configured Providers:");
|
||||
foreach (Provider p in ProviderFactory.Providers)
|
||||
Console.WriteLine(p.Description);
|
||||
</pre>
|
||||
|
||||
<p>A Super lazy overload to the FillDataSet method (in <br>
|
||||
DataTools.cs) that will fill a dataset in one line of code.
|
||||
|
||||
<pre>
|
||||
DataSet ds=DataTools.FillDataSet("PubsConnStr", "select * from authors");
|
||||
</pre>
|
||||
|
||||
** About Configuration Files
|
||||
|
||||
<p>Information about <a href="http://msdn.microsoft.com/library/en-us/vbcon/html/vboriintroductiontoapplicationsettingstorage.asp?frame=true">app.config</a> files
|
||||
can be found at <a href="http://msdn.microsoft.com/">MSDN</a>.
|
||||
|
||||
<p>See the mcs/class/Mono.Data/app.config for sample configuration file in<br>
|
||||
mcs source. Basically, if your application is named blah.exe, <br>
|
||||
you would create an app.config file named blah.exe.config
|
||||
|
||||
<p>Here's a sample app.config file showing the provider <br>
|
||||
declarations along with sample connection strings:
|
||||
|
||||
<pre>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="mono.data">
|
||||
<section name="providers" type="Mono.Data.ProviderSectionHandler,Mono.Data" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<appSettings>
|
||||
<add key="PubsConnStr" value="factory=System.Data.SqlClient;server=speedy;database=pubs;uid=sa;pwd=" />
|
||||
</appSettings>
|
||||
<mono.data>
|
||||
<providers>
|
||||
<provider name="System.Data.SqlClient" connection="System.Data.SqlClient.SqlConnection" adapter="System.Data.SqlClient.SqlDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="System.Data.OleDb" connection="System.Data.OleDb.OleDbConnection" adapter="System.Data.OleDb.OleDbDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="System.Data.Odbc" connection="System.Data.Odbc.OdbcConnection" adapter="System.Data.OleDb.OdbcDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="Mono.Data.TdsClient" connection="Mono.Data.TdsClient.TdsConnection" adapter="Mono.Data.TdsClient.TdsDataAdapter" assembly="Mono.Data.TdsClient" />
|
||||
<provider name="Mono.Data.MySql" connection="Mono.Data.MySql.MySqlConnection" adapter="Mono.Data.MySql.MySqlDataAdapter" assembly="Mono.Data.MySql" />
|
||||
<provider name="Mono.Data.PostgreSqlClient" connection="Mono.Data.PostgreSqlClient.PgSqlConnection" adapter="Mono.Data.PostgreSqlClient.PgSqlDataAdapter" assembly="Mono.Data.PostgreSqlClient" />
|
||||
<provider name="Mono.Data.SqliteClient" connection="Mono.Data.SqliteClient.SqliteConnection" adapter="Mono.Data.SqliteClient.SqliteDataAdapter" assembly="Mono.Data.SqliteClient" />
|
||||
<provider name="Mono.Data.SybaseClient" connection="Mono.Data.SybaseClient.SybaseConnection" adapter="Mono.Data.SybaseClient.SybaseDataAdapter" assembly="Mono.Data.SybaseClient" />
|
||||
</providers>
|
||||
</mono.data>
|
||||
</configuration>
|
||||
|
||||
</pre>
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
* Screenshots
|
||||
|
||||
** Mono Debugger
|
||||
|
||||
Some shots of the <a href="jit-debug.html">Mono Debugger</a>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-Debugger-1.png"><img src="images/Screenshot-Debugger-1-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Debugger showing the source code view.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-Debugger-2.png"><img src="images/Screenshot-Debugger-2-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Debugger showing the CPU view.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Mono Documentation Browser
|
||||
|
||||
The Mono Documentation Browser is available from <a
|
||||
href="anoncvs.html">CVS</a>, module `monodoc'.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-B2.png"><img src="images/Screenshot-B2-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Documentation Browser rendering a method description.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-MethodSummary.png"><img src="images/Screenshot-MethodSummary-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Documentation Browser rendering the class method summary
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Mono Basic
|
||||
|
||||
The Mono Basic compiler ships with the Mono distribution.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/gtk-vb.png"><img src="images/gtk-vb-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Basic running a sample Gtk# application.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Platano Media Player
|
||||
|
||||
Alp's <a href="http://www.atoker.com/platano/">Platano</a>
|
||||
Media Player is written with Gtk# (with GStreamer support):
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/platano_s.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Platano startup.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/platano-playing_s.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Platano playing the <a
|
||||
href="http://developer.ximian.com/projects/third_party/codemonkey/index.html">Code
|
||||
Monkey At Work</a> video.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** GSIRC
|
||||
|
||||
Alp's <a href="http://www.atoker.com/gsirc/">GSIRC</a>
|
||||
Gtk-Sharp IRC written with Gtk#
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://go-mono.com/images/gsirc-0.2a_overview.jpg"><img src="images/gsirc-0.2a_overview-thumb.jpg"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
GSIRC is shown with the preferences dialog and chatting on some channels (rooms).
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** SQL# For GTK#
|
||||
|
||||
Daniel Morgan's SQL query tool that runs on Mono on Linux and Windows. It is
|
||||
written in C# and allows you to connect to various Mono ADO.NET providers and
|
||||
enter SQL commands.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="http://go-mono.com/images/sqlsharp.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
SQL# For GTK# is shown retrieving data from a Microsoft SQL Server 2000 database.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** SkyNET
|
||||
|
||||
SkyNET is written in C# and uses GTK# for displaying a star chart.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="http://go-mono.com/images/skynet.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+180
-24
@@ -1,58 +1,214 @@
|
||||
* Microsoft SQL Server Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases
|
||||
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases</li>
|
||||
|
||||
<li>Exists in namespace System.Data.SqlClient and assembly System.Data
|
||||
<li>Exists in namespace System.Data.SqlClient and assembly System.Data</li>
|
||||
|
||||
<li>Created by Tim Coleman
|
||||
<li>Created by Tim Coleman</li>
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
|
||||
<li>Implemented in 100% C#
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.</li>
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 7.0</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
|
||||
|
||||
** Current Status
|
||||
|
||||
|
||||
<ul>
|
||||
<li>Able to connect to Microsoft SQL Server 7/2000 databases
|
||||
<li>Able to connect to Microsoft SQL Server 7/2000 databases</li>
|
||||
|
||||
<li>Connection pooling works.
|
||||
<li>Connection pooling works.</li>
|
||||
|
||||
<li>Stored Procedures work
|
||||
<li>Stored Procedures work</li>
|
||||
|
||||
<li>Parameters work.
|
||||
<li>Parameters work.</li>
|
||||
|
||||
<li>Prepare works.
|
||||
<li>Prepare works.</li>
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a SqlCommand.
|
||||
via ExecuteNonQuery() of a SqlCommand.</li>
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a SqlCommand
|
||||
result can be retrieved via ExecuteScalar() of a SqlCommand</li>
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via SqlDataReader.
|
||||
can be retrieved via SqlDataReader.</li>
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a SqlDataReader
|
||||
in a SqlDataReader</li>
|
||||
|
||||
<li>XML can be read via ExecuteXmlReader in a SqlCommand.
|
||||
<li>XML can be read via ExecuteXmlReader in a SqlCommand.</li>
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 7.0
|
||||
<li>Uses TDS Protocol Version 7.0</li>
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a></li>
|
||||
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
|
||||
* Action plan
|
||||
** Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.
|
||||
<li>Connection timeouts is being developed now</li>
|
||||
|
||||
<li>Needs more testing</li>
|
||||
|
||||
<li>Would like to figure out how to connect via Trusted_Connection or Integrated Security</li>
|
||||
|
||||
<li>Start work on TDS Protocol Version 8.0 support</li>
|
||||
|
||||
<li>TODO
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Microsoft SQL Server database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>If using Microsoft SQL Server 2000, make sure
|
||||
you are using at least Service Pack 3 for Microsoft SQL Server 2000. If using
|
||||
MSDE 2000, make sure you have the special Service Pack 3 for MSDE 2000.</li>
|
||||
|
||||
<li>For those that only have MSDE installed. You can change the authentication mode
|
||||
from Windows Only Authentication to SQL Server and Windows Authentications (also knows as Mixed-mode authentication)
|
||||
via the <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322336&sd=tech#4">registry</a></li>. It is
|
||||
the LoginMode you need to change. By default,
|
||||
MSDE is installed with Windows Only Authentication. For SqlClient to work with MSDE, you will
|
||||
need to change the setting.</a>
|
||||
|
||||
<li>If using MSDE, you might need to create a new user with password. Give
|
||||
this user access to various databases in this MSDE instance. Also, for each
|
||||
database, give this new user at least SELECT access to the various tables you want
|
||||
to retrieve data from.</li>
|
||||
|
||||
<li>If you have Enterprise Manager, you can easily change the authentication mode
|
||||
for both MSDE and Microsoft SQL Server. To change the authentication mode in
|
||||
Enterprise Mananger, select the instance, right-click on it, and select properites.
|
||||
The SQL Server properties dialog for that instance will pop up. Choose the Security
|
||||
tab. Change the authentication from Windows Only to SQL Server and Windows. If
|
||||
the instance of your database does not show up in Enterprise Manager, Register first
|
||||
by selecting the Action menu and choosing New SQL Server Registration.</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Mono's SqlClient does not support trusted connections
|
||||
nor integrated security. You can not use this when connecting. You need
|
||||
to explicitly use a User ID and Password
|
||||
authenticated by SQL Server.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used three ways:
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Server Definition</b></td> <td><b>Example</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname</td> <td>Server=MYHOST</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname,port</td> <td>Server=MYHOST,1433</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname\\instance</td> <td>Server=MYHOST\\NETSDK</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SqlConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+127
-12
@@ -1,28 +1,143 @@
|
||||
* SQL Lite Data Provider
|
||||
|
||||
<ul>
|
||||
<li>Exists in namespace and assembly Mono.Data.SqliteClient
|
||||
|
||||
<li>Created by Vladimir Vukicevic
|
||||
|
||||
<li><a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
|
||||
<li>ADO.NET Data Provider for
|
||||
the <a href"http://www.hwaci.com/sw/sqlite/">SQL Lite</a> which
|
||||
is an embeddable SQL database engine</li>
|
||||
|
||||
<li>From the SQL Lite web page: SQLite is a C library that
|
||||
implements an embeddable SQL database engine. Programs that link with
|
||||
the SQLite library can have SQL database access without
|
||||
running a separate RDBMS process. The distribution
|
||||
comes with a standalone command-line access program (sqlite) that
|
||||
can be used to administer an SQLite database and which serves
|
||||
as an example of how to use the SQLite library. SQLite is not a client library
|
||||
used to connect to a big database server. SQLite is the server. The SQLite
|
||||
library reads and writes directly to and from the database files on disk.</li>
|
||||
|
||||
<li>SQL Lite can be downloaded
|
||||
from <a href"http://www.hwaci.com/sw/sqlite/download.html">here</a>.
|
||||
binaries exist for Linux and Windows. sqlite.dll on Windows
|
||||
and sqlite.so on Linux.
|
||||
and sqlite.so on Linux. The source code is available too.</li>
|
||||
|
||||
<li>Exists in namespace and assembly Mono.Data.SqliteClient</li>
|
||||
|
||||
<li>Created by Vladimir Vukicevic so he could have a database of
|
||||
thumbnail images for mPhoto. mPhoto is GUI application
|
||||
for cataloging images. mPhoto runs on Mono
|
||||
and uses <a href="http:www.go-mono.com/gtk-sharp.html">GTK#</a> for its GUI.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect, execute commands, and retrieve data...
|
||||
<li>Able to connect, execute commands, and retrieve data...</li>
|
||||
|
||||
<li>Works in mPhoto
|
||||
<li>Works in mPhoto by providing access to a SQL Lite database to store images.</li>
|
||||
</ul>
|
||||
|
||||
* Action Plan
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Create a DataAdapter for SQL Lite named SqliteDataAdapter that can be used to
|
||||
Fill a DataTable in a DataSet
|
||||
Fill a DataTable in a DataSet</li>
|
||||
|
||||
<li>TODO
|
||||
<li>Get the method GetSchemaTable() in class SqliteDataReader to return a DataTable
|
||||
that works</li>
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mcs and mono</li>
|
||||
|
||||
<li>Make sure Mono.Data.SqliteClient.dll was built and is installed
|
||||
in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>If you do not have <a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>,
|
||||
download it. There are binaries for Windows and Linux.</li>
|
||||
|
||||
<li>There is a test named SqliteTest.cs found at mcs/class/Mono.Data.SqliteTest/Test</li>
|
||||
|
||||
<li>Has a connection string format of "URI=file:some/path". For example,
|
||||
the connection string "URI=file:SqliteTest.db" will use the database file
|
||||
named SqliteTest.db, if it does not exist, the file will be created.</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.SqliteClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString = "URI=file:SqliteTest.db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader[0];
|
||||
string LastName = reader[1];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.SqliteClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.SqliteClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+124
-17
@@ -1,48 +1,155 @@
|
||||
* Sybase Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for Sybase SQL Server databases
|
||||
<li>ADO.NET Provider for Sybase SQL Server databases</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient
|
||||
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient</li>
|
||||
|
||||
<li>Created by Tim Coleman
|
||||
<li>Created by Tim Coleman</li>
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
|
||||
<li>Implemented in 100% C#
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.
|
||||
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 5.0
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
|
||||
<li>Uses TDS Protocol Version 5.0</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect to Sybase databases
|
||||
<li>Able to connect to Sybase databases</li>
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a SybaseCommand.
|
||||
via ExecuteNonQuery() of a SybaseCommand.</li>
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a SybaseCommand
|
||||
result can be retrieved via ExecuteScalar() of a SybaseCommand</li>
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via SybaseDataReader.
|
||||
can be retrieved via SybaseDataReader.</li>
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a SybaseDataReader
|
||||
in a SybaseDataReader</li>
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter</li>
|
||||
</ul>
|
||||
|
||||
* Action plan
|
||||
** Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.
|
||||
|
||||
<li>Needs more testing...
|
||||
|
||||
<li>TODO
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Sybase database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used two ways:
|
||||
<ul>
|
||||
<li>hostname - "Server=MYHOST"</li>
|
||||
<li>hostname,port - "Server=MYHOST,1533"</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.SybaseClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SybaseConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.SybaseClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.SybaseClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+127
-19
@@ -1,51 +1,159 @@
|
||||
* TDS Generic Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases
|
||||
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient
|
||||
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient</li>
|
||||
|
||||
<li>Created by Tim Coleman
|
||||
<li>Created by Tim Coleman</li>
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
|
||||
<li>Implemented in 100% C#
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.
|
||||
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 4.2 by default
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
|
||||
<li>Uses TDS Protocol Version 4.2 by default</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
** Current Status
|
||||
|
||||
|
||||
<ul>
|
||||
<li>Only builds on Windows currently due to mcs does not support modules and mcs
|
||||
has problems with code that is internal.
|
||||
has problems with code that is internal.</li>
|
||||
|
||||
<li>Able to connect to Microsoft SQL Server and Sybase databases
|
||||
<li>Able to connect to Microsoft SQL Server and Sybase databases</li>
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a TdsCommand.
|
||||
via ExecuteNonQuery() of a TdsCommand.</li>
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a TdsCommand
|
||||
result can be retrieved via ExecuteScalar() of a TdsCommand</li>
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via TdsDataReader.
|
||||
can be retrieved via TdsDataReader.</li>
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a TdsDataReader
|
||||
in a TdsDataReader</li>
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter
|
||||
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter</li>
|
||||
</ul>
|
||||
|
||||
* Action plan
|
||||
** Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.
|
||||
<li>Connection timeouts is being developed now.</li>
|
||||
|
||||
<li>TODO
|
||||
<li>TODO</li>
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Sybase or Microsoft SQL Server database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If using Microsoft SQL Server 2000, make sure
|
||||
you are using at least Service Pack 3 for Microsoft SQL Server 2000</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used two ways:
|
||||
<ul>
|
||||
<li>hostname - "Server=MYHOST"</li>
|
||||
<li>hostname,port - "Server=MYHOST,1533"</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.TdsClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new TdsConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.TdsClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.TdsClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
+7
-1
@@ -1,5 +1,8 @@
|
||||
0,Home,index.html,index.src
|
||||
1,FAQ,faq.html,faq.src
|
||||
1,News archive,http://monoevo.sf.net/mwn/archives.html
|
||||
1,Screenshots,screenshots.html,screenshots.src
|
||||
1,Other sites,other.html,other.src
|
||||
0,Mono,rationale.html,rationale.src
|
||||
1,Runtime,runtime.html,runtime.src
|
||||
2,Embedding,embedded-api.html,embedded-api.src
|
||||
@@ -33,8 +36,9 @@
|
||||
1,Debugging,jit-debug.html,jit-debug.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
1,Crypto,crypto.html,crypto.src
|
||||
2,ProviderFactory,provider-factory.html,provider-factory.src
|
||||
2,Firebird Interbase,firebird.html,firebird.src
|
||||
2,IBM DB2,ibmdb2.html,ibmdb2.src
|
||||
2,Microsft SQL Server,sqlclient.html,sqlclient.src
|
||||
2,MySQL,mysql.html,mysql.src
|
||||
2,ODBC,odbc.html,odbc.src
|
||||
@@ -44,6 +48,7 @@
|
||||
2,SQL Lite,sqlite.html,sqlite.src
|
||||
2,Sybase,sybase.html,sybase.src
|
||||
2,TDS Generic,tdsclient.html,tdsclient.src
|
||||
1,Crypto,crypto.html,crypto.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
0,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
|
||||
@@ -59,4 +64,5 @@
|
||||
1,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Cscompmgd,class-status-Cscompmgd.html,class-status-Cscompmgd.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,System.Security,class-status-System.Security.html,class-status-System.Security.src,cm/cormissing.css,cm/cormissing.js
|
||||
0,Contact,contact.html,contact.src
|
||||
+42
-37
@@ -5,7 +5,7 @@ CORCOMPARE=../../../mcs/tools/corcompare
|
||||
|
||||
OBJECTS= \
|
||||
deploy/ado-net.html \
|
||||
deploy/firebird.html \
|
||||
deploy/provider-factory.html \
|
||||
deploy/mysql.html \
|
||||
deploy/odbc.html \
|
||||
deploy/oledb.html \
|
||||
@@ -19,6 +19,44 @@ OBJECTS= \
|
||||
deploy/asp-net.html \
|
||||
deploy/books.html \
|
||||
deploy/contributing.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/crypto.html \
|
||||
deploy/embedded-api.html \
|
||||
deploy/faq.html \
|
||||
deploy/firebird.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/gtk-sharp.html \
|
||||
deploy/hackers.html \
|
||||
deploy/ideas.html \
|
||||
deploy/ibmdb2.html \
|
||||
deploy/index.html \
|
||||
deploy/java.html \
|
||||
deploy/jit-debug.html \
|
||||
deploy/languages.html \
|
||||
deploy/mailing-lists.html \
|
||||
deploy/mbas.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/other.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/ppc.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/screenshots.html \
|
||||
deploy/status.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html \
|
||||
deploy/class-status.html \
|
||||
deploy/class-status-corlib.html \
|
||||
deploy/class-status-System.html \
|
||||
@@ -30,45 +68,12 @@ OBJECTS= \
|
||||
deploy/class-status-Microsoft.VisualBasic.html \
|
||||
deploy/class-status-System.EnterpriseServices.html \
|
||||
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html \
|
||||
deploy/class-status-System.Security.html \
|
||||
deploy/class-status-System.Windows.Forms.html \
|
||||
deploy/class-status-Cscompmgd.html \
|
||||
deploy/class-library.html \
|
||||
deploy/classlib-doc.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/mbas.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/crypto.html \
|
||||
deploy/embedded-api.html \
|
||||
deploy/faq.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/hackers.html \
|
||||
deploy/index.html \
|
||||
deploy/ideas.html \
|
||||
deploy/java.html \
|
||||
deploy/jit-debug.html \
|
||||
deploy/jit-debug-sample.html \
|
||||
deploy/jit-debug-sample2.html \
|
||||
deploy/languages.html \
|
||||
deploy/mailing-lists.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/ppc.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/status.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html
|
||||
deploy/classlib-doc.html
|
||||
|
||||
#2,Configuration.Install,class-status-System.Configuration.Install.html,class-status-System.Configuration.Install.src,cm/cormissing.css,cm/cormissing.js
|
||||
#2,Runtime.Remoting,class-status-System.Runtime.Remoting.html,class-status-System.Runtime.Remoting.src,cm/cormissing.css,cm/cormissing.js
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<!--
|
||||
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
|
||||
background-attachment: fixed; }
|
||||
}
|
||||
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
font-size: 14px; }
|
||||
|
||||
|
||||
@@ -225,6 +225,15 @@
|
||||
It may not be possible to manage exceptions in that case,
|
||||
though. I need to think more about it.
|
||||
|
||||
** Threading issues
|
||||
|
||||
If your application creates threads on its own, and you want them to
|
||||
be able to call code into the CIL universe with Mono, you have to
|
||||
register the thread with Mono before issuing the call.
|
||||
|
||||
To do so, call the mono_thread_attach() function before you execute
|
||||
any managed code from the thread
|
||||
|
||||
* Samples
|
||||
|
||||
See the sample programs inmono/sample/embed for examples of
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
.\"
|
||||
.\" cert2spc manual page.
|
||||
.\" Copyright 2002, 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "cert2spc"
|
||||
.SH NAME
|
||||
cert2spc \- Transform multiple X.509 certificates to a Software
|
||||
Publisher Certificate
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B cert2spc certificate|crl [certificate|crl ...] outputfile.spc
|
||||
.SH DESCRIPTION
|
||||
Combine a list of X.509 certificates or X.509 CRL (Certificate
|
||||
Revocation List) into a Software Publisher Certificate (PKCS#7
|
||||
file). The SPC file is required for signing a PE file (like an
|
||||
assembly) using signcode.
|
||||
.SH PARAMETERS
|
||||
.TP
|
||||
.I "certificate"
|
||||
One (or more) X.509 certificate to add (space separated).
|
||||
.TP
|
||||
.I "crl"
|
||||
One (or more) X.509 CRL to add (space separated).
|
||||
.TP
|
||||
.I "output.spc"
|
||||
Software Publisher Certificate to output. If the specified file
|
||||
exists it will be overwritten.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2002, 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR makecert(1), signcode(1)
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
.\"
|
||||
.\" secutil manual page.
|
||||
.\" Copyright 2002, 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "secutil"
|
||||
.SH NAME
|
||||
secutil \- Extract X.509 certificates and strongnames from assemblies.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B secutil [options] filename
|
||||
.SH DESCRIPTION
|
||||
Extract X.509 certificates and strongnames from assemblies in a
|
||||
format that can be easily re-used in source code (C# or VB.NET syntax).
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I "-s assembly", "-strongname assembly"
|
||||
Display strongname informations about the assembly.
|
||||
.TP
|
||||
.I "-x assembly", "-x509certificate assembly"
|
||||
Display the X509 Authenticode certificate for the assembly.
|
||||
.TP
|
||||
.I "-a", "-array"
|
||||
Display data in a decimal array (default).
|
||||
.TP
|
||||
.I "-v", "-vbmode"
|
||||
Display data in a VisualBasic friendly format.
|
||||
.TP
|
||||
.I "-c", "-cmode"
|
||||
Display data in a C/C++/C# friendly format (default).
|
||||
.TP
|
||||
.I "-help", "-h", "-?"
|
||||
Display help about this tool.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2002, 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR sn(1), signcode(1)
|
||||
+47
-11
@@ -342,16 +342,30 @@ ption defaulting to true.
|
||||
.SH PROVIDERS
|
||||
.nf
|
||||
|
||||
PROVIDER NAME NAMESPACE ASSEMBLY
|
||||
PROVIDER NAME NAMESPACE ASSEMBLY
|
||||
|
||||
OleDb OLE DB System.Data.OleDb System.Data
|
||||
SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
|
||||
Odbc ODBC System.Data.Odbc System.Data
|
||||
MySql MySQL Mono.Data.MySql Mono.Data.MySql
|
||||
Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
|
||||
Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
|
||||
Tds TDS Generic Mono.Data.TdsClient Mono.Data.TdsClient
|
||||
PostgreSql PostgreSQL Mono.Data.PostgreSqlClient Mono.Data.PostgreSqlClient
|
||||
Internal
|
||||
--------
|
||||
|
||||
OleDb OLE DB System.Data.OleDb System.Data
|
||||
SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
|
||||
Odbc ODBC System.Data.Odbc System.Data
|
||||
|
||||
External to System.Data
|
||||
-----------------------
|
||||
MySql MySQL Mono.Data.MySql Mono.Data.MySql
|
||||
Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
|
||||
Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
|
||||
Tds TDS Generic Mono.Data.TdsClient Mono.Data.TdsClient
|
||||
PostgreSql M PostgreSQL Mono.Data.PostgreSqlClient Mono.Data.PostgreSqlClient
|
||||
DB2 IBM DB2 Mono.Data.DB2Client Mono.Data.DB2Client
|
||||
Oracle Oracle 8i System.Data.OracleClient System.Data.OracleClient
|
||||
|
||||
External to Mono
|
||||
----------------
|
||||
|
||||
Npgsql NetPostgreSQL Npgsql Npgsql
|
||||
MySQLNet ByteFX MySQL ByteFX.Data.MySQL ByteFX.Data
|
||||
|
||||
.fi
|
||||
.SH CONNECTION STRING SAMPLES
|
||||
@@ -407,10 +421,32 @@ which connects to a PostgreSQL database:
|
||||
|
||||
Provider=PostgreSQL;Addr=127.0.0.1;Database=rodrigo
|
||||
|
||||
|
||||
Oracle via System.Data.OracleClient
|
||||
|
||||
Data Source=testdb;User ID=scott;Password=tiger
|
||||
|
||||
|
||||
IBM DB2 Universal Database via Mono.Data.DB2Client
|
||||
|
||||
DSN=sample;User ID=db2admin;Password=mysecret
|
||||
|
||||
|
||||
Npgsql (.NET PostgreSQL) from
|
||||
http://gborg.postgresql.org/project/npgsql/projdisplay.php
|
||||
|
||||
Server=localhost;Database=test;User ID=postgres;Password=fun2db
|
||||
|
||||
|
||||
MySQLNet (ByteFX MySQL) from
|
||||
http://sourceforge.net/projects/mysqlnet/
|
||||
|
||||
Server=localhost;Database=test;User ID=mysql;Password=
|
||||
|
||||
|
||||
.fi
|
||||
.SH DEBUGGING SUPPORT
|
||||
No debugging support.
|
||||
.SH TRACING SUPPORT
|
||||
No support for tracing right now.
|
||||
.SH AUTHORS
|
||||
The Mono SQL# Tool was written
|
||||
.nf
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
2003-02-16 Martin Baulig <[email protected]>
|
||||
|
||||
* docs/compiler: Added a few works about the new `Location' code.
|
||||
|
||||
2003-02-15 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile.gnu: Add testcorlib target to run just the corlib unit tests.
|
||||
|
||||
2003-02-10 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: Add testcorlib target to run just the corlib unit tests.
|
||||
|
||||
2003-01-16 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile.gnu: Add corlib target to just build that.
|
||||
|
||||
2003-01-14 Duncan Mak <[email protected]>
|
||||
|
||||
* ilasm/parser/ScannerAdapter.cs: Remove the cleanup method now that
|
||||
it's no longer in the interface.
|
||||
|
||||
2003-01-13 Duncan Mak <[email protected]>
|
||||
|
||||
* ilasm/parser/ScannerAdapter.cs: Implement the new cleanup method
|
||||
in the tokenizer. This fixes the build.
|
||||
|
||||
2003-01-10 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* README.building: New file.
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
2003-02-22 Martin Baulig <[email protected]>
|
||||
|
||||
* library.make: Pass `MCS_FLAGS' to MCS.
|
||||
|
||||
2003-02-15 Zoltan Varga <[email protected]>
|
||||
|
||||
* makefile.gnu (test): do not install .dbg files since mcs no longer
|
||||
generates them.
|
||||
|
||||
2003-02-13 Tim Coleman <[email protected]>
|
||||
* makefile.gnu: Add System.Data.OracleClient to linux build.
|
||||
|
||||
2003-02-10 Nick Drochak <[email protected]>
|
||||
|
||||
* library.build:
|
||||
* makefile: add testcorlib target to run unit tests just for corlib.
|
||||
|
||||
2003-02-05 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* library.build: added Mono.Security.Win32 to build, test and
|
||||
clean. There's no makefile.gnu for this assembly as it is
|
||||
specific to Win32.
|
||||
|
||||
2003-01-23 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: install the .dbg files too so the debugger can use them.
|
||||
|
||||
2003-01-17 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* library.build: added System.Security to build, test and clean.
|
||||
There's no makefile.gnu yet for this assembly.
|
||||
|
||||
2003-01-16 Rodrigo Moya <[email protected]>
|
||||
|
||||
* makefile.gnu: added Mono.Data.DB2Client directory.
|
||||
|
||||
2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
|
||||
|
||||
* System.Web.Mobile : Added new directory
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2003-02-23 Jackson Harper <[email protected]>
|
||||
|
||||
* CompilerError.cs: Use fields not properties, and remove unneeded finalizer
|
||||
|
||||
2002-12-15 Jackson Harper <[email protected]>
|
||||
|
||||
* CompilerError.cs ErrorLevel.cs: Moved ErrorLevel enum into its own file
|
||||
|
||||
@@ -13,64 +13,23 @@ namespace Microsoft.CSharp {
|
||||
|
||||
public class CompilerError {
|
||||
|
||||
private ErrorLevel level = ErrorLevel.None;
|
||||
private string message = null;
|
||||
private string file = null;
|
||||
private int number = 0;
|
||||
private int column = 0;
|
||||
private int line = 0;
|
||||
public ErrorLevel ErrorLevel;
|
||||
public string ErrorMessage;
|
||||
public string SourceFile;
|
||||
public int ErrorNumber;
|
||||
public int SourceColumn;
|
||||
public int SourceLine;
|
||||
|
||||
public CompilerError()
|
||||
public CompilerError ()
|
||||
{
|
||||
ErrorLevel = ErrorLevel.None;
|
||||
ErrorMessage = String.Empty;
|
||||
SourceFile = String.Empty;
|
||||
ErrorNumber = 0;
|
||||
SourceColumn = 0;
|
||||
SourceLine = 0;
|
||||
}
|
||||
|
||||
~CompilerError()
|
||||
{
|
||||
message = null;
|
||||
file = null;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Public Properties
|
||||
//
|
||||
|
||||
public ErrorLevel ErrorLevel {
|
||||
get { return level; }
|
||||
set { level = value; }
|
||||
}
|
||||
|
||||
public string ErrorMessage {
|
||||
get {
|
||||
return (null == message ? String.Empty : message);
|
||||
}
|
||||
set {
|
||||
message = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int ErrorNumber {
|
||||
get { return number; }
|
||||
set { number = value; }
|
||||
}
|
||||
|
||||
public int SourceColumn {
|
||||
get { return column; }
|
||||
set { column = value; }
|
||||
}
|
||||
|
||||
public string SourceFile {
|
||||
get {
|
||||
return (null == file ? String.Empty : file);
|
||||
}
|
||||
set { file = value; }
|
||||
}
|
||||
|
||||
public int SourceLine {
|
||||
get { return line; }
|
||||
set { line = value; }
|
||||
}
|
||||
|
||||
//
|
||||
// Public Methods
|
||||
//
|
||||
@@ -92,6 +51,7 @@ namespace Microsoft.CSharp {
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Private Properties
|
||||
//
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 [email protected]
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -13,29 +15,107 @@ namespace Microsoft.VisualBasic
|
||||
{
|
||||
sealed public class ErrObject {
|
||||
// Declarations
|
||||
int pHelpContext;
|
||||
int pLastDllError;
|
||||
int pNumber;
|
||||
int pErl;
|
||||
string pSource;
|
||||
string pHelpFile;
|
||||
string pDescription;
|
||||
System.Exception pException;
|
||||
// Constructors
|
||||
// Properties
|
||||
[MonoTODO]
|
||||
public System.Int32 HelpContext { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
public System.Int32 HelpContext
|
||||
{
|
||||
get {
|
||||
return pHelpContext;
|
||||
}
|
||||
set {
|
||||
pHelpContext = value;
|
||||
}
|
||||
}
|
||||
[MonoTODO]
|
||||
public System.Int32 LastDllError { get { throw new NotImplementedException (); } }
|
||||
public System.Int32 LastDllError {
|
||||
get {
|
||||
return pLastDllError;
|
||||
}
|
||||
}
|
||||
[MonoTODO]
|
||||
public System.Int32 Number { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
public System.Int32 Number {
|
||||
get {
|
||||
return pNumber;
|
||||
}
|
||||
set {
|
||||
pNumber = value;
|
||||
}
|
||||
}
|
||||
[MonoTODO]
|
||||
public System.Int32 Erl { get { throw new NotImplementedException (); } }
|
||||
public System.Int32 Erl {
|
||||
get {
|
||||
return pErl;
|
||||
}
|
||||
}
|
||||
[MonoTODO]
|
||||
public System.String Source { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
public System.String Source {
|
||||
get {
|
||||
return pSource;
|
||||
}
|
||||
set {
|
||||
pSource = value;
|
||||
}
|
||||
}
|
||||
[MonoTODO]
|
||||
public System.String HelpFile { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
public System.String HelpFile {
|
||||
get {
|
||||
return pHelpFile;
|
||||
}
|
||||
set {
|
||||
pHelpFile = value;
|
||||
}
|
||||
}
|
||||
[MonoTODO]
|
||||
public System.String Description { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
public System.String Description {
|
||||
get {
|
||||
return pDescription;
|
||||
}
|
||||
set {
|
||||
pDescription = value;
|
||||
}
|
||||
}
|
||||
// Methods
|
||||
[MonoTODO("We should parse the exception object to obtain VB-like error code. Not a trivial task!")]
|
||||
internal void SetException (Exception ex)
|
||||
{
|
||||
if (pException != ex)
|
||||
{
|
||||
pNumber = 0xFFFF;
|
||||
pSource = ex.Source;
|
||||
pDescription = ex.Message + "\n" + ex.StackTrace;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public System.Exception GetException () { throw new NotImplementedException (); }
|
||||
public System.Exception GetException ()
|
||||
{
|
||||
return pException;
|
||||
}
|
||||
[MonoTODO]
|
||||
public void Clear () { throw new NotImplementedException (); }
|
||||
public void Clear () {
|
||||
pHelpContext=0;
|
||||
pLastDllError=0;
|
||||
pNumber=0;
|
||||
pErl=0;
|
||||
pSource="";
|
||||
pHelpFile="";
|
||||
pDescription="";
|
||||
pException= null;
|
||||
}
|
||||
[MonoTODO]
|
||||
public void Raise (System.Int32 Number, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Source, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Description, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpFile, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpContext) { throw new NotImplementedException (); }
|
||||
public void Raise (System.Int32 Number, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Source, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Description, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpFile, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpContext)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
// Events
|
||||
};
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,8 +3,10 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected]
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2003 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -18,7 +20,9 @@ namespace Microsoft.VisualBasic
|
||||
// Properties
|
||||
// Methods
|
||||
[MonoTODO]
|
||||
public static Microsoft.VisualBasic.ErrObject Err () { throw new NotImplementedException (); }
|
||||
public static Microsoft.VisualBasic.ErrObject Err () {
|
||||
return Microsoft.VisualBasic.CompilerServices.ProjectData.Err;
|
||||
}
|
||||
[MonoTODO]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static System.Int32 Erl () { throw new NotImplementedException (); }
|
||||
|
||||
+9
-3
@@ -3,13 +3,15 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
@@ -19,8 +21,12 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.Boolean FromString (System.String Value) { return System.Boolean.Parse(Value); }
|
||||
[MonoTODO]
|
||||
public static System.Boolean FromObject (System.Object Value) { throw new NotImplementedException(); }
|
||||
public static System.Boolean FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value == null) return false;
|
||||
//if (Value.GetType() == typeof(string)) return FromString((string)Value);
|
||||
else return System.Convert.ToBoolean(Value);
|
||||
}
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+10
-3
@@ -3,13 +3,15 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
@@ -19,8 +21,13 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.Byte FromString (System.String Value) { return System.Byte.Parse(Value); }
|
||||
[MonoTODO]
|
||||
public static System.Byte FromObject (System.Object Value) { throw new NotImplementedException(); }
|
||||
|
||||
public static System.Byte FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value == null) return 0;
|
||||
else return System.Convert.ToByte(Value);
|
||||
}
|
||||
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+13
-5
@@ -3,13 +3,15 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
@@ -19,10 +21,16 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.DateTime FromString (System.String Value) { return System.DateTime.Parse(Value); }
|
||||
[MonoTODO]
|
||||
public static System.DateTime FromString (System.String Value, System.Globalization.CultureInfo culture) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.DateTime FromObject (System.Object Value) { throw new NotImplementedException (); }
|
||||
public static System.DateTime FromString (System.String Value, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return System.DateTime.Parse (Value,culture);
|
||||
}
|
||||
public static System.DateTime FromObject (System.Object Value) {
|
||||
if ((object)Value ==null)
|
||||
return new DateTime(1,1,1);
|
||||
//if (Value.GetType() == typeof(string)) return FromString((string)Value);
|
||||
else return System.Convert.ToDateTime(Value);
|
||||
}
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+10
-3
@@ -3,13 +3,15 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
@@ -19,8 +21,13 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.Int32 FromString (System.String Value) { return System.Int32.Parse(Value); }
|
||||
[MonoTODO]
|
||||
public static System.Int32 FromObject (System.Object Value) { throw new NotImplementedException (); }
|
||||
|
||||
public static System.Int32 FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value==null)
|
||||
return 0;
|
||||
else return System.Convert.ToInt32(Value);
|
||||
}
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+3
-1
@@ -3,13 +3,15 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
sealed public class ObjectType {
|
||||
|
||||
+98
-80
@@ -1,80 +1,98 @@
|
||||
//
|
||||
// ProjectData.cs
|
||||
//
|
||||
// Authors:
|
||||
// Martin Adoue ([email protected])
|
||||
// Chris J Breisch ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian Inc.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ProjectData.
|
||||
/// </summary>
|
||||
|
||||
[MonoTODO]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public class ProjectData{
|
||||
|
||||
private static System.Exception projectError;
|
||||
private static int erl;
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ClearProjectError
|
||||
/// </summary>
|
||||
public static void ClearProjectError()
|
||||
{
|
||||
projectError = null;
|
||||
erl = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex)
|
||||
{
|
||||
SetProjectError(ex, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
/// <param name="lErl">FIXME: Required. Summary description for lErl</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex, int lErl)
|
||||
{
|
||||
projectError = ex;
|
||||
erl = lErl;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public static void EndApp()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
protected static void Finalize()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//
|
||||
// ProjectData.cs
|
||||
//
|
||||
// Authors:
|
||||
// Martin Adoue ([email protected])
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian Inc.
|
||||
// 2002 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ProjectData.
|
||||
/// </summary>
|
||||
|
||||
[MonoTODO]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public class ProjectData{
|
||||
|
||||
internal static System.Exception projectError;
|
||||
internal static int erl;
|
||||
internal static Microsoft.VisualBasic.ErrObject pErr;
|
||||
|
||||
internal static Microsoft.VisualBasic.ErrObject Err
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pErr==null)
|
||||
pErr=new ErrObject();
|
||||
|
||||
return pErr;
|
||||
}
|
||||
set
|
||||
{
|
||||
pErr = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ClearProjectError
|
||||
/// </summary>
|
||||
public static void ClearProjectError()
|
||||
{
|
||||
projectError = null;
|
||||
erl = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex)
|
||||
{
|
||||
SetProjectError(ex, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
/// <param name="lErl">FIXME: Required. Summary description for lErl</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex, int lErl)
|
||||
{
|
||||
projectError = ex;
|
||||
erl = lErl;
|
||||
Err.SetException (ex);
|
||||
}
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public static void EndApp()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
protected static void Finalize()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+64
-31
@@ -3,13 +3,15 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
@@ -18,36 +20,67 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Constructors
|
||||
// Properties
|
||||
// Methods
|
||||
[MonoTODO]
|
||||
public static System.String FromBoolean (System.Boolean Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromByte (System.Byte Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromChar (System.Char Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromShort (System.Int16 Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromInteger (System.Int32 Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromLong (System.Int64 Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromSingle (System.Single Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDouble (System.Double Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromSingle (System.Single Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDouble (System.Double Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDate (System.DateTime Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDecimal (System.Decimal Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDecimal (System.Decimal Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromObject (System.Object Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.Int32 StrCmp (System.String sLeft, System.String sRight, System.Boolean TextCompare) { throw new NotImplementedException (); }
|
||||
public static System.String FromBoolean (System.Boolean Value) {
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromByte (System.Byte Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromChar (System.Char Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromShort (System.Int16 Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromInteger (System.Int32 Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromLong (System.Int64 Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromSingle (System.Single Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromDouble (System.Double Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromSingle (System.Single Value, System.Globalization.NumberFormatInfo NumberFormat)
|
||||
{
|
||||
return Convert.ToString(Value,NumberFormat);
|
||||
}
|
||||
public static System.String FromDouble (System.Double Value, System.Globalization.NumberFormatInfo NumberFormat)
|
||||
{
|
||||
return Convert.ToString(Value,NumberFormat);
|
||||
}
|
||||
public static System.String FromDate (System.DateTime Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromDecimal (System.Decimal Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromDecimal (System.Decimal Value, System.Globalization.NumberFormatInfo NumberFormat)
|
||||
{
|
||||
return Convert.ToString(Value,NumberFormat);
|
||||
}
|
||||
public static System.String FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value==null) return "";
|
||||
else return Convert.ToString(Value);
|
||||
}
|
||||
[MonoTODO("Last boolean parameter ignored")]
|
||||
public static System.Int32 StrCmp (System.String sLeft, System.String sRight, System.Boolean TextCompare)
|
||||
{
|
||||
return sLeft.CompareTo(sRight);
|
||||
}
|
||||
[MonoTODO]
|
||||
public static System.Boolean StrLike (System.String Source, System.String Pattern, Microsoft.VisualBasic.CompareMethod CompareOption) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
// Authors:
|
||||
// Martin Adoue ([email protected])
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
// Daniel Campos ([email protected])
|
||||
// Rafael Teixeira ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian Inc.
|
||||
// 2002 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -36,12 +40,11 @@ namespace Microsoft.VisualBasic
|
||||
/// </summary>
|
||||
/// <param name="String">Required. Any valid Char or String expression. If String is a String expression, only the first character of the string is used for input. If String is Nothing or contains no characters, an ArgumentException error occurs.</param>
|
||||
[MonoTODO]
|
||||
public static int Asc(char String)
|
||||
public static int Asc(char Char)
|
||||
{
|
||||
//FIXME: Check the docs, it says something about Locales, DBCS, etc.
|
||||
throw new NotImplementedException();
|
||||
return (int)Char;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -51,8 +54,8 @@ namespace Microsoft.VisualBasic
|
||||
[MonoTODO]
|
||||
public static int Asc(string String)
|
||||
{
|
||||
if ((String == null) || (String.Length != 1))
|
||||
throw new ArgumentException("Length of argument 'String' must be one.", "String");
|
||||
if ((String == null) || (String.Length < 1))
|
||||
throw new ArgumentException("Length of argument 'String' must be at least one.", "String");
|
||||
|
||||
//FIXME: Check the docs, it says something about Locales, DBCS, etc.
|
||||
return (int) String.ToCharArray(0, 1)[0];
|
||||
@@ -277,7 +280,7 @@ namespace Microsoft.VisualBasic
|
||||
/// Returns an expression formatted as a currency value using the currency symbol defined in the system control panel.
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. Expression to be formatted.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is 1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="IncludeLeadingDigit">Optional. Tristate enumeration that indicates whether or not a leading zero is displayed for fractional values. See Settings for values.</param>
|
||||
/// <param name="UseParensForNegativeNumbers">Optional. Tristate enumeration that indicates whether or not to place negative values within parentheses. See Settings for values.</param>
|
||||
/// <param name="GroupDigits">Optional. Tristate enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See Settings for values.</param>
|
||||
@@ -335,7 +338,7 @@ namespace Microsoft.VisualBasic
|
||||
/// Returns an expression formatted as a number.
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. Expression to be formatted.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is 1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="IncludeLeadingDigit">Optional. Tristate enumeration that indicates whether or not a leading zero is displayed for fractional values. See Settings for values.</param>
|
||||
/// <param name="UseParensForNegativeNumbers">Optional. Tristate enumeration that indicates whether or not to place negative values within parentheses. See Settings for values.</param>
|
||||
/// <param name="GroupDigits">Optional. Tristate enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See Settings for values.</param>
|
||||
@@ -363,7 +366,7 @@ namespace Microsoft.VisualBasic
|
||||
/// Returns an expression formatted as a percentage (that is, multiplied by 100) with a trailing % character.
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. Expression to be formatted.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is 1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="IncludeLeadingDigit">Optional. Tristate enumeration that indicates whether or not a leading zero is displayed for fractional values. See Settings for values.</param>
|
||||
/// <param name="UseParensForNegativeNumbers">Optional. Tristate enumeration that indicates whether or not to place negative values within parentheses. See Settings for values.</param>
|
||||
/// <param name="GroupDigits">Optional. Tristate enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See Settings for values.</param>
|
||||
@@ -407,6 +410,23 @@ namespace Microsoft.VisualBasic
|
||||
return Str.ToCharArray(Index -1, 1)[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an integer specifying the start position of the first occurrence of one string within another.
|
||||
/// </summary>
|
||||
/// <param name="Start">Required. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The start index is 1 based.</param>
|
||||
/// <param name="String1">Required. String expression being searched.</param>
|
||||
/// <param name="String2">Required. String expression sought.</param>
|
||||
/// <param name="Compare">Optional. Specifies the type of string comparison. If Compare is omitted, the Option Compare setting determines the type of comparison. Specify a valid LCID (LocaleID) to use locale-specific rules in the comparison. </param>
|
||||
[MonoTODO("Needs testing")]
|
||||
public static int InStr(string String1,
|
||||
string String2,
|
||||
[OptionCompare]
|
||||
[Optional]
|
||||
[DefaultValue(CompareMethod.Binary)]
|
||||
CompareMethod Compare)
|
||||
{
|
||||
return InStr(1, String1, String2, Compare);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an integer specifying the start position of the first occurrence of one string within another.
|
||||
@@ -445,14 +465,13 @@ namespace Microsoft.VisualBasic
|
||||
*/
|
||||
|
||||
//FIXME: someone with a non US setup should test this.
|
||||
|
||||
switch (Compare)
|
||||
{
|
||||
case CompareMethod.Text:
|
||||
return System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(String2, String1, Start - 1) + 1;
|
||||
|
||||
case CompareMethod.Binary:
|
||||
return String2.IndexOf(String1, Start - 1) + 1;
|
||||
return String1.IndexOf(String2, Start - 1) + 1;
|
||||
default:
|
||||
throw new System.ArgumentException("Argument 'Compare' must be CompareMethod.Binary or CompareMethod.Text.", "Compare");
|
||||
}
|
||||
@@ -465,7 +484,7 @@ namespace Microsoft.VisualBasic
|
||||
/// </summary>
|
||||
/// <param name="StringCheck">Required. String expression being searched.</param>
|
||||
/// <param name="StringMatch">Required. String expression being searched for.</param>
|
||||
/// <param name="Start">Optional. Numeric expression that sets the one-based starting position for each search, starting from the left side of the string. If Start is omitted, –1 is used, which means that the search begins at the last character position. Search then proceeds from right to left.</param>
|
||||
/// <param name="Start">Optional. Numeric expression that sets the one-based starting position for each search, starting from the left side of the string. If Start is omitted, 1 is used, which means that the search begins at the last character position. Search then proceeds from right to left.</param>
|
||||
/// <param name="Compare">Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. If omitted, a binary comparison is performed. See Settings for values.</param>
|
||||
[MonoTODO]
|
||||
public static int InStrRev(string StringCheck,
|
||||
@@ -721,8 +740,7 @@ namespace Microsoft.VisualBasic
|
||||
if ((Str == null) || (Str.Length == 0))
|
||||
return String.Empty; // VB.net does this.
|
||||
|
||||
Str.TrimStart(null);
|
||||
return Str;
|
||||
return Str.TrimStart(null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -735,8 +753,7 @@ namespace Microsoft.VisualBasic
|
||||
if ((Str == null) || (Str.Length == 0))
|
||||
return String.Empty; // VB.net does this.
|
||||
|
||||
Str.TrimEnd(null);
|
||||
return Str;
|
||||
return Str.TrimEnd(null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -749,8 +766,7 @@ namespace Microsoft.VisualBasic
|
||||
if ((Str == null) || (Str.Length == 0))
|
||||
return String.Empty; // VB.net does this.
|
||||
|
||||
Str.Trim();
|
||||
return Str;
|
||||
return Str.Trim();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -808,7 +824,7 @@ namespace Microsoft.VisualBasic
|
||||
/// <param name="Find">Required. Substring being searched for.</param>
|
||||
/// <param name="Replacement">Required. Replacement substring.</param>
|
||||
/// <param name="Start">Optional. Position within Expression where substring search is to begin. If omitted, 1 is assumed.</param>
|
||||
/// <param name="Count">Optional. Number of substring substitutions to perform. If omitted, the default value is –1, which means make all possible substitutions.</param>
|
||||
/// <param name="Count">Optional. Number of substring substitutions to perform. If omitted, the default value is 1, which means make all possible substitutions.</param>
|
||||
/// <param name="Compare">Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings for values.</param>
|
||||
[MonoTODO("Needs testing")]
|
||||
public static string Replace(string Expression,
|
||||
@@ -853,8 +869,7 @@ namespace Microsoft.VisualBasic
|
||||
if (Length < 0)
|
||||
throw new ArgumentException("Argument 'Length' must be greater or equal to zero.", "Length");
|
||||
|
||||
//FIXME
|
||||
throw new NotImplementedException();
|
||||
return Str.Substring (Str.Length - Length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -893,7 +908,7 @@ namespace Microsoft.VisualBasic
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. String expression containing substrings and delimiters. If Expression is a zero-length string (""), the Split function returns an array with no elements and no data.</param>
|
||||
/// <param name="Delimiter">Optional. Single character used to identify substring limits. If Delimiter is omitted, the space character (" ") is assumed to be the delimiter. If Delimiter is a zero-length string, a single-element array containing the entire Expression string is returned.</param>
|
||||
/// <param name="Limit">Optional. Number of substrings to be returned; the default, –1, indicates that all substrings are returned.</param>
|
||||
/// <param name="Limit">Optional. Number of substrings to be returned; the default, 1, indicates that all substrings are returned.</param>
|
||||
/// <param name="Compare">Optional. Numeric value indicating the comparison to use when evaluating substrings. See Settings for values.</param>
|
||||
[MonoTODO]
|
||||
public static string[] Split(string Expression,
|
||||
@@ -1059,27 +1074,26 @@ namespace Microsoft.VisualBasic
|
||||
/// <param name="Expression">Required. String expression whose characters are to be reversed. If Expression is a zero-length string (""), a zero-length string is returned.</param>
|
||||
public static string StrReverse(string Expression)
|
||||
{
|
||||
|
||||
if (Expression == null)
|
||||
return String.Empty; // "If Expression is a zero-length string (""), a zero-length string is returned."
|
||||
|
||||
int count = Expression.Length;
|
||||
|
||||
if (count == 0)
|
||||
return String.Empty; // "If Expression is a zero-length string (""), a zero-length string is returned."
|
||||
|
||||
/*
|
||||
* This would be much faster if I had access to the internal array.
|
||||
* I'd just reverse the array. Maybe as strings are inmutable in .net (is this true in Mono?)
|
||||
* it'll be the same. Comments?
|
||||
*/
|
||||
char[] chars = new char[count - 1];
|
||||
chars = Expression.ToCharArray();
|
||||
|
||||
System.Array.Reverse (chars);
|
||||
|
||||
return new string(chars);
|
||||
|
||||
// patched by Daniel Campos
|
||||
// [email protected]
|
||||
if (Expression != null)
|
||||
{
|
||||
if ( Expression.Length>0)
|
||||
{
|
||||
int counter=0;
|
||||
char[] buf=new char[Expression.Length];
|
||||
|
||||
for (int backwardsCounter=Expression.Length - 1;
|
||||
backwardsCounter>=0;
|
||||
backwardsCounter--)
|
||||
buf[counter++]=Expression[backwardsCounter];
|
||||
return new string(buf);
|
||||
}
|
||||
else
|
||||
return String.Empty;
|
||||
}
|
||||
else
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// (C) 2002 Tipic Inc
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -15,15 +17,37 @@ namespace Microsoft.VisualBasic {
|
||||
// Declarations
|
||||
// Constructors
|
||||
// Properties
|
||||
static Random rnd = new Random();
|
||||
static float last = (float)rnd.NextDouble();
|
||||
// Methods
|
||||
[MonoTODO]
|
||||
public static System.Single Rnd () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.Single Rnd (System.Single Number) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static void Randomize () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static void Randomize (System.Double Number) { throw new NotImplementedException (); }
|
||||
public static float Rnd () {
|
||||
last = (float)rnd.NextDouble();
|
||||
return last;
|
||||
}
|
||||
public static float Rnd (float Number)
|
||||
{
|
||||
if (Number == 0.0)
|
||||
{
|
||||
return last;
|
||||
}
|
||||
else if (Number < 0.0 )
|
||||
{
|
||||
//fd: What does this mean?
|
||||
//fd: ms-help://MS.VSCC/MS.MSDNVS/script56/html/vsstmRandomize
|
||||
//fd: ms-help://MS.VSCC/MS.MSDNVS/script56/html/vsfctrnd.htm
|
||||
Randomize(Number);
|
||||
return Rnd();
|
||||
}
|
||||
return Rnd();
|
||||
}
|
||||
public static void Randomize () {
|
||||
rnd = new Random();
|
||||
}
|
||||
[MonoTODO("Rethink the double => int conversion")]
|
||||
public static void Randomize (double Number)
|
||||
{
|
||||
rnd = new Random((int)Number);
|
||||
}
|
||||
// Events
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
2002-02-19 Carsten Hess
|
||||
* Created
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<!-- NAnt build file for Microsoft.VisualC.dll -->
|
||||
|
||||
<project name="System" default="build">
|
||||
<property name="debug" value="false"/>
|
||||
|
||||
<target name="build">
|
||||
<mkdir dir="../lib"/>
|
||||
<csc target="library" output="../lib/Microsoft.VisualC.dll" debug="${debug}">
|
||||
<arg value="/nowarn:1595"/>
|
||||
<arg value="/noconfig"/> <!-- don't reference ms assemblies -->
|
||||
|
||||
<!-- cor compare dies with these currently -->
|
||||
<!--<arg value="/nostdlib"/>--> <!-- don't reference mscorlib -->
|
||||
<!--<arg value="/lib:../lib/"/>-->
|
||||
<!--<arg value="/r:..\lib\corlib.dll"/>-->
|
||||
<!--<arg value="/r:..\lib\System.dll"/>-->
|
||||
<arg value="/r:System.dll"/>
|
||||
<sources>
|
||||
<includes name="**/*.cs"/>
|
||||
<excludes name="Test/**"/>
|
||||
</sources>
|
||||
<references>
|
||||
<!--<includes name="../lib/corlib.dll"/>-->
|
||||
<!--<includes name="../lib/System.dll"/>-->
|
||||
</references>
|
||||
</csc>
|
||||
<copy file="../lib/Microsoft.VisualC.dll" tofile="Test/Microsoft.VisualC.dll"/>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<nant basedir="Test" target="test"/>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<nant basedir="Test" target="clean"/>
|
||||
<delete file="../lib/Microsoft.VisualC.dll" failonerror="false"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class DebugInfoInPDBAttribute:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class DecoratedNameAttribute:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsCXXReferenceModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsConstModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsLongModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsSignedModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsVolatileModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
|
||||
public sealed class MiscellaneousBitsAttribute:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class NeedsCopyConstructorModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class NoSignSpecifiedModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
Microsoft.VisualC/DebugInfoInPDBAttribute.cs
|
||||
Microsoft.VisualC/DecoratedNameAttribute.cs
|
||||
Microsoft.VisualC/IsCXXReferenceModifier.cs
|
||||
Microsoft.VisualC/IsConstModifier.cs
|
||||
Microsoft.VisualC/IsLongModifier.cs
|
||||
Microsoft.VisualC/IsSignedModifier.cs
|
||||
Microsoft.VisualC/IsVolatileModifier.cs
|
||||
Microsoft.VisualC/MiscellaneousBitsAttribute.cs
|
||||
Microsoft.VisualC/NeedsCopyConstructorModifier.cs
|
||||
Microsoft.VisualC/NoSignSpecifiedModifier.cs
|
||||
@@ -0,0 +1,13 @@
|
||||
topdir = ../..
|
||||
|
||||
LIBRARY = $(topdir)/class/lib/Microsoft.VisualC.dll
|
||||
|
||||
LIB_LIST = list
|
||||
LIB_FLAGS = -r corlib -r System
|
||||
|
||||
SOURCES_INCLUDE=*.cs
|
||||
SOURCES_EXCLUDE=./Test*
|
||||
|
||||
export MONO_PATH_PREFIX = $(topdir)/class/lib:
|
||||
|
||||
include $(topdir)/class/library.make
|
||||
@@ -1,3 +1,119 @@
|
||||
2003-02-22 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolTable.cs: Incremented version number.
|
||||
|
||||
2003-02-22 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.FindMethod): Fixed a bug.
|
||||
(MonoSymbolFile.MethodLookup): New method.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.GetMethod): Added overloaded
|
||||
version which takes a MethodBase.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolTable.cs (MethodIndexEntry): New public struct.
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.GetMethodByToken): New method.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.Assembly): New public property.
|
||||
|
||||
* MonoSymbolTable.cs (MethodEntry.MethodBase): New public property.
|
||||
(MethodEntry.LocalTypes): New public variable.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MethodEntry.ThisTypeIndex): Renamed to
|
||||
ClassTypeIndex; provide this for all methods so we can get the
|
||||
class of static methods.
|
||||
|
||||
2003-02-10 Nick Drochak <[email protected]>
|
||||
|
||||
* Mono.CSharp.Debugger.build: passing the /r using an 'arg' node works.
|
||||
The <include> node wasn't getting to the compiler. This fixes build
|
||||
breakage on cygwin.
|
||||
|
||||
* MonoSymbolFile.cs: Qualify which Min method. Fixes build breakage
|
||||
on cygwin.
|
||||
|
||||
2003-02-09 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (MonoSymbolWriter.ctor): We don't need the
|
||||
`mbuilder_array' anymore.
|
||||
|
||||
2003-02-09 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (SourceFile): Derive from SourceFileEntry.
|
||||
(SourceBlock): We don't need source lines here.
|
||||
(SourceMethod): We're always constructed with source info.
|
||||
|
||||
* MonoSymbolTable.cs: Added support for namespaces.
|
||||
(NamespaceEntry): New struct.
|
||||
(SourceFileEntry.DefineNamespace): New method.
|
||||
(MethodEntry.BuildLineNumberTable): The table is already sorted,
|
||||
so we don't need to do this here.
|
||||
|
||||
2003-02-09 Martin Baulig <[email protected]>
|
||||
|
||||
* IMonoSymbolWriter.cs: Ooops, I forgot to remove this.
|
||||
|
||||
2003-02-08 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolDocumentWriter.cs: Removed.
|
||||
|
||||
* MonoSymbolWriter.cs (SourceFile): Implement ISymbolDocumentWriter.
|
||||
|
||||
2003-02-08 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (GetMethodSource): New public method.
|
||||
(FindMethod): Return the correct index.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (Methods, Sources): New public properties.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.ReadSymbolFile): New public
|
||||
static method, returns null (without throwing an exception) if the
|
||||
assembly doesn't have any debugging info.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Removed the
|
||||
custom initialization function.
|
||||
|
||||
* MonoSymbolTableWriter.cs: Removed; the code is now in
|
||||
MonoSymbolFile.cs and MonoSymbolWriter.cs.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs: The symbol file is now a resource in the
|
||||
assembly instead of a separate file.
|
||||
|
||||
* MonoSymbolTable.cs: Did a few more cleanups, sort the line
|
||||
number table and remove duplicate line numbers.
|
||||
|
||||
2003-02-05 Martin Baulig <[email protected]>
|
||||
|
||||
Modified the symbol file format to speed up method looks by name
|
||||
and cleaned this up a lot.
|
||||
|
||||
* MonoSymbolFile.cs: New public class. This is now a public class
|
||||
and writes and reads the symbol file.
|
||||
|
||||
* IMonoBinaryReader.cs: Removed.
|
||||
|
||||
* MonoSymbolTable.cs: Set version number to 29.
|
||||
|
||||
2003-01-17 Zoltan Varga <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (OpenMethod): Make it work on constructors.
|
||||
|
||||
2002-10-13 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolTable.cs: Set version number to 28.
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/IMonoBinaryReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public interface IMonoBinaryReader
|
||||
{
|
||||
long Position {
|
||||
get; set;
|
||||
}
|
||||
|
||||
int ReadInt32 ();
|
||||
|
||||
long ReadInt64 ();
|
||||
|
||||
byte[] ReadBuffer (int size);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/IMonoSymbolWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// This interface is derived from System.Diagnostics.SymbolStore.ISymbolWriter.
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public interface IMonoSymbolWriter : System.Diagnostics.SymbolStore.ISymbolWriter
|
||||
{
|
||||
void Initialize (string assembly_filename, string filename, string[] args);
|
||||
}
|
||||
|
||||
internal enum SourceOffsetType
|
||||
{
|
||||
OFFSET_NONE,
|
||||
OFFSET_IL,
|
||||
OFFSET_LOCAL,
|
||||
OFFSET_PARAMETER
|
||||
}
|
||||
|
||||
internal interface ITypeHandle
|
||||
{
|
||||
string Name {
|
||||
get;
|
||||
}
|
||||
|
||||
Type Type {
|
||||
get;
|
||||
}
|
||||
|
||||
int Token {
|
||||
get;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,11 @@
|
||||
<csc target="library" output="../lib/Mono.CSharp.Debugger.dll" debug="${debug}">
|
||||
<arg value="/nowarn:1595"/>
|
||||
<arg value="/unsafe"/>
|
||||
<arg value="/r:../lib/corlib.dll"/>
|
||||
<sources>
|
||||
<includes name="**/*.cs"/>
|
||||
<excludes name="Test/**"/>
|
||||
</sources>
|
||||
<references>
|
||||
<includes name="../lib/corlib.dll"/>
|
||||
</references>
|
||||
</csc>
|
||||
</target>
|
||||
<target name="clean">
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/MonoSymbolDocumentWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// This is the default implementation of the
|
||||
// System.Diagnostics.SymbolStore.ISymbolDocumentWriter interface.
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
|
||||
public class MonoSymbolDocumentWriter : ISymbolDocumentWriter
|
||||
{
|
||||
protected string url;
|
||||
|
||||
//
|
||||
// Constructor
|
||||
//
|
||||
public MonoSymbolDocumentWriter (string url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public string FileName {
|
||||
get {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Interface ISymbolDocumentWriter
|
||||
//
|
||||
|
||||
//
|
||||
// MonoSymbolWriter creates a DWARF 2 debugging file and DWARF operates
|
||||
// on file names, but has no way to include a whole source file in the
|
||||
// symbol file.
|
||||
//
|
||||
|
||||
public void SetCheckSum (Guid algorithmId, byte[] checkSum)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetSource (byte[] source)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,607 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/MonoSymbolFile.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// (C) 2003 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public class MonoSymbolFileException : Exception
|
||||
{
|
||||
public MonoSymbolFileException ()
|
||||
: base ()
|
||||
{ }
|
||||
|
||||
public MonoSymbolFileException (string message, params object[] args)
|
||||
: base (String.Format (message, args))
|
||||
{ }
|
||||
}
|
||||
|
||||
internal class MyMemoryStream : Stream
|
||||
{
|
||||
int length;
|
||||
int real_length;
|
||||
int position;
|
||||
|
||||
int chunk_size = 4096;
|
||||
ArrayList chunks = new ArrayList ();
|
||||
|
||||
private struct Chunk {
|
||||
public readonly int Offset;
|
||||
public readonly int Length;
|
||||
public byte[] Buffer;
|
||||
|
||||
public Chunk (int offset, int length)
|
||||
{
|
||||
this.Offset = offset;
|
||||
this.Length = length;
|
||||
this.Buffer = new Byte [length];
|
||||
}
|
||||
}
|
||||
|
||||
public override long Position {
|
||||
get { return position; }
|
||||
|
||||
set {
|
||||
if (value > length)
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
position = (int) value;
|
||||
}
|
||||
}
|
||||
|
||||
public override long Length {
|
||||
get { return length; }
|
||||
}
|
||||
|
||||
public override bool CanRead {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanWrite {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanSeek {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override void SetLength (long new_length)
|
||||
{
|
||||
if (new_length < length)
|
||||
throw new ArgumentException ();
|
||||
|
||||
while (new_length >= real_length) {
|
||||
Chunk new_chunk = new Chunk (real_length, chunk_size);
|
||||
chunks.Add (new_chunk);
|
||||
real_length += chunk_size;
|
||||
}
|
||||
|
||||
length = (int) new_length;
|
||||
}
|
||||
|
||||
public override void Flush ()
|
||||
{ }
|
||||
|
||||
public override long Seek (long offset, SeekOrigin origin)
|
||||
{
|
||||
int ref_point;
|
||||
|
||||
switch (origin) {
|
||||
case SeekOrigin.Begin:
|
||||
ref_point = 0;
|
||||
break;
|
||||
case SeekOrigin.Current:
|
||||
ref_point = position;
|
||||
break;
|
||||
case SeekOrigin.End:
|
||||
ref_point = length;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException ("Invalid SeekOrigin");
|
||||
}
|
||||
|
||||
if ((ref_point + offset < 0) || (offset > real_length))
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
position = ref_point + (int) offset;
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
Chunk FindChunk (int offset)
|
||||
{
|
||||
return (Chunk) chunks [offset / chunk_size];
|
||||
}
|
||||
|
||||
public override int Read (byte[] buffer, int offset, int count)
|
||||
{
|
||||
int old_count = count;
|
||||
|
||||
while (count > 0) {
|
||||
Chunk chunk = FindChunk (position);
|
||||
int coffset = position - chunk.Offset;
|
||||
int rest = chunk.Length - coffset;
|
||||
int size = System.Math.Min (count, rest);
|
||||
|
||||
Array.Copy (chunk.Buffer, coffset, buffer, offset, size);
|
||||
position += size;
|
||||
offset += size;
|
||||
count -= size;
|
||||
}
|
||||
|
||||
return old_count;
|
||||
}
|
||||
|
||||
public override void Write (byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (position + count > length)
|
||||
SetLength (position + count);
|
||||
|
||||
while (count > 0) {
|
||||
Chunk chunk = FindChunk (position);
|
||||
int coffset = position - chunk.Offset;
|
||||
int rest = chunk.Length - coffset;
|
||||
int size = System.Math.Min (count, rest);
|
||||
|
||||
Array.Copy (buffer, offset, chunk.Buffer, coffset, size);
|
||||
position += size;
|
||||
offset += size;
|
||||
count -= size;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] GetContents ()
|
||||
{
|
||||
byte[] retval = new byte [length];
|
||||
position = 0;
|
||||
Read (retval, 0, length);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoSymbolFile : IDisposable
|
||||
{
|
||||
ArrayList methods = new ArrayList ();
|
||||
ArrayList sources = new ArrayList ();
|
||||
Hashtable method_source_hash = new Hashtable ();
|
||||
Hashtable type_hash = new Hashtable ();
|
||||
|
||||
OffsetTable ot;
|
||||
int last_type_index;
|
||||
int last_method_index;
|
||||
int last_source_index;
|
||||
int last_namespace_index;
|
||||
|
||||
public MonoSymbolFile ()
|
||||
{ }
|
||||
|
||||
internal int AddSource (SourceFileEntry source)
|
||||
{
|
||||
sources.Add (source);
|
||||
return ++last_source_index;
|
||||
}
|
||||
|
||||
internal int DefineType (Type type)
|
||||
{
|
||||
if (type_hash.Contains (type))
|
||||
return (int) type_hash [type];
|
||||
|
||||
int index = ++last_type_index;
|
||||
type_hash.Add (type, index);
|
||||
return index;
|
||||
}
|
||||
|
||||
internal void AddMethod (MethodEntry entry)
|
||||
{
|
||||
methods.Add (entry);
|
||||
}
|
||||
|
||||
internal int GetNextTypeIndex ()
|
||||
{
|
||||
return ++last_type_index;
|
||||
}
|
||||
|
||||
internal int GetNextMethodIndex ()
|
||||
{
|
||||
return ++last_method_index;
|
||||
}
|
||||
|
||||
internal int GetNextNamespaceIndex ()
|
||||
{
|
||||
return ++last_namespace_index;
|
||||
}
|
||||
|
||||
internal void WriteString (BinaryWriter bw, string text)
|
||||
{
|
||||
byte[] data = Encoding.UTF8.GetBytes (text);
|
||||
bw.Write ((int) data.Length);
|
||||
bw.Write (data);
|
||||
StringSize += data.Length;
|
||||
}
|
||||
|
||||
internal string ReadString (int offset)
|
||||
{
|
||||
int old_pos = (int) reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = offset;
|
||||
int length = reader.ReadInt32 ();
|
||||
|
||||
byte[] data = reader.ReadBytes (length);
|
||||
string text = Encoding.UTF8.GetString (data);
|
||||
reader.BaseStream.Position = old_pos;
|
||||
return text;
|
||||
}
|
||||
|
||||
void Write (BinaryWriter bw)
|
||||
{
|
||||
// Magic number and file version.
|
||||
bw.Write (OffsetTable.Magic);
|
||||
bw.Write (OffsetTable.Version);
|
||||
|
||||
//
|
||||
// Offsets of file sections; we must write this after we're done
|
||||
// writing the whole file, so we just reserve the space for it here.
|
||||
//
|
||||
long offset_table_offset = bw.BaseStream.Position;
|
||||
ot.Write (bw);
|
||||
|
||||
//
|
||||
// Write data sections.
|
||||
//
|
||||
ot.DataSectionOffset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceFileEntry source in sources)
|
||||
source.WriteData (bw);
|
||||
ot.DataSectionSize = (int) bw.BaseStream.Position - ot.DataSectionOffset;
|
||||
|
||||
//
|
||||
// Write method table.
|
||||
//
|
||||
ot.MethodTableOffset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
entry.WriteIndex (bw);
|
||||
}
|
||||
ot.MethodTableSize = (int) bw.BaseStream.Position - ot.MethodTableOffset;
|
||||
|
||||
//
|
||||
// Write source table.
|
||||
//
|
||||
ot.SourceTableOffset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < sources.Count; i++) {
|
||||
SourceFileEntry source = (SourceFileEntry) sources [i];
|
||||
source.Write (bw);
|
||||
}
|
||||
ot.SourceTableSize = (int) bw.BaseStream.Position - ot.SourceTableOffset;
|
||||
|
||||
//
|
||||
// Fixup offset table.
|
||||
//
|
||||
ot.TypeCount = last_type_index;
|
||||
ot.MethodCount = methods.Count;
|
||||
ot.SourceCount = sources.Count;
|
||||
|
||||
//
|
||||
// Write offset table.
|
||||
//
|
||||
ot.TotalFileSize = (int) bw.BaseStream.Position;
|
||||
bw.Seek ((int) offset_table_offset, SeekOrigin.Begin);
|
||||
ot.Write (bw);
|
||||
bw.Seek (0, SeekOrigin.End);
|
||||
}
|
||||
|
||||
public byte[] CreateSymbolFile ()
|
||||
{
|
||||
if (reader != null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
using (MyMemoryStream stream = new MyMemoryStream ()) {
|
||||
Write (new BinaryWriter (stream));
|
||||
Console.WriteLine ("WROTE SYMFILE: {0} sources, {1} methods, {2} types, " +
|
||||
"{3} line numbers, {4} locals, {5} namespaces, " +
|
||||
"{6} bytes of string data",
|
||||
SourceCount, MethodCount, TypeCount, LineNumberCount,
|
||||
LocalCount, NamespaceCount, StringSize);
|
||||
Console.WriteLine (ot);
|
||||
return stream.GetContents ();
|
||||
}
|
||||
}
|
||||
|
||||
Assembly assembly;
|
||||
BinaryReader reader;
|
||||
Hashtable method_hash;
|
||||
Hashtable source_file_hash;
|
||||
|
||||
Hashtable method_token_hash;
|
||||
Hashtable method_name_hash;
|
||||
Hashtable method_full_name_hash;
|
||||
Hashtable source_name_hash;
|
||||
|
||||
protected MonoSymbolFile (Assembly assembly, Stream stream)
|
||||
{
|
||||
this.assembly = assembly;
|
||||
|
||||
reader = new BinaryReader (stream);
|
||||
|
||||
try {
|
||||
long magic = reader.ReadInt64 ();
|
||||
long version = reader.ReadInt32 ();
|
||||
if ((magic != OffsetTable.Magic) || (version != OffsetTable.Version))
|
||||
throw new MonoSymbolFileException ();
|
||||
ot = new OffsetTable (reader);
|
||||
} catch {
|
||||
throw new MonoSymbolFileException ();
|
||||
}
|
||||
|
||||
method_hash = new Hashtable ();
|
||||
source_file_hash = new Hashtable ();
|
||||
}
|
||||
|
||||
public static MonoSymbolFile ReadSymbolFile (Assembly assembly)
|
||||
{
|
||||
Stream stream = assembly.GetManifestResourceStream ("MonoSymbolFile");
|
||||
if (stream == null)
|
||||
return null;
|
||||
|
||||
return new MonoSymbolFile (assembly, stream);
|
||||
}
|
||||
|
||||
public Assembly Assembly {
|
||||
get { return assembly; }
|
||||
}
|
||||
|
||||
public int SourceCount {
|
||||
get { return ot.SourceCount; }
|
||||
}
|
||||
|
||||
public int MethodCount {
|
||||
get { return ot.MethodCount; }
|
||||
}
|
||||
|
||||
public int TypeCount {
|
||||
get { return ot.TypeCount; }
|
||||
}
|
||||
|
||||
public int NamespaceCount {
|
||||
get { return last_namespace_index; }
|
||||
}
|
||||
|
||||
internal int LineNumberCount = 0;
|
||||
internal int LocalCount = 0;
|
||||
internal int StringSize = 0;
|
||||
|
||||
public SourceFileEntry GetSourceFile (int index)
|
||||
{
|
||||
if ((index < 1) || (index > ot.SourceCount))
|
||||
throw new ArgumentException ();
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
SourceFileEntry source = (SourceFileEntry) source_file_hash [index];
|
||||
if (source != null)
|
||||
return source;
|
||||
|
||||
reader.BaseStream.Position = ot.SourceTableOffset +
|
||||
SourceFileEntry.Size * (index - 1);
|
||||
source = new SourceFileEntry (this, reader);
|
||||
source_file_hash.Add (index, source);
|
||||
return source;
|
||||
}
|
||||
|
||||
public SourceFileEntry[] Sources {
|
||||
get {
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
SourceFileEntry[] retval = new SourceFileEntry [SourceCount];
|
||||
for (int i = 0; i < SourceCount; i++)
|
||||
retval [i] = GetSourceFile (i + 1);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public MethodIndexEntry GetMethodIndexEntry (int index)
|
||||
{
|
||||
int old_pos = (int) reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = ot.MethodTableOffset +
|
||||
MethodIndexEntry.Size * (index - 1);
|
||||
MethodIndexEntry ie = new MethodIndexEntry (reader);
|
||||
reader.BaseStream.Position = old_pos;
|
||||
return ie;
|
||||
}
|
||||
|
||||
public MethodEntry GetMethodByToken (int token)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (method_token_hash == null) {
|
||||
method_token_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < MethodCount; i++) {
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (i + 1);
|
||||
|
||||
method_token_hash.Add (ie.Token, i);
|
||||
}
|
||||
}
|
||||
|
||||
object value = method_token_hash [token];
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
return GetMethod ((int) value);
|
||||
}
|
||||
|
||||
public MethodEntry GetMethod (MethodBase method)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
int token = assembly.MonoDebugger_GetMethodToken (method);
|
||||
return GetMethodByToken (token);
|
||||
}
|
||||
|
||||
public MethodEntry GetMethod (int index)
|
||||
{
|
||||
if ((index < 1) || (index > ot.MethodCount))
|
||||
throw new ArgumentException ();
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
MethodEntry entry = (MethodEntry) method_hash [index];
|
||||
if (entry != null)
|
||||
return entry;
|
||||
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (index);
|
||||
reader.BaseStream.Position = ie.FileOffset;
|
||||
|
||||
entry = new MethodEntry (this, reader, index);
|
||||
method_hash.Add (index, entry);
|
||||
return entry;
|
||||
}
|
||||
|
||||
public MethodEntry[] Methods {
|
||||
get {
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
MethodEntry[] retval = new MethodEntry [MethodCount];
|
||||
for (int i = 0; i < MethodCount; i++)
|
||||
retval [i] = GetMethod (i + 1);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public MethodSourceEntry GetMethodSource (int index)
|
||||
{
|
||||
if ((index < 1) || (index > ot.MethodCount))
|
||||
throw new ArgumentException ();
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
object entry = method_source_hash [index];
|
||||
if (entry != null)
|
||||
return (MethodSourceEntry) entry;
|
||||
|
||||
MethodEntry method = GetMethod (index);
|
||||
foreach (MethodSourceEntry source in method.SourceFile.Methods) {
|
||||
if (source.Index == index) {
|
||||
method_source_hash.Add (index, source);
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
throw new MonoSymbolFileException ("Internal error.");
|
||||
}
|
||||
|
||||
public int FindMethod (string full_name)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (method_full_name_hash == null) {
|
||||
method_full_name_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < ot.MethodCount; i++) {
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (i + 1);
|
||||
string name = ReadString (ie.FullNameOffset);
|
||||
|
||||
method_full_name_hash.Add (name, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
object value = method_full_name_hash [full_name];
|
||||
if (value == null)
|
||||
return -1;
|
||||
return (int) value;
|
||||
}
|
||||
|
||||
public int[] MethodLookup (string query)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
ArrayList list;
|
||||
if (method_name_hash == null) {
|
||||
method_name_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < ot.MethodCount; i++) {
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (i + 1);
|
||||
string full_name = ReadString (ie.FullNameOffset);
|
||||
|
||||
int pos = full_name.IndexOf ('(');
|
||||
string name = full_name.Substring (0, pos);
|
||||
|
||||
list = method_name_hash [name] as ArrayList;
|
||||
if (list == null) {
|
||||
list = new ArrayList ();
|
||||
method_name_hash.Add (name, list);
|
||||
}
|
||||
|
||||
list.Add (i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
list = method_name_hash [query] as ArrayList;
|
||||
if (list == null)
|
||||
return new int [0];
|
||||
|
||||
int[] retval = new int [list.Count];
|
||||
list.CopyTo (retval, 0);
|
||||
return retval;
|
||||
}
|
||||
|
||||
public int FindSource (string file_name)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (source_name_hash == null) {
|
||||
source_name_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < ot.SourceCount; i++) {
|
||||
SourceFileEntry source = GetSourceFile (i + 1);
|
||||
|
||||
source_name_hash.Add (source.FileName, i);
|
||||
}
|
||||
}
|
||||
|
||||
object value = source_name_hash [file_name];
|
||||
if (value == null)
|
||||
return -1;
|
||||
return (int) value;
|
||||
}
|
||||
|
||||
internal BinaryReader BinaryReader {
|
||||
get {
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
return reader;
|
||||
}
|
||||
}
|
||||
|
||||
void IDisposable.Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
}
|
||||
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
if (reader != null) {
|
||||
reader.Close ();
|
||||
reader = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,64 +18,55 @@ namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public struct OffsetTable
|
||||
{
|
||||
public const int Version = 28;
|
||||
public const int Version = 33;
|
||||
public const long Magic = 0x45e82623fd7fa614;
|
||||
|
||||
public int total_file_size;
|
||||
public int source_table_offset;
|
||||
public int source_table_size;
|
||||
public int method_count;
|
||||
public int method_table_offset;
|
||||
public int method_table_size;
|
||||
public int line_number_table_offset;
|
||||
public int line_number_table_size;
|
||||
public int local_variable_table_offset;
|
||||
public int local_variable_table_size;
|
||||
public int source_file_table_offset;
|
||||
public int source_file_table_size;
|
||||
public int source_file_count;
|
||||
public int type_count;
|
||||
public int type_index_table_offset;
|
||||
public int type_index_table_size;
|
||||
public int TotalFileSize;
|
||||
public int DataSectionOffset;
|
||||
public int DataSectionSize;
|
||||
public int SourceCount;
|
||||
public int SourceTableOffset;
|
||||
public int SourceTableSize;
|
||||
public int MethodCount;
|
||||
public int MethodTableOffset;
|
||||
public int MethodTableSize;
|
||||
public int TypeCount;
|
||||
|
||||
public OffsetTable (IMonoBinaryReader reader)
|
||||
internal OffsetTable (BinaryReader reader)
|
||||
{
|
||||
total_file_size = reader.ReadInt32 ();
|
||||
source_table_offset = reader.ReadInt32 ();
|
||||
source_table_size = reader.ReadInt32 ();
|
||||
method_count = reader.ReadInt32 ();
|
||||
method_table_offset = reader.ReadInt32 ();
|
||||
method_table_size = reader.ReadInt32 ();
|
||||
line_number_table_offset = reader.ReadInt32 ();
|
||||
line_number_table_size = reader.ReadInt32 ();
|
||||
local_variable_table_offset = reader.ReadInt32 ();
|
||||
local_variable_table_size = reader.ReadInt32 ();
|
||||
source_file_table_offset = reader.ReadInt32 ();
|
||||
source_file_table_size = reader.ReadInt32 ();
|
||||
source_file_count = reader.ReadInt32 ();
|
||||
type_count = reader.ReadInt32 ();
|
||||
type_index_table_offset = reader.ReadInt32 ();
|
||||
type_index_table_size = reader.ReadInt32 ();
|
||||
TotalFileSize = reader.ReadInt32 ();
|
||||
DataSectionOffset = reader.ReadInt32 ();
|
||||
DataSectionSize = reader.ReadInt32 ();
|
||||
SourceCount = reader.ReadInt32 ();
|
||||
SourceTableOffset = reader.ReadInt32 ();
|
||||
SourceTableSize = reader.ReadInt32 ();
|
||||
MethodCount = reader.ReadInt32 ();
|
||||
MethodTableOffset = reader.ReadInt32 ();
|
||||
MethodTableSize = reader.ReadInt32 ();
|
||||
TypeCount = reader.ReadInt32 ();
|
||||
}
|
||||
|
||||
public void Write (BinaryWriter bw)
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
bw.Write (total_file_size);
|
||||
bw.Write (source_table_offset);
|
||||
bw.Write (source_table_size);
|
||||
bw.Write (method_count);
|
||||
bw.Write (method_table_offset);
|
||||
bw.Write (method_table_size);
|
||||
bw.Write (line_number_table_offset);
|
||||
bw.Write (line_number_table_size);
|
||||
bw.Write (local_variable_table_offset);
|
||||
bw.Write (local_variable_table_size);
|
||||
bw.Write (source_file_table_offset);
|
||||
bw.Write (source_file_table_size);
|
||||
bw.Write (source_file_count);
|
||||
bw.Write (type_count);
|
||||
bw.Write (type_index_table_offset);
|
||||
bw.Write (type_index_table_size);
|
||||
bw.Write (TotalFileSize);
|
||||
bw.Write (DataSectionOffset);
|
||||
bw.Write (DataSectionSize);
|
||||
bw.Write (SourceCount);
|
||||
bw.Write (SourceTableOffset);
|
||||
bw.Write (SourceTableSize);
|
||||
bw.Write (MethodCount);
|
||||
bw.Write (MethodTableOffset);
|
||||
bw.Write (MethodTableSize);
|
||||
bw.Write (TypeCount);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format (
|
||||
"OffsetTable [{0} - {1}:{2} - {3}:{4}:{5} - {6}:{7}:{8} - {9}]",
|
||||
TotalFileSize, DataSectionOffset, DataSectionSize, SourceCount,
|
||||
SourceTableOffset, SourceTableSize, MethodCount, MethodTableOffset,
|
||||
MethodTableSize, TypeCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,11 +81,9 @@ namespace Mono.CSharp.Debugger
|
||||
this.Offset = offset;
|
||||
}
|
||||
|
||||
internal LineNumberEntry (SourceLine line)
|
||||
: this (line.Row, line.Offset)
|
||||
{ }
|
||||
public static LineNumberEntry Null = new LineNumberEntry (0, 0);
|
||||
|
||||
public LineNumberEntry (IMonoBinaryReader reader)
|
||||
internal LineNumberEntry (BinaryReader reader)
|
||||
{
|
||||
Row = reader.ReadInt32 ();
|
||||
Offset = reader.ReadInt32 ();
|
||||
@@ -106,6 +95,41 @@ namespace Mono.CSharp.Debugger
|
||||
bw.Write (Offset);
|
||||
}
|
||||
|
||||
private class OffsetComparerClass : IComparer
|
||||
{
|
||||
public int Compare (object a, object b)
|
||||
{
|
||||
LineNumberEntry l1 = (LineNumberEntry) a;
|
||||
LineNumberEntry l2 = (LineNumberEntry) b;
|
||||
|
||||
if (l1.Offset < l2.Offset)
|
||||
return -1;
|
||||
else if (l1.Offset > l2.Offset)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private class RowComparerClass : IComparer
|
||||
{
|
||||
public int Compare (object a, object b)
|
||||
{
|
||||
LineNumberEntry l1 = (LineNumberEntry) a;
|
||||
LineNumberEntry l2 = (LineNumberEntry) b;
|
||||
|
||||
if (l1.Row < l2.Row)
|
||||
return -1;
|
||||
else if (l1.Row > l2.Row)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly IComparer OffsetComparer = new OffsetComparerClass ();
|
||||
public static readonly IComparer RowComparer = new RowComparerClass ();
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[Line {0}:{1}]", Row, Offset);
|
||||
@@ -125,21 +149,19 @@ namespace Mono.CSharp.Debugger
|
||||
this.Signature = Signature;
|
||||
}
|
||||
|
||||
public LocalVariableEntry (IMonoBinaryReader reader)
|
||||
internal LocalVariableEntry (BinaryReader reader)
|
||||
{
|
||||
int name_length = reader.ReadInt32 ();
|
||||
byte[] name = reader.ReadBuffer (name_length);
|
||||
byte[] name = reader.ReadBytes (name_length);
|
||||
Name = Encoding.UTF8.GetString (name);
|
||||
Attributes = (FieldAttributes) reader.ReadInt32 ();
|
||||
int sig_length = reader.ReadInt32 ();
|
||||
Signature = reader.ReadBuffer (sig_length);
|
||||
Signature = reader.ReadBytes (sig_length);
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
internal void Write (MonoSymbolFile file, BinaryWriter bw)
|
||||
{
|
||||
byte[] name = Encoding.UTF8.GetBytes (Name);
|
||||
bw.Write ((int) name.Length);
|
||||
bw.Write (name);
|
||||
file.WriteString (bw, Name);
|
||||
bw.Write ((int) Attributes);
|
||||
bw.Write ((int) Signature.Length);
|
||||
bw.Write (Signature);
|
||||
@@ -153,74 +175,129 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public class SourceFileEntry
|
||||
{
|
||||
public readonly string SourceFile;
|
||||
|
||||
IMonoBinaryReader reader;
|
||||
long method_position;
|
||||
MonoSymbolFile file;
|
||||
string file_name;
|
||||
ArrayList methods;
|
||||
int count;
|
||||
ArrayList namespaces;
|
||||
int index, count, name_offset, method_offset;
|
||||
int namespace_count, nstable_offset;
|
||||
bool creating;
|
||||
|
||||
internal SourceFileEntry (string source_file)
|
||||
{
|
||||
this.SourceFile = source_file;
|
||||
this.methods = new ArrayList ();
|
||||
this.count = 0;
|
||||
public static int Size {
|
||||
get { return 24; }
|
||||
}
|
||||
|
||||
internal void AddMethod (MethodSourceEntry method)
|
||||
internal SourceFileEntry (MonoSymbolFile file, string file_name)
|
||||
{
|
||||
methods.Add (method);
|
||||
count++;
|
||||
this.file = file;
|
||||
this.file_name = file_name;
|
||||
this.index = file.AddSource (this);
|
||||
|
||||
creating = true;
|
||||
methods = new ArrayList ();
|
||||
namespaces = new ArrayList ();
|
||||
}
|
||||
|
||||
public void DefineMethod (MethodBase method, int token, LocalVariableEntry[] locals,
|
||||
LineNumberEntry[] lines, int start, int end, int namespace_id)
|
||||
{
|
||||
if (!creating)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
MethodEntry entry = new MethodEntry (
|
||||
file, this, method, token, locals, lines, start, end, namespace_id);
|
||||
|
||||
methods.Add (entry);
|
||||
file.AddMethod (entry);
|
||||
}
|
||||
|
||||
public int DefineNamespace (string name, string[] using_clauses, int parent)
|
||||
{
|
||||
if (!creating)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
int index = file.GetNextNamespaceIndex ();
|
||||
NamespaceEntry ns = new NamespaceEntry (name, index, using_clauses, parent);
|
||||
namespaces.Add (ns);
|
||||
return index;
|
||||
}
|
||||
|
||||
internal void WriteData (BinaryWriter bw)
|
||||
{
|
||||
name_offset = (int) bw.BaseStream.Position;
|
||||
file.WriteString (bw, file_name);
|
||||
|
||||
ArrayList list = new ArrayList ();
|
||||
foreach (MethodEntry entry in methods)
|
||||
list.Add (entry.Write (file, bw));
|
||||
list.Sort ();
|
||||
count = list.Count;
|
||||
|
||||
method_offset = (int) bw.BaseStream.Position;
|
||||
foreach (MethodSourceEntry method in list)
|
||||
method.Write (bw);
|
||||
|
||||
namespace_count = namespaces.Count;
|
||||
nstable_offset = (int) bw.BaseStream.Position;
|
||||
foreach (NamespaceEntry ns in namespaces)
|
||||
ns.Write (file, bw);
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
byte[] name = Encoding.UTF8.GetBytes (SourceFile);
|
||||
bw.Write ((int) name.Length);
|
||||
bw.Write (name);
|
||||
|
||||
methods.Sort ();
|
||||
bw.Write (methods.Count);
|
||||
foreach (MethodSourceEntry method in methods)
|
||||
method.Write (bw);
|
||||
bw.Write (index);
|
||||
bw.Write (count);
|
||||
bw.Write (namespace_count);
|
||||
bw.Write (name_offset);
|
||||
bw.Write (method_offset);
|
||||
bw.Write (nstable_offset);
|
||||
}
|
||||
|
||||
public SourceFileEntry (IMonoBinaryReader reader)
|
||||
internal SourceFileEntry (MonoSymbolFile file, BinaryReader reader)
|
||||
{
|
||||
int name_length = reader.ReadInt32 ();
|
||||
byte[] name = reader.ReadBuffer (name_length);
|
||||
SourceFile = Encoding.UTF8.GetString (name);
|
||||
this.file = file;
|
||||
|
||||
index = reader.ReadInt32 ();
|
||||
count = reader.ReadInt32 ();
|
||||
this.reader = reader;
|
||||
this.method_position = reader.Position;
|
||||
namespace_count = reader.ReadInt32 ();
|
||||
name_offset = reader.ReadInt32 ();
|
||||
method_offset = reader.ReadInt32 ();
|
||||
nstable_offset = reader.ReadInt32 ();
|
||||
|
||||
reader.Position += count * MethodSourceEntry.Size;
|
||||
file_name = file.ReadString (name_offset);
|
||||
}
|
||||
|
||||
public int Index {
|
||||
get { return index; }
|
||||
}
|
||||
|
||||
public string FileName {
|
||||
get { return file_name; }
|
||||
}
|
||||
|
||||
public MethodSourceEntry[] Methods {
|
||||
get {
|
||||
read_methods ();
|
||||
MethodSourceEntry[] retval = new MethodSourceEntry [methods.Count];
|
||||
methods.CopyTo (retval, 0);
|
||||
if (creating)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
BinaryReader reader = file.BinaryReader;
|
||||
int old_pos = (int) reader.BaseStream.Position;
|
||||
|
||||
reader.BaseStream.Position = method_offset;
|
||||
ArrayList list = new ArrayList ();
|
||||
for (int i = 0; i < count; i ++)
|
||||
list.Add (new MethodSourceEntry (reader));
|
||||
reader.BaseStream.Position = old_pos;
|
||||
|
||||
MethodSourceEntry[] retval = new MethodSourceEntry [count];
|
||||
list.CopyTo (retval, 0);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
void read_methods ()
|
||||
{
|
||||
if (methods != null)
|
||||
return;
|
||||
|
||||
reader.Position = method_position;
|
||||
methods = new ArrayList ();
|
||||
for (int i = 0; i < count; i++)
|
||||
methods.Add (new MethodSourceEntry (reader));
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("SourceFileEntry ({0}:{1})", SourceFile, count);
|
||||
return String.Format ("SourceFileEntry ({0}:{1}:{2})", index, file_name, count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +316,7 @@ namespace Mono.CSharp.Debugger
|
||||
this.EndRow = end;
|
||||
}
|
||||
|
||||
public MethodSourceEntry (IMonoBinaryReader reader)
|
||||
internal MethodSourceEntry (BinaryReader reader)
|
||||
{
|
||||
Index = reader.ReadInt32 ();
|
||||
FileOffset = reader.ReadInt32 ();
|
||||
@@ -247,11 +324,8 @@ namespace Mono.CSharp.Debugger
|
||||
EndRow = reader.ReadInt32 ();
|
||||
}
|
||||
|
||||
public static int Size
|
||||
{
|
||||
get {
|
||||
return 16;
|
||||
}
|
||||
public static int Size {
|
||||
get { return 16; }
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
@@ -281,84 +355,152 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public struct MethodIndexEntry
|
||||
{
|
||||
public readonly int FileOffset;
|
||||
public readonly int FullNameOffset;
|
||||
public readonly int Token;
|
||||
|
||||
public static int Size {
|
||||
get { return 12; }
|
||||
}
|
||||
|
||||
public MethodIndexEntry (int offset, int name_offset, int token)
|
||||
{
|
||||
this.FileOffset = offset;
|
||||
this.FullNameOffset = name_offset;
|
||||
this.Token = token;
|
||||
}
|
||||
|
||||
internal MethodIndexEntry (BinaryReader reader)
|
||||
{
|
||||
FileOffset = reader.ReadInt32 ();
|
||||
FullNameOffset = reader.ReadInt32 ();
|
||||
Token = reader.ReadInt32 ();
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
bw.Write (FileOffset);
|
||||
bw.Write (FullNameOffset);
|
||||
bw.Write (Token);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("MethodIndexEntry ({0}:{1}:{2:x})",
|
||||
FileOffset, FullNameOffset, Token);
|
||||
}
|
||||
}
|
||||
|
||||
public class MethodEntry
|
||||
{
|
||||
#region This is actually written to the symbol file
|
||||
public readonly int SourceFileIndex;
|
||||
public readonly int Token;
|
||||
public readonly int StartRow;
|
||||
public readonly int EndRow;
|
||||
public readonly int NumLineNumbers;
|
||||
public readonly int ThisTypeIndex;
|
||||
public readonly int ClassTypeIndex;
|
||||
public readonly int NumParameters;
|
||||
public readonly int NumLocals;
|
||||
public readonly int NumLineNumbers;
|
||||
public readonly int NamespaceID;
|
||||
|
||||
public int TypeIndexTableOffset;
|
||||
public int LocalVariableTableOffset;
|
||||
public readonly int SourceFileOffset;
|
||||
public readonly int LineNumberTableOffset;
|
||||
int NameOffset;
|
||||
int FullNameOffset;
|
||||
int TypeIndexTableOffset;
|
||||
int LocalVariableTableOffset;
|
||||
int LineNumberTableOffset;
|
||||
#endregion
|
||||
|
||||
public readonly string SourceFile = null;
|
||||
public readonly LineNumberEntry[] LineNumbers = null;
|
||||
public readonly int[] ParamTypeIndices = null;
|
||||
public readonly int[] LocalTypeIndices = null;
|
||||
public readonly LocalVariableEntry[] Locals = null;
|
||||
int index;
|
||||
int file_offset;
|
||||
string name;
|
||||
string full_name;
|
||||
MethodIndexEntry index_entry;
|
||||
|
||||
public static int Size
|
||||
{
|
||||
get {
|
||||
return 44;
|
||||
}
|
||||
public readonly SourceFileEntry SourceFile;
|
||||
public readonly LineNumberEntry[] LineNumbers;
|
||||
public readonly int[] ParamTypeIndices;
|
||||
public readonly int[] LocalTypeIndices;
|
||||
public readonly LocalVariableEntry[] Locals;
|
||||
public readonly Type[] LocalTypes;
|
||||
|
||||
public readonly MonoSymbolFile SymbolFile;
|
||||
|
||||
public static int Size {
|
||||
get { return 52; }
|
||||
}
|
||||
|
||||
public MethodEntry (IMonoBinaryReader reader)
|
||||
public string Name {
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
public string FullName {
|
||||
get { return full_name; }
|
||||
}
|
||||
|
||||
public MethodBase MethodBase {
|
||||
get { return SymbolFile.Assembly.MonoDebugger_GetMethod (Token); }
|
||||
}
|
||||
|
||||
internal MethodEntry (MonoSymbolFile file, BinaryReader reader, int index)
|
||||
{
|
||||
this.SymbolFile = file;
|
||||
this.index = index;
|
||||
SourceFileIndex = reader.ReadInt32 ();
|
||||
Token = reader.ReadInt32 ();
|
||||
StartRow = reader.ReadInt32 ();
|
||||
EndRow = reader.ReadInt32 ();
|
||||
ThisTypeIndex = reader.ReadInt32 ();
|
||||
ClassTypeIndex = reader.ReadInt32 ();
|
||||
NumParameters = reader.ReadInt32 ();
|
||||
NumLocals = reader.ReadInt32 ();
|
||||
NumLineNumbers = reader.ReadInt32 ();
|
||||
NameOffset = reader.ReadInt32 ();
|
||||
FullNameOffset = reader.ReadInt32 ();
|
||||
TypeIndexTableOffset = reader.ReadInt32 ();
|
||||
LocalVariableTableOffset = reader.ReadInt32 ();
|
||||
SourceFileOffset = reader.ReadInt32 ();
|
||||
LineNumberTableOffset = reader.ReadInt32 ();
|
||||
NamespaceID = reader.ReadInt32 ();
|
||||
|
||||
if (SourceFileOffset != 0) {
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = SourceFileOffset;
|
||||
int source_file_length = reader.ReadInt32 ();
|
||||
byte[] source_file = reader.ReadBuffer (source_file_length);
|
||||
SourceFile = Encoding.UTF8.GetString (source_file);
|
||||
reader.Position = old_pos;
|
||||
}
|
||||
name = file.ReadString (NameOffset);
|
||||
full_name = file.ReadString (FullNameOffset);
|
||||
|
||||
SourceFile = file.GetSourceFile (SourceFileIndex);
|
||||
|
||||
if (LineNumberTableOffset != 0) {
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = LineNumberTableOffset;
|
||||
long old_pos = reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = LineNumberTableOffset;
|
||||
|
||||
LineNumbers = new LineNumberEntry [NumLineNumbers];
|
||||
|
||||
for (int i = 0; i < NumLineNumbers; i++)
|
||||
LineNumbers [i] = new LineNumberEntry (reader);
|
||||
|
||||
reader.Position = old_pos;
|
||||
reader.BaseStream.Position = old_pos;
|
||||
}
|
||||
|
||||
if (LocalVariableTableOffset != 0) {
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = LocalVariableTableOffset;
|
||||
long old_pos = reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = LocalVariableTableOffset;
|
||||
|
||||
Locals = new LocalVariableEntry [NumLocals];
|
||||
LocalTypes = new Type [NumLocals];
|
||||
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
Assembly ass = file.Assembly;
|
||||
|
||||
for (int i = 0; i < NumLocals; i++) {
|
||||
Locals [i] = new LocalVariableEntry (reader);
|
||||
LocalTypes [i] = ass.MonoDebugger_GetLocalTypeFromSignature (
|
||||
Locals [i].Signature);
|
||||
}
|
||||
|
||||
reader.Position = old_pos;
|
||||
reader.BaseStream.Position = old_pos;
|
||||
}
|
||||
|
||||
if (TypeIndexTableOffset != 0) {
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = TypeIndexTableOffset;
|
||||
long old_pos = reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = TypeIndexTableOffset;
|
||||
|
||||
ParamTypeIndices = new int [NumParameters];
|
||||
LocalTypeIndices = new int [NumLocals];
|
||||
@@ -368,52 +510,180 @@ namespace Mono.CSharp.Debugger
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
LocalTypeIndices [i] = reader.ReadInt32 ();
|
||||
|
||||
reader.Position = old_pos;
|
||||
reader.BaseStream.Position = old_pos;
|
||||
}
|
||||
}
|
||||
|
||||
internal MethodEntry (int token, int sf_offset, string source_file,
|
||||
int this_type_index, int[] param_type_indices,
|
||||
int[] local_type_indices, LocalVariableEntry[] locals,
|
||||
LineNumberEntry[] lines, int lnt_offset,
|
||||
int start_row, int end_row)
|
||||
internal MethodEntry (MonoSymbolFile file, SourceFileEntry source, MethodBase method,
|
||||
int token, LocalVariableEntry[] locals, LineNumberEntry[] lines,
|
||||
int start_row, int end_row, int namespace_id)
|
||||
{
|
||||
this.Token = token;
|
||||
this.StartRow = start_row;
|
||||
this.EndRow = end_row;
|
||||
this.NumLineNumbers = lines.Length;
|
||||
this.ThisTypeIndex = this_type_index;
|
||||
this.NumParameters = param_type_indices.Length;
|
||||
this.NumLocals = local_type_indices.Length;
|
||||
this.ParamTypeIndices = param_type_indices;
|
||||
this.LocalTypeIndices = local_type_indices;
|
||||
this.Locals = locals;
|
||||
this.SourceFileOffset = sf_offset;
|
||||
this.LineNumberTableOffset = lnt_offset;
|
||||
this.SourceFile = source_file;
|
||||
this.LineNumbers = lines;
|
||||
this.SymbolFile = file;
|
||||
index = file.GetNextMethodIndex ();
|
||||
|
||||
Token = token;
|
||||
SourceFileIndex = source.Index;
|
||||
SourceFile = source;
|
||||
StartRow = start_row;
|
||||
EndRow = end_row;
|
||||
NamespaceID = namespace_id;
|
||||
|
||||
LineNumbers = BuildLineNumberTable (lines);
|
||||
NumLineNumbers = LineNumbers.Length;
|
||||
|
||||
ParameterInfo[] parameters = method.GetParameters ();
|
||||
if (parameters == null)
|
||||
parameters = new ParameterInfo [0];
|
||||
|
||||
StringBuilder sb = new StringBuilder ();
|
||||
sb.Append (method.DeclaringType.FullName);
|
||||
sb.Append (".");
|
||||
sb.Append (method.Name);
|
||||
sb.Append ("(");
|
||||
for (int i = 0; i < parameters.Length; i++) {
|
||||
if (i > 0)
|
||||
sb.Append (",");
|
||||
sb.Append (parameters [i].ParameterType.FullName);
|
||||
}
|
||||
sb.Append (")");
|
||||
|
||||
name = method.Name;
|
||||
full_name = sb.ToString ();
|
||||
|
||||
NumParameters = parameters.Length;
|
||||
ParamTypeIndices = new int [NumParameters];
|
||||
for (int i = 0; i < NumParameters; i++)
|
||||
ParamTypeIndices [i] = file.DefineType (parameters [i].ParameterType);
|
||||
|
||||
NumLocals = locals.Length;
|
||||
Locals = locals;
|
||||
|
||||
LocalTypeIndices = new int [NumLocals];
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
LocalTypeIndices [i] = file.GetNextTypeIndex ();
|
||||
|
||||
ClassTypeIndex = file.DefineType (method.ReflectedType);
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
LineNumberEntry[] BuildLineNumberTable (LineNumberEntry[] line_numbers)
|
||||
{
|
||||
ArrayList list = new ArrayList ();
|
||||
int last_offset = -1;
|
||||
int last_row = -1;
|
||||
|
||||
for (int i = 0; i < line_numbers.Length; i++) {
|
||||
LineNumberEntry line = (LineNumberEntry) line_numbers [i];
|
||||
|
||||
if (line.Offset > last_offset) {
|
||||
if (last_row >= 0)
|
||||
list.Add (new LineNumberEntry (last_row, last_offset));
|
||||
last_row = line.Row;
|
||||
last_offset = line.Offset;
|
||||
} else if (line.Row > last_row) {
|
||||
last_row = line.Row;
|
||||
}
|
||||
}
|
||||
|
||||
if (last_row >= 0)
|
||||
list.Add (new LineNumberEntry (last_row, last_offset));
|
||||
|
||||
LineNumberEntry[] retval = new LineNumberEntry [list.Count];
|
||||
list.CopyTo (retval, 0);
|
||||
return retval;
|
||||
}
|
||||
|
||||
internal MethodSourceEntry Write (MonoSymbolFile file, BinaryWriter bw)
|
||||
{
|
||||
NameOffset = (int) bw.BaseStream.Position;
|
||||
file.WriteString (bw, name);
|
||||
|
||||
FullNameOffset = (int) bw.BaseStream.Position;
|
||||
file.WriteString (bw, full_name);
|
||||
|
||||
TypeIndexTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int i = 0; i < NumParameters; i++)
|
||||
bw.Write (ParamTypeIndices [i]);
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
bw.Write (LocalTypeIndices [i]);
|
||||
|
||||
LocalVariableTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
Locals [i].Write (file, bw);
|
||||
|
||||
LineNumberTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int i = 0; i < NumLineNumbers; i++)
|
||||
LineNumbers [i].Write (bw);
|
||||
|
||||
file.LineNumberCount += NumLineNumbers;
|
||||
file.LocalCount += NumLocals;
|
||||
|
||||
file_offset = (int) bw.BaseStream.Position;
|
||||
|
||||
index_entry = new MethodIndexEntry (file_offset, FullNameOffset, Token);
|
||||
|
||||
bw.Write (SourceFileIndex);
|
||||
bw.Write (Token);
|
||||
bw.Write (StartRow);
|
||||
bw.Write (EndRow);
|
||||
bw.Write (ThisTypeIndex);
|
||||
bw.Write (ClassTypeIndex);
|
||||
bw.Write (NumParameters);
|
||||
bw.Write (NumLocals);
|
||||
bw.Write (NumLineNumbers);
|
||||
bw.Write (NameOffset);
|
||||
bw.Write (FullNameOffset);
|
||||
bw.Write (TypeIndexTableOffset);
|
||||
bw.Write (LocalVariableTableOffset);
|
||||
bw.Write (SourceFileOffset);
|
||||
bw.Write (LineNumberTableOffset);
|
||||
bw.Write (NamespaceID);
|
||||
|
||||
return new MethodSourceEntry (index, file_offset, StartRow, EndRow);
|
||||
}
|
||||
|
||||
internal void WriteIndex (BinaryWriter bw)
|
||||
{
|
||||
index_entry.Write (bw);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[Method {0}:{1}:{2}:{3}:{4} - {5}:{6}]",
|
||||
Token, SourceFile, StartRow, EndRow,
|
||||
NumLineNumbers, SourceFileOffset, LineNumberTableOffset);
|
||||
return String.Format ("[Method {0}:{1}:{2}:{3}:{4} - {7}:{8}:{9}:{10} - {5} - {6}]",
|
||||
index, Token, SourceFileIndex, StartRow, EndRow,
|
||||
SourceFile, FullName, ClassTypeIndex, NumParameters,
|
||||
NumLocals, NumLineNumbers);
|
||||
}
|
||||
}
|
||||
|
||||
public struct NamespaceEntry
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly int Index;
|
||||
public readonly int Parent;
|
||||
public readonly string[] UsingClauses;
|
||||
|
||||
public NamespaceEntry (string name, int index, string[] using_clauses, int parent)
|
||||
{
|
||||
this.Name = name;
|
||||
this.Index = index;
|
||||
this.Parent = parent;
|
||||
this.UsingClauses = using_clauses != null ? using_clauses : new string [0];
|
||||
}
|
||||
|
||||
internal void Write (MonoSymbolFile file, BinaryWriter bw)
|
||||
{
|
||||
file.WriteString (bw, Name);
|
||||
bw.Write (Index);
|
||||
bw.Write (Parent);
|
||||
bw.Write (UsingClauses.Length);
|
||||
foreach (string uc in UsingClauses)
|
||||
file.WriteString (bw, uc);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[Namespace {0}:{1}:{2}]", Name, Index, Parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,213 +0,0 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/MonoSymbolTableWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
internal class MonoSymbolTableWriter : IDisposable
|
||||
{
|
||||
BinaryWriter bw;
|
||||
Hashtable type_hash;
|
||||
int last_type_index;
|
||||
|
||||
public MonoSymbolTableWriter (string output_filename)
|
||||
{
|
||||
FileStream stream = new FileStream (output_filename, FileMode.Create);
|
||||
bw = new BinaryWriter (stream);
|
||||
type_hash = new Hashtable ();
|
||||
}
|
||||
|
||||
int GetTypeIndex (Type type)
|
||||
{
|
||||
if (type_hash.Contains (type))
|
||||
return (int) type_hash [type];
|
||||
|
||||
int index = ++last_type_index;
|
||||
type_hash.Add (type, index);
|
||||
return index;
|
||||
}
|
||||
|
||||
public void WriteSymbolTable (MonoSymbolWriter symwriter)
|
||||
{
|
||||
// Magic number and file version.
|
||||
bw.Write (OffsetTable.Magic);
|
||||
bw.Write (OffsetTable.Version);
|
||||
|
||||
OffsetTable ot = new OffsetTable ();
|
||||
|
||||
//
|
||||
// Offsets of file sections; we must write this after we're done
|
||||
// writing the whole file, so we just reserve the space for it here.
|
||||
//
|
||||
long offset_table_offset = bw.BaseStream.Position;
|
||||
ot.Write (bw);
|
||||
|
||||
//
|
||||
// Write source file table.
|
||||
//
|
||||
Hashtable sources = new Hashtable ();
|
||||
|
||||
ot.source_table_offset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceFile source in symwriter.Sources) {
|
||||
if (sources.ContainsKey (source))
|
||||
continue;
|
||||
|
||||
sources.Add (source, (int) bw.BaseStream.Position);
|
||||
byte[] file_name = Encoding.UTF8.GetBytes (source.FileName);
|
||||
bw.Write ((int) file_name.Length);
|
||||
bw.Write (file_name);
|
||||
}
|
||||
ot.source_table_size = (int) bw.BaseStream.Position - ot.source_table_offset;
|
||||
|
||||
Hashtable source_table = new Hashtable ();
|
||||
|
||||
//
|
||||
// Write line number table
|
||||
//
|
||||
ArrayList methods = new ArrayList ();
|
||||
|
||||
int num_methods = 0;
|
||||
|
||||
ot.line_number_table_offset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceMethod method in symwriter.Methods) {
|
||||
if (method.Start == null || method.Start.Row == 0)
|
||||
continue;
|
||||
|
||||
int count = method.Lines.Length;
|
||||
LineNumberEntry[] lines = new LineNumberEntry [count];
|
||||
|
||||
int pos = (int) bw.BaseStream.Position;
|
||||
|
||||
int num_params = method.Parameters.Length;
|
||||
int[] param_type_indices = new int [num_params];
|
||||
for (int i = 0; i < num_params; i++) {
|
||||
Type type = method.Parameters [i].ParameterType;
|
||||
param_type_indices [i] = GetTypeIndex (type);
|
||||
}
|
||||
|
||||
int num_locals = method.Locals.Length;
|
||||
int[] local_type_indices = new int [num_locals];
|
||||
for (int i = 0; i < num_locals; i++)
|
||||
local_type_indices [i] = ++last_type_index;
|
||||
|
||||
int type_index_table_offset = ot.type_index_table_size;
|
||||
ot.type_index_table_size += 4 * (num_params + num_locals);
|
||||
|
||||
int this_type_index = 0;
|
||||
if (!method.MethodBase.IsStatic)
|
||||
this_type_index = GetTypeIndex (method.MethodBase.ReflectedType);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
lines [i] = new LineNumberEntry (method.Lines [i]);
|
||||
lines [i].Write (bw);
|
||||
}
|
||||
|
||||
MethodEntry entry = new MethodEntry (
|
||||
(int) method.Token, (int) sources [method.SourceFile],
|
||||
method.SourceFile.FileName, this_type_index,
|
||||
param_type_indices, local_type_indices, method.Locals, lines, pos,
|
||||
(int) method.Start.Row, (int) method.End.Row);
|
||||
|
||||
methods.Add (entry);
|
||||
}
|
||||
ot.line_number_table_size = (int) bw.BaseStream.Position -
|
||||
ot.line_number_table_offset;
|
||||
|
||||
//
|
||||
// Write type index table.
|
||||
//
|
||||
|
||||
ot.type_index_table_offset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
|
||||
entry.TypeIndexTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int j = 0; j < entry.NumParameters; j++)
|
||||
bw.Write (entry.ParamTypeIndices [j]);
|
||||
for (int j = 0; j < entry.NumLocals; j++)
|
||||
bw.Write (entry.LocalTypeIndices [j]);
|
||||
}
|
||||
ot.type_index_table_size = (int) bw.BaseStream.Position -
|
||||
ot.type_index_table_offset;
|
||||
|
||||
//
|
||||
// Write local variable table.
|
||||
//
|
||||
|
||||
ot.local_variable_table_offset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
|
||||
entry.LocalVariableTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int j = 0; j < entry.NumLocals; j++)
|
||||
entry.Locals [j].Write (bw);
|
||||
}
|
||||
ot.local_variable_table_size = (int) bw.BaseStream.Position -
|
||||
ot.local_variable_table_offset;
|
||||
|
||||
//
|
||||
// Write method table
|
||||
//
|
||||
ot.method_count = methods.Count;
|
||||
ot.method_table_offset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
SourceFileEntry source = (SourceFileEntry) source_table [entry.SourceFileOffset];
|
||||
if (source == null) {
|
||||
source = new SourceFileEntry (entry.SourceFile);
|
||||
source_table.Add (entry.SourceFileOffset, source);
|
||||
}
|
||||
|
||||
source.AddMethod (new MethodSourceEntry (
|
||||
i, (int) bw.BaseStream.Position, entry.StartRow, entry.EndRow));
|
||||
|
||||
entry.Write (bw);
|
||||
}
|
||||
ot.method_table_size = (int) bw.BaseStream.Position - ot.method_table_offset;
|
||||
|
||||
//
|
||||
// Write source file table.
|
||||
//
|
||||
ot.source_file_count = source_table.Count;
|
||||
ot.source_file_table_offset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceFileEntry source in source_table.Values)
|
||||
source.Write (bw);
|
||||
ot.source_file_table_size = (int) bw.BaseStream.Position - ot.source_file_table_offset;
|
||||
|
||||
//
|
||||
// Write offset table
|
||||
//
|
||||
ot.type_count = last_type_index;
|
||||
ot.total_file_size = (int) bw.BaseStream.Position;
|
||||
bw.Seek ((int) offset_table_offset, SeekOrigin.Begin);
|
||||
ot.Write (bw);
|
||||
bw.Seek (0, SeekOrigin.End);
|
||||
}
|
||||
|
||||
void IDisposable.Dispose() {
|
||||
Dispose (true);
|
||||
}
|
||||
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
bw.Close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,28 +20,15 @@ using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
internal class SourceFile
|
||||
internal class SourceFile : SourceFileEntry, ISymbolDocumentWriter
|
||||
{
|
||||
private ArrayList _methods = new ArrayList ();
|
||||
private string _file_name;
|
||||
|
||||
public SourceFile (string filename)
|
||||
{
|
||||
this._file_name = filename;
|
||||
}
|
||||
public SourceFile (MonoSymbolFile file, string filename)
|
||||
: base (file, filename)
|
||||
{ }
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return _file_name;
|
||||
}
|
||||
|
||||
public string FileName {
|
||||
get {
|
||||
return _file_name;
|
||||
}
|
||||
}
|
||||
|
||||
public SourceMethod[] Methods {
|
||||
public new SourceMethod[] Methods {
|
||||
get {
|
||||
SourceMethod[] retval = new SourceMethod [_methods.Count];
|
||||
_methods.CopyTo (retval);
|
||||
@@ -53,6 +40,16 @@ namespace Mono.CSharp.Debugger
|
||||
{
|
||||
_methods.Add (method);
|
||||
}
|
||||
|
||||
void ISymbolDocumentWriter.SetCheckSum (Guid algorithmId, byte[] checkSum)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
void ISymbolDocumentWriter.SetSource (byte[] source)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal class SourceBlock
|
||||
@@ -60,30 +57,21 @@ namespace Mono.CSharp.Debugger
|
||||
static private int next_index;
|
||||
private readonly int _index;
|
||||
|
||||
public SourceBlock (SourceMethod method, SourceLine start, SourceLine end)
|
||||
{
|
||||
this._method = method;
|
||||
this._start = start;
|
||||
this._end = end;
|
||||
this._index = ++next_index;
|
||||
}
|
||||
|
||||
internal SourceBlock (SourceMethod method, int startOffset)
|
||||
{
|
||||
this._method = method;
|
||||
this._start = new SourceLine (startOffset);
|
||||
this._start_offset = startOffset;
|
||||
this._index = ++next_index;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return "SourceBlock #" + ID + " (" + Start + " - " + End + ")";
|
||||
return "SourceBlock #" + ID;
|
||||
}
|
||||
|
||||
private readonly SourceMethod _method;
|
||||
private ArrayList _blocks = new ArrayList ();
|
||||
internal SourceLine _start;
|
||||
internal SourceLine _end;
|
||||
internal int _start_offset, _end_offset;
|
||||
|
||||
private ArrayList _locals = new ArrayList ();
|
||||
|
||||
@@ -106,18 +94,6 @@ namespace Mono.CSharp.Debugger
|
||||
_blocks.Add (block);
|
||||
}
|
||||
|
||||
public SourceLine Start {
|
||||
get {
|
||||
return _start;
|
||||
}
|
||||
}
|
||||
|
||||
public SourceLine End {
|
||||
get {
|
||||
return _end;
|
||||
}
|
||||
}
|
||||
|
||||
public int ID {
|
||||
get {
|
||||
return _index;
|
||||
@@ -138,63 +114,6 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
internal class SourceLine
|
||||
{
|
||||
public SourceLine (int row, int column)
|
||||
: this (0, row, column)
|
||||
{
|
||||
this._type = SourceOffsetType.OFFSET_NONE;
|
||||
}
|
||||
|
||||
public SourceLine (int offset, int row, int column)
|
||||
{
|
||||
this._offset = offset;
|
||||
this._row = row;
|
||||
this._column = column;
|
||||
this._type = SourceOffsetType.OFFSET_IL;
|
||||
}
|
||||
|
||||
internal SourceLine (int offset)
|
||||
: this (offset, 0, 0)
|
||||
{ }
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return "SourceLine (" + _offset + "@" + _row + ":" + _column + ")";
|
||||
}
|
||||
|
||||
internal SourceOffsetType _type;
|
||||
internal int _offset;
|
||||
internal int _row;
|
||||
internal int _column;
|
||||
|
||||
// interface SourceLine
|
||||
|
||||
public SourceOffsetType OffsetType {
|
||||
get {
|
||||
return _type;
|
||||
}
|
||||
}
|
||||
|
||||
public int Offset {
|
||||
get {
|
||||
return _offset;
|
||||
}
|
||||
}
|
||||
|
||||
public int Row {
|
||||
get {
|
||||
return _row;
|
||||
}
|
||||
}
|
||||
|
||||
public int Column {
|
||||
get {
|
||||
return _column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class SourceMethod
|
||||
{
|
||||
private ArrayList _lines = new ArrayList ();
|
||||
@@ -205,32 +124,25 @@ namespace Mono.CSharp.Debugger
|
||||
internal readonly MethodBase _method_base;
|
||||
internal SourceFile _source_file;
|
||||
internal int _token;
|
||||
private int _namespace_id;
|
||||
private LineNumberEntry _start, _end;
|
||||
|
||||
private SourceBlock _implicit_block;
|
||||
|
||||
public SourceMethod (MethodBase method_base, SourceFile source_file)
|
||||
: this (method_base)
|
||||
{
|
||||
this._source_file = source_file;
|
||||
}
|
||||
|
||||
internal SourceMethod (MethodBase method_base)
|
||||
internal SourceMethod (SourceFile source_file, int startLine, int startColumn,
|
||||
int endLine, int endColumn, MethodBase method_base,
|
||||
int namespace_id)
|
||||
{
|
||||
this._method_base = method_base;
|
||||
this._source_file = source_file;
|
||||
this._namespace_id = namespace_id;
|
||||
|
||||
this._start = new LineNumberEntry (startLine, 0);
|
||||
this._end = new LineNumberEntry (endLine, 0);
|
||||
|
||||
this._implicit_block = new SourceBlock (this, 0);
|
||||
}
|
||||
|
||||
public void SetSourceRange (SourceFile sourceFile,
|
||||
int startLine, int startColumn,
|
||||
int endLine, int endColumn)
|
||||
{
|
||||
_source_file = sourceFile;
|
||||
_implicit_block._start = new SourceLine (startLine, startColumn);
|
||||
_implicit_block._end = new SourceLine (endLine, endColumn);
|
||||
}
|
||||
|
||||
|
||||
public void StartBlock (SourceBlock block)
|
||||
{
|
||||
_block_stack.Push (block);
|
||||
@@ -239,7 +151,7 @@ namespace Mono.CSharp.Debugger
|
||||
public void EndBlock (int endOffset) {
|
||||
SourceBlock block = (SourceBlock) _block_stack.Pop ();
|
||||
|
||||
block._end = new SourceLine (endOffset);
|
||||
block._end_offset = endOffset;
|
||||
|
||||
if (_block_stack.Count > 0) {
|
||||
SourceBlock parent = (SourceBlock) _block_stack.Peek ();
|
||||
@@ -254,8 +166,8 @@ namespace Mono.CSharp.Debugger
|
||||
public void SetBlockRange (int BlockID, int startOffset, int endOffset)
|
||||
{
|
||||
SourceBlock block = (SourceBlock) _block_hash [BlockID];
|
||||
((SourceLine) block.Start)._offset = startOffset;
|
||||
((SourceLine) block.End)._offset = endOffset;
|
||||
block._start_offset = startOffset;
|
||||
block._end_offset = endOffset;
|
||||
}
|
||||
|
||||
public SourceBlock CurrentBlock {
|
||||
@@ -267,15 +179,15 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public SourceLine[] Lines {
|
||||
public LineNumberEntry[] Lines {
|
||||
get {
|
||||
SourceLine[] retval = new SourceLine [_lines.Count];
|
||||
LineNumberEntry[] retval = new LineNumberEntry [_lines.Count];
|
||||
_lines.CopyTo (retval);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLine (SourceLine line)
|
||||
public void AddLine (LineNumberEntry line)
|
||||
{
|
||||
_lines.Add (line);
|
||||
}
|
||||
@@ -350,28 +262,39 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public SourceLine Start {
|
||||
public bool HasSource {
|
||||
get {
|
||||
return _implicit_block.Start;
|
||||
return _source_file != null;
|
||||
}
|
||||
}
|
||||
|
||||
public SourceLine End {
|
||||
public LineNumberEntry Start {
|
||||
get {
|
||||
return _implicit_block.End;
|
||||
return _start;
|
||||
}
|
||||
}
|
||||
|
||||
public LineNumberEntry End {
|
||||
get {
|
||||
return _end;
|
||||
}
|
||||
}
|
||||
|
||||
public int NamespaceID {
|
||||
get {
|
||||
return _namespace_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoSymbolWriter : IMonoSymbolWriter
|
||||
{
|
||||
protected Assembly assembly;
|
||||
protected ModuleBuilder module_builder;
|
||||
protected ArrayList locals = null;
|
||||
protected ArrayList orphant_methods = null;
|
||||
protected ArrayList methods = null;
|
||||
protected Hashtable sources = null;
|
||||
private ArrayList mbuilder_array = null;
|
||||
private MonoSymbolFile file = null;
|
||||
|
||||
internal SourceMethod[] Methods {
|
||||
get {
|
||||
@@ -390,31 +313,31 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
|
||||
private SourceMethod current_method = null;
|
||||
private string assembly_filename = null;
|
||||
private string output_filename = null;
|
||||
|
||||
//
|
||||
// Interface IMonoSymbolWriter
|
||||
//
|
||||
|
||||
public MonoSymbolWriter (ModuleBuilder mb, string filename, ArrayList mbuilder_array)
|
||||
public MonoSymbolWriter (ModuleBuilder mb)
|
||||
{
|
||||
this.assembly_filename = filename;
|
||||
this.module_builder = mb;
|
||||
this.methods = new ArrayList ();
|
||||
this.sources = new Hashtable ();
|
||||
this.orphant_methods = new ArrayList ();
|
||||
this.locals = new ArrayList ();
|
||||
this.mbuilder_array = mbuilder_array;
|
||||
this.file = new MonoSymbolFile ();
|
||||
}
|
||||
|
||||
public void Close () {
|
||||
if (assembly == null)
|
||||
assembly = Assembly.LoadFrom (assembly_filename);
|
||||
public void Close ()
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
DoFixups (assembly);
|
||||
public byte[] CreateSymbolFile (AssemblyBuilder assembly_builder)
|
||||
{
|
||||
DoFixups (assembly_builder);
|
||||
|
||||
CreateOutput (assembly);
|
||||
return CreateOutput (assembly_builder);
|
||||
}
|
||||
|
||||
public void CloseNamespace () {
|
||||
@@ -426,7 +349,9 @@ namespace Mono.CSharp.Debugger
|
||||
Guid languageVendor,
|
||||
Guid documentType)
|
||||
{
|
||||
return new MonoSymbolDocumentWriter (url);
|
||||
SourceFile source_info = new SourceFile (file, url);
|
||||
sources.Add (url, source_info);
|
||||
return source_info;
|
||||
}
|
||||
|
||||
public void DefineField (
|
||||
@@ -487,14 +412,17 @@ namespace Mono.CSharp.Debugger
|
||||
int[] columns,
|
||||
int[] endLines,
|
||||
int[] endColumns)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void MarkSequencePoint (int offset, int line, int column)
|
||||
{
|
||||
if (current_method == null)
|
||||
return;
|
||||
|
||||
SourceLine source_line = new SourceLine (offsets [0], lines [0], columns [0]);
|
||||
|
||||
if (current_method != null)
|
||||
current_method.AddLine (source_line);
|
||||
LineNumberEntry source_line = new LineNumberEntry (line, offset);
|
||||
current_method.AddLine (source_line);
|
||||
}
|
||||
|
||||
public void Initialize (IntPtr emitter, string filename, bool fFullBuild)
|
||||
@@ -502,26 +430,9 @@ namespace Mono.CSharp.Debugger
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void Initialize (string assembly_filename, string filename, string[] args)
|
||||
{
|
||||
this.output_filename = filename;
|
||||
this.assembly_filename = assembly_filename;
|
||||
}
|
||||
|
||||
public void OpenMethod (SymbolToken symbol_token)
|
||||
{
|
||||
int token = symbol_token.GetToken ();
|
||||
|
||||
if ((token & 0xff000000) != 0x06000000)
|
||||
throw new ArgumentException ();
|
||||
|
||||
int index = (token & 0xffffff) - 1;
|
||||
|
||||
MethodBuilder mb = (MethodBuilder) mbuilder_array [index];
|
||||
|
||||
current_method = new SourceMethod (mb);
|
||||
|
||||
methods.Add (current_method);
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetMethodSourceRange (ISymbolDocumentWriter startDoc,
|
||||
@@ -529,32 +440,21 @@ namespace Mono.CSharp.Debugger
|
||||
ISymbolDocumentWriter endDoc,
|
||||
int endLine, int endColumn)
|
||||
{
|
||||
if (current_method == null)
|
||||
return;
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
if ((startDoc == null) || (endDoc == null))
|
||||
public void OpenMethod (ISymbolDocumentWriter document, int startLine, int startColumn,
|
||||
int endLine, int endColumn, MethodBase method, int namespace_id)
|
||||
{
|
||||
SourceFile source_info = document as SourceFile;
|
||||
|
||||
if ((source_info == null) || (method == null))
|
||||
throw new NullReferenceException ();
|
||||
|
||||
if (!(startDoc is MonoSymbolDocumentWriter) || !(endDoc is MonoSymbolDocumentWriter))
|
||||
throw new NotSupportedException ("both startDoc and endDoc must be of type "
|
||||
+ "MonoSymbolDocumentWriter");
|
||||
|
||||
if (!startDoc.Equals (endDoc))
|
||||
throw new NotSupportedException ("startDoc and endDoc must be the same");
|
||||
|
||||
string source_file = ((MonoSymbolDocumentWriter) startDoc).FileName;
|
||||
SourceFile source_info;
|
||||
|
||||
if (sources.ContainsKey (source_file))
|
||||
source_info = (SourceFile) sources [source_file];
|
||||
else {
|
||||
source_info = new SourceFile (source_file);
|
||||
sources.Add (source_file, source_info);
|
||||
}
|
||||
|
||||
current_method.SetSourceRange (source_info, startLine, startColumn,
|
||||
endLine, endColumn);
|
||||
current_method = new SourceMethod (source_info, startLine, startColumn,
|
||||
endLine, endColumn, method, namespace_id);
|
||||
|
||||
methods.Add (current_method);
|
||||
source_info.AddMethod (current_method);
|
||||
}
|
||||
|
||||
@@ -562,6 +462,19 @@ namespace Mono.CSharp.Debugger
|
||||
current_method = null;
|
||||
}
|
||||
|
||||
public int DefineNamespace (string name, ISymbolDocumentWriter document,
|
||||
string[] using_clauses, int parent)
|
||||
{
|
||||
if ((document == null) || (using_clauses == null))
|
||||
throw new NullReferenceException ();
|
||||
if (!(document is SourceFile))
|
||||
throw new ArgumentException ();
|
||||
|
||||
SourceFile source_info = (SourceFile) document;
|
||||
|
||||
return source_info.DefineNamespace (name, using_clauses, parent);
|
||||
}
|
||||
|
||||
public void OpenNamespace (string name)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
@@ -633,10 +546,21 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
protected void CreateOutput (Assembly assembly)
|
||||
protected byte[] CreateOutput (Assembly assembly)
|
||||
{
|
||||
using (MonoSymbolTableWriter writer = new MonoSymbolTableWriter (output_filename))
|
||||
writer.WriteSymbolTable (this);
|
||||
foreach (SourceMethod method in Methods) {
|
||||
if (!method.HasSource) {
|
||||
Console.WriteLine ("INGORING METHOD: {0}", method);
|
||||
continue;
|
||||
}
|
||||
|
||||
method.SourceFile.DefineMethod (
|
||||
method.MethodBase, method.Token, method.Locals,
|
||||
method.Lines, method.Start.Row, method.End.Row,
|
||||
method.NamespaceID);
|
||||
}
|
||||
|
||||
return file.CreateSymbolFile ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
IMonoSymbolWriter.cs
|
||||
MonoSymbolDocumentWriter.cs
|
||||
MonoSymbolWriter.cs
|
||||
MonoSymbolTable.cs
|
||||
MonoSymbolTableWriter.cs
|
||||
IMonoBinaryReader.cs
|
||||
MonoSymbolFile.cs
|
||||
@@ -0,0 +1,27 @@
|
||||
2003-01-16 Daniel Morgan <[email protected]>
|
||||
|
||||
* Mono.Data.Db2Client/DB2ClientConnection.cs: added parsing and setting
|
||||
of connection string values. Prior to this change, the server, username, and
|
||||
authentication were hard-coded.
|
||||
|
||||
* Mono.Data.Db2Client/DB2ClientUtils.cs: prevent warning about
|
||||
unreachable code
|
||||
|
||||
* Test/TestDB2Conn/TestDB2Conn.cs: modify test to accept
|
||||
database, username, and password from command line. Also, test
|
||||
a CREATE TABLE statement with ExecuteNonQuery()
|
||||
|
||||
2003-01-16 Daniel Morgan <[email protected]>
|
||||
|
||||
* Mono.Data.Db2Client.build: added file for Windows build
|
||||
|
||||
2003-01-16 Rodrigo Moya <[email protected]>
|
||||
|
||||
* makefile.gnu: added --unsafe command line option, needed for unsafe
|
||||
code. The IBM DB2 provider now compiles on Mono.
|
||||
|
||||
* list: added missing file.
|
||||
|
||||
2003-01-15 Rodrigo Moya <[email protected]>
|
||||
|
||||
Added IBM DB2 provider from cleared <[email protected]>.
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<!-- NAnt build file for Mono.Data.DB2Client.dll -->
|
||||
|
||||
<project name="Mono.Data.DB2Client" default="build">
|
||||
<property name="debug" value="false"/>
|
||||
|
||||
<target name="build">
|
||||
<csc target="library" output="../lib/Mono.Data.DB2Client.dll" debug="${debug}">
|
||||
<arg value="/nowarn:1595"/>
|
||||
<arg value="/nowarn:0067"/>
|
||||
<arg value="/nowarn:0109"/>
|
||||
<arg value="/nowarn:0169"/>
|
||||
<arg value="/nowarn:0649"/>
|
||||
<arg value="/unsafe"/>
|
||||
<arg value="/noconfig"/>
|
||||
<arg value="/r:System.dll"/>
|
||||
<arg value="/r:System.Xml.dll"/>
|
||||
<arg value="/r:System.Data.dll"/>
|
||||
<sources>
|
||||
<includes name="**/*.cs"/>
|
||||
<excludes name="Test/**"/>
|
||||
</sources>
|
||||
<references>
|
||||
<includes name="../lib/corlib.dll"/>
|
||||
<includes name="../lib/System.dll"/>
|
||||
<includes name="../lib/System.Xml.dll"/>
|
||||
<includes name="../lib/System.Data.dll"/>
|
||||
</references>
|
||||
</csc>
|
||||
<copy file="../lib/System.Data.dll" tofile="Test/System.Data.dll"/>
|
||||
<copy file="../lib/Mono.Data.DB2Client.dll" tofile="Test/Mono.Data.DB2Client.dll"/>
|
||||
<copy file="../lib/Mono.Data.DB2Client.dll" tofile="Mono.Data.DB2Client/Mono.Data.DB2Client.dll"/>
|
||||
<copy file="../lib/Mono.Data.DB2Client.dll" tofile="../System.Data/Test/Mono.Data.DB2Client.dll"/>
|
||||
</target>
|
||||
<target name="test" depends="build">
|
||||
<nant basedir="Test" target="test"/>
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete file="Test/System.Data.dll" failonerror="false"/>
|
||||
<delete file="../lib/Mono.Data.DB2Client.dll" failonerror="false"/>
|
||||
<delete file="Test/Mono.Data.DB2Client.dll" failonerror="false"/>
|
||||
</target>
|
||||
</project>
|
||||
+6
-14
@@ -1,11 +1,3 @@
|
||||
//
|
||||
// AssemblyInfo.cs: Assembly information
|
||||
//
|
||||
// Author: Jonathan Pryor ([email protected])
|
||||
//
|
||||
// (C) 2003 Jonathan Pryor
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -14,12 +6,12 @@ using System.Runtime.CompilerServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("Type Reflector")]
|
||||
[assembly: AssemblyDescription("Displays System.Reflection Information for .NET Types")]
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Jon Pryor Research Labs")]
|
||||
[assembly: AssemblyProduct("Type Reflector")]
|
||||
[assembly: AssemblyCopyright("Copyright (C) 2002-2003")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -34,7 +26,7 @@ using System.Runtime.CompilerServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("0.6.*")]
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
@@ -0,0 +1,331 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DB2ClientCommand.
|
||||
/// </summary>
|
||||
public class DB2ClientCommand : IDbCommand
|
||||
{
|
||||
#region Private data members
|
||||
private string commandText;
|
||||
private DB2ClientConnection db2Conn;
|
||||
private DB2ClientTransaction db2Trans;
|
||||
private int commandTimeout;
|
||||
private bool prepared = false;
|
||||
private IntPtr hwndStmt; //Our statement handle
|
||||
private DB2ClientParameterCollection parameters = new DB2ClientParameterCollection();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// Default constructor. Since I'm using CLI functions to do this stuff, we're stuck
|
||||
/// until we get the database environment handle.
|
||||
/// </summary>
|
||||
public DB2ClientCommand()
|
||||
{
|
||||
hwndStmt = IntPtr.Zero;
|
||||
}
|
||||
public DB2ClientCommand(string commandStr)
|
||||
{
|
||||
commandText = commandStr;
|
||||
hwndStmt = IntPtr.Zero;
|
||||
}
|
||||
public DB2ClientCommand(string commandStr, DB2ClientConnection con)
|
||||
{
|
||||
commandText = commandStr;
|
||||
db2Conn = con;
|
||||
AllocateStatement("Constructor 3");
|
||||
}
|
||||
public DB2ClientCommand (string commandStr, DB2ClientConnection con, DB2ClientTransaction trans)
|
||||
{
|
||||
commandText = commandStr;
|
||||
db2Conn = con;
|
||||
db2Trans = trans;
|
||||
AllocateStatement("Constructor 4");
|
||||
}
|
||||
///DB2 Specific constructors
|
||||
///
|
||||
public DB2ClientCommand (IntPtr hwndSt)
|
||||
{
|
||||
hwndStmt = hwndSt;
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
#region SelfDescribe property
|
||||
///
|
||||
/// Property dictates whether or not any paramter markers will get their describe info
|
||||
/// from the database, or if the user will supply the information
|
||||
///
|
||||
bool selfDescribe = false;
|
||||
public bool SelfDescribe
|
||||
{
|
||||
get
|
||||
{
|
||||
return selfDescribe;
|
||||
}
|
||||
set
|
||||
{
|
||||
selfDescribe = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region CommandText property
|
||||
///
|
||||
///The query; If it gets set, reset the prepared property
|
||||
///
|
||||
public string CommandText
|
||||
{
|
||||
get
|
||||
{
|
||||
return commandText;
|
||||
}
|
||||
set
|
||||
{
|
||||
prepared = false;
|
||||
commandText = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region CommandTimeout property
|
||||
///
|
||||
/// The Timeout property states how long we wait for results to return
|
||||
///
|
||||
public int CommandTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return commandTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
commandTimeout = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region CommandType property
|
||||
///
|
||||
/// I believe this one is left as text all of the time for DB2, but I have to check that...
|
||||
///
|
||||
public CommandType CommandType
|
||||
{
|
||||
get
|
||||
{
|
||||
return CommandType.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
///Do nothing
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Connection property
|
||||
///
|
||||
/// The connection we'll be executing on.
|
||||
///
|
||||
public IDbConnection Connection
|
||||
{
|
||||
get
|
||||
{
|
||||
return db2Conn;
|
||||
}
|
||||
set
|
||||
{
|
||||
db2Conn = (DB2ClientConnection)value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Parameters property
|
||||
///
|
||||
/// Parameter list, Not yet implemented
|
||||
///
|
||||
public DB2ClientParameterCollection Parameters
|
||||
{
|
||||
get
|
||||
{
|
||||
return parameters;
|
||||
}
|
||||
}
|
||||
IDataParameterCollection IDbCommand.Parameters
|
||||
{
|
||||
get
|
||||
{
|
||||
return parameters;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Transaction property
|
||||
///
|
||||
/// The transaction this command is associated with
|
||||
///
|
||||
public IDbTransaction Transaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return db2Trans;
|
||||
}
|
||||
set
|
||||
{
|
||||
db2Trans = (DB2ClientTransaction)value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region UpdatedRowSource property
|
||||
///
|
||||
/// Need to see how this works with DB2...
|
||||
///
|
||||
public UpdateRowSource UpdatedRowSource
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new DB2ClientException ("TBD");
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new DB2ClientException ("TBD");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Statement Handle
|
||||
///
|
||||
/// returns the DB2Client statement handle
|
||||
///
|
||||
public IntPtr statementHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
return hwndStmt;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region AllocateStatement function
|
||||
///
|
||||
/// Allocate a statement handle, internal. Pass in the name of the caller for exception info.
|
||||
/// I think I'll make the handle a property and add a constructor with the handle argument so that
|
||||
/// statements can be executed on the same handle if need be, though you could accomplish the same by
|
||||
/// just keeping the command object open.
|
||||
///
|
||||
internal void AllocateStatement(string location)
|
||||
{
|
||||
short sqlRet;
|
||||
sqlRet = DB2ClientPrototypes.SQLAllocHandle(DB2ClientConstants.SQL_HANDLE_STMT, db2Conn.DBHandle, ref hwndStmt);
|
||||
if (sqlRet == DB2ClientConstants.SQL_ERROR)
|
||||
throw new DB2ClientException(DB2ClientConstants.SQL_HANDLE_DBC, db2Conn.DBHandle, location +": Unable to allocate statement handle.");
|
||||
}
|
||||
#endregion
|
||||
#region Cancel
|
||||
/// <summary>
|
||||
/// Attempt to cancel an executing command
|
||||
/// </summary>
|
||||
public void Cancel()
|
||||
{
|
||||
DB2ClientPrototypes.SQLCancel(hwndStmt);
|
||||
}
|
||||
#endregion
|
||||
#region CreateParameter
|
||||
///
|
||||
///Returns a parameter
|
||||
///
|
||||
public IDbDataParameter CreateParameter()
|
||||
{
|
||||
throw new DB2ClientException("TBD");
|
||||
}
|
||||
#endregion
|
||||
#region ExecuteNonQuery
|
||||
///
|
||||
/// ExecuteNonQuery Executes an SQL statement without returning a DataSet
|
||||
///
|
||||
public int ExecuteNonQuery()
|
||||
{
|
||||
short sqlRet;
|
||||
if (prepared)
|
||||
sqlRet = DB2ClientPrototypes.SQLExecute(hwndStmt);
|
||||
else
|
||||
sqlRet = DB2ClientPrototypes.SQLExecDirect(hwndStmt, commandText, commandText.Length);
|
||||
|
||||
int numRows = 0;
|
||||
sqlRet = DB2ClientPrototypes.SQLRowCount(hwndStmt, ref numRows); //How many rows affected. numRows will be -1 if we aren't dealing with an Insert, Delete or Update, or if the statement did not execute successfully
|
||||
///At this point, I think we need to save any results, but not return them
|
||||
///For now, we will go execute and return the number of rows affected
|
||||
return numRows;
|
||||
}
|
||||
#endregion
|
||||
#region ExecuteReader calls
|
||||
///
|
||||
///ExecuteReader
|
||||
///
|
||||
public IDataReader ExecuteReader()
|
||||
{
|
||||
DB2ClientDataReader reader;
|
||||
|
||||
if (!prepared)
|
||||
{
|
||||
ExecuteNonQuery();
|
||||
reader = new DB2ClientDataReader(db2Conn, this);
|
||||
}
|
||||
else
|
||||
reader = new DB2ClientDataReader(db2Conn, this, true);
|
||||
|
||||
return reader;
|
||||
|
||||
}
|
||||
public IDataReader ExecuteReader(CommandBehavior behavior)
|
||||
{
|
||||
throw new DB2ClientException("TBD");
|
||||
}
|
||||
#endregion
|
||||
#region ExecuteScalar
|
||||
///
|
||||
/// ExecuteScalar
|
||||
///
|
||||
public object ExecuteScalar()
|
||||
{
|
||||
throw new DB2ClientException("TBD");
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Prepare ()
|
||||
///
|
||||
/// Prepare a statement against the database
|
||||
///
|
||||
public void Prepare ()
|
||||
{
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
short sqlRet = 0;
|
||||
|
||||
IntPtr numParams = IntPtr.Zero;
|
||||
sqlRet = DB2ClientPrototypes.SQLPrepare(hwndStmt, commandText, commandText.Length);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "SQLPrepare error.");
|
||||
short i=1;
|
||||
foreach ( DB2ClientParameter param in parameters)
|
||||
{
|
||||
if (selfDescribe)
|
||||
{
|
||||
sqlRet = param.Describe(this.hwndStmt, i);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "Error binding parameter in DB2ClientCommand: ");
|
||||
}
|
||||
sqlRet = param.Bind(this.hwndStmt, i);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "Error binding parameter in DB2ClientCommand: ");
|
||||
i++;
|
||||
}
|
||||
prepared=true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
///
|
||||
/// Authors:
|
||||
/// Christopher Bockner
|
||||
///
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
///
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary> /// This class is IDbConnection compliant. Refer to MSDN documentation for reference.
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
public class DB2ClientConnection : IDbConnection
|
||||
{
|
||||
private string connectionString = null;
|
||||
private StringBuilder outConnectStr;
|
||||
private string dbName = null;
|
||||
private int connectionTimeout;
|
||||
|
||||
private IntPtr dbHandle = IntPtr.Zero;
|
||||
private bool disposed = false;
|
||||
public DB2ClientConnection()
|
||||
{
|
||||
//
|
||||
// TODO: Add constructor logic here
|
||||
//
|
||||
}
|
||||
public DB2ClientConnection(string conString)
|
||||
{
|
||||
SetConnectionString(conString);
|
||||
}
|
||||
#region ConnectionString property
|
||||
///
|
||||
///Accessor for the connectionString property
|
||||
public string ConnectionString
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectionString;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetConnectionString(value);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region ConnectionTimeout property
|
||||
public int ConnectionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectionTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
connectionTimeout = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Database property
|
||||
public string Database
|
||||
{
|
||||
get
|
||||
{
|
||||
return dbName;
|
||||
}
|
||||
set
|
||||
{
|
||||
dbName = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region State property
|
||||
/// <summary>
|
||||
/// The Connection State property, open or closed.
|
||||
/// NOTE: IBM's docs on SqlFreeHandle do not state what is done when a handle is freed
|
||||
/// i.e. if the handle is set to SQL_NULL_HANDLE.
|
||||
/// </summary>
|
||||
|
||||
unsafe public ConnectionState State
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((long)dbHandle.ToPointer() == DB2ClientConstants.SQL_NULL_HANDLE)
|
||||
return ConnectionState.Closed;
|
||||
else
|
||||
return ConnectionState.Open;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DBHandle
|
||||
///
|
||||
/// Handle Returns an IntPtr of the dbm handle
|
||||
///
|
||||
public IntPtr DBHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
return dbHandle;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BeginTransaction Method
|
||||
/// <summary>
|
||||
/// Opens a transaction against the database at the default isolation level, which will be
|
||||
/// that which the packages were bound at, unless overriden in the connection string, and if nothing was specified at that point
|
||||
/// then I believe the default level is Cursor Stability (don't quote me on that, I haven't
|
||||
/// found the appropriate reference yet), ODBC equivalent is SQL_TXN_READ_COMMITTED
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IDbTransaction BeginTransaction()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
#region BeginTransaction (IsolationLevel) Method
|
||||
/// <summary>
|
||||
/// BeginTransaction again overloadded to let us set the transaction level for the statement
|
||||
/// </summary>
|
||||
/// <param name="isolationL"></param>
|
||||
/// <returns></returns>
|
||||
public IDbTransaction BeginTransaction(IsolationLevel isolationL)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
#region ChangeDatabase
|
||||
unsafe public void ChangeDatabase(string newDBName)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
#region Close
|
||||
///Close, per MSDN documentation
|
||||
///
|
||||
unsafe public void Close()
|
||||
{
|
||||
short sqlRet = 0;
|
||||
// DB2ClientUtils util = new DB2ClientUtils();
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLDisconnect(dbHandle);
|
||||
// util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_DBC, dbHandle, "Error in Connection->Close: ");
|
||||
dbHandle = new IntPtr(DB2ClientConstants.SQL_NULL_HANDLE);
|
||||
}
|
||||
#endregion
|
||||
#region CreateCommand
|
||||
/// <summary>
|
||||
/// CreateCommand per MSDN
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IDbCommand CreateCommand()
|
||||
{
|
||||
CheckState();
|
||||
return new DB2ClientCommand();
|
||||
}
|
||||
#endregion
|
||||
#region Open
|
||||
/// <summary>
|
||||
/// Open, per MSDN
|
||||
/// </summary>
|
||||
unsafe public void Open()
|
||||
{
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
outConnectStr = new StringBuilder(60); //Set some initial size, we know we're gettig a chunk of data back
|
||||
IntPtr penvHandle=IntPtr.Zero;
|
||||
IntPtr numOutCharsReturned = IntPtr.Zero;
|
||||
short sqlRet=0;
|
||||
|
||||
try
|
||||
{
|
||||
sqlRet = DB2ClientPrototypes.SQLAllocHandle(DB2ClientConstants.SQL_HANDLE_ENV, IntPtr.Zero, ref penvHandle);
|
||||
util.DB2CheckReturn(sqlRet, 0, IntPtr.Zero, "Unable to allocate Environment handle in DB2ClientConnection.");
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLAllocHandle(DB2ClientConstants.SQL_HANDLE_DBC, penvHandle, ref dbHandle);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_ENV, penvHandle, "Unable to allocate database handle in DB2ClientConnection.");
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLDriverConnect(dbHandle, 0, connectionString,
|
||||
connectionString.Length, outConnectStr, 100, numOutCharsReturned,
|
||||
DB2ClientConstants.SQL_DRIVER_COMPLETE);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_ENV, penvHandle, "Unable to connect to the database.");
|
||||
|
||||
}
|
||||
catch (DB2ClientException DB2E)
|
||||
{
|
||||
Console.WriteLine(DB2E.Message);
|
||||
Dispose();
|
||||
throw DB2E;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Dispose
|
||||
/// <summary>
|
||||
/// Dispose
|
||||
/// </summary>
|
||||
unsafe public void Dispose()
|
||||
{
|
||||
if(!disposed)
|
||||
{
|
||||
this.Close();
|
||||
disposed = true;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void CheckState()
|
||||
{
|
||||
if (ConnectionState.Closed == State)
|
||||
throw new DB2ClientException ("Connection is currently closed.");
|
||||
}
|
||||
|
||||
void SetConnectionString (string connectionString)
|
||||
{
|
||||
this.connectionString = connectionString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DB2Constants.
|
||||
/// </summary>
|
||||
public class DB2ClientConstants
|
||||
{
|
||||
public DB2ClientConstants()
|
||||
{
|
||||
//
|
||||
// TODO: Add constructor logic here
|
||||
//
|
||||
|
||||
}
|
||||
public const short SQL_HANDLE_ENV = 1;
|
||||
public const short SQL_HANDLE_DBC = 2;
|
||||
public const short SQL_HANDLE_STMT = 3;
|
||||
public const short SQL_HANDLE_DESC = 4;
|
||||
|
||||
/* RETCODE values */
|
||||
public const long SQL_SUCCESS = 0;
|
||||
public const long SQL_SUCCESS_WITH_INFO = 1;
|
||||
public const long SQL_NEED_DATA = 99;
|
||||
public const long SQL_NO_DATA = 100;
|
||||
public const long SQL_STILL_EXECUTING = 2;
|
||||
public const long SQL_ERROR = -1;
|
||||
public const long SQL_INVALID_HANDLE = -2;
|
||||
public const int SQL_NTS = -3;
|
||||
public const long SQL_NULL_HANDLE = 0L;
|
||||
public const short SQL_COMMIT = 0;
|
||||
public const short SQL_ROLLBACK = 1;
|
||||
public const short SQL_NO_DATA_FOUND = 100;
|
||||
|
||||
/* Isolation levels */
|
||||
public const long SQL_TXN_READ_UNCOMMITTED = 0x00000001L;
|
||||
public const long SQL_TXN_READ_COMMITTED = 0x00000002L;
|
||||
public const long SQL_TXN_REPEATABLE_READ = 0x00000004L;
|
||||
public const long SQL_TXN_SERIALIZABLE_READ = 0x00000008L;
|
||||
public const long SQL_TXN_NOCOMMIT = 0x00000020L;
|
||||
|
||||
/* Connect options */
|
||||
public const long SQL_TXN_ISOLATION = 108;
|
||||
public const long SQL_AUTOCOMMIT = 102;
|
||||
|
||||
public const long SQL_AUTOCOMMIT_OFF = 0L;
|
||||
public const long SQL_AUTOCOMMIT_ON = 1L;
|
||||
|
||||
/* Data Types */
|
||||
public const int SQL_UNKNOWN_TYPE = 0;
|
||||
public const int SQL_CHAR = 1;
|
||||
public const int SQL_NUMERIC = 2;
|
||||
public const int SQL_DECIMAL = 3;
|
||||
public const int SQL_INTEGER = 4;
|
||||
public const int SQL_SMALLINT = 5;
|
||||
public const int SQL_FLOAT = 6;
|
||||
public const int SQL_REAL = 7;
|
||||
public const int SQL_DOUBLE = 8;
|
||||
public const int SQL_DATETIME = 9;
|
||||
public const int SQL_VARCHAR = 12;
|
||||
public const int SQL_WCHAR = (-8);
|
||||
public const int SQL_WVARCHAR = (-9);
|
||||
public const int SQL_WLONGVARCHAR = (-10);
|
||||
public const int SQL_TYPE_DATE = 91;
|
||||
public const int SQL_TYPE_TIME = 92;
|
||||
public const int SQL_TYPE_TIMESTAMP = 93;
|
||||
|
||||
public const int SQL_C_CHAR = SQL_CHAR;
|
||||
public const int SQL_C_DEFAULT = 99;
|
||||
|
||||
public const int SQL_USER_DEFINED_TYPE = (-450);
|
||||
|
||||
/* SQLDriverConnect Options */
|
||||
public const int SQL_DRIVER_NOPROMPT = 0;
|
||||
public const int SQL_DRIVER_COMPLETE = 1;
|
||||
public const int SQL_DRIVER_PROMPT = 2;
|
||||
public const int SQL_DRIVER_COMPLETE_REQUIRED = 3;
|
||||
|
||||
/* Null settings */
|
||||
public const int SQL_NO_NULLS = 0;
|
||||
public const int SQL_NULLABLE = 1;
|
||||
public const int SQL_NULLABLE_UNKNOWN = 2;
|
||||
|
||||
/* Defines for SQLBindParameter and SQLProcedureColumns */
|
||||
public const int SQL_PARAM_TYPE_UNKNOWN = 0;
|
||||
public const int SQL_PARAM_INPUT = 1;
|
||||
public const int SQL_PARAM_INPUT_OUTPUT = 2;
|
||||
public const int SQL_RESULT_COL = 3;
|
||||
public const int SQL_PARAM_OUTPUT = 4;
|
||||
public const int SQL_RETURN_VALUE = 5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,513 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DB2ClientDataReader.
|
||||
/// DB2ClientDataReader.
|
||||
/// </summary>
|
||||
unsafe public class DB2ClientDataReader : IDataReader
|
||||
{
|
||||
internal DataTable rs; //Our result set is a datatable
|
||||
internal DB2ClientConnection db2Conn; //The connection we're working with
|
||||
internal IntPtr hwndStmt; //The statement handle returning the results
|
||||
private int row=-1; //Row pointer
|
||||
private int numCols=0;
|
||||
|
||||
#region Constructors and destructors
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="con"></Connection object to DB2>
|
||||
/// <param name="com"></Command object>
|
||||
internal DB2ClientDataReader(DB2ClientConnection con, DB2ClientCommand com)
|
||||
{
|
||||
db2Conn = con;
|
||||
hwndStmt = com.statementHandle; //We have access to the results through the statement handle
|
||||
|
||||
short sqlRet;
|
||||
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
rs = new DataTable();
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLNumResultCols(hwndStmt, ref numCols);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLNumResultCols");
|
||||
|
||||
IntPtr[] dbVals = new IntPtr[numCols];
|
||||
IntPtr[] sqlLen_or_IndPtr = new IntPtr[numCols];
|
||||
|
||||
PrepareResults(dbVals, sqlLen_or_IndPtr);
|
||||
FetchResults(dbVals, sqlLen_or_IndPtr, rs);
|
||||
isClosed = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Constructor for use with prepared statements
|
||||
/// </summary>
|
||||
///
|
||||
internal DB2ClientDataReader(DB2ClientConnection con, DB2ClientCommand com, bool prepared)
|
||||
{
|
||||
db2Conn = con;
|
||||
hwndStmt = com.statementHandle; //We have access to the results through the statement handle
|
||||
|
||||
short sqlRet;
|
||||
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
rs = new DataTable();
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLNumResultCols(hwndStmt, ref numCols);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLNumResultCols");
|
||||
|
||||
IntPtr[] dbVals = new IntPtr[numCols];
|
||||
IntPtr[] sqlLen_or_IndPtr = new IntPtr[numCols];
|
||||
|
||||
PrepareResults(dbVals, sqlLen_or_IndPtr);
|
||||
FetchResults(dbVals, sqlLen_or_IndPtr, rs);
|
||||
isClosed = false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
#endregion
|
||||
#region Properties
|
||||
#region Depth property
|
||||
///
|
||||
///Depth of nesting for the current row, need to figure out what this translates into
|
||||
///with DB2.
|
||||
///
|
||||
private int depth = 0;
|
||||
public int Depth
|
||||
{
|
||||
get
|
||||
{
|
||||
return depth;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region IsClosed property
|
||||
/// <summary>
|
||||
/// True if the reader is closed.
|
||||
/// </summary>
|
||||
private bool isClosed = true;
|
||||
public bool IsClosed
|
||||
{
|
||||
get
|
||||
{
|
||||
return isClosed;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RecordsAffected property
|
||||
///
|
||||
/// Number of records affected by this operation. Will be zero until we close the
|
||||
/// reader
|
||||
///
|
||||
private int recordsAffected = 0;
|
||||
public int RecordsAffected
|
||||
{
|
||||
get
|
||||
{
|
||||
return recordsAffected;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
#region Methods
|
||||
#region Close method
|
||||
///
|
||||
///
|
||||
public void Close()
|
||||
{
|
||||
if (rs != null)
|
||||
{
|
||||
recordsAffected = rs.Rows.Count;
|
||||
rs.Dispose();
|
||||
rs = null;
|
||||
isClosed=true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region GetSchemaTable
|
||||
///
|
||||
/// We'll return an empty table for now...ughh this one will be tedious to write
|
||||
///
|
||||
public DataTable GetSchemaTable()
|
||||
{
|
||||
throw new DB2ClientException ("TBD");
|
||||
}
|
||||
#endregion
|
||||
#region NextResult
|
||||
///
|
||||
/// Ummm is this related to SQLBulkOperations stuff..?
|
||||
///
|
||||
public bool NextResult()
|
||||
{
|
||||
throw new DB2ClientException("To be done");
|
||||
|
||||
//Deferring the meat of this until the batch stuff is implemented
|
||||
}
|
||||
#endregion
|
||||
#region Read
|
||||
///
|
||||
/// Apparently, this function does nothing other than tell you if you can move to the
|
||||
/// next row in the resultset. I have to move the fetching stuff elswhere...
|
||||
///
|
||||
public bool Read()
|
||||
{
|
||||
if (isClosed) return false;
|
||||
row++;
|
||||
//do something with the fetched data now...
|
||||
if(row < rs.Rows.Count)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Describe/Bind/Fetch functions
|
||||
///
|
||||
///Broke these out so that we can use different paths for Immediate executions and Prepared executions
|
||||
/// <summary>
|
||||
/// Does the describe and bind steps for the query result set. Called for both immediate and prepared queries.
|
||||
/// </summary>
|
||||
private void PrepareResults(IntPtr[] dbVals, IntPtr[] sqlLen_or_IndPtr)
|
||||
{
|
||||
short sqlRet;
|
||||
StringBuilder colName = new StringBuilder(18);
|
||||
short colNameMaxLength=18;
|
||||
IntPtr colNameLength=IntPtr.Zero;
|
||||
IntPtr sqlDataType=IntPtr.Zero;
|
||||
IntPtr colSize=IntPtr.Zero;
|
||||
IntPtr scale=IntPtr.Zero;
|
||||
IntPtr nullable=IntPtr.Zero;
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
for (ushort i=1; i<=numCols; i++)
|
||||
{
|
||||
sqlRet = DB2ClientPrototypes.SQLDescribeCol(hwndStmt, i, colName, colNameMaxLength, colNameLength, ref sqlDataType, ref colSize, ref scale, ref nullable);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLDescribeCol");
|
||||
///At this point I have the data type information as well, but for now I will insert the data as
|
||||
///Ansi strings and see how it goes. Maybe we can speed things up later...
|
||||
///
|
||||
rs.Columns.Add(colName.ToString());
|
||||
|
||||
sqlLen_or_IndPtr[i-1] = new IntPtr();
|
||||
dbVals[i-1] = Marshal.AllocHGlobal((int)colSize+1);
|
||||
|
||||
try
|
||||
{
|
||||
switch ((int)sqlDataType)
|
||||
{
|
||||
case DB2ClientConstants.SQL_DECIMAL: //These types are treated as SQL_C_CHAR for binding purposes
|
||||
case DB2ClientConstants.SQL_TYPE_DATE:
|
||||
case DB2ClientConstants.SQL_TYPE_TIME:
|
||||
case DB2ClientConstants.SQL_TYPE_TIMESTAMP:
|
||||
case DB2ClientConstants.SQL_VARCHAR:
|
||||
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, DB2ClientConstants.SQL_C_CHAR, dbVals[i-1],(short)colSize+1, ref sqlLen_or_IndPtr[i-1]);
|
||||
break;
|
||||
default:
|
||||
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, (short)sqlDataType, dbVals[i-1],(short)colSize+1, ref sqlLen_or_IndPtr[i-1]);
|
||||
break;
|
||||
}
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLBindCol");
|
||||
}
|
||||
catch(DB2ClientException e)
|
||||
{
|
||||
System.Console.Write(e.Message);
|
||||
}
|
||||
isClosed = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// FetchResults does what it says.
|
||||
/// </summary>
|
||||
/// <param name="dbVals"></param>
|
||||
/// <param name="sqlLen_or_IndPtr"></param>
|
||||
/// <param name="rs"></param>
|
||||
private void FetchResults(IntPtr[] dbVals, IntPtr[] sqlLen_or_IndPtr, DataTable rs)
|
||||
{
|
||||
short sqlRet = 0;
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLFetch(hwndStmt);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLFetch 1");
|
||||
|
||||
while(sqlRet != DB2ClientConstants.SQL_NO_DATA_FOUND)
|
||||
{
|
||||
DataRow newRow = rs.NewRow();
|
||||
for (short y=1;y<=numCols;y++)
|
||||
newRow[y-1] = Marshal.PtrToStringAnsi(dbVals[y-1]);
|
||||
|
||||
rs.Rows.Add(newRow);
|
||||
sqlRet = DB2ClientPrototypes.SQLFetch(hwndStmt);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLFetch 2");
|
||||
}
|
||||
for (int n=0;n<numCols;n++)
|
||||
Marshal.FreeHGlobal(dbVals[n]);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IDataRecord Interface
|
||||
///Code for the IDataRecord interface
|
||||
///
|
||||
#region FieldCount
|
||||
///
|
||||
///
|
||||
private int fieldCount = -1;
|
||||
public int FieldCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsClosed)
|
||||
fieldCount = 0;
|
||||
else
|
||||
fieldCount = rs.Columns.Count;
|
||||
return fieldCount;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Item accessors
|
||||
public object this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
return rs.Rows[row][name];
|
||||
}
|
||||
}
|
||||
public object this[int col]
|
||||
{
|
||||
get
|
||||
{
|
||||
return rs.Rows[row][col];
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region GetBoolean method
|
||||
///
|
||||
///Use the Convert class for all of these returns
|
||||
///
|
||||
public bool GetBoolean(int col)
|
||||
{
|
||||
return Convert.ToBoolean(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetByte
|
||||
///
|
||||
///GetByte
|
||||
///
|
||||
public byte GetByte(int col)
|
||||
{
|
||||
return Convert.ToByte(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetBytes
|
||||
///
|
||||
/// GetBytes, return a stream of bytes
|
||||
///
|
||||
public long GetBytes(int col, long fieldOffset, byte[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
//Hmm... How shall we deal with this one?
|
||||
return 0;
|
||||
}
|
||||
#endregion
|
||||
#region GetChar
|
||||
///
|
||||
///GetChar, return column as a char
|
||||
///
|
||||
public char GetChar(int col)
|
||||
{
|
||||
return Convert.ToChar(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetChars
|
||||
///
|
||||
///GetChars, returns char array
|
||||
///
|
||||
public long GetChars(int col, long fieldOffset, char[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
//Again, not sure how I'll deal with this just yet
|
||||
return 0;
|
||||
}
|
||||
#endregion
|
||||
#region GetData
|
||||
///
|
||||
/// GetData method
|
||||
///
|
||||
public IDataReader GetData(int col)
|
||||
{
|
||||
//Have to research this one, not quite sure what the docs mean
|
||||
//DB2 does have some structured data types, is that what this is for?
|
||||
throw new DB2ClientException("Not yet supported.");
|
||||
}
|
||||
#endregion
|
||||
#region GetDataTypeName
|
||||
///
|
||||
///GetDataTypeName return the type of data
|
||||
///
|
||||
public string GetDataTypeName(int col)
|
||||
{
|
||||
//I could check the meta data as a starting point for this one, but until I implement
|
||||
//returning the result sets, I'm not exactly sure what info I'll have, so this function
|
||||
//waits until then...
|
||||
throw new DB2ClientException("Not yet implemented");
|
||||
}
|
||||
#endregion
|
||||
#region GetDateTime
|
||||
///
|
||||
/// GetDateTime method
|
||||
///
|
||||
public DateTime GetDateTime(int col)
|
||||
{
|
||||
return Convert.ToDateTime(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetDecimal
|
||||
///
|
||||
///GetDecimal method
|
||||
///
|
||||
public decimal GetDecimal(int col)
|
||||
{
|
||||
return Convert.ToDecimal(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetDouble
|
||||
///
|
||||
/// GetDouble
|
||||
///
|
||||
public double GetDouble(int col)
|
||||
{
|
||||
return Convert.ToDouble(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetFieldType
|
||||
///
|
||||
/// Type GetFieldType
|
||||
///
|
||||
public Type GetFieldType(int col)
|
||||
{
|
||||
//Again need more research here
|
||||
return typeof(int);
|
||||
}
|
||||
#endregion
|
||||
#region GetFloat
|
||||
///
|
||||
/// GetFloat
|
||||
///
|
||||
public float GetFloat(int col)
|
||||
{
|
||||
return (float) Convert.ToDouble(this[col].ToString(),new CultureInfo("en-US").NumberFormat);
|
||||
}
|
||||
#endregion
|
||||
#region GetGuid
|
||||
///
|
||||
/// GetGuid
|
||||
///
|
||||
public Guid GetGuid(int col)
|
||||
{
|
||||
// a Guid is a 128 bit unique value. Could be like a GENERATE UNIQUE in DB2
|
||||
// as usual, need more research
|
||||
throw new DB2ClientException("TBD");
|
||||
}
|
||||
#endregion
|
||||
#region The GetInt?? series
|
||||
///
|
||||
///GetInt16
|
||||
///
|
||||
public short GetInt16(int col)
|
||||
{
|
||||
return Convert.ToInt16(this[col]);
|
||||
}
|
||||
///
|
||||
///GetInt32
|
||||
///
|
||||
public int GetInt32(int col)
|
||||
{
|
||||
return Convert.ToInt32(this[col]);
|
||||
}
|
||||
///
|
||||
///GetInt64
|
||||
///
|
||||
public long GetInt64(int col)
|
||||
{
|
||||
return Convert.ToInt64(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetName
|
||||
///
|
||||
///GetName, returns the name of the field
|
||||
///
|
||||
public string GetName(int col)
|
||||
{
|
||||
return (rs.Columns[col].ColumnName);
|
||||
}
|
||||
#endregion
|
||||
#region GetOrdinal
|
||||
///
|
||||
/// GetOrdinal, return the index of the named column
|
||||
///
|
||||
public int GetOrdinal(string name)
|
||||
{
|
||||
return rs.Columns[name].Ordinal;
|
||||
}
|
||||
#endregion
|
||||
#region GetString
|
||||
///
|
||||
/// GetString returns a string
|
||||
///
|
||||
public string GetString(int col)
|
||||
{
|
||||
return Convert.ToString(this[col]);
|
||||
}
|
||||
#endregion
|
||||
#region GetValue
|
||||
///
|
||||
/// GetVCalue, returns an object
|
||||
///
|
||||
public object GetValue(int col)
|
||||
{
|
||||
return this[col];
|
||||
}
|
||||
#endregion
|
||||
#region GetValues
|
||||
///
|
||||
/// GetValues returns all columns in the row through the argument, and the number of columns in the return value
|
||||
///
|
||||
public int GetValues(object[] values)
|
||||
{
|
||||
int numCols = FieldCount;
|
||||
if (values.Length<numCols)
|
||||
throw new DB2ClientException("GetValues argument too small for number of columns in row.");
|
||||
for (int i = 0; i<=numCols; i++)
|
||||
values[i] = this[i];
|
||||
return numCols;
|
||||
}
|
||||
#endregion
|
||||
#region IsDBNull
|
||||
///
|
||||
/// IsDBNull Is the column null
|
||||
///
|
||||
public bool IsDBNull(int col)
|
||||
{
|
||||
//Proper implementation once I get the SQLDescribe/SQLBind/SQLFetch stuff in place
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion ///For IDataRecord
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
@@ -0,0 +1,57 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception class. We will throw our own exception in the case of SQL_ERROR returns
|
||||
/// and call SQLGetDiagRec to get the error info.
|
||||
/// </summary>
|
||||
public class DB2ClientException : Exception
|
||||
{
|
||||
internal string message;
|
||||
public DB2ClientException(string Message)
|
||||
{
|
||||
this.message = Message;
|
||||
}
|
||||
unsafe public DB2ClientException(short sqlHandleType, IntPtr sqlHandle, string Message)
|
||||
{
|
||||
StringBuilder sqlState = new StringBuilder(50);
|
||||
StringBuilder errorMessage = new StringBuilder(1025);
|
||||
|
||||
int sqlReturn;
|
||||
short recNum=1;
|
||||
short bufLength = 1025;
|
||||
|
||||
IntPtr textLengthPtr = IntPtr.Zero;
|
||||
IntPtr nativeErrorPtr = IntPtr.Zero;
|
||||
|
||||
sqlReturn = DB2ClientPrototypes.SQLGetDiagRec(sqlHandleType, sqlHandle, recNum, sqlState, ref nativeErrorPtr, errorMessage, bufLength, ref textLengthPtr);
|
||||
this.message = Message + "\n" + sqlState.ToString() + " " + errorMessage.ToString()+"\n";
|
||||
//See if there are more errors to retrieve and get them.
|
||||
while (sqlReturn != DB2ClientConstants.SQL_NO_DATA && sqlReturn > 0)
|
||||
{
|
||||
recNum++;
|
||||
sqlReturn = DB2ClientPrototypes.SQLGetDiagRec(sqlHandleType, sqlHandle, recNum, sqlState, ref nativeErrorPtr, errorMessage, bufLength, ref textLengthPtr);
|
||||
this.message += "\n" + sqlState.ToString() + " " + errorMessage.ToString()+"\n";
|
||||
}
|
||||
|
||||
}
|
||||
public override string Message
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,365 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameter object for DB2 client
|
||||
/// </summary>
|
||||
public sealed class DB2ClientParameter : MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable
|
||||
{
|
||||
private DbType dbType;
|
||||
private IntPtr db2DataType;
|
||||
private ParameterDirection direction;
|
||||
private bool nullable;
|
||||
private string parameterName;
|
||||
private string sourceColumn;
|
||||
private IntPtr paramSize;
|
||||
private IntPtr decimalDigits;
|
||||
private DataRowVersion sourceVersion;
|
||||
object dataVal;
|
||||
byte[] bDataVal;
|
||||
private int iDataVal;
|
||||
private byte scale, precision;
|
||||
private int size;
|
||||
bool selfDescribe = false;
|
||||
|
||||
#region Contructors and destructors
|
||||
public DB2ClientParameter()
|
||||
{
|
||||
}
|
||||
public DB2ClientParameter (string name)
|
||||
{
|
||||
parameterName = name;
|
||||
}
|
||||
|
||||
public DB2ClientParameter(string name, DbType type)
|
||||
{
|
||||
parameterName = name;
|
||||
dbType = type;
|
||||
}
|
||||
public DB2ClientParameter(string name, object data)
|
||||
{
|
||||
parameterName = name;
|
||||
this.Value = data;
|
||||
}
|
||||
public DB2ClientParameter(string name, DbType type, string columnName)
|
||||
{
|
||||
parameterName = name;
|
||||
dbType = type;
|
||||
sourceColumn = columnName;
|
||||
}
|
||||
public DB2ClientParameter(string name, int db2Type)
|
||||
{
|
||||
parameterName = name;
|
||||
dbType = inferTypeFromDB2Type(db2Type);
|
||||
db2DataType = new IntPtr(db2Type);
|
||||
}
|
||||
#endregion
|
||||
#region Properties
|
||||
#region DbType Property
|
||||
///
|
||||
/// Parameter data type
|
||||
///
|
||||
public DbType DbType
|
||||
{
|
||||
get
|
||||
{
|
||||
return dbType;
|
||||
}
|
||||
set
|
||||
{
|
||||
dbType = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Direction
|
||||
///
|
||||
/// In or out parameter, or both
|
||||
///
|
||||
public ParameterDirection Direction
|
||||
{
|
||||
get
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
set
|
||||
{
|
||||
direction = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region IsNullable
|
||||
///
|
||||
/// Does this parameter support a null value
|
||||
///
|
||||
public bool IsNullable
|
||||
{
|
||||
get
|
||||
{
|
||||
return nullable;
|
||||
}
|
||||
set
|
||||
{
|
||||
nullable = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region ParameterName
|
||||
public string ParameterName
|
||||
{
|
||||
get
|
||||
{
|
||||
return parameterName;
|
||||
}
|
||||
set
|
||||
{
|
||||
parameterName = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region SourceColumn
|
||||
///
|
||||
/// Gets or sets the name of the source column that is mapped to the DataSet
|
||||
///
|
||||
public string SourceColumn
|
||||
{
|
||||
get
|
||||
{
|
||||
return sourceColumn;
|
||||
}
|
||||
set
|
||||
{
|
||||
sourceColumn = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region SourceVersion
|
||||
///
|
||||
/// DataRowVersion property
|
||||
///
|
||||
public DataRowVersion SourceVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return sourceVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
sourceVersion = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region IDbDataParameter properties
|
||||
public byte Precision
|
||||
{
|
||||
get
|
||||
{
|
||||
return precision;
|
||||
}
|
||||
set
|
||||
{
|
||||
precision = value;
|
||||
}
|
||||
}
|
||||
|
||||
public byte Scale
|
||||
{
|
||||
get
|
||||
{
|
||||
return scale;
|
||||
}
|
||||
set
|
||||
{
|
||||
scale = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Size
|
||||
{
|
||||
get
|
||||
{
|
||||
return size;
|
||||
}
|
||||
set
|
||||
{
|
||||
size = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Value
|
||||
///
|
||||
/// The actual parameter data
|
||||
///
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.dataVal = value;
|
||||
DbType = inferType(dataVal);
|
||||
// Load buffer with new value
|
||||
if (dbType==DbType.Int32)
|
||||
iDataVal=(int) value;
|
||||
else
|
||||
{
|
||||
// Treat everything else as a string
|
||||
// Init string buffer
|
||||
if (bDataVal==null || bDataVal.Length< (((int)paramSize>20)?(int)paramSize:20) )
|
||||
bDataVal=new byte[((int)paramSize>20)?(int)paramSize:20];
|
||||
else
|
||||
bDataVal.Initialize();
|
||||
// Convert value into string and store into buffer
|
||||
byte[] strValueBuffer=System.Text.Encoding.ASCII.GetBytes(dataVal.ToString());
|
||||
strValueBuffer.CopyTo(bDataVal,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
#region inferType Method
|
||||
/// <summary>
|
||||
/// Determine the data type based on the value
|
||||
/// </summary>
|
||||
private DbType inferType (object Data)
|
||||
{
|
||||
switch (Type.GetTypeCode(Data.GetType()))
|
||||
{
|
||||
case TypeCode.Empty:
|
||||
throw new SystemException("Invalid data type");
|
||||
|
||||
case TypeCode.Object:
|
||||
return DbType.Object;
|
||||
|
||||
case TypeCode.DBNull:
|
||||
case TypeCode.Char:
|
||||
case TypeCode.SByte:
|
||||
case TypeCode.UInt16:
|
||||
case TypeCode.UInt32:
|
||||
case TypeCode.UInt64:
|
||||
// Throw a SystemException for unsupported data types.
|
||||
throw new SystemException("Invalid data type");
|
||||
|
||||
case TypeCode.Boolean:
|
||||
return DbType.Boolean;
|
||||
|
||||
case TypeCode.Byte:
|
||||
return DbType.Byte;
|
||||
|
||||
case TypeCode.Int16:
|
||||
return DbType.Int16;
|
||||
|
||||
case TypeCode.Int32:
|
||||
return DbType.Int32;
|
||||
|
||||
case TypeCode.Int64:
|
||||
return DbType.Int64;
|
||||
|
||||
case TypeCode.Single:
|
||||
return DbType.Single;
|
||||
|
||||
case TypeCode.Double:
|
||||
return DbType.Double;
|
||||
|
||||
case TypeCode.Decimal:
|
||||
return DbType.Decimal;
|
||||
|
||||
case TypeCode.DateTime:
|
||||
return DbType.DateTime;
|
||||
|
||||
case TypeCode.String:
|
||||
return DbType.String;
|
||||
|
||||
default:
|
||||
throw new SystemException("Value is of unknown data type");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region inferTypeFromDB2Type
|
||||
///
|
||||
/// Determine the DbType from the SQL type returned by SQLDescribeParam
|
||||
///
|
||||
private DbType inferTypeFromDB2Type(int db2Type)
|
||||
{
|
||||
switch (db2Type)
|
||||
{
|
||||
case DB2ClientConstants.SQL_CHAR:
|
||||
return DbType.AnsiString;
|
||||
case DB2ClientConstants.SQL_NUMERIC:
|
||||
case DB2ClientConstants.SQL_DECIMAL:
|
||||
return DbType.Decimal;
|
||||
case DB2ClientConstants.SQL_DATETIME:
|
||||
return DbType.DateTime;
|
||||
case DB2ClientConstants.SQL_FLOAT:
|
||||
case DB2ClientConstants.SQL_DOUBLE:
|
||||
return DbType.Double;
|
||||
case DB2ClientConstants.SQL_INTEGER:
|
||||
return DbType.Int32;
|
||||
case DB2ClientConstants.SQL_SMALLINT:
|
||||
return DbType.Int16;
|
||||
case DB2ClientConstants.SQL_VARCHAR:
|
||||
return DbType.String;
|
||||
case DB2ClientConstants.SQL_USER_DEFINED_TYPE:
|
||||
return DbType.Object;
|
||||
default:
|
||||
throw new SystemException("DB2 Data type is unknown.");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Describe
|
||||
///
|
||||
/// Describe the parameter. Use at the caller's discretion
|
||||
///
|
||||
public short Describe(IntPtr hwndStmt, short paramNum)
|
||||
{
|
||||
IntPtr nullable = IntPtr.Zero;
|
||||
paramSize = IntPtr.Zero;
|
||||
decimalDigits = IntPtr.Zero;
|
||||
short sqlRet = 0;
|
||||
|
||||
sqlRet = DB2ClientPrototypes.SQLDescribeParam(hwndStmt, paramNum, ref db2DataType, ref paramSize, ref decimalDigits, ref nullable);
|
||||
return sqlRet;
|
||||
}
|
||||
#endregion
|
||||
#region Bind
|
||||
///
|
||||
/// Bind this parameter
|
||||
///
|
||||
public short Bind(IntPtr hwndStmt, short paramNum)
|
||||
{
|
||||
short sqlRet = 0;
|
||||
|
||||
switch ((int)db2DataType)
|
||||
{
|
||||
case DB2ClientConstants.SQL_DECIMAL: //These types are treated as SQL_C_CHAR for binding purposes
|
||||
case DB2ClientConstants.SQL_TYPE_DATE:
|
||||
case DB2ClientConstants.SQL_TYPE_TIME:
|
||||
case DB2ClientConstants.SQL_TYPE_TIMESTAMP:
|
||||
case DB2ClientConstants.SQL_VARCHAR:
|
||||
case DB2ClientConstants.SQL_CHAR:
|
||||
sqlRet = DB2ClientPrototypes.SQLBindParameter(hwndStmt, (ushort)paramNum, DB2ClientConstants.SQL_PARAM_INPUT, DB2ClientConstants.SQL_C_DEFAULT, (short)db2DataType, Convert.ToUInt32((int)paramSize) , (short) decimalDigits, bDataVal, 0, 0);
|
||||
break;
|
||||
default:
|
||||
sqlRet = DB2ClientPrototypes.SQLBindParameter(hwndStmt, (ushort)paramNum, DB2ClientConstants.SQL_PARAM_INPUT, DB2ClientConstants.SQL_C_DEFAULT, (short)db2DataType, Convert.ToUInt32((int)paramSize) , 0, ref iDataVal, 0, 0);
|
||||
break;
|
||||
}
|
||||
return sqlRet;
|
||||
}
|
||||
#endregion
|
||||
object ICloneable.Clone ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DB2ClientParameterCollection.
|
||||
/// </summary>
|
||||
public class DB2ClientParameterCollection : ArrayList, IDataParameterCollection
|
||||
{
|
||||
public object this[string index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[IndexOf(index)];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[IndexOf(index)] = value;
|
||||
}
|
||||
}
|
||||
public bool Contains(string paramName)
|
||||
{
|
||||
return(-1 != IndexOf(paramName));
|
||||
}
|
||||
|
||||
public int IndexOf(string paramName)
|
||||
{
|
||||
int index = 0;
|
||||
foreach(DB2ClientParameter item in this)
|
||||
{
|
||||
if (0 == _cultureAwareCompare(item.ParameterName, paramName))
|
||||
{
|
||||
return index;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void RemoveAt(string paramName)
|
||||
{
|
||||
RemoveAt(IndexOf(paramName));
|
||||
}
|
||||
|
||||
public override int Add(object value)
|
||||
{
|
||||
return Add((DB2ClientParameter)value);
|
||||
}
|
||||
|
||||
public int Add(DB2ClientParameter value)
|
||||
{
|
||||
if (((DB2ClientParameter)value).ParameterName != null)
|
||||
{
|
||||
return base.Add(value);
|
||||
}
|
||||
else
|
||||
throw new ArgumentException("parameter must be named");
|
||||
}
|
||||
|
||||
public int Add(string paramName, DbType type)
|
||||
{
|
||||
return Add(new DB2ClientParameter(paramName, type));
|
||||
}
|
||||
|
||||
public int Add(string paramName, object value)
|
||||
{
|
||||
return Add(new DB2ClientParameter(paramName, value));
|
||||
}
|
||||
|
||||
public int Add(string paramName, DbType dbType, string sourceColumn)
|
||||
{
|
||||
return Add(new DB2ClientParameter(paramName, dbType, sourceColumn));
|
||||
}
|
||||
|
||||
private int _cultureAwareCompare(string strA, string strB)
|
||||
{
|
||||
return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// DB2CLIPrototypes class is a wrapper for the db2cli.lib, IBM's Call Level Interface to DB2
|
||||
/// </summary>
|
||||
internal class DB2ClientPrototypes
|
||||
{
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLAllocHandle")]
|
||||
unsafe public static extern short SQLAllocHandle(short handleType, IntPtr inputHandle, ref IntPtr outputHandle);
|
||||
[DllImport("db2cli.Dll", EntryPoint = "SQLConnect")]
|
||||
unsafe public static extern short SQLConnect(IntPtr sqlHdbc, string serverName, short serverNameLength, string userName, short userNameLength, string authentication, short authenticationLength);
|
||||
[DllImport("db2cli.Dll", CharSet = CharSet.Auto, EntryPoint = "SQLDisconnect")]
|
||||
unsafe public static extern short SQLDisconnect(IntPtr sqlHdbc);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLGetDiagRec")]
|
||||
unsafe public static extern short SQLGetDiagRec( short handleType, IntPtr handle, short recNum, [Out] StringBuilder sqlState, ref IntPtr nativeErrorPtr, [Out] StringBuilder errorMessage, short bufferLength, ref IntPtr shortTextLengthPtr);
|
||||
[DllImport("db2cli.Dll", EntryPoint = "SQLSetConnectAttr")]
|
||||
unsafe public static extern short SQLSetConnectAttr(IntPtr sqlHdbc, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
|
||||
[DllImport("db2cli.Dll", EntryPoint = "SQLEndTran")]
|
||||
unsafe public static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
|
||||
[DllImport("db2cli.Dll", EntryPoint = "SQLCancel")]
|
||||
unsafe public static extern short SQLCancel(IntPtr handle);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLNumResultCols")]
|
||||
unsafe public static extern short SQLNumResultCols(IntPtr handle, ref int numCols);
|
||||
[DllImport("db2cli.Dll", EntryPoint = "SQLFetch")]
|
||||
unsafe public static extern short SQLFetch(IntPtr handle);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLRowCount")]
|
||||
unsafe public static extern short SQLRowCount(IntPtr stmtHandle, ref int numRows);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLExecute")]
|
||||
unsafe public static extern short SQLExecute(IntPtr handle);
|
||||
[DllImport ("db2cli.dll", EntryPoint = "SQLExecDirect")]
|
||||
unsafe public static extern short SQLExecDirect(IntPtr stmtHandle, string stmt, int length);
|
||||
[DllImport("db2cli.Dll", EntryPoint = "SQLDescribeCol")]
|
||||
unsafe public static extern short SQLDescribeCol(IntPtr stmtHandle, ushort colNum, [Out] StringBuilder colName, short colNameMaxLength, IntPtr colNameLength, ref IntPtr dataType, ref IntPtr colSizePtr, ref IntPtr scalePtr, ref IntPtr nullablePtr );
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLBindCol")]
|
||||
unsafe public static extern short SQLBindCol(IntPtr stmtHandle, ushort colNum, int dataType,[In][Out] IntPtr dataBufferPtr, int dataBufferLength, ref IntPtr StrLen_or_IndPtr);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLDriverConnect")]
|
||||
unsafe public static extern short SQLDriverConnect(IntPtr hdbc, int centered, [In] string inConnectStr, [In] int inStrLength, [Out] StringBuilder outConnectStr, [Out] int outStrCapacity, [Out] IntPtr outStrLengthReturned, [In] int completion);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLPrepare")]
|
||||
unsafe public static extern short SQLPrepare(IntPtr stmtHandle, string stmt, int length);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLDescribeParam")]
|
||||
unsafe public static extern short SQLDescribeParam(IntPtr stmtHandle, short paramNumber,ref IntPtr dataType, ref IntPtr paramSize, ref IntPtr decimalDigits, ref IntPtr nullable);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLNumParams")]
|
||||
unsafe public static extern short SQLNumParams(IntPtr stmtHandle, ref IntPtr numParams);
|
||||
[DllImport("db2cli.dll")]
|
||||
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
|
||||
short dataType, short valueType, short paramType, uint colSize, short decDigits,
|
||||
byte[] dataBufferPtr, int dataBufferLength, int StrLen_or_IndPtr);
|
||||
[DllImport("db2cli.dll", EntryPoint = "SQLBindParameter")]
|
||||
unsafe public static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
|
||||
short dataType, short valueType, short paramType, uint colSize, short decDigits,
|
||||
ref int dataBufferPtr, int dataBufferLength, int StrLen_or_IndPtr);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// DB2ClientTransaction. DB2 requires nothing specific to be done to open a transaction, so we set the
|
||||
/// isolation level, make sure AUTOCOMMIT is off. DB2 Also allows you to set transaction isolation
|
||||
/// at the statement level, but I haven't worked that in here yet.
|
||||
/// NOTE: AT THE MOMENT, SETTING OF THE ISOLATION LEVEL IS NOT WORKING
|
||||
/// </summary>
|
||||
unsafe public class DB2ClientTransaction : IDbTransaction
|
||||
{
|
||||
DB2ClientUtils util = new DB2ClientUtils();
|
||||
IsolationLevel IL = IsolationLevel.Unspecified;
|
||||
DB2ClientConnection db2Conn;
|
||||
public DB2ClientTransaction(DB2ClientConnection con, IsolationLevel isoL)
|
||||
{
|
||||
long db2IsoL = DB2ClientConstants.SQL_TXN_READ_COMMITTED;
|
||||
db2Conn = con;
|
||||
short sqlRet;
|
||||
|
||||
switch (isoL)
|
||||
{
|
||||
case System.Data.IsolationLevel.Chaos: //No DB2equivalent, default to SQL_TXN_READ_COMMITTED
|
||||
break;
|
||||
case System.Data.IsolationLevel.ReadCommitted: //SQL_TXN_READ_COMMITTED
|
||||
db2IsoL = DB2ClientConstants.SQL_TXN_READ_COMMITTED;
|
||||
break;
|
||||
case System.Data.IsolationLevel.ReadUncommitted: //SQL_TXN_READ_UNCOMMITTED
|
||||
db2IsoL = DB2ClientConstants.SQL_TXN_READ_UNCOMMITTED;
|
||||
break;
|
||||
case System.Data.IsolationLevel.RepeatableRead: //SQL_TXN_REPEATABLE_READ
|
||||
db2IsoL = DB2ClientConstants.SQL_TXN_REPEATABLE_READ;
|
||||
break;
|
||||
case System.Data.IsolationLevel.Serializable: //SQL_TXN_SERIALIZABLE_READ
|
||||
db2IsoL = DB2ClientConstants.SQL_TXN_SERIALIZABLE_READ;
|
||||
break;
|
||||
}
|
||||
|
||||
IL = isoL;
|
||||
IntPtr iso = new IntPtr(db2IsoL);
|
||||
IntPtr attr = new IntPtr(DB2ClientConstants.SQL_AUTOCOMMIT_OFF);
|
||||
sqlRet = DB2ClientPrototypes.SQLSetConnectAttr(db2Conn.DBHandle, DB2ClientConstants.SQL_AUTOCOMMIT, attr, 0);
|
||||
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting AUTOCOMMIT OFF in transaction CTOR.");
|
||||
// sqlRet = DB2ClientPrototypes.SQLSetConnectAttr(db2Conn.DBHandle, DB2ClientConstants.SQL_TXN_ISOLATION, iso, 0);
|
||||
// util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting TRANSCTION ISOLATION in transaction CTOR.");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DB2ClientConnection associated with this transaction
|
||||
/// </summary>
|
||||
public IDbConnection Connection
|
||||
{
|
||||
get
|
||||
{
|
||||
return db2Conn;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IsolationLevel property
|
||||
/// </summary>
|
||||
///
|
||||
public IsolationLevel IsolationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return IL;
|
||||
}
|
||||
}
|
||||
|
||||
public void Commit() {
|
||||
DB2ClientPrototypes.SQLEndTran(DB2ClientConstants.SQL_HANDLE_DBC, db2Conn.DBHandle, DB2ClientConstants.SQL_COMMIT);
|
||||
}
|
||||
public void Rollback()
|
||||
{
|
||||
DB2ClientPrototypes.SQLEndTran(DB2ClientConstants.SQL_HANDLE_DBC, db2Conn.DBHandle, DB2ClientConstants.SQL_ROLLBACK);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose method.
|
||||
/// </summary>
|
||||
private bool Done = false;
|
||||
public void Dispose()
|
||||
{
|
||||
if (Done)
|
||||
return;
|
||||
Rollback();
|
||||
IL = IsolationLevel.Unspecified;
|
||||
db2Conn = null;
|
||||
Done = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
#region Licence
|
||||
/// DB2DriverCS - A DB2 driver for .Net
|
||||
/// Copyright 2003 By Christopher Bockner
|
||||
/// Released under the terms of the MIT/X11 Licence
|
||||
/// Please refer to the Licence.txt file that should be distributed with this package
|
||||
/// This software requires that DB2 client software be installed correctly on the machine
|
||||
/// (or instance) on which the driver is running.
|
||||
#endregion
|
||||
using System;
|
||||
|
||||
namespace DB2ClientCS
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility functions class, i.e. functions like SQL return code error checking
|
||||
/// </summary>
|
||||
public class DB2ClientUtils
|
||||
{
|
||||
public DB2ClientUtils()
|
||||
{
|
||||
//
|
||||
// TODO: Add constructor logic here
|
||||
//
|
||||
}
|
||||
#region DB2CheckReturn
|
||||
/// <summary>
|
||||
/// Check the return value from a Call Level Interface call and respond to errors (by tossing exception)
|
||||
/// </summary>
|
||||
/// <param name="sqlRet"><The return value>
|
||||
/// <param name="handleType"><Type of handle, 0 means we don't care, so don't try to check the handle for any messages placed there by DB2>
|
||||
/// <param name="handle"><The handle in question, don't care if handletype is 0>
|
||||
/// <param name="message"><Message we may throw>
|
||||
/// <returns></returns>
|
||||
public int DB2CheckReturn(short sqlRet, short handleType, IntPtr handle, string message)
|
||||
{
|
||||
switch ((long)sqlRet)
|
||||
{
|
||||
case DB2ClientConstants.SQL_ERROR:
|
||||
if (handleType != 0)
|
||||
throw new DB2ClientException(handleType, handle, message);
|
||||
else
|
||||
throw new DB2ClientException(message);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
Loaded 100 of 1240 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user